transactionDetail.vue 707 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <view class="content">
  3. <web-view :src="url+type" @onPostMessage ref="webH5"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. var wv
  8. export default {
  9. data() {
  10. return {
  11. url: '/hybrid/html/local.html?type=',
  12. type: ''
  13. };
  14. },
  15. onLoad(res) {
  16. this.type = res.type
  17. // #ifdef APP-PLUS
  18. var currentWebview = this.$scope.$getAppWebview() //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效
  19. wv = currentWebview.children()[0];
  20. console.log(wv);
  21. // #endif
  22. },
  23. onShow() {},
  24. methods: {}
  25. };
  26. </script>
  27. <style lang="scss">
  28. page,
  29. .content {
  30. min-height: 100%;
  31. height: auto;
  32. }
  33. </style>