marketing.vue 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <view class="marketing-page">
  3. <view class="item" v-for="(item, idx) in marketings" :key="item.id" @click="handItem(item)">
  4. <image class="cover" :src="item.icon" />
  5. <view class="name">{{ item.name }}</view>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data () {
  12. return {
  13. marketings: [
  14. {
  15. id: 1,
  16. name: '特价菜',
  17. icon: require('../../static/imgs/mine/tjc.png'),
  18. path: '/pages/activity/special-item'
  19. },
  20. {
  21. id: 2,
  22. name: '店铺满减',
  23. icon: require('../../static/imgs/mine/dpmj.png'),
  24. path: '/pages/activity/full-discounts'
  25. },
  26. // {
  27. // id: 3,
  28. // name: '广告位',
  29. // icon: require('../../static/imgs/mine/ggw.png'),
  30. // path: '/pages/activity/advertising'
  31. // },
  32. {
  33. id: 4,
  34. name: '霸王餐',
  35. icon: require('../../static/imgs/mine/bwc.png'),
  36. path: '/pages/activity/overlord-meal'
  37. },
  38. {
  39. id: 5,
  40. name: '新客立减设置',
  41. icon: require('../../static/imgs/mine/new.png'),
  42. path: '/pages/activity/new-customer'
  43. },
  44. {
  45. id: 6,
  46. name: '免配送费设置',
  47. icon: require('../../static/imgs/mine/free.png'),
  48. path: '/pages/activity/free-delivery'
  49. },
  50. {
  51. id: 7,
  52. name: '优惠券设置',
  53. icon: require('../../static/imgs/mine/coupon.png'),
  54. path: '/pages/activity/coupon-item'
  55. }
  56. ]
  57. }
  58. },
  59. methods: {
  60. handItem (item) {
  61. const list = ['special-item', 'coupon', 'advertising', 'overlord-meal', 'new-customer']
  62. uni.navigateTo({
  63. url: item.path
  64. });
  65. }
  66. },
  67. onLoad () {}
  68. }
  69. </script>
  70. <style lang="scss" scoped>
  71. .marketing-page {
  72. display: flex;
  73. flex-wrap: wrap;
  74. align-items: flex-start;
  75. justify-content: flex-start;
  76. border-top: 2rpx solid #ECECEC;
  77. }
  78. .item {
  79. width: 250rpx;
  80. height: 250rpx;
  81. display: flex;
  82. flex-direction: column;
  83. align-items: center;
  84. justify-content: center;
  85. border-right: 2rpx solid #ECECEC;
  86. border-bottom: 2rpx solid #ECECEC;
  87. box-sizing: border-box;
  88. .cover {
  89. width: 72rpx;
  90. height: 72rpx;
  91. margin-bottom: 10rpx;
  92. }
  93. }
  94. </style>