index_nav.vue 3.5 KB

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