index_nav.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. },
  24. {
  25. name: '平台活动',
  26. url: '/static/index/activity.png'
  27. },
  28. {
  29. name: '优惠券',
  30. url: '/static/index/coupon.png'
  31. },
  32. {
  33. name: '退款管理',
  34. url: '/static/index/refund.png'
  35. },
  36. {
  37. name: '审核查询',
  38. url: '/static/index/audit.png'
  39. },
  40. {
  41. name: '商品管理',
  42. url: '/static/index/product.png'
  43. },
  44. {
  45. name: '提现管理',
  46. url: '/static/index/withdraw.png'
  47. },
  48. {
  49. name: '秒杀活动',
  50. url: '/static/index/seckill.png'
  51. },
  52. {
  53. name: '客户评价',
  54. url: '/static/index/evaluate.png'
  55. },
  56. {
  57. name: '全部服务',
  58. url: '/static/index/all.png'
  59. },
  60. ]
  61. }
  62. },
  63. methods: {
  64. jump(item) {
  65. if (item.name == '客户评价') {
  66. uni.navigateTo({
  67. url: '/pages/evaluate/evaluate'
  68. })
  69. } else if (item.name == '商品管理') {
  70. uni.navigateTo({
  71. url: '/pages/product/index'
  72. })
  73. } else if (item.name == '全部服务') {
  74. uni.navigateTo({
  75. url: '/pages/index/full'
  76. })
  77. }
  78. }
  79. }
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. .item {
  84. width: 100%;
  85. display: flex;
  86. flex-wrap: wrap;
  87. justify-content: space-between;
  88. }
  89. .card {
  90. width: 20%;
  91. height: 96rpx;
  92. display: flex;
  93. flex-direction: column;
  94. flex-wrap: wrap;
  95. justify-content: center;
  96. align-items: center;
  97. font-size: 24rpx;
  98. image {
  99. width: 56rpx;
  100. height: 56rpx;
  101. margin-bottom: 4rpx;
  102. }
  103. }
  104. .card:nth-child(-n+5){
  105. margin-bottom: 40rpx;
  106. }
  107. /deep/.uni-swiper-wrapper {
  108. -webkit-transform: translate3d(0px, 0, 0);
  109. -moz-transform: translate3d(0px, 0, 0);
  110. -o-transform: translate(0px, 0px);
  111. -ms-transform: translate3d(0px, 0, 0);
  112. transform: translate3d(0px, 0, 0);
  113. }
  114. </style>