<template>
  <web-view v-if="src" :src="src"></web-view>
</template>

<script>
import utils from "@/utils/utils";
import { TOKEN_KEY } from "@/constants/storage-keys";
import config from "@/config/index";

const { BASE_LIVE_URL } = config;

export default {
  data() {
    return {
      src: "",
    };
  },
  onLoad(options) {
    const token = utils.getStorage(TOKEN_KEY) || "";

    options.__token__ = token;

    const data = this.$util.objToParam(options);

    this.src = BASE_LIVE_URL + "/wap/live/index?" + data;
    console.log(this.src);
    
  },
  // onShow(){
  //   let timestamp = new Date().getTime();
  //   let src=this.src+`&flag=${timestamp}`
  //   this.src=src
  // },
  methods: {},
};
</script>

<style scoped></style>
