index.vue 768 B

123456789101112131415161718192021222324252627282930313233343536
  1. <template>
  2. <view>
  3. <web-view :webview-styles="webviewStyles" :src="path"></web-view>
  4. </view>
  5. </template>
  6. <script>
  7. import Vue from 'vue'
  8. export default {
  9. data() {
  10. return {
  11. webviewStyles: {
  12. progress: {
  13. color: '#FF3333'
  14. }
  15. },
  16. path: '/traceability',
  17. }
  18. },
  19. onLoad({id}) {
  20. console.log(id)
  21. this.path = `${Vue.prototype.webviewUrl}/traceability?id=${id}`
  22. },
  23. computed: {
  24. webviewUrl() {
  25. console.log('webviewUrl', Vue.prototype.webviewUrl)
  26. // http://aiot.zoomwin.com.cn:51007/traceability?id=1970310344451657730
  27. return Vue.prototype.webviewUrl + '/traceability'
  28. }
  29. },
  30. }
  31. </script>
  32. <style>
  33. </style>