<template>
  <view v-if="params.url">
    <web-view :webview-styles="webviewStyles" :src="`${params.url}`"></web-view>
  </view>
</template>

<script>
import { getToken } from '@/utils/auth'
  export default {
    data() {
      return {
        params: {},
		url:'',
        webviewStyles: {
          progress: {
            color: "#FF3333"
          }
        }
      }
    },
    props: {
      src: {
        type: [String],
        default: null
      }
    },
    onLoad(event) {
		var token=getToken();
      this.params = event
	  var url=event.url+'?token='+token;
	  console.log(url,1)
	  this.url=url;
      if (event.title) {
        uni.setNavigationBarTitle({
          title: event.title
        })
      }
    }
  }
</script>
