<template>
  <div>
    <web-view :src="src"></web-view>
  </div>
</template>

<script>
import utils from "@/utils/index";
export default {
  data() {
    return {
      query: {},
      src: "https://nbjk-mock.zzxcx.net/#/exam/begin",
      params:""
    };
  },
  methods: {
    name() {},
  },
  onLoad(query) {
    this.query = query;
    this.params = query.params
    console.log(this.params)
    //src=https://mn.zzxcx.net/#/exam/begin&params={"username":"微信用户","subject":4,"headimg":"https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"}
    this.src = this.src+'?'+utils.mapToUrlQuery({
      username:"微信用户",
      gs:query.gs,
      subject:query.subject,
      headimg:"https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132"
    });
  },
};
</script>

<style lang="scss" scoped>
</style>