page.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. }
  42. // console.log(this.activityPath)
  43. // uni.setNavigationBarTitle({title:'多重精华,多重修复'});
  44. },
  45. methods:{
  46. navToDetailPage() {//跳转商品详情页
  47. this.$api.navigateTo(`/pages/goods/product?id=${this.productID}`)
  48. },
  49. }
  50. }
  51. </script>
  52. <style lang="scss">
  53. .activity{
  54. width: 100%;
  55. height: auto;
  56. image{
  57. width: 100%;
  58. height: auto;
  59. }
  60. }
  61. </style>