index_nav.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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"
  10. :style="{width:item.name=='广告管理'?'52rpx':'56rpx',height:item.name=='广告管理'?'52rpx':'56rpx',}">
  11. </image>
  12. {{item.name}}
  13. </view>
  14. <!-- 弹窗 -->
  15. <Modal ref="myModal" :title="modalText.title" :content="modalText.content" :showCancelButton="false" />
  16. </view>
  17. </template>
  18. <script>
  19. import Modal from '@/components/modal/index.vue';
  20. export default {
  21. name: 'indexNav',
  22. components: {
  23. Modal,
  24. },
  25. data() {
  26. return {
  27. dotStyle: true,
  28. swiperList: [{
  29. name: '店铺设置',
  30. url: '/static/index/shop.png',
  31. path: '/pages/store/settings'
  32. },
  33. {
  34. name: '团餐活动',
  35. url: '/static/index/groupMeal.png',
  36. path: '/pages/groupMeal/goods/list'
  37. },
  38. {
  39. name: '优惠券',
  40. url: '/static/index/coupon.png',
  41. path: '/pages/coupon/coupon'
  42. },
  43. {
  44. name: '退款管理',
  45. url: '/static/index/refund.png'
  46. },
  47. {
  48. name: '订单管理',
  49. url: '/static/index/indent.png'
  50. },
  51. // {
  52. // name: '审核查询',
  53. // url: '/static/index/audit.png',
  54. // path: '/pages/store/examine'
  55. // },
  56. {
  57. name: '商品管理',
  58. url: '/static/index/product.png',
  59. path: '/pages/product/index'
  60. },
  61. {
  62. name: '提现管理',
  63. url: '/static/index/withdraw.png'
  64. },
  65. {
  66. name: '广告管理',
  67. url: '/static/index/ad.png',
  68. path: '/pages/adManagement/adlist'
  69. },
  70. {
  71. name: '秒杀活动',
  72. url: '/static/index/seckill.png'
  73. },
  74. {
  75. name: '客户评价',
  76. url: '/static/index/evaluate.png',
  77. path: '/pages/evaluate/evaluate'
  78. },
  79. {
  80. name: '全部服务',
  81. url: '/static/index/all.png',
  82. path: '/pages/index/full'
  83. },
  84. ],
  85. // 弹窗
  86. modalText: {
  87. title: '提示',
  88. btntext: '好的',
  89. // 很抱歉,您没有通过平台审核,如有疑问请联系平台客服。
  90. content: '报名成功,请等待平台审核'
  91. },
  92. }
  93. },
  94. methods: {
  95. jump(item) {
  96. // 需要先报名
  97. if (item.name === '团餐活动') {
  98. this.$http.post('/groupmeal/gmMerchantApplicationRecord/isApply', {}).then(res => {
  99. if (!res.data.result) {
  100. uni.navigateTo({
  101. url: '/pages/groupMeal/goods/index'
  102. });
  103. } else {
  104. let status = res.data.result.status;
  105. if (status == 1) {
  106. uni.navigateTo({
  107. url: item.path
  108. });
  109. } else {
  110. this.modalText.content = status == 2 ? '很抱歉,您没有通过平台审核,如有疑问请联系平台客服。' :
  111. '团餐活动报名审核中,请耐心等待';
  112. this.$refs.myModal.onOpen();
  113. }
  114. }
  115. });
  116. return;
  117. }
  118. if (!item.path) return;
  119. uni.navigateTo({
  120. url: item.path
  121. });
  122. }
  123. }
  124. }
  125. </script>
  126. <style scoped lang="scss">
  127. .item {
  128. width: 100%;
  129. display: flex;
  130. flex-wrap: wrap;
  131. justify-content: space-between;
  132. }
  133. .card {
  134. width: 20%;
  135. display: flex;
  136. flex-direction: column;
  137. flex-wrap: wrap;
  138. justify-content: space-between;
  139. align-items: center;
  140. font-size: 24rpx;
  141. image {
  142. width: 56rpx;
  143. height: 56rpx;
  144. margin-bottom: 4rpx;
  145. }
  146. }
  147. .card:nth-child(-n+5) {
  148. margin-bottom: 40rpx;
  149. }
  150. ::v-deep .uni-swiper-wrapper {
  151. -webkit-transform: translate3d(0px, 0, 0);
  152. -moz-transform: translate3d(0px, 0, 0);
  153. -o-transform: translate(0px, 0px);
  154. -ms-transform: translate3d(0px, 0, 0);
  155. transform: translate3d(0px, 0, 0);
  156. }
  157. </style>