web.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!-- web页面 -->
  2. <template>
  3. <view>
  4. <web-view :src="url"></web-view>
  5. </view>
  6. </template>
  7. <script>
  8. import commonData from '../../commonData.js'
  9. import commonFun from '../../commonFun.js'
  10. export default {
  11. data() {
  12. return {
  13. data: [{
  14. title: '0',
  15. },
  16. {
  17. title: '1',
  18. },
  19. {
  20. title: '2',
  21. },
  22. {
  23. title: '关于平台',
  24. },
  25. {
  26. title: '4',
  27. },
  28. {
  29. title: '5',
  30. },
  31. {
  32. title: '用户协议',
  33. },
  34. {
  35. title: '隐私政策',
  36. },
  37. {
  38. index: 8,
  39. title: '小优保障',
  40. tapid: 4,
  41. },
  42. {
  43. index: 9,
  44. title: '小优保险',
  45. tapid: 5,
  46. },
  47. {
  48. index: 10,
  49. title: '会员指南',
  50. tapid: 9,
  51. },
  52. {
  53. index: 11,
  54. title: '商家指南',
  55. tapid: 10,
  56. },
  57. {
  58. index: 12,
  59. title: '快来优',
  60. },
  61. {
  62. index: 13,
  63. title: '公告声明',
  64. },
  65. ],
  66. url: '',
  67. id: '',
  68. }
  69. },
  70. onLoad(e) {
  71. let index = Number(e.index)
  72. // console.log(index)
  73. uni.setNavigationBarTitle({
  74. title: this.data[index]['title']
  75. })
  76. if (index == 12) { //轮播跳转
  77. this.url = commonFun.webviewServerUrlReq + '#/slide?id=' + (e.id)
  78. } else if (index == 13) {
  79. this.url = commonFun.webviewServerUrlReq + '#/about?id=11'
  80. } else if (index > 7) {
  81. this.url = commonFun.webviewServerUrlReq + '#/images?id=' + (this.data[index]['tapid'])
  82. } else {
  83. this.url = commonFun.webviewServerUrlReq + '#/about?id=' + (index)
  84. }
  85. console.log(this.url)
  86. }
  87. }
  88. </script>
  89. <style>
  90. </style>