tool.vue 5.0 KB

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