ApplyAudit.vue 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <template>
  2. <view class="apply-term">
  3. <image :src="distributionSet.image || default_img" mode="aspectFill" class="apply-img"></image>
  4. <!-- 成为分销商审核中 -->
  5. <view class="apply-cont" v-if="auditStatus === 1 && applicationCondition === 1">
  6. <view class="apply-tip">
  7. <view class="audit-img"><image src="https://onlineimg.qianniao.vip/audit_img.jpg" mode="aspectFit"></image></view>
  8. <view class="tip-text" v-if="applicationCondition === 4">您已购买指定商品,满足申请条件,请等待审核</view>
  9. <view class="tip-text" v-else>感谢您的支持,请等待审核</view>
  10. </view>
  11. <view @click="goPage('/pages/index/index', 'switchTab')" class="sub-btn">去商城逛逛</view>
  12. </view>
  13. <!-- 申请成为分销商条件为累计消费次数或者累计消费金额 -->
  14. <view class="apply-cont" v-if="auditStatus === 1 && [2, 3].includes(applicationCondition)">
  15. <view class="apply-num-cont">
  16. <view>您已累计消费</view>
  17. <view class="num-weight" v-if="applicationCondition === 2">
  18. <text class="_number">{{ businessmanInfo.statistics ? businessmanInfo.statistics.auditOrderTotal || 0 : 0 }}</text>
  19. <text>次</text>
  20. </view>
  21. <view class="num-weight" v-if="applicationCondition === 3">
  22. <text class="_number">{{ businessmanInfo.statistics ? businessmanInfo.statistics.auditTotalMoney || 0 : 0 }}</text>
  23. <text>元</text>
  24. </view>
  25. </view>
  26. <view class="apply-tip-view" v-if="applicationCondition === 2">
  27. <block v-if="distributionSet.buyNum > businessmanInfo.statistics.auditOrderTotal">
  28. 本店累计消费满
  29. <text class="_importent">{{ distributionSet.buyNum }}</text>
  30. 次,
  31. <text v-if="distributionSet.audit === 4">通过审核后</text>
  32. 即可{{ text_set.distributor || '成为分销商' }}
  33. </block>
  34. <block v-else>您的累计消费次数满足申请条件,请等待审核</block>
  35. </view>
  36. <view class="apply-tip-view" v-if="applicationCondition === 3">
  37. <block v-if="distributionSet.buyAmount > businessmanInfo.statistics.auditTotalMoney">
  38. 本店累计消费满
  39. <text class="_importent">{{ distributionSet.buyAmount }}</text>
  40. 元,
  41. <text v-if="distributionSet.audit === 4">通过审核后</text>
  42. 即可{{ text_set.distributor || '成为分销商' }}
  43. </block>
  44. <block v-else>您的累计消费金额满足申请条件,请等待审核</block>
  45. </view>
  46. <view @click="goPage('/pages/index/index', 'switchTab')" class="sub-btn">继续去购物</view>
  47. </view>
  48. <!-- 申请成为分销商条件为购买商品 -->
  49. <view class="apply-cont" v-if="applicationCondition === 4">
  50. <scroll-view scroll-y="true" style="height: calc(100vh - 360rpx);">
  51. <view>
  52. <block v-for="(item, index) in goodsList" :key="index">
  53. <view class="goods-item-box clearfix">
  54. <!-- 左边 -->
  55. <view class="imgStyle float_left" @click="goPage(`/pagesT/product/product?id=${item.goodsId}`)">
  56. <image mode="aspectFit" :src="item.images[0]"></image>
  57. </view>
  58. <!-- 右边 -->
  59. <view class="right float_left">
  60. <p class="title" @click="goPage(`/pagesT/product/product?id=${item.goodsId}`)">{{ item.goodsName }}</p>
  61. <p class="subTitle" @click="goPage(`/pagesT/product/product?id=${item.goodsId}`)">
  62. <text class="gradeName">{{ item.gradeName }}</text>
  63. {{ item.unitName }}
  64. <text v-for="(itemS, indexS) in item.specGroup" :key="indexS">_{{ itemS.specValueName }}</text>
  65. </p>
  66. <view class="clearfix" style="position:relative">
  67. <view class="price float_left" v-if="!isShow" @click="goPage(`/pagesT/product/product?id=${item.goodsId}`)">
  68. <text class="icon-rmb">¥</text>
  69. <text>{{ item.salePrice }}</text>
  70. </view>
  71. <view class="float_right" v-if="item.inventory - 0 > 0">
  72. <text class="add-cart-btn ibonfont ibongouwuche " @click="addCard(item.goodsId, item.skuId)"></text>
  73. </view>
  74. </view>
  75. </view>
  76. <text v-if="!(item.inventory - 0) || item.inventory - 0 <= 0" class="ibonfont ibonyishouwan-copy sale-end-icon"></text>
  77. </view>
  78. </block>
  79. </view>
  80. </scroll-view>
  81. </view>
  82. <AddCardModel :selAddress="now_sel_address" :skuId="goods_sku_id" @close="is_add_show = false" @change="cardModelPopChange" :isShow="is_add_show" :goodsId="goods_id" />
  83. </view>
  84. </template>
  85. <script>
  86. import AddCardModel from '@/components/AddCardModel';
  87. export default {
  88. components: {
  89. AddCardModel,
  90. },
  91. data() {
  92. return {
  93. default_img: 'https://onlineimg.qianniao.vip/931544405107da76ca2ec31cd63fae49/1596008994491apply_banner.png',
  94. is_add_show: false,
  95. isLoding: false,
  96. goods_id: 0,
  97. goods_sku_id: 0,
  98. now_sel_address: {},
  99. goodsList: [],
  100. distributionSet: {
  101. image: '',
  102. info: [],
  103. businessmanCondition: 0
  104. },
  105. auditStatus: 0, // 审核状态
  106. applicationCondition: 0, // 申请成为分销商条件
  107. text_set: {},
  108. businessmanInfo: {
  109. statistics:{}
  110. }
  111. };
  112. },
  113. onLoad(options) {
  114. this.distributionSet = this.$store.state.distributionSet;
  115. this.auditStatus = parseInt(options.auditStatus);
  116. this.applicationCondition = parseInt(options.applicationCondition);
  117. this.text_set = this.$store.state.distributionTextSet;
  118. this.getInfoBusinessman()
  119. // 申请成为分销商条件为购买商品
  120. if (this.applicationCondition === 4) {
  121. this.getBuyGoods();
  122. }
  123. },
  124. methods: {
  125. // 获取分销商详情
  126. getInfoBusinessman() {
  127. this.$u.api.getInfoBusinessman().then(res=>{
  128. this.businessmanInfo = res.data;
  129. });
  130. },
  131. // 查询升级商品
  132. getBuyGoods() {
  133. this.$u.api.getBuyGoods().then(res=>{
  134. this.goodsList = data;
  135. });
  136. },
  137. cardModelPopChange(obj) {
  138. if (!obj.show) {
  139. this.is_add_show = false;
  140. }
  141. },
  142. addCard(id, skuId) {
  143. this.goods_id = id;
  144. this.goods_sku_id = skuId;
  145. this.is_add_show = true;
  146. },
  147. }
  148. };
  149. </script>
  150. <style lang="scss">
  151. .apply-img {
  152. width: 100%;
  153. height: 322upx;
  154. display: block;
  155. }
  156. .apply-cont {
  157. padding: 20upx 30upx;
  158. .apply-agree {
  159. font-size: 24upx;
  160. color: #999;
  161. padding: 20upx 0;
  162. }
  163. .apply-tip-view {
  164. text-align: center;
  165. ._importent {
  166. color: #ff5a5f;
  167. }
  168. }
  169. .apply-tip {
  170. border-radius: 8upx;
  171. width: 650upx;
  172. margin: 26upx auto 46upx;
  173. box-shadow: 0 0 20upx 4upx #f5f5f5;
  174. padding: 50upx 0;
  175. .audit-img {
  176. image {
  177. display: block;
  178. width: 200upx;
  179. height: 200upx;
  180. margin: 0 auto;
  181. }
  182. }
  183. .tip-text {
  184. padding: 0 24upx;
  185. text-align: center;
  186. opacity: 0.9;
  187. line-height: 60upx;
  188. }
  189. }
  190. .sub-btn {
  191. font-size: 30upx;
  192. text-align: center;
  193. color: #ffffff;
  194. width: 645upx;
  195. height: 72upx;
  196. background-color: #fe582e;
  197. border-radius: 40px;
  198. line-height: 72upx;
  199. margin: 50upx auto 0;
  200. }
  201. }
  202. .apply-num-cont {
  203. width: 650upx;
  204. margin: 46upx auto;
  205. font-size: 24upx;
  206. color: #898c98;
  207. text-align: center;
  208. box-shadow: 0 0 20upx 4upx #f5f5f5;
  209. padding: 64upx 0;
  210. .num-weight {
  211. padding-top: 40upx;
  212. font-weight: bold;
  213. color: #3d404c;
  214. ._number {
  215. margin-right: 10upx;
  216. font-size: 66upx;
  217. }
  218. }
  219. }
  220. .goods-item-box {
  221. border-bottom: 1upx solid #eee;
  222. padding: 18upx 0;
  223. position: relative;
  224. .sale-end-icon {
  225. font-size: 90upx;
  226. color: $uni-color-error;
  227. display: block;
  228. position: absolute;
  229. right: 60upx;
  230. top: 80upx;
  231. }
  232. .right {
  233. width: calc(100% - 188upx);
  234. }
  235. .title {
  236. font-size: 28upx;
  237. color: #303133;
  238. width: 100%;
  239. height: 76upx;
  240. line-height: 36upx;
  241. text-overflow: -o-ellipsis-lastline;
  242. overflow: hidden;
  243. text-overflow: ellipsis;
  244. display: -webkit-box;
  245. -webkit-line-clamp: 2;
  246. line-clamp: 2;
  247. -webkit-box-orient: vertical;
  248. }
  249. .subTitle {
  250. font-size: 24upx;
  251. color: #666;
  252. white-space: nowrap;
  253. width: 100%;
  254. overflow: hidden;
  255. /* 默认溢出隐藏 */
  256. text-overflow: ellipsis;
  257. padding: 6upx 0;
  258. height: 48upx;
  259. line-height: 42upx;
  260. .gradeName {
  261. padding: 0 10upx;
  262. line-height: 32upx;
  263. color: #fe582e;
  264. border: 1upx solid #fe582e;
  265. border-radius: 20upx;
  266. display: inline-block;
  267. vertical-align: middle;
  268. height: 32upx;
  269. margin-right: 10upx;
  270. }
  271. }
  272. .price {
  273. display: inline-block;
  274. font-size: 28upx;
  275. color: #fe582e;
  276. font-weight: 500;
  277. }
  278. .price .icon-rmb {
  279. font-size: 22upx;
  280. }
  281. .imgStyle {
  282. padding-right: 24upx;
  283. }
  284. .imgStyle image {
  285. width: 160upx;
  286. height: 160upx;
  287. border: 1px solid #eee;
  288. border-radius: 4upx;
  289. display: block;
  290. }
  291. /* 选规格 */
  292. .add-cart-btn {
  293. position: absolute;
  294. right: 0;
  295. bottom: 45%;
  296. transform: translateY(50%);
  297. background-color: #fe582e;
  298. color: #fff;
  299. display: block;
  300. width: 50upx;
  301. height: 50upx;
  302. border-radius: 100%;
  303. font-size: 24upx;
  304. text-align: center;
  305. line-height: 50upx;
  306. }
  307. }
  308. </style>