common.vue 435 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <view class="container">
  3. <!-- 使用uni-app的web-view组件展示网页 -->
  4. <web-view :src="url"></web-view>
  5. </view>
  6. </template>
  7. <script >
  8. export default {
  9. data() {
  10. return {
  11. url:""
  12. }
  13. },
  14. onLoad(opt) {
  15. console.log(opt.url)
  16. this.url = decodeURIComponent(opt.url)
  17. },
  18. methods: {}
  19. }
  20. </script>
  21. <style scoped lang="scss">
  22. .container {
  23. width: 100%;
  24. height: 100vh;
  25. }
  26. </style>