index.vue 960 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view>
  3. <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="工单列表" background-color="#157A2C" color="#fff"
  4. @clickLeft="back"></uni-nav-bar>
  5. <view>
  6. <web-view :webview-styles="webviewStyles" :src="path"></web-view>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. import Vue from 'vue'
  12. export default {
  13. data() {
  14. return {
  15. webviewStyles: {
  16. progress: {
  17. color: '#FF3333'
  18. }
  19. },
  20. path: '/traceability',
  21. }
  22. },
  23. onLoad({id}) {
  24. console.log(id)
  25. this.path = `${Vue.prototype.webviewUrl}/traceability?id=${id}`
  26. },
  27. computed: {
  28. webviewUrl() {
  29. console.log('webviewUrl', Vue.prototype.webviewUrl)
  30. // http://aiot.zoomwin.com.cn:51007/traceability?id=1970310344451657730
  31. return Vue.prototype.webviewUrl + '/traceability'
  32. }
  33. },
  34. }
  35. </script>
  36. <style>
  37. </style>