page.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 '7':
  24. this.activityPath = 'https://www.caimei365.com/repair.html'
  25. break;
  26. case '99':
  27. this.activityPath = 'https://www.caimei365.com/help/1000.html'
  28. break;
  29. case '101':
  30. this.activityPath = 'https://www.caimei365.com/repair/form.html'
  31. break;
  32. }
  33. // console.log(this.activityPath)
  34. // uni.setNavigationBarTitle({title:'多重精华,多重修复'});
  35. },
  36. methods:{
  37. navToDetailPage() {//跳转商品详情页
  38. this.$api.navigateTo(`/pages/goods/product?id=${this.productID}`)
  39. },
  40. }
  41. }
  42. </script>
  43. <style lang="scss">
  44. .activity{
  45. width: 100%;
  46. height: auto;
  47. image{
  48. width: 100%;
  49. height: auto;
  50. }
  51. }
  52. </style>