website.vue 525 B

123456789101112131415161718192021222324252627282930
  1. <template>
  2. <view class="app-page">
  3. <web-view :src="webUrl"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. data() {
  9. return {
  10. title: '',
  11. webUrl: ''
  12. };
  13. },
  14. onLoad(e) {
  15. const {title, url} = JSON.parse(e.data);
  16. this.webUrl = decodeURIComponent(url);
  17. console.log("webUrl" + this.webUrl)
  18. if (title) {
  19. this.fnSetPageTitle(title);
  20. }
  21. }
  22. };
  23. </script>
  24. <style scoped>
  25. .app-page {
  26. width: 100vw;
  27. }
  28. </style>