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

<script>
import {h5BaseUrl} from '../utils/config'
export default {
    data () {
        return {
            url:''
        }
    },
    onLoad(options){
        const queryObj={
            ChartInfoId:options.chartInfoId,
			chartSource: options.chartSource,
            chartCode:options.chartCode,
            source:'ybxcx_my_chart',
            classifyId:options.classifyId||'',
            token:this.$store.state.user.token||uni.getStorageSync("token"),
            timestamp:new Date().getTime(),//防止缓存
        }
        let queryObjStr=''
        for (const key in queryObj) {
            if(!queryObjStr){
                    queryObjStr=`${key}=${queryObj[key]}`
            }else{
                queryObjStr=`${queryObjStr}&${key}=${queryObj[key]}`
            }
        }
        console.log('拼接字符串：',queryObjStr);
        this.url=`${h5BaseUrl}/hzyb/chart/detail?${queryObjStr}#wechat_redirect`
    }
}
</script>

<style>

</style>