page.vue 1.5 KB

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