index.vue 556 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. onLoad(options) {
  24. uni.showLoading({
  25. title: '加载中',
  26. })
  27. console.log(options.src)
  28. this.src = options.src
  29. setTimeout(function() {
  30. uni.hideLoading()
  31. }, 5000);
  32. }
  33. };
  34. </script>
  35. <style lang="stylus">
  36. </style>