index.vue 776 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view>
  3. <web-view :webview-styles="webviewStyles" :src="webUrl"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. export default {
  8. // props: {
  9. // title: String,
  10. // url: String
  11. // },
  12. data() {
  13. return {
  14. webUrl: '',
  15. title,
  16. webviewStyles: {
  17. progress: {
  18. color: '#FF3333'
  19. }
  20. }
  21. }
  22. },
  23. onShareAppMessage(options) {
  24. console.log(options.webViewUrl)
  25. },
  26. onLoad(e) {
  27. this.webUrl = decodeURIComponent(e.url)
  28. this.title = e.title
  29. },
  30. mounted() {
  31. }
  32. }
  33. </script>
  34. <style lang="scss">
  35. page {
  36. background: #fff;
  37. }
  38. </style>