detail.vue 985 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. chartCode:options.chartCode,
  17. source:'ybxcx_my_chart',
  18. token:this.$store.state.user.token||uni.getStorageSync("token"),
  19. timestamp:new Date().getTime(),//防止缓存
  20. }
  21. let queryObjStr=''
  22. for (const key in queryObj) {
  23. if(!queryObjStr){
  24. queryObjStr=`${key}=${queryObj[key]}`
  25. }else{
  26. queryObjStr=`${queryObjStr}&${key}=${queryObj[key]}`
  27. }
  28. }
  29. console.log('拼接字符串:',queryObjStr);
  30. this.url=`${h5BaseUrl}/hzyb/chart/detail?${queryObjStr}#wechat_redirect`
  31. }
  32. }
  33. </script>
  34. <style>
  35. </style>