index.vue 594 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <web-view :src="src" bindload='pageLoad'></web-view>
  3. </template>
  4. <script>
  5. export default {
  6. name: 'h5Page',
  7. props: {
  8. src: {
  9. type: [String]
  10. }
  11. },
  12. methods: {
  13. pageLoad (){
  14. uni.hideLoading()
  15. }
  16. },
  17. onHide() {
  18. },
  19. onUnload() {
  20. },
  21. onShow() {
  22. },
  23. // 分享
  24. onShareAppMessage(e){},
  25. onLoad(options) {
  26. uni.showLoading({
  27. title: '加载中',
  28. })
  29. console.log(options.src)
  30. this.src = options.src
  31. setTimeout(function() {
  32. uni.hideLoading()
  33. }, 5000);
  34. }
  35. };
  36. </script>
  37. <style lang="stylus">
  38. </style>