page.vue 1.4 KB

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