tool.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <template>
  2. <view>
  3. <!-- 常用工具 -->
  4. <view class="interact-tools" style="margin-bottom: 15px">
  5. <view class="interact-title">常用工具</view>
  6. <div class="paddingBox">
  7. <view class="interact-container">
  8. <view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
  9. <image src="/static/mine/sign.png" mode=""></image>
  10. <view>每日签到</view>
  11. </view>
  12. <view class="interact-item" @click="navigateTo('/pages/mine/point/myPoint')">
  13. <image src="/static/mine/mypoint.png" mode=""></image>
  14. <view>我的积分</view>
  15. </view>
  16. <view class="interact-item" @click="navigateTo('/pages/cart/coupon/myCoupon')">
  17. <image src="/static/mine/mycoupon.png" mode=""></image>
  18. <view>优惠券</view>
  19. </view>
  20. <view class="interact-item" @click="navigateTo('/pages/mine/myCollect')">
  21. <image src="/static/mine/myfavorite.png" mode=""></image>
  22. <view>我的关注</view>
  23. </view>
  24. <view class="interact-item" @click="navigateTo('/pages/mine/myTracks')">
  25. <image src="/static/mine/myhistory.png" mode=""></image>
  26. <view>我的足迹</view>
  27. </view>
  28. <view class="interact-item" @click="navigateTo('/pages/order/evaluate/myEvaluate')">
  29. <image src="/static/mine/mycommit.png" mode=""></image>
  30. <view>我的评价</view>
  31. </view>
  32. <view class="interact-item" @click="navigateTo('/pages/order/complain/complainList')">
  33. <image src="/static/mine/shensu.png" mode=""></image>
  34. <view>我的投诉</view>
  35. </view>
  36. <view class="interact-item" @click="navigateTo('/pages/mine/set/feedBack')">
  37. <image src="/static/mine/feedback.png" mode=""></image>
  38. <view>意见反馈</view>
  39. </view>
  40. <view class="interact-item" @click="navigateTo('/pages/cart/coupon/couponCenter')">
  41. <image src="/static/mine/couponcenter.png" mode=""></image>
  42. <view>领券中心</view>
  43. </view>
  44. <view class="interact-item" @click="navigateTo('/pages/mine/address/addressManage')">
  45. <image src="/static/mine/myaddress.png" mode=""></image>
  46. <view>地址管理</view>
  47. </view>
  48. <view class="interact-item" @click="navigateTo('/pages/mine/set/setUp')">
  49. <image src="/static/mine/setting.png" mode=""></image>
  50. <view>设置</view>
  51. </view>
  52. <view class="interact-item" @click="distribution">
  53. <image src="/static/mine/distribution.png" mode=""></image>
  54. <view>我的分销</view>
  55. </view>
  56. </view>
  57. </div>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. import { distribution } from "@/api/goods";
  63. export default {
  64. methods: {
  65. navigateTo(url) {
  66. uni.navigateTo({
  67. url,
  68. });
  69. },
  70. distribution() {
  71. distribution().then((res) => {
  72. if (res.data.result) {
  73. let type = res.data.result.distributionStatus;
  74. if (type == "PASS") {
  75. uni.navigateTo({
  76. url: "/pages/mine/distribution/home",
  77. });
  78. } else if (type == "REFUSE") {
  79. uni.navigateTo({
  80. url: "/pages/mine/distribution/auth",
  81. });
  82. } else if (type == "RETREAT") {
  83. uni.showToast({
  84. title: "您的分销资格已被清退。请联系管理员!",
  85. duration: 2000,
  86. icon: "none",
  87. });
  88. } else {
  89. uni.showToast({
  90. title: "您的信息正在审核",
  91. duration: 2000,
  92. icon: "none",
  93. });
  94. }
  95. } else if (!res.data.success && res.data.code == 22000) {
  96. uni.showToast({
  97. title: "分销功能暂未开启",
  98. duration: 2000,
  99. icon: "none",
  100. });
  101. } else {
  102. // 没有资格申请 先去实名认证
  103. uni.navigateTo({
  104. url: "/pages/mine/distribution/auth",
  105. });
  106. }
  107. });
  108. },
  109. },
  110. };
  111. </script>
  112. <style lang="scss" scoped>
  113. .interact-tools {
  114. border-left: none;
  115. border-right: none;
  116. margin-top: 30rpx;
  117. .interact-title {
  118. background: #f2f2f2;
  119. height: 96rpx;
  120. line-height: 96rpx;
  121. font-size: 28rpx;
  122. color: #333;
  123. font-weight: bold;
  124. padding-left: 30rpx;
  125. margin: 0 20rpx;
  126. border-radius: 14rpx 14rpx 0 0;
  127. }
  128. .interactBox {
  129. height: 156rpx;
  130. }
  131. .interact-container {
  132. margin: 0 20rpx;
  133. background: #fff;
  134. border-radius: 0 0 14rpx 14rpx;
  135. .interact-item-img {
  136. width: 52rpx !important;
  137. height: 52rpx !important;
  138. // margin-bottom: !important;
  139. margin: 0 auto 6rpx auto !important;
  140. }
  141. image {
  142. width: 52rpx;
  143. height: 52rpx;
  144. margin-bottom: 6rpx;
  145. }
  146. display: flex;
  147. align-items: center;
  148. flex-wrap: wrap;
  149. text-align: center;
  150. .interact-item {
  151. font-size: $font-sm;
  152. width: 25%;
  153. height: 160rpx;
  154. padding: 30rpx;
  155. }
  156. }
  157. }
  158. </style>