detail.vue 944 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <web-view :src="url"></web-view>
  3. </template>
  4. <script>
  5. import {h5BaseUrl} from '../utils/config'
  6. export default {
  7. data () {
  8. return {
  9. url:''
  10. }
  11. },
  12. onLoad(options){
  13. const queryObj={
  14. ChartInfoId:options.chartInfoId,
  15. chartSource: options.chartSource,
  16. source:'ybxcx_my_chart',
  17. token:this.$store.state.user.token||uni.getStorageSync("token"),
  18. timestamp:new Date().getTime(),//防止缓存
  19. }
  20. let queryObjStr=''
  21. for (const key in queryObj) {
  22. if(!queryObjStr){
  23. queryObjStr=`${key}=${queryObj[key]}`
  24. }else{
  25. queryObjStr=`${queryObjStr}&${key}=${queryObj[key]}`
  26. }
  27. }
  28. console.log('拼接字符串:',queryObjStr);
  29. this.url=`${h5BaseUrl}/hzyb/chart/detail?${queryObjStr}#wechat_redirect`
  30. }
  31. }
  32. </script>
  33. <style>
  34. </style>