h5.vue 759 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <view>
  3. <web-view :src="href"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. href: ""
  11. };
  12. },
  13. onLoad(option) {
  14. if (option.url == 'jinjiaqu_pingce') {
  15. this.href = 'http://anstatic.nxmy.com:8011/assets/html/pingce/?mine_code=jinjiaqu&token=' + uni.getStorageSync('Authorization') + '#/'
  16. }if (option.url == 'https://xw.tianqi.qq.com/') {
  17. this.href = 'https://xw.tianqi.qq.com/'
  18. }else{
  19. this.href = option.url + "?token="+uni.getStorageSync('Authorization')
  20. console.log(this.href)
  21. }
  22. //#ifdef H5
  23. // if(this.href.indexOf('https://mp.weixin.qq.com') != -1){
  24. // window.location.href = this.href;
  25. // }
  26. //#endif
  27. }
  28. }
  29. </script>
  30. <style lang="scss">
  31. </style>