index_nav.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <!-- <swiper class="screen-swiper" :class="dotStyle?'square-dot':'round-dot'" :indicator-dots="true" :circular="true"
  3. :autoplay="false" interval="5000" duration="500">
  4. <swiper-item class="item">
  5. </swiper-item>
  6. </swiper> -->
  7. <view class="item">
  8. <view class="card" v-for="(item,index) in swiperList" :key="index" @click="jump(item)">
  9. <image :src="item.url" mode="aspectFill"></image>
  10. {{item.name}}
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. name: 'indexNav',
  17. data() {
  18. return {
  19. dotStyle: true,
  20. swiperList: [{
  21. name: '店铺设置',
  22. url: '/static/index/shop.png',
  23. path: '/pages/store/settings'
  24. },
  25. {
  26. name: '团餐活动',
  27. url: '/static/index/groupMeal.png',
  28. path: '/pages/groupMeal/goods/list'
  29. },
  30. {
  31. name: '优惠券',
  32. url: '/static/index/coupon.png',
  33. path: '/pages/coupon/coupon'
  34. },
  35. {
  36. name: '退款管理',
  37. url: '/static/index/refund.png'
  38. },
  39. {
  40. name: '订单管理',
  41. url: '/static/index/indent.png'
  42. },
  43. // {
  44. // name: '审核查询',
  45. // url: '/static/index/audit.png',
  46. // path: '/pages/store/examine'
  47. // },
  48. {
  49. name: '商品管理',
  50. url: '/static/index/product.png',
  51. path: '/pages/product/index'
  52. },
  53. {
  54. name: '提现管理',
  55. url: '/static/index/withdraw.png'
  56. },
  57. {
  58. name: '秒杀活动',
  59. url: '/static/index/seckill.png'
  60. },
  61. {
  62. name: '客户评价',
  63. url: '/static/index/evaluate.png',
  64. path: '/pages/evaluate/evaluate'
  65. },
  66. {
  67. name: '全部服务',
  68. url: '/static/index/all.png',
  69. path: '/pages/index/full'
  70. },
  71. ]
  72. }
  73. },
  74. methods: {
  75. jump(item) {
  76. if (!item.path) return;
  77. uni.navigateTo({
  78. url: item.path
  79. })
  80. }
  81. }
  82. }
  83. </script>
  84. <style scoped lang="scss">
  85. .item {
  86. width: 100%;
  87. display: flex;
  88. flex-wrap: wrap;
  89. justify-content: space-between;
  90. }
  91. .card {
  92. width: 20%;
  93. height: 96rpx;
  94. display: flex;
  95. flex-direction: column;
  96. flex-wrap: wrap;
  97. justify-content: center;
  98. align-items: center;
  99. font-size: 24rpx;
  100. image {
  101. width: 56rpx;
  102. height: 56rpx;
  103. margin-bottom: 4rpx;
  104. }
  105. }
  106. .card:nth-child(-n+5){
  107. margin-bottom: 40rpx;
  108. }
  109. ::v-deep .uni-swiper-wrapper {
  110. -webkit-transform: translate3d(0px, 0, 0);
  111. -moz-transform: translate3d(0px, 0, 0);
  112. -o-transform: translate(0px, 0px);
  113. -ms-transform: translate3d(0px, 0, 0);
  114. transform: translate3d(0px, 0, 0);
  115. }
  116. </style>