page.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <view class="activity">
  3. <!-- <image @click.stop="navToDetailPage" src="https://img.caimei365.com/group1/M00/03/9A/Cmis216Zf8GAb_UqABE6NiwUUZs004.jpg" mode="widthFix"></image> -->
  4. <web-view :webview-styles="webviewStyles" :src="activityPath"></web-view>
  5. </view>
  6. </template>
  7. <script>
  8. export default {
  9. data() {
  10. return {
  11. webviewStyles: {
  12. progress: {
  13. color: '#FF3333'
  14. }
  15. },
  16. productID:'',
  17. activityPath:'',
  18. }
  19. },
  20. onLoad(option) {
  21. // console.log(option)
  22. switch(option.linkType){
  23. case '3':
  24. this.activityPath = 'https://www.caimei365.com/info/center-2-1.html'
  25. break;
  26. case '5':
  27. this.activityPath = 'https://www.caimei365.com/topic.html?type=6'
  28. break;
  29. case '6':
  30. this.activityPath = 'https://www.caimei365.com/investment.html'
  31. break;
  32. case '7':
  33. this.activityPath = 'https://www.caimei365.com/repair.html'
  34. break;
  35. case '14':
  36. this.activityPath = 'https://www.caimei365.com/investment.html'
  37. break;
  38. case '99':
  39. this.activityPath = 'https://www.caimei365.com/help/1000.html'
  40. break;
  41. case '100':
  42. this.activityPath = 'https://www.caimei365.com/info/detail-5856-1.html'
  43. break;
  44. case '101':
  45. this.activityPath = 'https://www.caimei365.com/repair/form.html'
  46. break;
  47. }
  48. // console.log(this.activityPath)
  49. // uni.setNavigationBarTitle({title:'多重精华,多重修复'});
  50. },
  51. methods:{
  52. navToDetailPage() {//跳转商品详情页
  53. this.$api.navigateTo(`/pages/goods/product?id=${this.productID}`)
  54. },
  55. }
  56. }
  57. </script>
  58. <style lang="scss">
  59. .activity{
  60. width: 100%;
  61. height: auto;
  62. image{
  63. width: 100%;
  64. height: auto;
  65. }
  66. }
  67. </style>