h5.vue 425 B

12345678910111213141516171819202122232425262728
  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. this.href = option.url + "?token="+uni.getStorageSync('Authorization')
  15. //#ifdef H5
  16. if(this.href.indexOf('https://mp.weixin.qq.com') != -1){
  17. window.location.href = this.href;
  18. }
  19. //#endif
  20. }
  21. }
  22. </script>
  23. <style lang="scss">
  24. </style>