h5.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <template>
  2. <view>
  3. <web-view update-title :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. // #ifndef APP-NVUE
  15. const eventChannel = this.getOpenerEventChannel();
  16. // #endif
  17. // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
  18. eventChannel.on('acceptDataFromOpenerPage', (data) => {
  19. console.log(data)
  20. let url = escape(data.url)
  21. console.log(url)
  22. console.log(unescape(url))
  23. // this.href = "http://oa_system.nxjiewei.com:8011/oa_login?staff_num=" + uni.getStorageSync('user').staff_num + "&url=" + url
  24. this.href = "http://webdevelop.nxjiewei.com/assets/html/zhks-quankuang/ningdongyunying/download/oa_login/?staff_num=" + uni.getStorageSync('user').staff_num + "&url=" + url
  25. // this.href = "http://oa_system.nxjiewei.com:8011/?m=ying&d=we&mnum=carmrese&show=we&hideheader=true"
  26. })
  27. // this.href = "http://oa_system.nxjiewei.com:8011/oa_login?staff_num=" + uni.getStorageSync('user').staff_num + "&url=" + escape("http://oa_system.nxjiewei.com:8011/?m=ying&d=we&num=flow&hideheader=true")
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. </style>