Commit dd8f695c9a0f4a3d018b8653e20a8e9ba3bbc657

Authored by 前端开发-熊洪亮
2 parents 087597cb 014734b9

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

Showing 75 changed files with 1921 additions and 1174 deletions
... ... @@ -51,7 +51,7 @@ App({
51 51 config: null, //门店参数
52 52 config2: null, //门店配置
53 53 code: null,
54   - user_id:null,// qa-6519858,//
  54 + user_id:null,// 6520352,// qa-6519858,//
55 55 // user_id:6520314,// qa-6519858,//
56 56 // user_id:14148118,// qa-6519858,//
57 57 buy_now: null,
... ... @@ -928,7 +928,7 @@ App({
928 928 });
929 929 },
930 930  
931   - user_tools_endTime(type) {
  931 + user_tools_endTime(type,func) {
932 932 //调用接口判断商家工具有没有过期
933 933 return this.request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=" + type + "", {}).then(res => {
934 934 if (res.data.code == 0) {
... ... @@ -938,8 +938,18 @@ App({
938 938 if (item.is_sy == 0) {
939 939 var now = Date.parse(new Date()); now = now / 1000;
940 940 if (item.end_time < now) {
  941 +
  942 + if(func){
  943 + func(0)
  944 + return false;
  945 + }
941 946 return 0
942 947 }
  948 + if(func){
  949 + func(1)
  950 + return false;
  951 + }
  952 +
943 953 return 1;
944 954 }
945 955 }
... ...
app.json
... ... @@ -37,7 +37,7 @@
37 37 "pages/user/grow_value/grow_value",
38 38 "pages/payment/pay_success/pay_success",
39 39 "pages/user/plus/plus",
40   - "pages/user/cardinfo/cardinfo",
  40 +
41 41 "pages/user/my_service/appment_main",
42 42 "pages/user/my_service/i_service",
43 43 "pages/user/my_service/cosmetology_list",
... ... @@ -209,7 +209,8 @@
209 209 "pages": [
210 210 "pages/togoin/togoin",
211 211 "pages/user/Detailed/Detailed",
212   - "pages/user/user_fw/user_fw"
  212 + "pages/user/user_fw/user_fw",
  213 + "pages/user/cardinfo/cardinfo"
213 214 ]
214 215 }
215 216  
... ...
app.wxss
... ... @@ -380,7 +380,7 @@ button {
380 380 .modal-close {
381 381 position: absolute;
382 382 right: 25rpx;
383   - top:40rpx;
  383 + top:16rpx;
384 384 }
385 385 .no-data {
386 386 width: 100%;
... ...
components/cart_collect_temp/cart_collect_temp.js 0 → 100644
  1 +Component({
  2 + properties: {
  3 + // 这里定义了数据列表属性,列表显示数据
  4 + all_collocation_list: {
  5 + type: Array,
  6 + value: null
  7 + },
  8 + // 是不是购物车
  9 + is_cart: {
  10 + type: Boolean,
  11 + value: false
  12 + },
  13 + // 购物车的索引
  14 + cart_index: {
  15 + type: Number,
  16 + value: 0
  17 + }
  18 +
  19 + },
  20 + /*** 页面的初始数据***/
  21 + data: {
  22 + imgUrl: getApp().globalData.setting.imghost,
  23 + },
  24 + methods: {
  25 + select_coll(e) {
  26 + var index = e.currentTarget.dataset.index;
  27 + var itr = this.properties.all_collocation_list[index];
  28 + var ob = {
  29 + index: index,
  30 + selected: !itr.selected
  31 + }
  32 +
  33 + if(this.properties.is_cart){
  34 + ob.is_cart =1;
  35 + ob.cart_index =this.properties.cart_index;
  36 + }
  37 +
  38 + var txt = "all_collocation_list[" + index + "].selected"
  39 +
  40 + this.setData({[txt]: ob.selected})
  41 + this.triggerEvent('childFun', ob);
  42 + },
  43 +
  44 + //图片失败,默认图片
  45 + bind_bnerr3: function (e) {
  46 + var _errImg = e.target.dataset.errorimg;
  47 + var _Img = e.target.dataset.img;
  48 + if (_Img != undefined) {
  49 + var _errObj = {};
  50 + _errObj[_errImg] = "/public/images/default_goods_image_240.gif";
  51 + this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
  52 + }
  53 + },
  54 +
  55 +
  56 + }
  57 +})
0 58 \ No newline at end of file
... ...
components/cart_collect_temp/cart_collect_temp.json 0 → 100644
  1 +{
  2 + "component": true,
  3 + "usingComponents": {}
  4 +}
0 5 \ No newline at end of file
... ...
components/cart_collect_temp/cart_collect_temp.wxml 0 → 100644
  1 +<!-- 如果有搭配购商品的售 -->
  2 +<view class="seckill" wx:if="{{all_collocation_list && all_collocation_list.length != 0}}"
  3 + style="border-bottom: 20rpx solid #F0F0F0;border-top: 20rpx solid #F0F0F0;">
  4 + <view class="fs30 pd20">超值搭配</view>
  5 + <view class="">
  6 + <scroll-view scroll-x="true" class="s_proms" style="height:400rpx" indicator-active-color='red' bindchange="ptSwiperChange" indicator-dots>
  7 + <view class="flex" style="padding: 0; margin-left: 10rpx">
  8 + <navigator wx:for="{{all_collocation_list}}" style="flex-shrink: 0;width: 247rpx" class="nav" hover-class="none"
  9 + url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}" >
  10 + <view class="imgview" style="height:247rpx;width: 247rpx">
  11 + <image src="{{imgUrl+item.original_img}}" mode="aspectFill" lazy-load="true"
  12 + data-errorimg="all_collocation_list[{{index}}].original_img"
  13 + binderror="bind_bnerr3" data-img="{{item.original_img}}"></image>
  14 + </view>
  15 + <view class="ellipsis-2 fs30" style="height: 84rpx;">{{item.goods_name}}</view>
  16 + <view class="co-red flex jc_sb ai_c" style="margin-top:6rpx">
  17 + <view><text class="fs20">¥</text>{{item.price}}</view>
  18 + <view style="margin-right:10rpx" catchtap="select_coll" data-index="{{index}}" >
  19 + <icon color="{{item.selected?'red':'gray'}}" size="14" type="success"></icon>
  20 + </view>
  21 + </view>
  22 + </navigator>
  23 + </view>
  24 + </scroll-view>
  25 + </view>
  26 +</view>
... ...
components/cart_collect_temp/cart_collect_temp.wxss 0 → 100644
  1 +@import '../../app.wxss';
  2 +@import "../../pages/index/index/index.wxss";
  3 +
... ...
components/diy_advertising/diy_advertising.wxss
... ... @@ -66,6 +66,14 @@
66 66 margin: 0rpx;
67 67 }
68 68  
  69 +.s8_gk2 image {
  70 + width: 100%;
  71 + height: 488rpx;
  72 + vertical-align: top;
  73 + padding: 0rpx;
  74 + margin: 0rpx;
  75 +}
  76 +
69 77 .s7_gk7 image {
70 78 width: 100%;
71 79 height: 100%;
... ...
components/diy_goodsGroup/diy_goodsGroup.js
... ... @@ -56,6 +56,11 @@ Component({
56 56 title_class: "",
57 57 is_no_plus: 1,
58 58 container: null,
  59 +
  60 + //判断接口是不是调用完成
  61 + is_get:0,
  62 +
  63 + is_retail_price:0 //是否显示零售价
59 64 },
60 65  
61 66 lifetimes: {
... ... @@ -315,44 +320,10 @@ Component({
315 320 getApp().getConfig2(function (e) {
316 321 var swithc_list = e.switch_list;
317 322 var sw_arr = JSON.parse(swithc_list);
318   - //---如果后台又开等级卡的开关---
319   - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
320   - th.setData({
321   - rank_switch: true
322   - });
323   - //---回调卡的列表---
324   - th.getPlusCardType(function (ob) {
325   - th.setData({
326   - card_list: ob.card_list
327   - });
328   - var ti = setInterval(function () {
329   - var user = getApp().globalData.userInfo;
330   - if (!user) return false;
331   - clearInterval(ti);
332   -
333   - if (user.card_field && user['card_expiredate']) {
334   - var str = user['card_expiredate'].replace(/-/g, '/');
335   - var end = new Date(str);
336   - end = Date.parse(end) / 1000;
337   - var now = ut.gettimestamp();
338   -
339   - //--- 判断是等级会员,且在有效期范围内 ---
340   - if (user.card_field && now < end) {
341   - var card_name = ob.name_map.get(user.card_field);
342   - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 4);
343   - th.setData({
344   - card_field: user.card_field,
345   - card_name: card_name,
346   - card_list: ob.card_list
347   - });
348   - }
349   -
350   - }
351   -
352   - }, 500)
353   - })
354   -
  323 + if(sw_arr.is_retail_price){
  324 + th.setData({is_retail_price:1});
355 325 }
  326 + ut.get_plus_name_price(sw_arr,th);
356 327 })
357 328 }
358 329 })
... ... @@ -571,11 +542,12 @@ Component({
571 542 for (var i = 0; i < rData.length; i += 3) {
572 543 arr.push(rData.slice(i, i + 3));
573 544 }
574   - th.setData({ goods_array: arr, page: th.data.currentPage - 1, });
  545 + th.setData({ goods_array: arr, page: th.data.currentPage - 1,is_get:1 });
575 546 } else {
576 547 th.setData({
577 548 goods_array: th.data.requestData,
578 549 page: th.data.currentPage - 1,
  550 + is_get:1
579 551 });
580 552 }
581 553  
... ...
components/diy_goodsGroup/diy_goodsGroup.wxml
... ... @@ -25,7 +25,7 @@
25 25 </block>
26 26  
27 27  
28   -<view style="background-color: {{bg_color}};" wx:if="{{goods_array.length > 0 }}">
  28 +<view style="background-color: {{bg_color}};" wx:if="{{goods_array.length > 0 }}">
29 29 <!--1个列表的时候-->
30 30 <view class="zs_goods_wai" wx:if='{{object.column==1}}'>
31 31 <block wx:for="{{goods_array}}">
... ... @@ -67,7 +67,7 @@
67 67 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
68 68 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
69 69 </view>
70   -<!-- <view class='del'>¥{{item.market_price}}</view>-->
  70 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
71 71 </block>
72 72 <block wx:else>
73 73  
... ... @@ -89,10 +89,10 @@
89 89 </view>
90 90 <view class="flex" style="line-height: 28rpx;">
91 91 <!-- 原价 -->
92   -<!-- <view class="price flex xc-ash line_th">-->
93   -<!-- <view class="fs22">¥</view>-->
94   -<!--&lt;!&ndash; <view class="fs22">{{item.market_price}}</view>&ndash;&gt;-->
95   -<!-- </view>-->
  92 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  93 + <view class="fs22">¥</view>
  94 + <view class="fs22">{{item.market_price}}</view>
  95 + </view>
96 96 </view>
97 97 </block>
98 98 <blocK wx:else>
... ... @@ -105,10 +105,10 @@
105 105 </view>
106 106 <view class="flex" style="line-height: 28rpx;">
107 107 <!-- 原价 -->
108   -<!-- <view class="price flex xc-ash line_th">-->
109   -<!-- <view class="fs22">¥</view>-->
110   -<!--&lt;!&ndash; <view class="fs22">{{item.market_price}}</view>&ndash;&gt;-->
111   -<!-- </view>-->
  108 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  109 + <view class="fs22">¥</view>
  110 + <view class="fs22">{{item.market_price}}</view>
  111 + </view>
112 112 </view>
113 113 </blocK>
114 114 </block>
... ... @@ -122,10 +122,10 @@
122 122 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
123 123 </view>
124 124 <!-- 原价 -->
125   -<!-- <view class="price flex xc-ash line_th">-->
126   -<!-- <view class="fs22">¥</view>-->
127   -<!--&lt;!&ndash; <view class="fs22">{{item.market_price}}</view>&ndash;&gt;-->
128   -<!-- </view>-->
  125 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  126 + <view class="fs22">¥</view>
  127 + <view class="fs22">{{item.market_price}}</view>
  128 + </view>
129 129  
130 130 </view>
131 131 <view class="flex" style="line-height: 28rpx;">
... ... @@ -150,10 +150,10 @@
150 150 </view>
151 151 <view class="flex" style="line-height: 28rpx;">
152 152 <!-- 原价 -->
153   -<!-- <view class="price flex xc-ash line_th">-->
154   -<!-- <view class="fs22">¥</view>-->
155   -<!-- <view class="fs22">{{item.market_price}}</view>-->
156   -<!-- </view>-->
  153 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  154 + <view class="fs22">¥</view>
  155 + <view class="fs22">{{item.market_price}}</view>
  156 + </view>
157 157 </view>
158 158 </block>
159 159 </block>
... ... @@ -161,7 +161,7 @@
161 161  
162 162 <block wx:else>
163 163 <view class='wz_red'>¥{{item.shop_price}}</view>
164   -<!-- <view class='del'>¥{{item.market_price}}</view>-->
  164 + <view wx:if="{{is_retail_price}}"class='del'>¥{{item.market_price}}</view>
165 165 </block>
166 166  
167 167 </block>
... ... @@ -237,7 +237,7 @@
237 237 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
238 238 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
239 239 </view>
240   -<!-- <view class='del'>¥{{item.market_price}}</view>-->
  240 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
241 241 </block>
242 242 <block wx:else>
243 243 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
... ... @@ -258,10 +258,10 @@
258 258 </view>
259 259 <view class="flex" style="line-height: 28rpx;">
260 260 <!-- 原价 -->
261   -<!-- <view class="price flex xc-ash line_th">-->
262   -<!-- <view class="fs22">¥</view>-->
263   -<!-- <view class="fs22">{{item.market_price}}</view>-->
264   -<!-- </view>-->
  261 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  262 + <view class="fs22">¥</view>
  263 + <view class="fs22">{{item.market_price}}</view>
  264 + </view>
265 265 </view>
266 266 </block>
267 267 <blocK wx:else>
... ... @@ -274,10 +274,10 @@
274 274 </view>
275 275 <view class="flex" style="line-height: 28rpx;">
276 276 <!-- 原价 -->
277   -<!-- <view class="price flex xc-ash line_th">-->
278   -<!-- <view class="fs22">¥</view>-->
279   -<!-- <view class="fs22">{{item.market_price}}</view>-->
280   -<!-- </view>-->
  277 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  278 + <view class="fs22">¥</view>
  279 + <view class="fs22">{{item.market_price}}</view>
  280 + </view>
281 281 </view>
282 282 </blocK>
283 283 </block>
... ... @@ -291,10 +291,10 @@
291 291 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
292 292 </view>
293 293 <!-- 原价 -->
294   -<!-- <view class="price flex xc-ash line_th">-->
295   -<!-- <view class="fs22">¥</view>-->
296   -<!-- <view class="fs22">{{item.market_price}}</view>-->
297   -<!-- </view>-->
  294 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  295 + <view class="fs22">¥</view>
  296 + <view class="fs22">{{item.market_price}}</view>
  297 + </view>
298 298  
299 299 </view>
300 300 <view class="flex" style="line-height: 28rpx;">
... ... @@ -319,17 +319,17 @@
319 319 </view>
320 320 <view class="flex" style="line-height: 28rpx;">
321 321 <!-- 原价 -->
322   -<!-- <view class="price flex xc-ash line_th">-->
323   -<!-- <view class="fs22">¥</view>-->
324   -<!-- <view class="fs22">{{item.market_price}}</view>-->
325   -<!-- </view>-->
  322 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  323 + <view class="fs22">¥</view>
  324 + <view class="fs22">{{item.market_price}}</view>
  325 + </view>
326 326 </view>
327 327 </block>
328 328 </block>
329 329 </block>
330 330 <block wx:else>
331 331 <view class='wz_red'>¥{{item.shop_price}}</view>
332   -<!-- <view class='del'>¥{{item.market_price}}</view>-->
  332 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
333 333 </block>
334 334 </block>
335 335 </view>
... ... @@ -406,7 +406,7 @@
406 406 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
407 407 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
408 408 </view>
409   -<!-- <view class='del'>¥{{item.market_price}}</view>-->
  409 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
410 410 </block>
411 411 <block wx:else>
412 412 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
... ... @@ -427,10 +427,10 @@
427 427 </view>
428 428 <view class="flex" style="line-height: 28rpx;">
429 429 <!-- 原价 -->
430   -<!-- <view class="price flex xc-ash line_th">-->
431   -<!-- <view class="fs22">¥</view>-->
432   -<!-- <view class="fs22">{{item.market_price}}</view>-->
433   -<!-- </view>-->
  430 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  431 + <view class="fs22">¥</view>
  432 + <view class="fs22">{{item.market_price}}</view>
  433 + </view>
434 434 </view>
435 435 </block>
436 436 <blocK wx:else>
... ... @@ -443,10 +443,10 @@
443 443 </view>
444 444 <view class="flex" style="line-height: 28rpx;">
445 445 <!-- 原价 -->
446   -<!-- <view class="price flex xc-ash line_th">-->
447   -<!-- <view class="fs22">¥</view>-->
448   -<!-- <view class="fs22">{{item.market_price}}</view>-->
449   -<!-- </view>-->
  446 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  447 + <view class="fs22">¥</view>
  448 + <view class="fs22">{{item.market_price}}</view>
  449 + </view>
450 450 </view>
451 451 </blocK>
452 452 </block>
... ... @@ -460,10 +460,10 @@
460 460 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
461 461 </view>
462 462 <!-- 原价 -->
463   -<!-- <view class="price flex xc-ash line_th">-->
464   -<!-- <view class="fs22">¥</view>-->
465   -<!-- <view class="fs22">{{item.market_price}}</view>-->
466   -<!-- </view>-->
  463 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  464 + <view class="fs22">¥</view>
  465 + <view class="fs22">{{item.market_price}}</view>
  466 + </view>
467 467  
468 468 </view>
469 469 <view class="flex" style="line-height: 28rpx;">
... ... @@ -488,17 +488,17 @@
488 488 </view>
489 489 <view class="flex" style="line-height: 28rpx;">
490 490 <!-- 原价 -->
491   -<!-- <view class="price flex xc-ash line_th">-->
492   -<!-- <view class="fs22">¥</view>-->
493   -<!-- <view class="fs22">{{item.market_price}}</view>-->
494   -<!-- </view>-->
  491 + <view class="price flex xc-ash line_th">
  492 + <view class="fs22">¥</view>
  493 + <view class="fs22">{{item.market_price}}</view>
  494 + </view>
495 495 </view>
496 496 </block>
497 497 </block>
498 498 </block>
499 499 <block wx:else>
500 500 <view class='wz_red'>¥{{item.shop_price}}</view>
501   -<!-- <view class='del'>¥{{item.market_price}}</view>-->
  501 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
502 502 </block>
503 503 </block>
504 504 </view>
... ... @@ -577,7 +577,7 @@
577 577 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
578 578 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
579 579 </view>
580   -<!-- <view class='del'>¥{{item.market_price}}</view>-->
  580 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
581 581 </block>
582 582 <!-- 不是活动的情况 -->
583 583 <block wx:else>
... ... @@ -600,10 +600,10 @@
600 600 </view>
601 601 <view class="flex" style="line-height: 28rpx;">
602 602 <!-- 原价 -->
603   -<!-- <view class="price flex xc-ash line_th">-->
604   -<!-- <view class="fs22">¥</view>-->
605   -<!-- <view class="fs22">{{item.market_price}}</view>-->
606   -<!-- </view>-->
  603 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  604 + <view class="fs22">¥</view>
  605 + <view class="fs22">{{item.market_price}}</view>
  606 + </view>
607 607 </view>
608 608 </block>
609 609 <blocK wx:else>
... ... @@ -616,10 +616,10 @@
616 616 </view>
617 617 <view class="flex" style="line-height: 28rpx;">
618 618 <!-- 原价 -->
619   -<!-- <view class="price flex xc-ash line_th">-->
620   -<!-- <view class="fs22">¥</view>-->
621   -<!-- <view class="fs22">{{item.market_price}}</view>-->
622   -<!-- </view>-->
  619 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  620 + <view class="fs22">¥</view>
  621 + <view class="fs22">{{item.market_price}}</view>
  622 + </view>
623 623 </view>
624 624 </blocK>
625 625 </block>
... ... @@ -633,10 +633,10 @@
633 633 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
634 634 </view>
635 635 <!-- 原价 -->
636   -<!-- <view class="price flex xc-ash line_th">-->
637   -<!-- <view class="fs22">¥</view>-->
638   -<!-- <view class="fs22">{{item.market_price}}</view>-->
639   -<!-- </view>-->
  636 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  637 + <view class="fs22">¥</view>
  638 + <view class="fs22">{{item.market_price}}</view>
  639 + </view>
640 640  
641 641 </view>
642 642 <view class="flex" style="line-height: 28rpx;">
... ... @@ -660,10 +660,10 @@
660 660 </view>
661 661 <view class="flex" style="line-height: 28rpx;">
662 662 <!-- 原价 -->
663   -<!-- <view class="price flex xc-ash line_th">-->
664   -<!-- <view class="fs22">¥</view>-->
665   -<!-- <view class="fs22">{{item.market_price}}</view>-->
666   -<!-- </view>-->
  663 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  664 + <view class="fs22">¥</view>
  665 + <view class="fs22">{{item.market_price}}</view>
  666 + </view>
667 667 </view>
668 668 </block>
669 669 </block>
... ... @@ -671,7 +671,7 @@
671 671  
672 672 <block wx:else>
673 673 <view class='wz_red'>¥{{item.shop_price}}</view>
674   -<!-- <view class='del'>¥{{item.market_price}}</view>-->
  674 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
675 675 </block>
676 676  
677 677 </block>
... ... @@ -772,7 +772,7 @@
772 772 <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text>
773 773 <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text>
774 774 </view>
775   -<!-- <view class='del'>¥{{aitem.market_price}}</view>-->
  775 + <view wx:if="{{is_retail_price}}" class='del'>¥{{aitem.market_price}}</view>
776 776 </block>
777 777 <block wx:else>
778 778 <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}">
... ... @@ -793,10 +793,10 @@
793 793 </view>
794 794 <view class="flex" style="line-height: 28rpx;">
795 795 <!-- 原价 -->
796   -<!-- <view class="price flex xc-ash line_th">-->
797   -<!-- <view class="fs22">¥</view>-->
798   -<!-- <view class="fs22">{{aitem.market_price}}</view>-->
799   -<!-- </view>-->
  796 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  797 + <view class="fs22">¥</view>
  798 + <view class="fs22">{{aitem.market_price}}</view>
  799 + </view>
800 800 </view>
801 801 </block>
802 802 <blocK wx:else>
... ... @@ -809,10 +809,10 @@
809 809 </view>
810 810 <view class="flex" style="line-height: 28rpx;">
811 811 <!-- 原价 -->
812   -<!-- <view class="price flex xc-ash line_th">-->
813   -<!-- <view class="fs22">¥</view>-->
814   -<!-- <view class="fs22">{{aitem.market_price}}</view>-->
815   -<!-- </view>-->
  812 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  813 + <view class="fs22">¥</view>
  814 + <view class="fs22">{{aitem.market_price}}</view>
  815 + </view>
816 816 </view>
817 817 </blocK>
818 818 </block>
... ... @@ -826,10 +826,10 @@
826 826 <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>
827 827 </view>
828 828 <!-- 原价 -->
829   -<!-- <view class="price flex xc-ash line_th">-->
830   -<!-- <view class="fs22">¥</view>-->
831   -<!-- <view class="fs22">{{aitem.market_price}}</view>-->
832   -<!-- </view>-->
  829 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  830 + <view class="fs22">¥</view>
  831 + <view class="fs22">{{aitem.market_price}}</view>
  832 + </view>
833 833  
834 834 </view>
835 835 <view class="flex" style="line-height: 28rpx;">
... ... @@ -854,17 +854,17 @@
854 854 </view>
855 855 <view class="flex" style="line-height: 28rpx;">
856 856 <!-- 原价 -->
857   -<!-- <view class="price flex xc-ash line_th">-->
858   -<!-- <view class="fs22">¥</view>-->
859   -<!-- <view class="fs22">{{aitem.market_price}}</view>-->
860   -<!-- </view>-->
  857 + <view wx:if="{{is_retail_price}}" class="price flex xc-ash line_th">
  858 + <view class="fs22">¥</view>
  859 + <view class="fs22">{{aitem.market_price}}</view>
  860 + </view>
861 861 </view>
862 862 </block>
863 863 </block>
864 864 </block>
865 865 <block wx:else>
866 866 <view class='wz_red'>¥{{aitem.shop_price}}</view>
867   -<!-- <view class='del'>¥{{aitem.market_price}}</view>-->
  867 + <view wx:if="{{is_retail_price}}" class='del'>¥{{aitem.market_price}}</view>
868 868 </block>
869 869 </block>
870 870 </view>
... ... @@ -898,5 +898,8 @@
898 898 </swiper>
899 899  
900 900 </view>
901   -<view class="nodata-title" wx:else>暂无数据</view>
  901 +<view class="nodata-title" wx:elif="{{is_get}}">暂无数据</view>
  902 +<view class="flex jcc loader" wx:else>
  903 + <image style="width: 40rpx; height: 40rpx; " src="{{url}}/miniapp/images/loader.gif"></image>
  904 +</view>
902 905 </view>
903 906 \ No newline at end of file
... ...
components/diy_goodsGroup/diy_goodsGroup.wxss
... ... @@ -912,6 +912,7 @@ top: 10rpx;
912 912 text-align: center;
913 913 }
914 914  
915   -
916   -
  915 +.flex{ display: flex;}
  916 +.jcc{ justify-content: center;}
  917 +.loader{ width:750rpx; margin:20rpx 0}
917 918  
... ...
components/diy_groupbuy/diy_groupbuy.js
... ... @@ -59,7 +59,19 @@ Component({
59 59  
60 60  
61 61 init: function (g_id) {
62   - var th = this, app = getApp(), goodsidlist = "";
  62 +
  63 + var th=this;
  64 + getApp().getConfig2(function (e) {
  65 + var swithc_list = e.switch_list;
  66 + var sw_arr = JSON.parse(swithc_list);
  67 +
  68 + if(sw_arr.is_retail_price){
  69 + th.setData({is_retail_price:1});
  70 + }
  71 + })
  72 +
  73 +
  74 + var app = getApp(), goodsidlist = "";
63 75 if (g_id.data && g_id.data.length > 0) {
64 76 //--先把商品ID串起来--
65 77 g_id.data.forEach(function (val, ind) {
... ...
components/diy_groupbuy/diy_groupbuy.wxml
... ... @@ -39,7 +39,7 @@
39 39 <view class='sp_wz'>
40 40 <view class='sp_wzi'>{{aitem.goods_name}}</view>
41 41 <view class='sp_jg'>¥{{aitem.price}}</view>
42   -<!-- <view class='sp_jgx'>¥{{aitem.shop_price}}</view>-->
  42 + <view wx:if="{{is_retail_price}}" class='sp_jgx'>¥{{aitem.market_price}}</view>
43 43 </view>
44 44 <!-- <view class="progress_box">
45 45 <text class="on_sale_list">已买:{{aitem.buy_num + aitem.virtual_num}}件</text>
... ... @@ -94,7 +94,7 @@
94 94 </view>
95 95 <view>
96 96 <view class='sp_jg'>¥{{aitem.price}}</view>
97   -<!-- <view class='sp_jgx'>¥{{aitem.shop_price}}</view>-->
  97 + <view wx:if="{{is_retail_price}}" class='sp_jgx'>¥{{aitem.market_price}}</view>
98 98 </view>
99 99 </view>
100 100 </view>
... ...
components/diy_luckyGo/diy_luckyGo.js
... ... @@ -60,7 +60,18 @@ Component({
60 60 // 这里是一个自定义方法
61 61 customMethod: function () { },
62 62 init: function (g_id) {
63   - var th = this, app = getApp(), goodsidlist = "";
  63 + var th = this;
  64 +
  65 + getApp().getConfig2(function (e) {
  66 + var swithc_list = e.switch_list;
  67 + var sw_arr = JSON.parse(swithc_list);
  68 +
  69 + if(sw_arr.is_retail_price){
  70 + th.setData({is_retail_price:1});
  71 + }
  72 + })
  73 +
  74 + var app = getApp(), goodsidlist = "";
64 75 if (g_id.data_type == 2) {
65 76 if (g_id.data && g_id.data.length > 0) {
66 77 //--先把商品ID串起来--
... ...
components/diy_luckyGo/diy_luckyGo.wxml
... ... @@ -27,9 +27,9 @@
27 27  
28 28 <view class="ellipsis-2 name fs28 clearbadge">{{aitem.title}}</view>
29 29 <view>
30   - <view class="flex ai-center">
  30 + <view class="flex ai-center" style="align-items: center;">
31 31 <text class="rmb c-red">{{filters.price(aitem.group_price)}}</text>
32   -<!-- <view class="del fs22 c-a pdl10"><text class="rmb">{{aitem.shop_price}}</text></view>-->
  32 + <view style="position: relative;top:-2rpx" wx:if="{{is_retail_price}}" class="del fs22 c-a pdl10"><text class="rmb">{{aitem.market_price}}</text></view>
33 33 </view>
34 34 </view>
35 35  
... ...
components/diy_pingd_buy/diy_pingd_buy.js
... ... @@ -65,8 +65,22 @@ Component({
65 65 // 这里是一个自定义方法
66 66 customMethod: function() {},
67 67 init: function(g_id) {
68   - var th = this,
69   - app = getApp(), all_array = [],
  68 +
  69 + var th = this;
  70 + getApp().getConfig2(function (e) {
  71 + var swithc_list = e.switch_list;
  72 + var sw_arr = JSON.parse(swithc_list);
  73 +
  74 + if(sw_arr.is_retail_price){
  75 + th.setData({is_retail_price:1});
  76 + }
  77 + })
  78 +
  79 +
  80 +
  81 +
  82 +
  83 + var app = getApp(), all_array = [],
70 84 index = 0,
71 85 goodsidlist="";
72 86  
... ...
components/diy_pingd_buy/diy_pingd_buy.wxml
... ... @@ -46,7 +46,7 @@
46 46 <view class='sp_wz_p'>
47 47 <view class='sp_wzi_p'>{{aitem.title}}</view>
48 48 <view class='sp_jg_p'>¥{{aitem.price}}</view>
49   - <!--<view class='sp_jgx_p'>¥{{aitem.market_price}}</view>-->
  49 + <view wx:if="{{is_retail_price}}" class='sp_jgx_p'>¥{{aitem.market_price}}</view>
50 50  
51 51 <view class="tuan_set_num">
52 52 <view class="co-red2">{{aitem.ct_num}}人团</view>
... ... @@ -91,7 +91,7 @@
91 91 </view>
92 92 <view class="money">
93 93 <view class='sp_jg_p'>¥{{aitem.price}}</view>
94   -<!-- <view class='sp_jgx_p'>¥{{aitem.shop_price}}</view>-->
  94 + <view wx:if="{{is_retail_price}}" class='sp_jgx_p'>¥{{aitem.market_price}}</view>
95 95 </view>
96 96 <view class="o1_sj_p" wx:if="{{aitem.end_time>newTime}}">
97 97 <image class="time_img" src="{{iurl}}/miniapp/images/time.png"></image>
... ...
components/diy_pregoods/diy_pregoods.js
... ... @@ -33,7 +33,19 @@ Component({
33 33 methods: {
34 34 // 这里是一个自定义方法
35 35 init: function(g_id) {
36   - var th = this, app = getApp(), goodsidlist="";
  36 + var th = this;
  37 +
  38 + getApp().getConfig2(function (e) {
  39 + var swithc_list = e.switch_list;
  40 + var sw_arr = JSON.parse(swithc_list);
  41 +
  42 + if(sw_arr.is_retail_price){
  43 + th.setData({is_retail_price:1});
  44 + }
  45 + })
  46 +
  47 +
  48 + var app = getApp(), goodsidlist="";
37 49 if(g_id && g_id.length>0){
38 50 //--先把商品ID串起来--
39 51 g_id.forEach(function(val, ind) {
... ...
components/diy_pregoods/diy_pregoods.wxml
... ... @@ -57,7 +57,7 @@
57 57 <view class='sp_wz'>
58 58 <view class='sp_wzi'>{{aitem.act_name}}</view>
59 59 <view class='sp_jg'>¥{{aitem.presell_price}}</view>
60   -<!-- <view class='sp_jgx'>¥{{aitem.shop_price}}</view>-->
  60 + <view wx:if="{{is_retail_price}}" class='sp_jgx'>¥{{aitem.shop_price}}</view>
61 61 </view>
62 62  
63 63 </view>
... ... @@ -88,7 +88,7 @@
88 88 </view>
89 89 <view class="money">
90 90 <view class='sp_jg'>¥{{aitem.presell_price}}</view>
91   - <view class='sp_jgx'>¥{{aitem.market_price}}</view>
  91 + <view wx:if="{{is_retail_price}}"class='sp_jgx'>¥{{aitem.market_price}}</view>
92 92 </view>
93 93  
94 94 <block wx:if="{{aitem.end_time<newTime}}">
... ...
components/diy_seckill/diy_seckill.js
... ... @@ -78,7 +78,19 @@ Component({
78 78 // 这里是一个自定义方法
79 79 customMethod: function () { },
80 80 init: function (g_id) {
81   - var th = this, app = getApp(), goodsidlist = "", idlist = "";
  81 + var th = this;
  82 +
  83 + getApp().getConfig2(function (e) {
  84 + var swithc_list = e.switch_list;
  85 + var sw_arr = JSON.parse(swithc_list);
  86 +
  87 + if(sw_arr.is_retail_price){
  88 + th.setData({is_retail_price:1});
  89 + }
  90 + })
  91 +
  92 +
  93 + var app = getApp(), goodsidlist = "", idlist = "";
82 94 if (g_id.data_type == 2) {
83 95 if (g_id.data && g_id.data.length > 0) {
84 96 //--先把商品ID串起来--
... ...
components/diy_seckill/diy_seckill.wxml
... ... @@ -82,7 +82,7 @@
82 82 <view class='sp_wz'>
83 83 <view class='sp_wzi ellipsis-2'>{{aitem.goods_name}}</view>
84 84 <view class='sp_jg'>¥{{aitem.price}}</view>
85   -<!-- <view class='sp_jgx'>¥{{aitem.shop_price}}</view>-->
  85 + <view wx:if="{{is_retail_price}}"class='sp_jgx'>¥{{aitem.market_price}}</view>
86 86 </view>
87 87  
88 88 </view>
... ...
components/goods_list/goods_list.js
... ... @@ -18,14 +18,29 @@ Component({
18 18 max_card_field: "",
19 19 card_list: null,
20 20 is_no_plus: 1,
  21 +
  22 + is_retail_price:0
  23 +
21 24 },
22 25 properties: {
23 26 // 这⾥定义了innerText属性,属性值可以在组件使⽤时指定
24 27 },
25   - ready: function () { },
  28 + ready: function () {
  29 +
  30 + var th=this;
  31 + getApp().getConfig2(function (e) {
  32 + var swithc_list = e.switch_list;
  33 + var sw_arr = JSON.parse(swithc_list);
  34 + if(sw_arr.is_retail_price){
  35 + th.setData({is_retail_price:1});
  36 + }
  37 + },1);
  38 +
  39 + },
26 40 pageLifetimes: {
27 41 //要处理一下,游客登录后的界面的变化,主要还该是改变会员
28 42 show: function () {
  43 +
29 44 this.init();
30 45 if (getApp().globalData.login_back == 1) {
31 46 getApp().globalData.login_back == 0;
... ... @@ -48,39 +63,7 @@ Component({
48 63 getApp().getConfig2(function (e) {
49 64 var swithc_list = e.switch_list;
50 65 var sw_arr = JSON.parse(swithc_list);
51   - //---如果后台有开等级卡的开关---
52   - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
53   - th.setData({
54   - rank_switch: true
55   - });
56   - //---回调卡的列表---
57   - th.getPlusCardType(function (ob) {
58   - th.setData({
59   - card_list: ob.card_list
60   - });
61   - var ti = setInterval(function () {
62   - var user = getApp().globalData.userInfo;
63   - if (!user) return false;
64   - clearInterval(ti);
65   - if (user.card_field && user['card_expiredate']) {
66   - var str = user['card_expiredate'].replace(/-/g, '/');
67   - var end = new Date(str);
68   - end = Date.parse(end) / 1000;
69   - var now = ut.gettimestamp();
70   - //--- 判断是等级会员,且在有效期范围内 ---
71   - if (user.card_field && now < end) {
72   - var card_name = ob.name_map.get(user.card_field);
73   - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8);
74   - th.setData({
75   - card_field: user.card_field,
76   - card_name: card_name,
77   - card_list: ob.card_list
78   - });
79   - }
80   - }
81   - }, 500)
82   - })
83   - }
  66 + ut.get_plus_name_price(sw_arr,th);
84 67 })
85 68  
86 69 }
... ...
components/goods_list/goods_list.wxml
... ... @@ -17,7 +17,7 @@
17 17 <!-- 判断是否有活动价 -->
18 18 <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}">
19 19 <view class="pdt10">
20   - <view class="money flex xc-wc">
  20 + <view class="money flex xc-wc" style="line-height:28rpx">
21 21 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
22 22 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
23 23 <!-- 活动价 -->
... ... @@ -26,13 +26,16 @@
26 26 <view class="fs35">{{item.prom_price}}</view>
27 27 </view>
28 28 </view>
29   -<!-- <view class="flex">-->
30   -<!-- &lt;!&ndash; 原价 &ndash;&gt;-->
31   -<!-- <view class="price flex xc-ash line_th">-->
32   -<!-- <view class="fs22">¥</view>-->
33   -<!-- <view class="fs22">{{item.market_price}}</view>-->
34   -<!-- </view>-->
35   -<!-- </view>-->
  29 +
  30 + <!-- 控制显示原价 -->
  31 + <view class="flex" wx:if="{{is_retail_price}}">
  32 + <!-- 原价 -->
  33 + <view class="price flex xc-ash line_th">
  34 + <view class="fs22">¥</view>
  35 + <view class="fs22">{{item.market_price}}</view>
  36 + </view>
  37 + </view>
  38 +
36 39 </view>
37 40  
38 41 </block>
... ... @@ -54,15 +57,20 @@
54 57 </view>
55 58 </view>
56 59 </view>
57   -<!-- <view class="flex">-->
58   -<!-- &lt;!&ndash; 原价 &ndash;&gt;-->
59   -<!-- <view class="price flex xc-ash line_th">-->
60   -<!-- <view class="fs22">¥</view>-->
61   -<!-- <view class="fs22">{{item.market_price}}</view>-->
62   -<!-- </view>-->
63   -<!-- </view>-->
  60 +
  61 +
  62 +
  63 + <view class="flex" wx:if="{{is_retail_price}}">
  64 + <!-- 原价 -->
  65 + <view class="price flex xc-ash line_th">
  66 + <view class="fs22">¥</view>
  67 + <view class="fs22">{{item.market_price}}</view>
  68 + </view>
  69 + </view>
  70 +
  71 +
64 72 </block>
65   - <blocK wx:else>
  73 + <block wx:else>
66 74 <view class="money flex">
67 75 <!-- 办卡价 -->
68 76 <view class="flex xc-wc">
... ... @@ -70,14 +78,14 @@
70 78 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
71 79 </view>
72 80 </view>
73   -<!-- <view class="flex">-->
74   -<!-- &lt;!&ndash; 原价 &ndash;&gt;-->
75   -<!-- <view class="price flex xc-ash line_th">-->
76   -<!-- <view class="fs22">¥</view>-->
77   -<!-- <view class="fs22">{{item.market_price}}</view>-->
78   -<!-- </view>-->
79   -<!-- </view>-->
80   - </blocK>
  81 + <view class="flex" wx:if="{{is_retail_price}}">
  82 + <!-- 原价 -->
  83 + <view class="price flex xc-ash line_th">
  84 + <view class="fs22">¥</view>
  85 + <view class="fs22">{{item.market_price}}</view>
  86 + </view>
  87 + </view>
  88 + </block>
81 89 </block>
82 90 <block wx:else>
83 91 <!-- 如果商品有设置等级价⼤于0的 -->
... ... @@ -89,10 +97,10 @@
89 97 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
90 98 </view>
91 99 <!-- 原价 -->
92   -<!-- <view class="price flex xc-ash line_th">-->
93   -<!-- <view class="fs22">¥</view>-->
94   -<!-- <view class="fs22">{{item.market_price}}</view>-->
95   -<!-- </view>-->
  100 + <view class="price flex xc-ash line_th" wx:if="{{is_retail_price}}">
  101 + <view class="fs22">¥</view>
  102 + <view class="fs22">{{item.market_price}}</view>
  103 + </view>
96 104 </view>
97 105 <view class="flexr">
98 106 <!-- 等级价 -->
... ... @@ -114,13 +122,13 @@
114 122 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
115 123 </view>
116 124 </view>
117   -<!-- <view class="flex">-->
118   -<!-- &lt;!&ndash; 原价 &ndash;&gt;-->
119   -<!-- <view class="price flex xc-ash line_th">-->
120   -<!-- <view class="fs22">¥</view>-->
121   -<!-- <view class="fs22">{{item.market_price}}</view>-->
122   -<!-- </view>-->
123   -<!-- </view>-->
  125 + <view class="flex" wx:if="{{is_retail_price}}">
  126 + <!-- 原价 -->
  127 + <view class="price flex xc-ash line_th">
  128 + <view class="fs22">¥</view>
  129 + <view class="fs22">{{item.market_price}}</view>
  130 + </view>
  131 + </view>
124 132 </block>
125 133 </block>
126 134 </block>
... ... @@ -133,13 +141,13 @@
133 141 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
134 142 </view>
135 143 </view>
136   -<!-- <view class="flex" style="">-->
137   -<!-- &lt;!&ndash; 原价 &ndash;&gt;-->
138   -<!-- <view class="price flex xc-ash line_th">-->
139   -<!-- <view class="fs22">¥</view>-->
140   -<!-- <view class="fs22">{{item.market_price}}</view>-->
141   -<!-- </view>-->
142   -<!-- </view>-->
  144 + <view class="flex" style="" wx:if="{{is_retail_price}}">
  145 + <!-- 原价 -->
  146 + <view class="price flex xc-ash line_th">
  147 + <view class="fs22">¥</view>
  148 + <view class="fs22">{{item.market_price}}</view>
  149 + </view>
  150 + </view>
143 151 </view>
144 152 </block>
145 153 </view>
... ...
components/serviceCard_list/serviceCard_list.js
... ... @@ -45,48 +45,7 @@ Component({
45 45 success: function (e) {
46 46 if (e.data.code == 0 && e.data && e.data.data) {
47 47 getApp().globalData.userInfo = e.data.data;
48   - getApp().getConfig2(function (e) {
49   - var swithc_list = e.switch_list;
50   - var sw_arr = JSON.parse(swithc_list);
51   - //---如果后台有开等级卡的开关---
52   - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
53   - th.setData({
54   - rank_switch: true
55   - });
56   - //---回调卡的列表---
57   - th.getPlusCardType(function (ob) {
58   - th.setData({
59   - card_list: ob.card_list
60   - });
61   - var ti = setInterval(function () {
62   - var user = getApp().globalData.userInfo;
63   - if (!user) return false;
64   - clearInterval(ti);
65   - if (user.card_field && user['card_expiredate']) {
66   - var str = user['card_expiredate'].replace(/-/g, '/');
67   - var end = new Date(str);
68   - end = Date.parse(end) / 1000;
69   - var now = ut.gettimestamp();
70   - //--- 判断是等级会员,且在有效期范围内 ---
71   - if (user.card_field && now < end) {
72   - var card_name = ob.name_map.get(user.card_field);
73   - if (card_name && card_name.length > 4) card_name = card_name.substring(0, 8);
74   - th.setData({
75   - card_field: user.card_field,
76   - card_name: card_name,
77   - card_list: ob.card_list
78   - });
79   - }
80   - }
81   - }, 500)
82   - })
83   - }
84   - })
85   -
86 48 }
87   -
88   -
89   -
90 49 }
91 50 })
92 51 },
... ...
components/serviceCard_list/serviceCard_list.wxml
... ... @@ -37,95 +37,8 @@
37 37  
38 38 </block>
39 39 <block wx:else>
40   - <!-- 商品价格,先判断下是后⼜等级价-->
41   - <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
42   - <!-- 当会员是等级卡的时候 -->
43   - <block wx:if="{{card_field}}">
44   - <!-- 等级价>0 -->
45   - <block wx:if="{{item[card_field]>0}}">
46   - <view class="money flex">
47   - <!-- 办卡价 -->
48   - <view class="flex xc-wc ai_and">
49   - <view class="fs24">¥</view>
50   - <view class="fs35">{{filter.toFix(item[card_field],2)}}</view>
51   - <view class="card_bg ellipsis-1">
52   - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></image>
53   - <text class="card_name">{{card_name}}</text>
54   - </view>
55   - </view>
56   - </view>
57   - <view class="flex">
58   - <!-- 原价 -->
59   - <view class="price flex xc-ash line_th">
60   - <view class="fs22">¥</view>
61   - <view class="fs22">{{item.market_price}}</view>
62   - </view>
63   - </view>
64   - </block>
65   - <blocK wx:else>
66   - <view class="money flex">
67   - <!-- 办卡价 -->
68   - <view class="flex xc-wc">
69   - <view class="fs24">¥</view>
70   - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
71   - </view>
72   - </view>
73   - <view class="flex">
74   - <!-- 原价 -->
75   - <view class="price flex xc-ash line_th">
76   - <view class="fs22">¥</view>
77   - <view class="fs22">{{item.market_price}}</view>
78   - </view>
79   - </view>
80   - </blocK>
81   - </block>
82   - <block wx:else>
83   - <!-- 如果商品有设置等级价⼤于0的 -->
84   - <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
85   - <view class="money flex">
86   - <!-- 办卡价 -->
87   - <view class="flex xc-wc">
88   - <view class="fs24">¥</view>
89   - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
90   - </view>
91   - <!-- 原价 -->
92   - <view class="price flex xc-ash line_th">
93   - <view class="fs22">¥</view>
94   - <view class="fs22">{{item.market_price}}</view>
95   - </view>
96   - </view>
97   - <view class="flexr" style="">
98   - <!-- 等级价 -->
99   - <view class="price flex ai-center">
100   - <view class="fs22">¥</view>
101   - <view class="fs28">{{filter.toFix(g_filter.get_card_price(item,card_list,0),2)}}</view>
102   - <view class="card_bg ellipsis-1">
103   - <image src="{{url}}/miniapp/images/plus/dj_icon.png"></ image>
104   - <text class="card_name">{{g_filter.get_card_price(item,card_list,1)}}</text>
105   - </view>
106   - </view>
107   - </view>
108   - </block>
109   - <block wx:else>
110   - <view class="money flex">
111   - <!-- 办卡价 -->
112   - <view class="flex xc-wc">
113   - <view class="fs24">¥</view>
114   - <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
115   - </view>
116   - </view>
117   - <view class="flex">
118   - <!-- 原价 -->
119   - <view class="price flex xc-ash line_th">
120   - <view class="fs22">¥</view>
121   - <view class="fs22">{{item.market_price}}</view>
122   - </view>
123   - </view>
124   - </block>
125   - </block>
126   - </block>
127 40 <!-- 商品压根就没有等级价 -->
128   - <view class="pdt10" wx:else>
  41 + <view class="pdt10">
129 42 <view class="money flex">
130 43 <!-- 办卡价 -->
131 44 <view class="flex xc-wc">
... ...
custom-tab-bar/index.js
... ... @@ -20,6 +20,12 @@ Component({
20 20 }
21 21 })
22 22  
  23 + //过滤掉分销到期的
  24 + getApp().user_tools_endTime(2,function(e){
  25 + if(!e) th.setData({is_no_distri:1})
  26 + });
  27 +
  28 +
23 29 //购买的信息用全局缓存
24 30 if(getApp().globalData.dis_buy_obj){
25 31 var arr = getApp().globalData.dis_buy_obj;
... ...
packageA/pages/distribution/goods/goods.wxml
... ... @@ -83,7 +83,7 @@
83 83 <view class="ellipsis-2">{{item.goods_name}}</view>
84 84 <view>
85 85 <!-- 判断是否有活动价 -->
86   - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
  86 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}">
87 87 <view class="flex xc-wc ai-center">
88 88 <text wx:if="{{item.prom_integral}}"><text class="fs30">{{item.prom_integral}}</text>积分</text>
89 89 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
... ...
packageA/pages/distribution/shop/shop.wxml
... ... @@ -76,7 +76,7 @@
76 76 <view class="flex fdc jc_sb">
77 77 <view class="ellipsis-2 h68 mgb20">{{item.goods_name}}</view>
78 78 <!-- 判断是否有活动价 -->
79   - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_type!=2 && item.prom_id>0}}">
  79 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}">
80 80 <view class="flex xc-wc pdt20">
81 81 <text wx:if="{{item.prom_integral}}">
82 82 <text class="fs30">{{item.prom_integral}}</text>
... ...
packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -914,7 +914,7 @@ Page({
914 914 // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
915 915 let actInfo = th.data.sele_g;
916 916 await th.get_buy_num2().then(function (data) {
917   - let limited = actInfo.buy_limit; // 限购数量a
  917 + let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a
918 918 let promcardbuynum = data.data.data.promcardbuynum;
919 919 let buyedNum = promcardbuynum; // 自己已经购买的数量b
920 920 let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
... ... @@ -1242,7 +1242,7 @@ Page({
1242 1242 // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
1243 1243 let actInfo = th.data.sele_g;
1244 1244 await th.get_buy_num2().then(function (data) {
1245   - let limited = actInfo.buy_limit; // 限购数量a
  1245 + let limited = actInfo.buy_limit==0?100000:actInfo.buy_limit; // 限购数量a
1246 1246 let promcardbuynum = data.data.data.promcardbuynum;
1247 1247 let buyedNum = promcardbuynum; // 自己已经购买的数量b
1248 1248 let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
... ...
packageA/pages/profile/profile.js
... ... @@ -586,6 +586,18 @@ Page({
586 586 this.setData({head_pic:uu.head_pic,nickname:uu.nickname})
587 587 }
588 588  
  589 + if(getApp().globalData.first_leader){
  590 + //--生成会员 --
  591 + getApp().promiseGet("/api/weshop/users/get/" + r.stoid + "/" + getApp().globalData.first_leader,{}).then(res=>{
  592 + if(res.data.code==0){
  593 + //更新会员
  594 + self.setData({
  595 + fir_user:res.data.data
  596 + })
  597 + }
  598 + })
  599 + }
  600 +
589 601 app.request.get(url1, {
590 602 success:async function(res) {
591 603 if(res.data.code == 0) {
... ... @@ -1132,7 +1144,7 @@ Page({
1132 1144  
1133 1145 //-- 需要推荐人 --
1134 1146 if(this.data.reg_info.introducer_state){
1135   - let tjrname = this.data.referee;
  1147 + let tjrname = this.data.referee || this.data.fir_user.mobile;
1136 1148 if (tjrname == "" || tjrname == null) {
1137 1149 //app.my_warnning("请输入推荐人", 0, this);
1138 1150 //return false;
... ...
packageA/pages/profile/profile.wxml
... ... @@ -29,8 +29,17 @@
29 29 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.introducer_state}}">
30 30 <view class="user-name-txt">推荐人:</view>
31 31  
  32 + <block wx-if="{{fir_user}}">
  33 + <input bindblur="" disabled="true" value="{{fir_user.mobile}}" data-name="推荐人"
  34 + class="user-txt-right f1 pdl20 t-r" />
  35 + </block>
  36 +
  37 + <block v-else>
  38 + <input bindinput="getReferee" bindblur="" disabled="{{user['fromuser_id']}}"
  39 + value="{{user['fromuser_id']?user['fromuser_id']:''}}" data-name="推荐人" class="user-txt-right f1 pdl20 t-r" placeholder="请输入推荐人手机号码或卡号"/>
  40 + </block>
  41 +
32 42  
33   - <input bindinput="getReferee" bindblur="" disabled="{{user['fromuser_id']}}" value="{{user['fromuser_id']?user['fromuser_id']:''}}" data-name="推荐人" class="user-txt-right f1 pdl20 t-r" placeholder="请输入推荐人手机号码或卡号"/>
34 43  
35 44 <block wx:if="{{!user['fromuser_id']}}">
36 45 <view class="c-red pdl20 fs24" wx:if="{{reg_info.introducer && reg_info.introducer_state && (reg_info.introducer_type == 0)}}">+{{reg_info.introducer}}积分</view>
... ...
packageB/pages/zuhegou/index/index.js
... ... @@ -540,10 +540,12 @@ Page({
540 540 this.data.is_zuhe_addcart = 1;
541 541 if (!haveAdded) {
542 542  
543   -
544   -
  543 + //购买的商品的数量默认超量的数量
545 544 th.data.sele_g = this.data.list[index];
546   - if (!th.data.sele_g.num) th.data.goodsInputNum = 1;
  545 + if (!th.data.sele_g.num){
  546 + th.data.goodsInputNum = 1;
  547 + if(th.data.sele_g.zhqty) th.data.goodsInputNum = th.data.sele_g.zhqty;
  548 + }
547 549  
548 550 //如果没有门店,活动商品的配送方式和门店的配送方式不一样
549 551 if (!th.data.def_pick_store ||
... ... @@ -664,8 +666,11 @@ Page({
664 666 async check_pk_store_conut(func,is_no_msg,gd,by_num){
665 667 var th=this;
666 668 if(this.data.sales_rules!=2){
667   - if(func) func();
668   - return false;
  669 + if(is_no_msg) return true;
  670 + else {
  671 + if(func) func();
  672 + return false;
  673 + }
669 674 }
670 675 //门店库存no
671 676 var pkno= gd && gd.pickup_no?gd.pickup_no:this.data.def_pick_store.pickup_no;
... ... @@ -784,9 +789,17 @@ Page({
784 789 this.data.sele_index = index;
785 790 th.data.goodsInputNum = th.data.sele_g.num + 1;
786 791  
  792 + //必须是组合购买的超量
  793 + var is_zhqty=0;
  794 + if(th.data.goodsInputNum<th.data.sele_g.zhqty){
  795 + th.data.goodsInputNum=th.data.sele_g.zhqty;
  796 + is_zhqty=1;
  797 + }
  798 +
787 799 th.check_pk_store_conut(function(){
788 800 if (th.data.sele_g.cart_num) {
789 801 th.data.s_cart_num = th.data.sele_g.cart_num + 1;
  802 + if(is_zhqty) th.data.s_cart_num=th.data.sele_g.zhqty;
790 803 }
791 804 th.add_cart_func();
792 805 })
... ... @@ -1195,7 +1208,7 @@ Page({
1195 1208 if (th.data.adding) return false;
1196 1209 th.data.adding = 1;
1197 1210 //-------如果购物车中有相关的数据---------
1198   - if (th.data.goodsInputNum > 1) {
  1211 + if (th.data.list[index].num > 0) {
1199 1212 var item = th.data.sele_g;
1200 1213 if (th.data.goodsInputNum > o.store_count) {
1201 1214 th.data.adding = 0;
... ... @@ -2000,6 +2013,13 @@ Page({
2000 2013 }
2001 2014  
2002 2015 var num = item.goods_num;
  2016 +
  2017 + var is_num_change=0;
  2018 + if(num<th.data.goodsInputNum){
  2019 + num=th.data.goodsInputNum;
  2020 + is_num_change=1;
  2021 + }
  2022 +
2003 2023 if (item.cbuy > -1 && item.cbuy < item.goods_num) {
2004 2024 num = item.cbuy;
2005 2025 }
... ... @@ -2024,6 +2044,9 @@ Page({
2024 2044 updata['guide_id'] = getApp().globalData.guide_id;
2025 2045 updata['guide_type'] = 0;
2026 2046 }
  2047 + if(is_num_change){
  2048 + updata['goods_num']=num;
  2049 + }
2027 2050  
2028 2051 getApp().request.put("/api/weshop/cart/update", {
2029 2052 data: updata,
... ...
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -6018,7 +6018,7 @@ Page({
6018 6018 },
6019 6019  
6020 6020 go_card_info: function () {
6021   - getApp().goto("/pages/user/cardinfo/cardinfo");
  6021 + getApp().goto("/packageE/pages/user/cardinfo/cardinfo");
6022 6022 },
6023 6023  
6024 6024 //-- 根据ID拿出门店 --
... ...
packageC/pages/presell/goodsInfo/goodsInfo.js
... ... @@ -4531,7 +4531,7 @@ Page({
4531 4531 getApp().goto("/pages/user/plus/plus");
4532 4532 },
4533 4533 go_card_info: function () {
4534   - getApp().goto("/pages/user/cardinfo/cardinfo");
  4534 + getApp().goto("/packageE/pages/user/cardinfo/cardinfo");
4535 4535 },
4536 4536 //-- 根据ID拿出门店 --
4537 4537 get_pick_from_list(pid) {
... ...
packageC/pages/presell/pregoodsInfo/goodsInfo.js
... ... @@ -3694,7 +3694,7 @@ Page({
3694 3694 getApp().goto("/pages/user/plus/plus");
3695 3695 },
3696 3696 go_card_info: function () {
3697   - getApp().goto("/pages/user/cardinfo/cardinfo");
  3697 + getApp().goto("/packageE/pages/user/cardinfo/cardinfo");
3698 3698 },
3699 3699 //-- 根据ID拿出门店 --
3700 3700 get_pick_from_list(pid) {
... ...
pages/user/cardinfo/cardinfo.js renamed to packageE/pages/user/cardinfo/cardinfo.js
... ... @@ -2,11 +2,11 @@ var t = getApp(),
2 2 a = t.request,
3 3 o = t.globalData.setting,
4 4 os = o,
5   - i = require("../../../utils/util.js"),
  5 + i = require("../../../../utils/util.js"),
6 6 ut = i,
7   - s = require("../../../utils/common.js"),t_pay = require("../../../utils/pay2.js"),
8   - w = require("../../../utils/wxParse/wxParse.js");
9   -var regeneratorRuntime = require('../../../utils/runtime.js');
  7 + s = require("../../../../utils/common.js"),t_pay = require("../../../../utils/pay2.js"),
  8 + w = require("../../../../utils/wxParse/wxParse.js");
  9 +var regeneratorRuntime = require('../../../../utils/runtime.js');
10 10 //wx.downloadFile把线上地址设为本地地址
11 11 Page({
12 12  
... ...
pages/user/cardinfo/cardinfo.json renamed to packageE/pages/user/cardinfo/cardinfo.json
pages/user/cardinfo/cardinfo.wxml renamed to packageE/pages/user/cardinfo/cardinfo.wxml
1   -<import src="../../../utils/wxParse/wxParse.wxml"></import>
2   -<wxs module="filters" src="../../../utils/filter.wxs"></wxs>
  1 +<import src="../../../../utils/wxParse/wxParse.wxml"></import>
  2 +<wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
3 3  
4 4 <view>
5 5 <image class="Member_bk" src="{{url}}/miniapp/images/plus/page_bk.png"></image>
... ...
pages/user/cardinfo/cardinfo.wxss renamed to packageE/pages/user/cardinfo/cardinfo.wxss
1   - @import "../../../utils/wxParse/wxParse.wxss";
  1 + @import "../../../../utils/wxParse/wxParse.wxss";
2 2 .Member_bk {
3 3 position:relative;
4 4 z-index: 0;
... ...
pages/activity/pind_list/pind_list.js
... ... @@ -18,6 +18,7 @@ Page({
18 18 iurl: os.imghost,
19 19 ad_data: null,
20 20 max_sw_height: 200,
  21 + is_retail_price:0
21 22 },
22 23  
23 24 //------初始化加载----------
... ... @@ -29,6 +30,16 @@ Page({
29 30 var th = this;
30 31 getApp().getConfig();
31 32  
  33 + var th=this;
  34 + getApp().getConfig2(function (e) {
  35 + var swithc_list = e.switch_list;
  36 + var sw_arr = JSON.parse(swithc_list);
  37 + if(sw_arr.is_retail_price){
  38 + th.setData({is_retail_price:1});
  39 + }
  40 + },1);
  41 +
  42 +
32 43 if (first_leader) {
33 44 getApp().globalData.first_leader = first_leader;
34 45 //调用接口判断是不是会员
... ...
pages/activity/pind_list/pind_list.wxml
... ... @@ -43,7 +43,7 @@
43 43 <view class="fs20 flex xc-people-val-frame"
44 44 style="border-color:{{type==1?'#d60021':'#059de5'}};margin-left:{{type==1?'15rpx':'0rpx'}}">
45 45 <view class=" flex-center val-img {{type==1?'red-b':'blue_b'}}">
46   - <image class="people-img"src="{{iurl}}/miniapp/images/bai-ren.png"></image>
  46 + <image class="people-img" src="{{iurl}}/miniapp/images/bai-ren.png"></image>
47 47 </view>
48 48 <text class="{{type==1?'red-co':'blue_c ai-bas'}}" style="margin-left:8rpx; margin-right:8rpx">{{item.ct_num}}人团</text>
49 49 </view>
... ... @@ -63,20 +63,20 @@
63 63 <text class='tui-conutdown-box'>{{item.djs.min}}</text>分
64 64 <text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒
65 65 </view>
66   - <view class="goods-num"style="margin-top:{{type==0?'42rpx':'18rpx'}}">
  66 + <view class="goods-num" style="margin-top:{{type==0?'42rpx':'18rpx'}}">
67 67 <view>
68 68  
69 69 <view class="fs40 flex xc-top15 {{type==1?'red-co ai-bas':'blue_c xc-lihe42 ai-bas'}}">
70 70 <text class="fs28 {{type==0?'martop13':''}}">¥</text>
71 71 <text style="margin-left:-5rpx">{{item.price}}</text>
72   -<!-- <span class="underline {{type==0?'martop18':''}}">¥{{item.shop_price}}</span>-->
  72 + <text wx:if="{{is_retail_price}}" class="underline {{type==0?'martop18':''}}">¥{{item.shop_price}}</text>
73 73 </view>
74 74  
75 75 </view>
76 76 <view class="kill-btn">
77   - <navigator class="huise"style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==1 }}">即将开始</navigator>
78   - <navigator class="huise"style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==2 }}" >即将开始</navigator>
79   - <navigator class="huise"style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==3 }}" >即将开始</navigator>
  77 + <navigator class="huise" style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==1 }}">即将开始</navigator>
  78 + <navigator class="huise" style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==2 }}" >即将开始</navigator>
  79 + <navigator class="huise" style="background-color: #059de5;" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{type==0 && item.kttype==3 }}" >即将开始</navigator>
80 80  
81 81 <navigator class="blue_b" url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{item.status==1 && type==1 && item.kttype==1}}">去参团</navigator>
82 82 <navigator url="{{!item.goods_type ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id):('/packageA/pages/serviceCard_pd/goodsInfo/goodsInfo?prom_type=6&goods_id=' + item.goods_id + '&prom_id=' + item.id)}}" wx:if="{{item.status==1 && type==1 && item.kttype==2}}">去开团</navigator>
... ... @@ -94,11 +94,11 @@
94 94 <view class="theader" >
95 95 <view bindtap='tip' data-ty="1" class="xc-border-right flex-center timeac left {{type==1?'active':''}}">
96 96 <image class="xc-bottom"
97   - src="{{type==1?'{{url}}/miniapp/images/fire-red.png':'{{url}}/miniapp/images/fire-black.png'}}"></image>
  97 + src="{{type==1?url+'/miniapp/images/fire-red.png':url+'/miniapp/images/fire-black.png'}}"></image>
98 98 火热进行中</view>
99 99 <view bindtap='tip' data-ty="0" class=" flex-center timeac right {{type==0?'active':''}}">
100 100 <image class="xc-bottom"
101   - src="{{type==0?'{{url}}/miniapp/images/clock-rad.png':'{{url}}/miniapp/images/clock-black.png'}}"></image>
  101 + src="{{type==0?url+'/miniapp/images/clock-rad.png':url+'/miniapp/images/clock-black.png'}}"></image>
102 102 即将开始</view>
103 103 </view>
104 104  
... ...
pages/activity/seckill_list/seckill_list.js
... ... @@ -17,6 +17,7 @@ Page({
17 17 isshow: 0,
18 18 ad_data: null,
19 19 max_sw_height: 200,
  20 + is_retail_price:0
20 21 },
21 22  
22 23 //------初始化加载----------
... ... @@ -37,6 +38,16 @@ Page({
37 38 console.log(first_leader);
38 39 getApp().getConfig();
39 40  
  41 + var th=this;
  42 + getApp().getConfig2(function (e) {
  43 + var swithc_list = e.switch_list;
  44 + var sw_arr = JSON.parse(swithc_list);
  45 + if(sw_arr.is_retail_price){
  46 + th.setData({is_retail_price:1});
  47 + }
  48 + },1);
  49 +
  50 +
40 51 if (first_leader) {
41 52 getApp().globalData.first_leader = first_leader;
42 53 //调用接口判断是不是会员
... ...
pages/activity/seckill_list/seckill_list.wxml
... ... @@ -68,8 +68,8 @@
68 68 </view>
69 69 <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" >
70 70 <view class="fs28" style="line-height: 16px;">¥</view>
71   - <text>{{item.price}}</text>
72   -<!-- <span class="underline fs20">零售价¥{{item.market_price}}</span>-->
  71 + <text>{{item.price}}--{{is_retail_price}}--</text>
  72 + <span wx:if="{{is_retail_price}}" class="underline fs20">零售价¥{{item.market_price}}</span>
73 73 </view>
74 74  
75 75 </view>
... ... @@ -79,7 +79,7 @@
79 79 <navigator class="huise"url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.id}}&prom_type=1" wx:if="{{item.status==3 && type==1}}">已抢光</navigator> -->
80 80 <navigator style="background-color: #059de5;" url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" wx:if="{{type==0}}" >即将开始</navigator>
81 81 <navigator url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" wx:if="{{item.status==1 && type==1}}">马上抢</navigator>
82   - <navigator class="huise"url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" wx:if="{{item.status==3 && type==1}}">已抢光</navigator>
  82 + <navigator class="huise" url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" wx:if="{{item.status==3 && type==1}}">已抢光</navigator>
83 83 </view>
84 84 </view>
85 85 </view>
... ...
pages/cart/cart2/cart2.js
... ... @@ -137,7 +137,11 @@ Page({
137 137 dis_config:null,
138 138 bn_use_commission:0, //是不是使用佣金
139 139 cart_use_commission:0,
140   - cart_commission:0
  140 + cart_commission:0,
  141 +
  142 + //订单所有搭配购的
  143 + all_collocation_list:[]
  144 +
141 145 },
142 146 onLoad: function (t) {
143 147 wx.setNavigationBarTitle({ title: "填写订单", })
... ... @@ -391,7 +395,11 @@ Page({
391 395 //to.get_allsto(function (e) {
392 396 //th.setData({ allsto: e });
393 397 //-------获取购物车已经选择的商品--------
  398 + if(!th.data.old_cartlist)
394 399 th.get_cart();
  400 + else{
  401 + th.calculatePrice();
  402 + }
395 403 //})
396 404 }
397 405 });
... ... @@ -413,6 +421,72 @@ Page({
413 421  
414 422 },
415 423  
  424 + //-- 获取搭配购商品 --
  425 + async set_collection(gd,arr,index){
  426 + var th=this;
  427 + var user_id=getApp().globalData.user_id;
  428 + var collocation_list=[];
  429 + var pick=null;
  430 + var distr_t=0;
  431 +
  432 + //如果是购物车的时候,
  433 + if(arr) {
  434 + var idx = th.data.allsto.findIndex(function (e) {
  435 + return e.pickup_id == arr[index].pick_id
  436 + })
  437 + pick = th.data.allsto[idx];
  438 + var get_gd=null;
  439 + await getApp().request.promiseGet("/api/weshop/goods/get/" + os.stoid + "/" + gd.goods_id,{
  440 +
  441 + }).then(res1 => {
  442 + if(res1.data.code==0){
  443 + get_gd=res1.data.data;
  444 + }
  445 + })
  446 + distr_t=pick.distr_type || get_gd.distr_type;
  447 +
  448 + }else{
  449 + var gg=to.get_b_now();
  450 + //---获取门店---
  451 + await getApp().request.promiseGet("/api/weshop/pickup/get/" + oo.stoid + "/" + gg.pick_id, {})
  452 + .then(res => {
  453 + pick = res.data.data;
  454 + });
  455 + distr_t=gd.distr_type || pick.distr_type;
  456 + }
  457 +
  458 + await getApp().request.promiseGet("/api/weshop/goods/getGoodsPromList/"
  459 + + os.stoid + "/" + gd.goods_id + "/0/"+user_id, {
  460 + }).then(res => {
  461 + if(res.data.code==0 && res.data.data){
  462 + var r_data = res.data.data;
  463 + if (r_data.collocationList) {
  464 + collocation_list=r_data.collocationList;
  465 + }
  466 + }
  467 + })
  468 +
  469 + if(!collocation_list) return null;
  470 +
  471 + var new_arr=[];
  472 + for (let i = 0; i <collocation_list.length; i++){
  473 + var item0=collocation_list[i];
  474 + //判断物流配送一样的
  475 + if(item0.distr_type==0 || item0.distr_type==distr_t ){
  476 + new_arr.push(item0);
  477 + }
  478 + }
  479 +
  480 + if(!new_arr.length) return null;
  481 + if(arr) {
  482 + arr[index].collocationList=new_arr;
  483 +
  484 + }
  485 + else th.setData({
  486 + all_collocation_list:new_arr
  487 + })
  488 +
  489 + },
416 490  
417 491 //-----真的获取购物车,入口--------
418 492 get_cart: function () {
... ... @@ -594,7 +668,10 @@ Page({
594 668 })
595 669 }
596 670 }
597   -
  671 + //-- 判断一下,获取搭配购的消息 --
  672 + if(item1.prom_type==0 || item1.prom_type==5){
  673 + await th.set_collection(item1,carr,i);
  674 + }
598 675 }
599 676  
600 677 //在分组的时候,就不要再调用接口,await
... ... @@ -662,6 +739,17 @@ Page({
662 739 if (car_item.cut_price1) arr[j].card_cut_price += car_item.cut_price1;
663 740  
664 741 arr[j].goods.push(car_item);
  742 + if(car_item.collocationList){
  743 +
  744 + if(!arr[j].collocationList) arr[j].collocationList=cart_item.collocationList;
  745 + else{
  746 + var arr_new=[...arr[j].collocationList,...cart_item.collocationList];
  747 + arr[j].collocationList=arr_new;
  748 + }
  749 + }
  750 +
  751 +
  752 +
665 753 find = 1;
666 754 break;
667 755 }
... ... @@ -715,6 +803,7 @@ Page({
715 803 }
716 804 }
717 805  
  806 +
718 807 var ie = {
719 808 pickup_id: pcid,
720 809 pname: pikname,
... ... @@ -734,6 +823,13 @@ Page({
734 823  
735 824 //-- 把等级卡会优惠多少钱装进去 --
736 825 if (car_item.cut_price1) ie.card_cut_price += car_item.cut_price1;
  826 +
  827 + if(car_item.collocationList) {
  828 +
  829 + ie.collocationList = car_item.collocationList;
  830 + }
  831 +
  832 +
737 833 arr.push(ie);
738 834 }
739 835 }
... ... @@ -927,7 +1023,6 @@ Page({
927 1023 wx.navigateBack({delta: 1})
928 1024 },1000)
929 1025  
930   -
931 1026 return false
932 1027 }
933 1028  
... ... @@ -972,6 +1067,8 @@ Page({
972 1067 et = th.data.bn_exp_type;
973 1068 m_wind = th.data.index;
974 1069 }
  1070 + th.data.m_wind = m_wind;
  1071 +
975 1072 //---是不是购买等级卡成功的返回---等级卡显示的判断---
976 1073 var is_card_back = getApp().globalData.is_card_back;
977 1074 if (is_card_back) {
... ... @@ -990,9 +1087,16 @@ Page({
990 1087 }
991 1088 }
992 1089  
  1090 + //-- 判断是不是可以收藏 --
  1091 + if(gd.prom_type ==5){
  1092 + await th.set_collection(gd);
  1093 + }
  1094 +
  1095 + //-- 当是搭配购的时候 --
993 1096 gd.prom_type = gg.prom_type ? gg.prom_type : 0;
994 1097 gd.prom_id = gg.prom_id ? gg.prom_id : 0;
995 1098  
  1099 +
996 1100 if(gd.whsle_id>0){
997 1101 gd.prom_type =gg.prom_type=0;
998 1102 gd.prom_id =gg.prom_id=0;
... ... @@ -1051,6 +1155,7 @@ Page({
1051 1155  
1052 1156 }
1053 1157  
  1158 +
1054 1159 //如果立即购买那边过来,就要读取接口,查看活动的优惠内容
1055 1160 if (gg.prom_type == 3) {
1056 1161 t.data.data.prom_id = gg.prom_id;
... ... @@ -1100,10 +1205,12 @@ Page({
1100 1205 //计算价格
1101 1206 th.calculatePrice2();
1102 1207 //获取优惠券
1103   - th.get_buy_now_quan();
  1208 + th.get_buy_now_quan();
1104 1209  
1105 1210 })
1106 1211 } else {
  1212 +
  1213 +
1107 1214 //--看是不是搭配促销--
1108 1215 if (gg.prom_type == 5) {
1109 1216 t.data.data.prom_id = gg.prom_id;
... ... @@ -1122,91 +1229,26 @@ Page({
1122 1229 }
1123 1230 th.setData({ collocation_goods: gg.collocation_goods });
1124 1231  
1125   - var cart_arr = new Array();
1126   - //var narr=gg.collocation_goods;
1127   - //修改成深拷贝,确保返回是数据正确
1128   - var narr = JSON.parse(JSON.stringify(gg.collocation_goods));
1129   -
1130   - narr.push(t.data.data);
1131   -
1132   - //-- 搭配促销的门店配送方式的修复 --
1133   - et = 1;
1134   - distr_t = 0; // 配送方式 0=用户自选 1=自提 2=物流
1135   - for (var hi in narr) {
1136   - var dis_t = narr[hi].distr_type;
1137   - if (dis_t == 2) {
1138   - th.setData({ is_all_zt: 0 });
1139   - et = 0;
1140   - }
1141   - if (dis_t > 0) {
1142   - distr_t = dis_t;
1143   - }
1144   -
1145   - //-- 如果有一件代发的商品或者不是同城配送的配送 --
1146   - if(narr[hi].is_same_city!=1 || narr[hi].whsle_id>0){
1147   - th.setData({show_same_city:0})
1148   - }
  1232 + if(th.data.all_collocation_list){
  1233 + for(var i = 0; i<th.data.all_collocation_list.length; i++){
  1234 + var item0=th.data.all_collocation_list[i];
  1235 + var idx=gg.collocation_goods.findIndex(function(e){
  1236 + return e.goods_id ==item0.goods_id && e.prom_id==item0.prom_id;
  1237 + })
  1238 + if(idx!=-1){
  1239 + var txt='all_collocation_list['+i+'].selected';
  1240 + th.setData({[txt]:1});
  1241 + }
  1242 + }
1149 1243  
1150 1244 }
1151   - //自选的时候,系统配置了默认的配送方式是物流的时候
1152   - if (distr_t == 0 && th.data.json_d.pickupway && th.data.json_d.pickupway == 1) {
1153   - et = 0;
1154   - }
1155   -
1156   - var ie = {
1157   - pickup_id: gg.pick_id,
1158   - pname: gg.pick_name,
1159   - goods: narr,
1160   - exp_type: et,
1161   - wind: m_wind,
1162   - distr_t: distr_t,
1163   - bn_t_exp_t: distr_t,
1164   - goods_price: 0,
1165   - shipping_price: 0,
1166   - user_money: 0,
1167   - total_amount: 0,
1168   - order_amount: 0,
1169   - user_note: ""
1170   - };
1171   -
1172   - var cart_commission=0;
1173   - //-- 循环计算一下线下取价 --
1174   - //计算佣金的商品
1175   - var commission_gds=[];
1176   - for (var c = 0; c < narr.length; c++) {
1177   -
1178   - var hr={
1179   - goods_id:item[c].goods_id,
1180   - goods_num:item[c].goods_num,
1181   - prom_type:0,
1182   - prom_id:0,
1183   - }
1184   - commission_gds.push(hr);
1185   -
1186   - }
1187   - //获取购物车的佣金,此处要优化调用接口,获取佣金
1188   - var req_d = {
1189   - user_id:getApp().globalData.user_id,goods_ids:commission_gds,store_id: os.stoid
1190   - }
1191   - var back_data=null;
1192   - await getApp().request.promisePost("/api/weshop/order/getrebateSum", {
1193   - is_json: 1, data: req_d
1194   - }).then(rs => {
1195   - if (rs.data.code == 0) back_data =rs.data.data;
1196   - });
1197   -
1198   - if(back_data && parseFloat(back_data)) {
1199   - ie.can_usecommise =parseFloat(back_data);
1200   - cart_commission = ie.can_usecommise;
1201   - }
1202 1245  
1203   - cart_arr.push(ie);
1204   - if(cart_commission){
1205   - th.setData({cart_commission});
1206   - }
1207 1246  
1208   -
1209   - th.data.old_cartlist = cart_arr;
  1247 + //var narr=gg.collocation_goods;
  1248 + //修改成深拷贝,确保返回是数据正确
  1249 + var narr = JSON.parse(JSON.stringify(gg.collocation_goods));
  1250 + narr.push(t.data.data);
  1251 + await th.get_collocation_list(narr);
1210 1252 }
1211 1253 th.setData({
1212 1254 bn_goods: gd, bn_pickname: gg.pick_name, index: m_wind,
... ... @@ -1228,8 +1270,6 @@ Page({
1228 1270 th.get_cart_quan();
1229 1271 });
1230 1272  
1231   -
1232   -
1233 1273 } else {
1234 1274 //计算价格
1235 1275 th.calculatePrice2();
... ... @@ -1540,7 +1580,6 @@ Page({
1540 1580 }
1541 1581 }
1542 1582  
1543   -
1544 1583 o_price -= (item_map.price - item_map.prom_price);
1545 1584 //如果有限制使用优惠券,就要减掉参与的活动商品的钱
1546 1585 if (!item_map.is_xz_yh) q_conditin = o_price;
... ... @@ -1622,6 +1661,9 @@ Page({
1622 1661 }
1623 1662  
1624 1663 },
  1664 +
  1665 +
  1666 +
1625 1667 calclate_lbNum(r_data) {
1626 1668 let send_lb = this.data.send_lb;
1627 1669 //g_lb_num我的礼包 g_zxlb_num专享礼包
... ... @@ -3154,10 +3196,17 @@ Page({
3154 3196 }
3155 3197  
3156 3198 //积分购,先要带is_integral_normal=1
3157   - if (gg.is_integral_normal) goods.is_integral_normal = 1;
  3199 + if (gg.is_integral_normal){
  3200 + goods.is_integral_normal = 1; item.is_normal=1;
  3201 + }
3158 3202  
3159 3203 //先要带is_pd_normal=1
3160   - if (gg.is_pd_normal) goods.is_pd_normal = 1;
  3204 + if (gg.is_pd_normal){
  3205 + goods.is_pd_normal = 1; item.is_normal=1;
  3206 + }
  3207 +
  3208 +
  3209 +
3161 3210  
3162 3211 //如果不立即购买或者秒杀,如果是线下库存购买的时候
3163 3212 if (goods.prom_type != 1 && goods.prom_type != 6 && goods.prom_type != 2 && th.data.sales_rules == 2 && !th.data.bn_goods.whsle_id) {
... ... @@ -4307,6 +4356,13 @@ Page({
4307 4356 ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif";
4308 4357 this.setData(ob);
4309 4358 },
  4359 + cart_set_err1: function (e) {
  4360 + var txt = e.currentTarget.dataset.err;
  4361 + var ob = {};
  4362 + ob[txt] = "/miniapp/images/default_g_img.gif";
  4363 + this.setData(ob);
  4364 + },
  4365 +
4310 4366 //--验证是否已经冻结--
4311 4367 check_is_frozenQuan: function (quanlist, frozenQuan, isby) {
4312 4368 console.log("券列表", quanlist);
... ... @@ -5400,10 +5456,9 @@ Page({
5400 5456 th.setData({ [txt9]: new_pk_list_goods, send_gf: this.data.send_gf });
5401 5457 this.data.old_cartlist[index].goods = new_pk_list_goods;
5402 5458  
5403   -
5404 5459 console.log(this.data.send_gf, "----");
5405   -
5406 5460 th.calculatePrice();
  5461 +
5407 5462 } else {
5408 5463 var new_pk_list_goods = [];
5409 5464 //-- 当是立即购买的时候 --
... ... @@ -5552,6 +5607,206 @@ Page({
5552 5607 } else {
5553 5608 func();
5554 5609 }
  5610 + },
  5611 +
  5612 + //子组件返回的优化
  5613 + select_coll(e){
  5614 + console.log("--1111--aaa--");
  5615 + console.log(e);
  5616 + //-- 如果是购物车的选择添加搭配商品 --
  5617 + if(e.detail.is_cart==1){
  5618 + this.select_coll_buy_cart(e.detail);
  5619 + }else{
  5620 + this.select_coll_buy_now(e.detail);
  5621 + }
  5622 + },
  5623 +
  5624 + //立即购买的时候,选中和不选中搭配商品
  5625 + async select_coll_buy_now(e){
  5626 + var th=this;
  5627 + //--按钮变灰色 --
  5628 + th.setData({submit:1});
  5629 + //如果是选中
  5630 + if(e.selected){
  5631 + var item=this.data.all_collocation_list[e.index];
  5632 + item.goods_num=1;
  5633 + item.goods_price=item.price;
  5634 + item.is_collocation=1;
  5635 +
  5636 + var coll_arr=[];
  5637 + if(this.data.collocation_goods && this.data.collocation_goods.length){
  5638 + coll_arr=this.data.collocation_goods;
  5639 + }
  5640 + coll_arr.push(item);
  5641 + this.setData({collocation_goods:coll_arr});
  5642 + //让主商品的活动变成5,搭配购
  5643 + this.setData({'bn_goods.prom_type':5, 'bn_goods.prom_id':coll_arr[0].prom_id });
  5644 +
  5645 + var is_has_main=coll_arr.findIndex(function(e){
  5646 + return e.goods_id==th.data.bn_goods.goods_id;
  5647 + })
  5648 +
  5649 + //要进行深拷贝
  5650 + var coll_arr_new=JSON.parse(JSON.stringify(coll_arr));
  5651 + coll_arr_new.unshift(this.data.bn_goods);
  5652 +
  5653 + await th.get_collocation_list(coll_arr_new);
  5654 + //计算价格
  5655 + th.calculatePrice2();
  5656 + th.get_cart_quan();
  5657 +
  5658 + }else{
  5659 + var item=this.data.all_collocation_list[e.index];
  5660 + var coll_arr=this.data.collocation_goods;
  5661 + var find=coll_arr.findIndex(function (e){
  5662 + return e.goods_id==item.goods_id;
  5663 + })
  5664 + coll_arr.splice(find,1);
  5665 +
  5666 + //当coll_arr的长度等于1的时候,说明没有选中搭配商品,只有主商品了
  5667 + if(!coll_arr || coll_arr.length<1){
  5668 + //让主商品的活动变成0,取消搭配购
  5669 + this.setData({'bn_goods.prom_type':0, 'bn_goods.prom_id':0,collocation_goods:[] });
  5670 + //计算价格
  5671 + th.calculatePrice2();
  5672 + //获取优惠券
  5673 + th.get_buy_now_quan();
  5674 +
  5675 + }else{
  5676 + this.setData({collocation_goods:coll_arr});
  5677 + //要进行深拷贝
  5678 + var coll_arr_new=JSON.parse(JSON.stringify(coll_arr));
  5679 + coll_arr_new.unshift(this.data.bn_goods);
  5680 + await th.get_collocation_list(coll_arr);
  5681 + //计算价格
  5682 + th.calculatePrice2();
  5683 + th.get_cart_quan();
  5684 + }
  5685 + }
  5686 + },
  5687 + //购物车购买的时候,选中和不选中搭配商品
  5688 + async select_coll_buy_cart(e){
  5689 + var th=this;
  5690 + var cart_index=e.cart_index;
  5691 + var index=e.index;
  5692 +
  5693 + var collocationList=this.data.cartlist[cart_index].collocationList;
  5694 + var item=collocationList[cart_index];
  5695 + var goods=this.data.cartlist[cart_index].goods;
  5696 + var txt='cartlist['+cart_index+'].goods';
  5697 + var txt2='cartlist['+cart_index+'].collocationList['+index+'].selected';
  5698 +
  5699 + //-- 如果是选中 --
  5700 + if(e.selected){
  5701 + item.goods_num=1;
  5702 + item.goods_price=item.price;
  5703 + item.prom_type=5;
  5704 + item.is_collocation=1;
  5705 +
  5706 + goods.push(item);
  5707 +
  5708 + th.setData({[txt]:goods,[txt2]:1});
  5709 +
  5710 + th.data.old_cartlist=JSON.parse(JSON.stringify(this.data.cartlist));
  5711 + th.calculatePrice();
  5712 + //th.get_cart_quan();
  5713 +
  5714 + }else{
  5715 + var fd=goods.findIndex(function (e){
  5716 + return e.goods_id ==item.goods_id && e.prom_type ==5;
  5717 + })
  5718 +
  5719 + goods.splice(fd,1);
  5720 + th.setData({[txt]:goods,[txt2]:0});
  5721 + th.data.old_cartlist=JSON.parse(JSON.stringify(this.data.cartlist));
  5722 +
  5723 + th.calculatePrice();
  5724 + //th.get_cart_quan();
  5725 + }
  5726 + },
  5727 +
  5728 + //-- 搭配购的获取搭配商品的购物车计算价格的数组格式 --
  5729 + async get_collocation_list(narr){
  5730 + var gg = to.get_b_now();
  5731 + var th=this;
  5732 + var cart_arr = new Array();
  5733 + //-- 搭配促销的门店配送方式的修复 --
  5734 + var et = 1;
  5735 + var distr_t = 0; // 配送方式 0=用户自选 1=自提 2=物流
  5736 + for (var hi in narr) {
  5737 + var dis_t = narr[hi].distr_type;
  5738 + if (dis_t == 2) {
  5739 + th.setData({ is_all_zt: 0 });
  5740 + et = 0;
  5741 + }
  5742 + if (dis_t > 0) {
  5743 + distr_t = dis_t;
  5744 + }
  5745 +
  5746 + //-- 如果有一件代发的商品或者不是同城配送的配送 --
  5747 + if(narr[hi].is_same_city!=1 || narr[hi].whsle_id>0){
  5748 + th.setData({show_same_city:0})
  5749 + }
  5750 + }
  5751 + //自选的时候,系统配置了默认的配送方式是物流的时候
  5752 + if (distr_t == 0 && th.data.json_d.pickupway && th.data.json_d.pickupway == 1) {
  5753 + et = 0; th.setData({ is_all_zt: 0 });
  5754 + }
  5755 +
  5756 + var m_wind=th.data.m_wind;
  5757 + var ie = {
  5758 + pickup_id: gg.pick_id,
  5759 + pname: gg.pick_name,
  5760 + goods: narr,
  5761 + exp_type: et,
  5762 + wind: m_wind,
  5763 + distr_t: distr_t,
  5764 + bn_t_exp_t: distr_t,
  5765 + goods_price: 0,
  5766 + shipping_price: 0,
  5767 + user_money: 0,
  5768 + total_amount: 0,
  5769 + order_amount: 0,
  5770 + user_note: ""
  5771 + };
  5772 +
  5773 + var cart_commission=0;
  5774 + //-- 循环计算一下线下取价 --
  5775 + //计算佣金的商品
  5776 + var commission_gds=[];
  5777 + for (var c = 0; c < narr.length; c++) {
  5778 + var hr={
  5779 + goods_id:narr[c].goods_id,
  5780 + goods_num:narr[c].goods_num,
  5781 + prom_type:0,
  5782 + prom_id:0,
  5783 + }
  5784 + commission_gds.push(hr);
  5785 +
  5786 + }
  5787 +
  5788 + //获取购物车的佣金,此处要优化调用接口,获取佣金
  5789 + var req_d = {
  5790 + user_id:getApp().globalData.user_id,goods_ids:commission_gds,store_id: os.stoid
  5791 + }
  5792 + var back_data=null;
  5793 + await getApp().request.promisePost("/api/weshop/order/getrebateSum", {
  5794 + is_json: 1, data: req_d
  5795 + }).then(rs => {
  5796 + if (rs.data.code == 0) back_data =rs.data.data;
  5797 + });
  5798 +
  5799 + if(back_data && parseFloat(back_data)) {
  5800 + ie.can_usecommise =parseFloat(back_data);
  5801 + cart_commission = ie.can_usecommise;
  5802 + }
  5803 +
  5804 + cart_arr.push(ie);
  5805 + if(cart_commission){
  5806 + th.setData({cart_commission});
  5807 + }
  5808 +
  5809 + th.data.old_cartlist = cart_arr;
5555 5810 }
5556 5811  
5557 5812  
... ...
pages/cart/cart2/cart2.json
... ... @@ -2,6 +2,7 @@
2 2 "navigationBarTitleText": "填写订单",
3 3 "enablePullDownRefresh": false,
4 4 "usingComponents": {
5   - "warn": "/components/long_warn/long_warn"
  5 + "warn": "/components/long_warn/long_warn",
  6 + "cart_collect_temp": "/components/cart_collect_temp/cart_collect_temp"
6 7 }
7 8 }
8 9 \ No newline at end of file
... ...
pages/cart/cart2/cart2.wxml
... ... @@ -108,6 +108,11 @@
108 108 </navigator>
109 109 </view>
110 110  
  111 + <!-- 使用搭配 -->
  112 + <cart_collect_temp bind:childFun="select_coll"
  113 + is_cart="1" cart_index="{{index}}"
  114 + all_collocation_list="{{item.collocationList}}" />
  115 +
111 116 <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
112 117 <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}">
113 118 <view class="flex">
... ... @@ -127,10 +132,6 @@
127 132 <view bindtap="buycard" class="card_op">立即开通</view>
128 133 </view>
129 134  
130   -
131   -
132   -
133   -
134 135 <view class="set-mes bdr_b-14">
135 136 <view wx:if="{{order.store_prom}}">
136 137 <icon color="#f23030" size="16" type="info"></icon>
... ... @@ -217,7 +218,6 @@
217 218 </view>
218 219 </block>
219 220 </view>
220   -
221 221 <!-- 赠品的显示 -->
222 222 <view wx:if="{{send_gf[item.pickup_id]}}">
223 223 <block wx:for="{{send_gf[item.pickup_id]}}" wx:for-item="iter">
... ... @@ -252,6 +252,7 @@
252 252 </view>
253 253  
254 254  
  255 +
255 256 <!-- 留言 -->
256 257 <view class="coupon-mes flex-vertical">
257 258 <view>留言</view>
... ... @@ -332,7 +333,7 @@
332 333 <view class="goods-img" style="position: relative">
333 334 <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image>
334 335  
335   - <image class="wh100 bdr14" src="{{item.original_img}}" binderror='cart_set_err' data-err="item.original_img"></image>
  336 + <image class="wh100 bdr14" src="{{item.original_img}}" binderror='cart_set_err' data-err="buy_now_gift_goods[{{index}}].original_img"></image>
336 337 </view>
337 338 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
338 339 <view class="goods-name ellipsis-2">{{item.goods_name}}</view>
... ... @@ -356,7 +357,7 @@
356 357 <!-- 搭配购买的功能实现 -->
357 358 <view class="order-detail" wx:for="{{collocation_goods}}">
358 359 <view class="goods-img">
359   - <image class="wh100 bdr14" src="{{imgUrl+item.original_img}}" binderror='err_img_collocation' data-err="item.original_img"></image>
  360 + <image class="wh100 bdr14" src="{{imgUrl+item.original_img}}" binderror='cart_set_err1' data-err="collocation_goods[{{index}}].original_img"></image>
360 361 </view>
361 362 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
362 363 <view class="goods-name ellipsis-2">{{item.goods_name}}</view>
... ... @@ -375,6 +376,10 @@
375 376 </view>
376 377 </block>
377 378  
  379 + <!-- 使用搭配 -->
  380 + <cart_collect_temp bind:childFun="select_coll" all_collocation_list="{{all_collocation_list}}" />
  381 +
  382 +
378 383 <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
379 384 <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}">
380 385 <view class="flex">
... ... @@ -441,8 +446,6 @@
441 446 </view>
442 447  
443 448  
444   -
445   -
446 449 <view class="set-mes bdr_b-14">
447 450  
448 451 <view wx:if="{{order.store_prom}}">
... ... @@ -478,8 +481,6 @@
478 481 </view>
479 482 </view>
480 483  
481   -
482   -
483 484 <!-- 留言 -->
484 485 <view class="coupon-mes flex-vertical">
485 486 <view>留言</view>
... ...
pages/distribution/distribution.wxml
... ... @@ -95,7 +95,7 @@
95 95 <view class="left f1">
96 96 <view class="icon-container"><text class="iconfont icon-huiyuan1"></text></view>
97 97 <view>仅限PLUS卡({{item.conditonRemark}})的会员,
98   - <text wx:if="{{item.pass}}" class="c-red" bindtap="goto" data-url="/pages/user/cardinfo/cardinfo">PLUS详情</text>
  98 + <text wx:if="{{item.pass}}" class="c-red" bindtap="goto" data-url="/packageE/pages/user/cardinfo/cardinfo">PLUS详情</text>
99 99 <text wx:else class="c-red" bindtap="goto" data-url="/pages/user/plus/plus">立即升级</text>
100 100 </view>
101 101 </view>
... ...
pages/giftpack/buygiftpack/giftpackbuy.wxml
... ... @@ -24,7 +24,7 @@
24 24 <!--<block wx:for="{{wareCard}}" wx:if="{{now > filter.gettimestamp(items.starTime) || (items.is_show && now > items.show_time)}}" wx:for-item="items" wx:for-index="index" wx:key="index">-->
25 25 <block wx:for="{{wareCard}}" wx:for-item="items" wx:for-index="index" wx:key="index">
26 26 <view class="content_box">
27   - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&orderSn=''">
  27 + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=1&lbId={{items.lbId}}&cover_img={{items.cover_img}}&orderSn=''">
28 28 <view class="content_box_img">
29 29 <image src="{{iurl+items.cover_img}}" lazy-load="true" binderror="bind_bnerr2" wx:if="{{items.cover_img}}" data-errorimg="wareCard[{{index}}].cover_img"></image>
30 30 <image src="{{iurl+items.lbUrl}}" lazy-load="true" binderror="bind_bnerr2" wx:else data-errorimg="wareCard[{{index}}].lbUrl"></image>
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -71,6 +71,7 @@ Page({
71 71  
72 72 sto_sele_name_1: '',
73 73 share_goods_img:'', //礼包的分享图
  74 + giftImageCover:null,
74 75 canvasHidden:true,
75 76  
76 77 screenWidth: 0
... ... @@ -251,8 +252,11 @@ Page({
251 252 },
252 253 success: function (res) {
253 254 if (res.data.code == 0) {
  255 + console.log('商品------++')
  256 + console.log(res)
254 257 th.setData({
255   - giftImage: th.data.iurl + res.data.data.lbUrl,
  258 + giftImage: th.data.iurl + res.data.data.lbUrl,
  259 + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
256 260 giftTitle: res.data.data.giftTitle,
257 261 default_color: res.data.data.bgcolor
258 262 })
... ... @@ -346,7 +350,8 @@ Page({
346 350 success: function success(res) {
347 351 if (res.data.code == 0) {
348 352 _this2.setData({
349   - giftImage: th.iurl + res.data.data.lbUrl,
  353 + giftImage: th.iurl + res.data.data.lbUrl,
  354 + giftImageCover: th.iurl + (_this2.data.params.cover_img ? _this2.data.params.cover_img: res.data.data.lbUrl),
350 355 giftTitle: res.data.data.giftTitle,
351 356 default_color: res.data.data.bgcolor
352 357 })
... ... @@ -419,6 +424,7 @@ Page({
419 424 if (res.data.code == 0) {
420 425 th.setData({
421 426 giftImage: th.data.iurl + res.data.data.lbUrl,
  427 + giftImageCover: th.data.iurl + (th.data.params.cover_img ? th.data.params.cover_img: res.data.data.lbUrl),
422 428 giftTitle: res.data.data.lbTitle,
423 429 default_color: res.data.data.bgcolor
424 430 })
... ... @@ -964,6 +970,7 @@ Page({
964 970 th.get_goods_temp(function () {
965 971 var vpath = res.path;
966 972 var context = wx.createCanvasContext('share');
  973 + // let share_goods_img = th.params.cover_img
967 974 th.drawPoster(context, unit, th.data.share_goods_img, vpath, 0);
968 975  
969 976 //把画板内容绘制成图片,并回调 画板图片路径
... ... @@ -1116,7 +1123,7 @@ Page({
1116 1123 tt();
1117 1124 return false;
1118 1125 }
1119   - var img_url = ee.data.giftImage;
  1126 + var img_url = ee.data.giftImageCover ? ee.data.giftImageCover : ee.data.giftImage;
1120 1127 //获取商品是分享图信息
1121 1128 wx.getImageInfo({
1122 1129 src: img_url,
... ...
pages/giftpack/mygiftpack/mygiftpack.wxml
... ... @@ -23,7 +23,7 @@
23 23 </view>
24 24 <block wx:for="{{wareCard}}" wx:for-item="item" wx:for-index="index" wx:key="index">
25 25 <view class="content_box">
26   - <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}">
  26 + <view class="content_box_ware" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}">
27 27 <view class="content_box_img">
28 28 <!-- <image src="{{$GetInfo.imgHttp+item.$orig.lbUrl}}"></image> -->
29 29 <image wx:if="{{item.cover_img}}" src="{{iurl+item.cover_img}}" lazy-load="true" binderror="bind_bnerr2" data-errorimg="wareCard[{{index}}].cover_img"></image>
... ... @@ -93,7 +93,7 @@
93 93  
94 94 </view>
95 95 </view>
96   - <view class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&orderSn={{item.orderSn}}">
  96 + <view class="content_box_button" bindtap="navigateTo" data-url="/pages/giftpack/giftpacklist/giftpacklist?isBuy=0&lbId={{item.lbId}}&cover_img={{item.cover_img}}&orderSn={{item.orderSn}}">
97 97 <button>立即使用</button>
98 98 </view>
99 99 </view>
... ...
pages/goods/categoryList/categoryList.js
... ... @@ -75,6 +75,8 @@ Page({
75 75 load: 0,
76 76 xmlist: null,
77 77  
  78 + is_retail_price:0 //是否显示零售价
  79 +
78 80  
79 81 },
80 82  
... ... @@ -166,32 +168,11 @@ Page({
166 168 //计算等级价相关
167 169 var swithc_list = rs.switch_list;
168 170 var sw_arr = JSON.parse(swithc_list);
169   - //---如果后台又开等级卡的开关---
170   - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
171   - th.setData({ rank_switch: true });
172   - var user = getApp().globalData.userInfo;
173   - var ti = setInterval(function () {
174   - if (!user) return false;
175   - clearInterval(ti);
176   - //---回调卡的列表---
177   - th.getPlusCardType(function (ob) {
178   - th.setData({ card_list: ob.card_list });
179   - if (user.card_field && user['card_expiredate']) {
180   - var str = user['card_expiredate'].replace(/-/g, '/');
181   - var end = new Date(str);
182   - end = Date.parse(end) / 1000;
183   - var now = ut.gettimestamp();
184   -
185   - //--- 判断是等级会员,且在有效期范围内 ---
186   - if (user.card_field && now < end) {
187   - var card_name = ob.name_map.get(user.card_field);
188   - //if (card_name.length > 4) card_name = card_name.substring(0, 4);
189   - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list });
190   - }
191   - }
192   - })
193   - }, 500)
  171 +
  172 + if(sw_arr.is_retail_price){
  173 + th.setData({is_retail_price:1});
194 174 }
  175 +
195 176 });
196 177 },
197 178 onShow: function () {
... ... @@ -221,6 +202,11 @@ Page({
221 202 var data = e;
222 203 var switch_list_data = data.switch_list;
223 204 var switch_list = JSON.parse(switch_list_data);
  205 +
  206 + //---如果后台又开等级卡的开关---
  207 + ut.get_plus_name_price(switch_list,that);
  208 +
  209 +
224 210 var is_newsgoodstype = switch_list.is_newsgoodstype;
225 211 if (is_newsgoodstype == undefined) {
226 212 is_newsgoodstype = 0;
... ...
pages/goods/categoryList/categoryList.wxml
... ... @@ -584,7 +584,8 @@
584 584 <view class="item-cont">
585 585 <view class="title">{{item.goods_name}}</view>
586 586 <!-- 判断是否有活动价 -->
587   - <block wx:if="{{item.prom_price>0 || item.prom_integral}}">
  587 + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}">
  588 +
588 589 <view class="flex ai-center">
589 590 <!-- 活动价 -->
590 591 <view class="price">
... ... @@ -592,7 +593,7 @@
592 593 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
593 594 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
594 595 </view>
595   - <!-- <view class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>-->
  596 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>
596 597 </view>
597 598  
598 599 <view class="comment">
... ... @@ -605,12 +606,14 @@
605 606 </block>
606 607 <block wx:else>
607 608  
  609 +
608 610 <!-- 商品价格,先判断下是后又等级价-->
609 611 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
610 612  
611 613  
612 614 <!-- 当会员是等级卡的时候 -->
613 615 <block wx:if="{{card_field}}">
  616 +
614 617 <!-- 等级价>0 -->
615 618 <block wx:if="{{item[card_field]>0}}">
616 619 <view class="flex ai_and">
... ... @@ -621,7 +624,7 @@
621 624 </view>
622 625 </view>
623 626 <view class="comment flex jc_sb">
624   - <!-- <view class="word-line xc-ash rmb fs24">{{item.market_price}}</view>-->
  627 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24">{{item.market_price}}</view>
625 628 <view class="fs22 pdt10 t-r">
626 629 <span>评论{{item.comment_count}}</span>
627 630 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -631,7 +634,7 @@
631 634 <block wx:else>
632 635 <view class="flex ai-center">
633 636 <view class="price rmb">{{item.shop_price}}</view>
634   - <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->
  637 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
635 638 </view>
636 639  
637 640 <view class="comment">
... ... @@ -647,7 +650,7 @@
647 650 <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
648 651 <view class="flex ai-center">
649 652 <view class="price rmb">{{item.shop_price}}</view>
650   - <!-- <view class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>-->
  653 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>
651 654 </view>
652 655 <view class="comment">
653 656 <view class="flex ai-center">
... ... @@ -668,8 +671,8 @@
668 671 </block>
669 672 <block wx:else>
670 673 <view class="flex ai-center">
671   - <view class="price rmb">{{item.shop_price}}</view>
672   - <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->
  674 + <view class="price rmb">{{item.shop_price}}</view>
  675 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
673 676 </view>
674 677 <!-- <view class="price">¥{{item.shop_price}}</view> -->
675 678 <view class="comment">
... ... @@ -683,9 +686,10 @@
683 686 </block>
684 687 </block>
685 688 <block wx:else>
  689 +
686 690 <view class="flex ai-center">
687 691 <view class="price rmb">{{item.shop_price}}</view>
688   - <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->
  692 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
689 693 </view>
690 694 <!-- <view class="price">¥{{item.shop_price}}</view> -->
691 695 <view class="comment">
... ...
pages/goods/com_screen.js 0 → 100644
  1 +const ut = require("../../utils/util.js");
  2 +var regeneratorRuntime = require('../../utils/runtime.js');
  3 +var oo = getApp().globalData.setting;
  4 +module.exports = {
  5 + //下拉排序
  6 + bind_pk_sort:function (e,th){
  7 + var index=e.detail.value;
  8 + var ob=th.data.more_sort_arr[index];
  9 +
  10 + var url = th.data.requestUrl;
  11 + if (th.data.tabname!=ob.value){
  12 + th.setData({ tabname: ob.value, adname: "desc" });
  13 + }
  14 + th.resetData(), th.requestGoodsList(url);
  15 + },
  16 +
  17 + //-- 获取列表 --
  18 + set_screen:async function (url,th){
  19 + if(!url) url=th.data.requestUrl;
  20 +
  21 + var arr=url.split('1=1&');
  22 + url='/api/weshop/goods/goodsBrandGroup?'+arr[1];
  23 +
  24 + var screen_brand=null;
  25 + var screen_nation=null;
  26 + var screen_price=null;
  27 + var screen_cate=null;
  28 + //如果有分类的话
  29 + if( th.data.cat_id && !th.data.screen_cate){
  30 + var c_url="/api/weshop/goodscategory/get/"+oo.stoid+"/"+ th.data.cat_id;
  31 + var f_cate=null;
  32 + await getApp().request.promiseGet(c_url,{
  33 + }).then(res=>{
  34 + if(res.data.code==0 && res.data.data){
  35 + f_cate=res.data.data;
  36 + }
  37 + })
  38 +
  39 + //分类必须有parent_id_path值
  40 + if(f_cate && f_cate['parent_id_path']){
  41 + var new_arr=f_cate['parent_id_path'].split('_');
  42 + c_url='/api/weshop/goodscategory/page?store_id='+oo.stoid+'&parent_id_path='+(new_arr[0]+"_"+new_arr['1']);
  43 + await getApp().request.promiseGet(c_url,{
  44 + data:{level:2,pageSize:1000}
  45 + }).then(res=>{
  46 + if(ut.ajax_ok(res) ){
  47 + screen_cate=res.data.data.pageData.filter(function(e){
  48 + return e.name
  49 + });
  50 + }
  51 + })
  52 + }
  53 +
  54 + }
  55 +
  56 +
  57 + if(url.indexOf('brand_id')==-1) {
  58 + var url1 = url + "&grouptype=1";
  59 + await getApp().request.promiseGet(url1, {
  60 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  61 + }).then(res => {
  62 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  63 + screen_brand = res.data.data.filter(function(e){
  64 + return e.name
  65 + });
  66 + }
  67 + })
  68 + }
  69 +
  70 + if(url.indexOf('nation_id')==-1) {
  71 + url1 = url + "&grouptype=2";
  72 + await getApp().request.promiseGet(url1, {
  73 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  74 + }).then(res => {
  75 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  76 + screen_nation = res.data.data.filter(function(e){
  77 + return e.name;
  78 + });
  79 + }
  80 + })
  81 + }
  82 +
  83 +
  84 + if(url.indexOf('startprice')==-1) {
  85 + url1 = url + "&grouptype=3";
  86 + await getApp().request.promiseGet(url1, {
  87 + data: {is_mainshow: 1, isonsale: 1, store_id: oo.stoid}
  88 + }).then(res => {
  89 + if (res.data.code == 0 && res.data.data && res.data.data.length) {
  90 + var price = res.data.data;
  91 + var max_price = price[0].final_price;
  92 + var psize = Math.ceil(max_price / 5); // 每一段累积的价钱
  93 + var parr = [];
  94 + for (var i = 0; i < 5; i++) {
  95 + var start = i * psize;
  96 + var end = start + psize;
  97 + // 如果没有这个价格范围的商品则不列出来
  98 + var ii = false;
  99 + for (var v in price) {
  100 + var item_p = price[v];
  101 + if (item_p.final_price > start && item_p.final_price <= end) {
  102 + ii = true;
  103 + }
  104 + }
  105 + if (ii == false) continue;
  106 + var obj = {};
  107 + obj['price'] = start + "-" + end;
  108 + if (i == 0) obj['name'] = end + "元以下";
  109 + else if (i == 4) obj['name'] = start + "元以上";
  110 + else obj['name'] = start + "-" + end + '元';
  111 + parr.push(obj)
  112 + }
  113 + screen_price = parr;
  114 + }
  115 + })
  116 + }
  117 +
  118 + th.setData({screen_brand,screen_nation,screen_price,screen_cate})
  119 +
  120 + },
  121 +
  122 +
  123 + filterGoods:function (e,th){
  124 +
  125 + var index=e.currentTarget.dataset.index;
  126 + var type=e.currentTarget.dataset.type;
  127 + var url=th.data.requestUrl;
  128 +
  129 + switch (type){
  130 + case "1"://分类
  131 + var item=th.data.screen_cate[index];
  132 + if( th.data.cat_id){
  133 + var arr_m=url.split("1=1&");
  134 + var arr_m2=arr_m[1].split('&');
  135 + var url="";
  136 + for(var jj in arr_m2){
  137 + if(arr_m2[jj].indexOf('cat_id')>=-1){
  138 + url+="&cat_id="+item.id;
  139 + }else if(arr_m2[jj].indexOf('pid')>=-1){
  140 + url+="&pid="+item.parent_id;
  141 + }else{
  142 + url+="&"+arr_m2[jj];
  143 + }
  144 + }
  145 + }else {
  146 + url+="&cat_id="+item.id+"&pid="+item.parent_id;
  147 + }
  148 + url=arr_m[0]+"1=1&"+url;
  149 + break;
  150 + case "2"://国别
  151 + var item=th.data.screen_nation[index];
  152 + url+="&nation_id="+item.nation_id;
  153 + break;
  154 + case "3"://品牌
  155 + var item=th.data.screen_brand[index];
  156 + url+="&brand_id="+item.brand_id;
  157 + break;
  158 + case "4"://价格
  159 + var item=th.data.screen_price[index];
  160 + var p_arr=item.price.split('-');
  161 + url+="&startprice="+p_arr[0]+"&endprice="+p_arr[1];
  162 + break;
  163 + }
  164 +
  165 + th.setData({screen_brand:null,screen_nation:null,openFilterModal:0,is_go:0,
  166 + screen_price:null,screen_cate:null,requestData:null})
  167 + th.data.currentPage=1;
  168 + //进行筛选
  169 + this.set_screen(url,th);
  170 +
  171 + //开始点击分类
  172 + if(th.requestGoodsList) {
  173 + //-- 开始点击分类 --
  174 + th.requestGoodsList(url);
  175 + }else if(th.requestSearch){
  176 + //-- 重新开始搜索 --
  177 + th.requestSearch(url);
  178 + }
  179 + },
  180 +
  181 + //-- 展开和收起的控制 --
  182 + open_more:function(e,th){
  183 + var type=e.currentTarget.dataset.type;
  184 + switch(type){
  185 + case "1":
  186 + if(th.data.fil_cate_state==0 || th.data.fil_cate_state==2) th.setData({fil_cate_state:1})
  187 + else th.setData({fil_cate_state:2})
  188 + break;
  189 + case "2":
  190 + if(th.data.fil_nation_state==0 || th.data.fil_nation_state==2) th.setData({fil_nation_state:1})
  191 + else th.setData({fil_nation_state:2})
  192 + break;
  193 + case "3":
  194 + if(th.data.fil_brand_state==0 || th.data.fil_brand_state==2) th.setData({fil_brand_state:1})
  195 + else th.setData({fil_brand_state:2})
  196 + break;
  197 + case "4":
  198 + if(th.data.fil_price_state==0 || th.data.fil_price_state==2) th.setData({fil_price_state:1})
  199 + else th.setData({fil_price_state:2})
  200 + break;
  201 +
  202 + }
  203 + },
  204 +
  205 + clear_fil(th){
  206 + var url=th.data.old_req_url;
  207 + th.setData({screen_brand:null,screen_nation:null,openFilterModal:0,is_go:0,
  208 + screen_price:null,screen_cate:null,requestData:null})
  209 + th.data.currentPage=1;
  210 +
  211 + //进行筛选
  212 + this.set_screen(url,th);
  213 + if(th.requestGoodsList) {
  214 + //-- 开始点击分类 --
  215 + th.requestGoodsList(url);
  216 + }else if(th.requestSearch){
  217 + //-- 重新开始搜索 --
  218 + th.requestSearch(url);
  219 + }
  220 + }
  221 +
  222 +
  223 +}
0 224 \ No newline at end of file
... ...
pages/goods/com_screen.wxml 0 → 100644
  1 +<!-- 点击筛选的优化 -->
  2 +<view hidden="{{!openFilterModal}}">
  3 + <view bindtap="closeFilterModal" class="cover-layer" style="z-index:1000"></view>
  4 + <view class="filter-modal">
  5 + <!-- 顶部标题 -->
  6 + <view class="flex jc-center ai_c t-c" style="height:80rpx">
  7 + 筛选
  8 + <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon>
  9 + </view>
  10 + <view class="filter-box" wx:if="{{screen_cate && screen_cate.length > 0}}">
  11 + <view class="f_cate_item fs28">
  12 + <text>分类</text>
  13 + <view class="fs24 flex jc-center ai_c" style="color:#666" bindtap="open_more" data-type="1">
  14 + <block wx:if="{{fil_cate_state==0}}"><text>全部展开</text><text class="iconfont icon-arrow_down"></text></block>
  15 + <block wx:if="{{fil_cate_state==1}}"><text>收起</text><text class="iconfont icon-arrow_down up_ar" ></text></block>
  16 + <block wx:if="{{fil_cate_state==2}}"><text>展开</text><text class="iconfont icon-arrow_down"></text></block>
  17 + </view>
  18 + </view>
  19 + <view class="filter-items fs26 {{fil_cate_state==0?'normal_to':(fil_cate_state==2?'back_to':'') }} " style="padding:0 20rpx">
  20 + <block wx:for="{{screen_cate}}">
  21 + <view bindtap="filterGoods" data-type="1" data-index="{{index}}" class="f_cate_item">{{item.name}}
  22 + </view>
  23 + </block>
  24 + </view>
  25 + </view>
  26 +
  27 + <view class="filter-box" wx:if="{{screen_nation && screen_nation.length>0}}">
  28 + <view class="f_cate_item fs28">国别
  29 + <view class="fs24 flex jc-center ai_c" style="color:#666" bindtap="open_more" data-type="2">
  30 + <block wx:if="{{fil_nation_state==0}}"><text>全部展开</text><text class="iconfont icon-arrow_down"></text></block>
  31 + <block wx:if="{{fil_nation_state==1}}"><text>收起</text><text class="iconfont icon-arrow_down up_ar" ></text></block>
  32 + <block wx:if="{{fil_nation_state==2}}"><text>展开</text><text class="iconfont icon-arrow_down"></text></block>
  33 + </view>
  34 + </view>
  35 + <view class="filter-items mgt20 fs26 {{fil_nation_state==0?'normal_to':(fil_nation_state==2?'back_to':'') }} ">
  36 + <block wx:for="{{screen_nation}}">
  37 + <view wx:if="{{item.name}}" bindtap="filterGoods" data-type="2" data-index="{{index}}"
  38 + class="filter-item">{{item.name}}
  39 + </view>
  40 + </block>
  41 + </view>
  42 + <view style="clear:both"></view>
  43 + </view>
  44 + <view class="filter-box" wx:if="{{screen_brand && screen_brand.length > 0}}">
  45 + <view class="f_cate_item fs28">品牌
  46 + <view class="fs24 flex jc-center ai_c" style="color:#666" bindtap="open_more" data-type="3">
  47 + <block wx:if="{{fil_brand_state==0}}"><text>全部展开</text><text class="iconfont icon-arrow_down"></text></block>
  48 + <block wx:if="{{fil_brand_state==1}}"><text>收起</text><text class="iconfont icon-arrow_down up_ar" ></text></block>
  49 + <block wx:if="{{fil_brand_state==2}}"><text>展开</text><text class="iconfont icon-arrow_down"></text></block>
  50 + </view>
  51 +
  52 + </view>
  53 + <view class="filter-items mgt20 fs26 {{fil_brand_state==0?'normal_to':(fil_brand_state==2?'back_to':'') }} ">
  54 + <block wx:for="{{screen_brand}}">
  55 + <view wx:if="{{item.name}}" bindtap="filterGoods" data-type="3" data-index="{{index}}"
  56 + class="filter-item">{{item.name}}
  57 + </view>
  58 + </block>
  59 + </view>
  60 + <view style="clear:both"></view>
  61 + </view>
  62 + <view class="filter-box" wx:if="{{screen_price}}">
  63 + <view class="f_cate_item fs28">价格
  64 + <view class="fs24 flex jc-center ai_c" style="color:#666" bindtap="open_more" data-type="4">
  65 + <block wx:if="{{fil_price_state==0}}"><text>全部展开</text><text class="iconfont icon-arrow_down"></text></block>
  66 + <block wx:if="{{fil_price_state==1}}"><text>收起</text><text class="iconfont icon-arrow_down up_ar" ></text></block>
  67 + <block wx:if="{{fil_price_state==2}}"><text>展开</text><text class="iconfont icon-arrow_down"></text></block>
  68 + </view>
  69 +
  70 + </view>
  71 + <view class="filter-items mgt20 fs26 {{fil_price_state==0?'normal_to':(fil_price_state==2?'back_to':'') }} ">
  72 + <block wx:for="{{screen_price}}">
  73 + <view bindtap="filterGoods" class="filter-item" data-type="4" data-index="{{index}}">{{item.name}}
  74 + </view>
  75 + </block>
  76 + </view>
  77 + <view style="clear:both"></view>
  78 + </view>
  79 +
  80 + <view class="flex jc_sb ai_c" style="padding:0 20rpx">
  81 + <view bindtap="clear_fil" class="fil_btn fil_cancle">取消筛选</view>
  82 + <view bindtap="closeFilterModal" class="fil_btn fil_sure">确定</view>
  83 + </view>
  84 +
  85 + <view class="filter-box" style="height:30rpx"></view>
  86 + </view>
  87 +</view>
0 88 \ No newline at end of file
... ...
pages/goods/com_screen.wxss 0 → 100644
  1 +/*--三角形的显示--*/
  2 +.arrow_down,.arrow_up{
  3 + width: 0px;
  4 + height: 0px;
  5 + font-size: 0;
  6 + line-height: 0;
  7 + border-right: 5px solid transparent;
  8 + border-left: 5px solid transparent;
  9 +}
  10 +
  11 +.arrow_down {
  12 + border-top: 5px solid #a5a5a5; margin-top: 4rpx;
  13 +}
  14 +.arrow_up{
  15 + border-bottom: 5px solid #a5a5a5;
  16 +}
  17 +
  18 +.arrow_down.on{
  19 + border-top: 5px solid #F4281C ;
  20 +}
  21 +.arrow_up.on{
  22 + border-bottom: 5px solid #F4281C;
  23 +}
  24 +
  25 +.f_cate_item{ height:80rpx; display:flex; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #dcdcdc;}
  26 +
  27 +.filter-items{ color: #666; overflow:hidden}
  28 +.filter-items.normal_to{ max-height: 260rpx}
  29 +.filter-items.back_to{ height: 0rpx}
  30 +
  31 +.up_ar{ transform: rotate(180deg)}
  32 +.fil_btn{ width: 47%; height:80rpx; border-radius:10rpx; display: flex;
  33 + justify-content:center; align-items: center; font-size:28rpx;color:#fff}
  34 +.fil_cancle{ background-color: #25c6fc }
  35 +.fil_sure{ background-color:#dd272c }
  36 +
  37 +.filter-modal {
  38 + position: fixed;
  39 + left: 150rpx;
  40 + top: 0;
  41 + right: 0;
  42 + bottom: 0;
  43 + z-index: 1120;
  44 + background-color: white;
  45 + overflow-x: hidden;
  46 +}
  47 +
  48 +.filter-box {
  49 + box-sizing: border-box;
  50 + width: 100%;
  51 + font-size: 28rpx;
  52 + padding: 20rpx;
  53 +}
  54 +
  55 +.filter-name {
  56 + width: 100%;
  57 + padding: 20rpx 0;
  58 + word-break: keep-all;
  59 + white-space: nowrap;
  60 + text-overflow: ellipsis;
  61 + overflow: hidden;
  62 + font-size: 30rpx;
  63 +}
  64 +
  65 +.filter-item {
  66 + float: left;
  67 + width: fit-content;
  68 + max-width: 500rpx;
  69 + word-break: keep-all;
  70 + white-space: nowrap;
  71 + text-overflow: ellipsis;
  72 + overflow: hidden;
  73 + padding: 10rpx;
  74 + border-radius: 10rpx;
  75 + border: 1rpx #ddd solid;
  76 + margin: 0 10rpx 10rpx 0;
  77 + background-color: #fdfdfd;
  78 + color: #666;
  79 +}
0 80 \ No newline at end of file
... ...
pages/goods/goodsInfo/buy_com_pop.wxml 0 → 100644
  1 +<view class="spec-goods">
  2 + <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}"
  3 + binderror="pop_err_img" data-errorimg="data.original_img"></image>
  4 + <view class="spec-goods-info">
  5 + <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view>
  6 + <view class="flex ai_end xc-val-money">
  7 + <text class="fs20">¥</text>
  8 + <!-- 如果是等级会员,且有等级价 -->
  9 + <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}}</block>
  10 + <block wx:else>{{sele_g.shop_price}}</block>
  11 + </view>
  12 +
  13 + <view class="flex">
  14 + <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view>
  15 + <block wx:if="{{sales_rules==2}}">
  16 + <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">
  17 + 可售:{{def_pick_store.CanOutQty}}
  18 + </view>
  19 + <view class="spec-goods-stock" wx:else>可售:0</view>
  20 + </block>
  21 + <block wx:else>
  22 + <view class="spec-goods-stock">可售:{{sele_g.store_count}}</view>
  23 + </block>
  24 + </view>
  25 +
  26 +
  27 + </view>
  28 +
  29 + <!-- 选择门店模块 -->
  30 + <view class="flex-space-between address ai_end xc-width ">
  31 +
  32 + <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
  33 + <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
  34 + <view class="distance fs24 xc-ash" wx:if="{{def_pick_store.distance!=null}}">
  35 + 距离:{{def_pick_store.distance > 1000 ? filters.toFix(def_pick_store.distance / 1000, 2) + "km" : filters.toFix(def_pick_store.distance, 0) + "m"}}
  36 +
  37 + </view>
  38 + </view>
  39 +
  40 + <!-- 没有门店的时候 -->
  41 + <view class="flex" bindtap="choice_store" wx:else>
  42 + <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
  43 + <view class="fs30" style="color:black;">选择门店</view>
  44 + </view>
  45 +
  46 + <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28"
  47 + bindtap="choice_store">更多门店<text class="right-arrow"></text>
  48 + </view>
  49 + </view>
  50 + <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
  51 + <block wx:else>
  52 + <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
  53 + <block wx:else>
  54 + <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
  55 + <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">
  56 + (库存不足)
  57 + </view>
  58 + </block>
  59 + </block>
  60 + <view class="fs24 xc-ash-9f xc-distance-top " wx:if="{{def_pick_store && def_pick_store.fulladdress}}">
  61 + 地址:{{def_pick_store.fulladdress}}
  62 + </view>
  63 +
  64 +
  65 + <!--商品的属性项目-->
  66 + <view class="xc-goods-attribute">
  67 + <view hidden="{{ismend==1}}" class="spec-name">商品规格</view>
  68 + <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;">
  69 + <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1"
  70 + data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g">
  71 + {{item.gg}}
  72 + </view>
  73 + </view>
  74 + </view>
  75 +
  76 + <view class="b_num">
  77 + <view>购买数量</view>
  78 + <view class="count">
  79 + <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}"
  80 + class="sub {{goodsInputNum <= 1 ? 'active':''}}">-
  81 + </view>
  82 + <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input>
  83 + <view bindtap="addCartNum" class="add">+</view>
  84 + </view>
  85 + </view>
  86 +</view>
  87 +<!-- 提示再买多少优惠 -->
  88 +<view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}">
  89 + 再买{{hui_condition.need}}
  90 + <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text>
  91 + <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text>
  92 + <text wx:if="{{hui_condition.past==1}}">,包邮</text>
  93 + <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text>
  94 + <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text>
  95 + <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text>
  96 + <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text>
  97 + <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text>
  98 +</view>
  99 +<!-- 按钮部分 -->
  100 +<view class="spec-cart-btns">
  101 +
  102 + <!-- 根本就找不到门店 -->
  103 + <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">
  104 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  105 + 配送不匹配
  106 + </view>
  107 + </block>
  108 + <block wx:else>
  109 + <!-- 根本就找不到门店 -->
  110 + <block wx:if="{{!only_pk && !def_pickpu_list}}">
  111 + <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">
  112 + 库存不足
  113 + </view>
  114 + </block>
  115 + <block wx:else>
  116 +
  117 +
  118 + <block wx:if="{{only_pk.length && !only_pk.length}}">
  119 + <view class="spec-cart-btn fs32" data-action="add"
  120 + style="background-color: #dcdcdc;color: #999;">库存不足
  121 + </view>
  122 + </block>
  123 + <block wx:else>
  124 + <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">
  125 + <view class="spec-cart-btn fs32" data-action="add"
  126 + style="background-color: #dcdcdc;color: #999">库存不足
  127 + </view>
  128 + </block>
  129 + <block wx:else>
  130 + <block wx:if="{{!def_pick_store}}">
  131 + <view class="spec-cart-btn fs32" data-action="add"
  132 + style="background-color: #dcdcdc;color: #999">请先选择门店
  133 + </view>
  134 + </block>
  135 + <block wx:else>
  136 + <block wx:if="{{data.store_count<=0}}">
  137 + <view class="spec-cart-btn fs32" data-action="add"
  138 + style="background-color: #dcdcdc;color: #999">库存不足
  139 + </view>
  140 + </block>
  141 + <block wx:else>
  142 + <view class="flex jc_sb">
  143 + <view class="spec-cart-btn spec-buy w40" bindtap="addCart"
  144 + data-action="add" style="background-color: #ffb03f;">加入购物车
  145 + </view>
  146 + <view class="spec-cart-btn spec-buy w40" bindtap="addCart"
  147 + data-action="buy">立即购买
  148 + </view>
  149 + </view>
  150 + </block>
  151 +
  152 + </block>
  153 + </block>
  154 + </block>
  155 + </block>
  156 + </block>
  157 +</view>
  158 +
... ...
pages/goods/goodsInfo/buy_flash_normal.wxml
1 1 <view bindtap="closeSpecModal_flash_normal" class="cover-layer"></view>
2   - <view class="spec-model">
3   - <view class="pding">
4   - <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon>
5   - <view class="spec-goods">
6   - <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
7   - <view class="spec-goods-info">
8   - <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view>
9   - <view class="flex ai_end xc-val-money">
10   - <text class="fs20">¥</text>
11   - <!-- 如果是等级会员,且有等级价 -->
12   - <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block>
13   - <block wx:else>{{sele_g.shop_price}}</block>
14   - </view>
15   -
16   - <view class="flex">
17   - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view>
18   - <block wx:if="{{sales_rules==2}}">
19   - <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view>
20   - <view class="spec-goods-stock" wx:else>可售:0</view>
21   - </block>
22   - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block>
23   - </view>
24   -
25   -
26   - </view>
27   -
28   - <!-- 选择门店模块 -->
29   - <view class="flex-space-between address ai_end xc-width ">
30   -
31   - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
32   - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
33   - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}">
34   - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
35   -
36   - </view>
37   - </view>
38   -
39   - <!-- 没有门店的时候 -->
40   - <view class="flex" bindtap="choice_store" wx:else>
41   - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
42   - <view class="fs30" style="color:black;">选择门店</view>
43   - </view>
44   -
45   - <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view>
46   - </view>
47   - <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
48   - <block wx:else>
49   - <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
50   - <block wx:else>
51   - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
52   - <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2 && prom_type==0}}">(库存不足)</view>
53   - </block>
54   - </block>
55   - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view>
56   -
57   -
58   - <!--商品的属性项目-->
59   - <view class="xc-goods-attribute">
60   - <view hidden="{{ismend==1}}" class="spec-name">商品规格</view>
61   - <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;">
62   - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g">
63   - {{item.gg}}
64   - </view>
65   - </view>
66   - </view>
67   -
68   - <view class="b_num">
69   - <view>购买数量</view>
70   - <view class="count">
71   - <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view>
72   - <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input>
73   - <view bindtap="addCartNum" class="add">+</view>
74   - </view>
75   - </view>
76   - </view>
77   -
78   -
79   - <!-- 提示再买多少优惠 -->
80   - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}">
81   - 再买{{hui_condition.need}}
82   - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text>
83   - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text>
84   - <text wx:if="{{hui_condition.past==1}}">,包邮</text>
85   - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text>
86   - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text>
87   - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text>
88   - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text>
89   - <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text>
90   - </view>
91   -
92   -
93   - <!-- 按钮部分 -->
94   - <view class="spec-cart-btns">
95   -
96   - <!-- 根本就找不到门店 -->
97   - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">
98   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view>
99   - </block>
100   - <block wx:else>
101   - <!-- 根本就找不到门店 -->
102   - <block wx:if="{{!only_pk && !def_pickpu_list}}">
103   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view>
104   - </block>
105   - <block wx:else>
106   -
107   -
108   - <block wx:if="{{only_pk.length && !only_pk.length}}">
109   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view>
110   - </block>
111   - <block wx:else>
112   - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">
113   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view>
114   - </block>
115   - <block wx:else>
116   - <block wx:if="{{!def_pick_store}}">
117   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view>
118   - </block>
119   - <block wx:else>
120   - <block wx:if="{{data.store_count<=0}}">
121   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view>
122   - </block>
123   - <block wx:else>
124   - <view class="flex jc_sb">
125   - <view class="spec-cart-btn spec-buy w40" bindtap="addCart"
126   - data-action="add" style="background-color: #ffb03f;">加入购物车</view>
127   - <view class="spec-cart-btn spec-buy w40" bindtap="addCart"
128   - data-action="buy">立即购买</view>
129   - </view>
130   - </block>
131   -
132   - </block>
133   - </block>
134   - </block>
135   - </block>
136   - </block>
137   - </view>
138   -
139   - </view>
140   - </view>
141   - <view class="clear"></view>
142 2 \ No newline at end of file
  3 +<view class="spec-model">
  4 + <view class="pding">
  5 + <icon bindtap="closeSpecModal_flash_normal" class="modal-close" color="black" size="22" type="cancel"></icon>
  6 + <include src="buy_com_pop.wxml"></include>
  7 + </view>
  8 +</view>
  9 +<view class="clear"></view>
143 10 \ No newline at end of file
... ...
pages/goods/goodsInfo/buy_integral_normal.wxml
1   -<view bindtap="closeSpecModal_inte_normal" class="cover-layer"></view>
2   - <view class="spec-model">
3   - <view class="pding">
4   - <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon>
5   - <view class="spec-goods">
6   - <image class="wh100 spec-img xc-distance-bottom" bindtap="previewImage" src="{{sele_g.original_img}}" binderror="pop_err_img" data-errorimg="data.original_img"></image>
7   - <view class="spec-goods-info">
8   - <view class="spec-goods-name ellipsis-2">{{sele_g.goods_name}}</view>
9   - <view class="flex ai_end xc-val-money">
10   - <text class="fs20">¥</text>
11   - <!-- 如果是等级会员,且有等级价 -->
12   - <block wx:if="{{card_field && sele_g[card_field]>0}}">{{sele_g[card_field]}} </block>
13   - <block wx:else>{{sele_g.shop_price}}</block>
14   - </view>
15   -
16   - <view class="flex">
17   - <view class="spec-goods-stock">已售:{{sele_g.sales_sum}}</view>
18   - <block wx:if="{{sales_rules==2}}">
19   - <view class="spec-goods-stock" wx:if="{{def_pick_store && def_pick_store.CanOutQty}}">可售:{{def_pick_store.CanOutQty}}</view>
20   - <view class="spec-goods-stock" wx:else>可售:0</view>
21   - </block>
22   - <block wx:else><view class="spec-goods-stock">可售:{{sele_g.store_count}}</view></block>
23   - </view>
24   -
25   -
26   - </view>
27   -
28   - <!-- 选择门店模块 -->
29   - <view class="flex-space-between address ai_end xc-width ">
30   -
31   - <view class="flex ai_end" wx:if="{{def_pick_store && def_pick_store.pickup_name}}">
32   - <text class="fs30 xc-black3 shop_name">{{def_pick_store.pickup_name}}</text>
33   - <view class="distance fs24 xc-ash"wx:if="{{def_pick_store.distance!=null}}">
34   - 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
35   -
36   - </view>
37   - </view>
38   -
39   - <!-- 没有门店的时候 -->
40   - <view class="flex" bindtap="choice_store" wx:else>
41   - <image class="stores-img" src="{{iurl}}/miniapp/images/stores.png"></image>
42   - <view class="fs30" style="color:black;">选择门店</view>
43   - </view>
44   -
45   - <view hidden="{{has_def && sys_switch.is_pricing_open_store}}" class="red-co fs28" bindtap="choice_store" >更多门店<text class="right-arrow"></text></view>
46   - </view>
47   - <view wx:if="{{only_pk && !only_pk.length}}">(库存不足)</view>
48   - <block wx:else>
49   - <view wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">(库存不足)</view>
50   - <block wx:else>
51   - <view class="no_store" wx:if="{{def_pick_store.is_no_dis}}">(配送不匹配)</view>
52   - <view wx:elif="{{def_pick_store && !def_pick_store.CanOutQty && sales_rules==2}}">(库存不足)</view>
53   - </block>
54   - </block>
55   - <view class="fs24 xc-ash-9f xc-distance-top "wx:if="{{def_pick_store && def_pick_store.fulladdress}}">地址:{{def_pick_store.fulladdress}}</view>
56   -
57   -
58   - <!--商品的属性项目-->
59   - <view class="xc-goods-attribute">
60   - <view hidden="{{ismend==1}}" class="spec-name">商品规格</view>
61   - <view hidden="{{ismend==1}}" style="max-height: 120rpx;overflow-y: auto;">
62   - <view class="spec_bt {{gid==item.goods_id?'act':''}}" bindtap="sele_spec" data-nor="1" data-gid='{{item.goods_id}}' wx:for="{{sku_g_pt}}" wx:key="sku_g">
63   - {{item.gg}}
64   - </view>
65   - </view>
66   - </view>
67   -
68   - <view class="b_num">
69   - <view>购买数量</view>
70   - <view class="count">
71   - <view bindtap="{{goodsInputNum <= 1 ? '':'subCartNum'}}" class="sub {{goodsInputNum <= 1 ? 'active':''}}">-</view>
72   - <input bindblur="inputCartNum" type="number" value="{{goodsInputNum}}"></input>
73   - <view bindtap="addCartNum" class="add">+</view>
74   - </view>
75   - </view>
76   - </view>
77   -
78   -
79   - <!-- 提示再买多少优惠 -->
80   - <view style="margin-top: 35rpx;color:#333;font-size:28rpx;" wx:if="{{hui_condition}}">
81   - 再买{{hui_condition.need}}
82   - <text wx:if="{{hui_condition.money}}">,免{{hui_condition.money}}元</text>
83   - <text wx:if="{{hui_condition.sale}}">,打{{hui_condition.sale}}折</text>
84   - <text wx:if="{{hui_condition.past==1}}">,包邮</text>
85   - <text wx:if="{{hui_condition.intValue>0}}">,送{{hui_condition.intValue}}积分</text>
86   - <text wx:if="{{hui_condition.couponId>0}}">,送优惠券</text>
87   - <text wx:if="{{hui_condition.gift_id>0}}">,送赠品</text>
88   - <text wx:if="{{hui_condition.lb_id>0}}">,送礼包</text>
89   - <text wx:if="{{hui_condition.zxlb_id>0}}">,送专享礼包</text>
90   - </view>
91   -
92   -
93   - <!-- 按钮部分 -->
94   - <view class="spec-cart-btns">
95   -
96   -
97   - <!-- 根本就找不到门店 -->
98   - <block wx:if="{{def_pick_store && def_pick_store.is_no_dis}}">
99   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">配送不匹配</view>
100   - </block>
101   - <block wx:else>
102   - <!-- 根本就找不到门店 -->
103   - <block wx:if="{{!only_pk && !def_pickpu_list}}">
104   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view>
105   - </block>
106   - <block wx:else>
107   -
108   -
109   - <block wx:if="{{only_pk.length && !only_pk.length}}">
110   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999;">库存不足</view>
111   - </block>
112   - <block wx:else>
113   - <block wx:if="{{def_pickpu_list && !def_pickpu_list.length}}">
114   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view>
115   - </block>
116   - <block wx:else>
117   - <block wx:if="{{!def_pick_store}}">
118   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">请先选择门店</view>
119   - </block>
120   - <block wx:else>
121   - <!-- 线下库存 -->
122   - <block wx:if="{{sales_rules==2 && prom_type==0 && !sele_g.whsle_id}}">
123   - <block wx:if="{{def_pick_store && !def_pick_store.CanOutQty}}">
124   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">库存不足</view>
125   - </block>
126   - <block wx:else>
127   - <view class="flex jc_sb">
128   - <view class="spec-cart-btn spec-buy w40" bindtap="addCart"
129   - data-action="add" style="background-color: #ffb03f;">加入购物车</view>
130   - <view class="spec-cart-btn spec-buy w40" bindtap="addCart"
131   - data-action="buy">立即购买</view>
132   - </view>
133   - </block>
134   - </block>
135   - <!-- 线上库存 -->
136   - <block wx:else>
137   - <block wx:if="{{sele_g.store_count<=0}}">
138   - <view class="spec-cart-btn fs32" data-action="add" style="background-color: #dcdcdc;color: #999">
139   - 库存不足5
140   - </view>
141   - </block>
142   - <block wx:else>
143   - <view class="flex jc_sb">
144   - <view class="spec-cart-btn spec-buy w40" bindtap="addCart"
145   - data-action="add" style="background-color: #ffb03f;">加入购物车</view>
146   - <view class="spec-cart-btn spec-buy w40" bindtap="addCart"
147   - data-action="buy">立即购买</view>
148   - </view>
149   - </block>
150   -
151   - </block>
152   -
153   - </block>
154   - </block>
155   - </block>
156   - </block>
157   - </block>
158   - </view>
159   -
160   -
161   - </view>
162   - </view>
163   - <view class="clear"></view>
164 1 \ No newline at end of file
  2 +<view bindtap="closeSpecModal_inte_normal" class="cover-layer"></view>
  3 +<view class="spec-model">
  4 + <view class="pding">
  5 + <icon bindtap="closeSpecModal_inte_normal" class="modal-close" color="black" size="22" type="cancel"></icon>
  6 + <include src="buy_com_pop.wxml"></include>
  7 + </view>
  8 +</view>
  9 +<view class="clear"></view>
165 10 \ No newline at end of file
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -255,7 +255,9 @@ Page({
255 255 share_hidden: false,
256 256 all_activity_list: null, //所有活动的列表
257 257  
258   - hiddenCS: true,
  258 + hiddenCS: true,
  259 +
  260 + is_retail_price:0,
259 261 },
260 262  
261 263 //------初始化加载----------
... ... @@ -424,7 +426,8 @@ Page({
424 426 store_config: e,
425 427 sys_switch: json_d,
426 428 is_closecoupon: json_d.is_closecoupon,
427   - is_newsales_rules: json_d.is_newsales_rules
  429 + is_newsales_rules: json_d.is_newsales_rules,
  430 + is_retail_price: json_d.is_retail_price || 0
428 431 });
429 432 ee.init(gid);
430 433 //------几人评价-------
... ... @@ -438,38 +441,7 @@ Page({
438 441 var swithc_list = e.switch_list;
439 442 var sw_arr = JSON.parse(swithc_list);
440 443 //---如果后台又开等级卡的开关---
441   - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
442   - th.setData({rank_switch: true});
443   - //---回调卡的列表---
444   - th.getPlusCardType(function (ob) {
445   - th.setData({card_list: ob.card_list});
446   - var ti = setInterval(function () {
447   - var user = getApp().globalData.userInfo;
448   - if (!user) return false;
449   - clearInterval(ti);
450   - if (user.card_field && user['card_expiredate']) {
451   - var str = user['card_expiredate'].replace(/-/g, '/');
452   - var end = new Date(str);
453   - end = Date.parse(end) / 1000;
454   - var now = ut.gettimestamp();
455   - //--- 判断是等级会员,且在有效期范围内 ---
456   - if (user.card_field && now < end) {
457   - var card_name = ob.name_map.get(user.card_field);
458   - //if(card_name.length>6) card_name=card_name.substring(0,6);
459   -
460   - var is_near_date = 0;
461   - if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天
462   - th.setData({
463   - card_field: user.card_field,
464   - card_name: card_name,
465   - card_list: ob.card_list,
466   - is_near_date: is_near_date
467   - });
468   - }
469   - }
470   - }, 500)
471   - })
472   - }
  444 + ut.get_plus_name_price(sw_arr,th);
473 445  
474 446 }, 1);
475 447  
... ... @@ -750,8 +722,11 @@ Page({
750 722 fir_quan = res1.data.data.pageData;
751 723 })
752 724 }
  725 +
  726 + let arr=[]
  727 +
753 728 //过滤不是本商品的单品优惠券-------------------
754   - if(fir_quan.length > 0 ){
  729 + if(fir_quan && fir_quan.length > 0 ){
755 730 let goodInfo = ee.data.data
756 731 for (let index = fir_quan.length-1; index >= 0; index--) {
757 732 if (fir_quan[index].useobjecttype==20) { //判断是单品优惠券
... ... @@ -759,15 +734,18 @@ Page({
759 734 fir_quan.splice(index,1)
760 735 }
761 736 }
762   - }
763   - }
764   - let arr=[]
765   - let length = fir_quan.length
766   - if (length <= 3) {
767   - arr=fir_quan
768   - }else{
769   - arr=fir_quan.splice(0,3);
  737 + }
  738 +
  739 + let length = fir_quan.length
  740 + if (length <= 3) {
  741 + arr=fir_quan
  742 + }else{
  743 + arr=fir_quan.splice(0,3);
  744 + }
  745 +
770 746 }
  747 +
  748 +
771 749 //--------获取视频图片---------
772 750 await getApp().request.promiseGet("/api/weshop/goodsVideos/get/" + os.stoid + "/" + ee.data.gid, {
773 751 1: 1
... ... @@ -1418,6 +1396,8 @@ Page({
1418 1396 };
1419 1397  
1420 1398  
  1399 +
  1400 +
1421 1401 //-- 代发商品不参加优惠 --
1422 1402 if(th.data.sele_g.whsle_id && newd.prom_type==3){
1423 1403 newd.prom_type=0;
... ... @@ -1465,6 +1445,7 @@ Page({
1465 1445  
1466 1446 newd.prom_type = 0;
1467 1447 newd.prom_id = 0;
  1448 + newd.is_pd_normal=1;
1468 1449  
1469 1450 //---如果是线下门店销售的时候---
1470 1451 if (th.data.sales_rules == 2) {
... ... @@ -1788,7 +1769,7 @@ Page({
1788 1769 add_cart_next(e, t, a, o, newd, CanOutQty) {
1789 1770 var th = this, i = getApp().request;
1790 1771 //---如果商品不是积分购和拼团,要判断一个是否要进行等级价的判断------
1791   - if ((o.prom_type != 1 || o.prom_id <= 0) && ((o.prom_type != 6 && o.prom_type != 4 && o.prom_type != 2 ) || th.data.is_normal)) {
  1772 + if ((o.prom_type != 6 && o.prom_type != 4 && o.prom_type != 2 && o.prom_type != 1 ) || th.data.is_normal) {
1792 1773 var conf = th.data.bconfig;
1793 1774 if (conf.switch_list && getApp().globalData.userInfo['card_field'] && getApp().globalData.userInfo['card_expiredate']) {
1794 1775 var s_list = JSON.parse(conf.switch_list);
... ... @@ -2007,7 +1988,7 @@ Page({
2007 1988 getApp().goto(url);
2008 1989 } else {
2009 1990 //要判断积分购的普通购买有没有参加优惠活动
2010   - if (e.is_integral_normal == 1) {
  1991 + if (e.is_integral_normal == 1 || e.is_pd_normal == 1 ) {
2011 1992 this.check_nor_promgood(e.goods_id, function (res) {
2012 1993 if (res && res.cat_id) {
2013 1994 e.prom_type = 3;
... ... @@ -6363,7 +6344,7 @@ Page({
6363 6344 getApp().goto("/pages/user/plus/plus");
6364 6345 },
6365 6346 go_card_info: function () {
6366   - getApp().goto("/pages/user/cardinfo/cardinfo");
  6347 + getApp().goto("/packageE/pages/user/cardinfo/cardinfo");
6367 6348 },
6368 6349 //-- 根据ID拿出门店 --
6369 6350 get_pick_from_list(pid) {
... ... @@ -6963,7 +6944,28 @@ Page({
6963 6944 var prom_id=e.currentTarget.dataset.prom;
6964 6945 var index=e.currentTarget.dataset.index;
6965 6946 getApp().goto("/packageD/pages/gift/gift?prom_id="+prom_id+"&index="+index);
  6947 + },
  6948 +
  6949 + pre_gallery_img(e){
  6950 +
  6951 + this.data.show_prew_img=1;
  6952 +
  6953 + var index = e.currentTarget.dataset.index;
  6954 + getApp().globalData.no_clear=1;
  6955 +
  6956 + var url=this.data.gallery[index].image_url;
  6957 + var url_arr=[];
  6958 +
  6959 + for(var i in this.data.gallery){
  6960 + url_arr.push(this.data.gallery[i].image_url)
6966 6961 }
6967 6962  
6968 6963  
  6964 + wx.previewImage({
  6965 + current: url, // 当前显示图片的http链接
  6966 + urls: url_arr,// 需要预览的图片http链接列表
  6967 + });
  6968 + }
  6969 +
  6970 +
6969 6971 })
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -45,8 +45,8 @@
45 45 <video bindfullscreenchange="screenChange" class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video>
46 46 </view>
47 47 </swiper-item>
48   - <swiper-item wx:for="{{gallery}}" wx:key="gallery">
49   - <view class="wh100 g_img_box" style="background-image:url({{item.image_url}});"></view>
  48 + <swiper-item wx:for="{{gallery}}" wx:key="gallery" >
  49 + <view data-index="{{index}}" bindtap='pre_gallery_img' class="wh100 g_img_box" style="background-image:url({{item.image_url}});"></view>
50 50 </swiper-item>
51 51 </swiper>
52 52 <block wx:if="{{mapurl}}">
... ... @@ -124,9 +124,9 @@
124 124 <view class="flex fs35 xc-qtsign">¥</view>
125 125 <view class="fs50 val">{{prom_price}}</view>
126 126 </view>
127   - <view class="word-line fs20 xc-qtunit-price">
128   - ¥{{filters.toFix(data.shop_price,2)}}
129   - </view>
  127 +
  128 + <view wx:if="is_retail_price" class="word-line fs20 xc-qtunit-price">¥{{filters.toFix(data.market_price,2)}}</view>
  129 + <view wx:else class="word-line fs20 xc-qtunit-price">¥{{filters.toFix(data.shop_price,2)}}</view>
130 130 </view>
131 131  
132 132 <view class="abs white xc-nanber">
... ... @@ -260,9 +260,15 @@
260 260 <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text>
261 261 <text class="rel_txt" wx:if="{{prom_price}}">{{filters.toFix(prom_price,2)}}元</text>
262 262 <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text>
263   - <text class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;">
  263 +
  264 + <text wx:if="{{is_retail_price}}" class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;">
  265 + &nbsp;&nbsp;&nbsp;¥{{filters.toFix(data.market_price,2)}}
  266 + </text>
  267 +
  268 + <text wx:else class="rel_txt fs22" decode="{{true}}" space="{{true}}" style="color: #999; text-decoration: line-through;">
264 269 &nbsp;&nbsp;&nbsp;¥{{filters.toFix(data.shop_price,2)}}
265 270 </text>
  271 +
266 272 </view>
267 273 <!-- 这个是分享按钮 -->
268 274 <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> -->
... ... @@ -302,18 +308,29 @@
302 308 </view>
303 309 <text class="rel yuan">¥</text>
304 310 {{filters.toFix(data[card_field],2)}}
305   -<!-- <view class='yj' style="top:35rpx">-->
306   -<!-- <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text>-->
307   -<!-- </view>-->
  311 +
  312 + <view wx:if="{{is_retail_price}}" class='yj' style="top:35rpx">
  313 + <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text>
  314 + </view>
  315 +
  316 + <view wx:else class='yj' style="top:35rpx">
  317 + <text>:¥{{filters.toFix(data.shop_price,2)}}</text>
  318 + </view>
  319 +
308 320 </block>
309 321 <block wx:elif="{{prom_type!=2}}">
310 322  
311 323  
312 324 <text class="yuan">¥</text>
313 325 {{filters.toFix(data.shop_price,2)}}
314   -<!-- <view class='yj'>-->
315   -<!-- <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text>-->
316   -<!-- </view>-->
  326 + <view wx:if="{{is_retail_price}}" class='yj'>
  327 + <text>零售价:¥{{filters.toFix(data.market_price,2)}}</text>
  328 + </view>
  329 +
  330 + <view wx:else class='yj'>
  331 + <text>:¥{{filters.toFix(data.shop_price,2)}}</text>
  332 + </view>
  333 +
317 334 </block>
318 335 </view>
319 336 </view>
... ... @@ -410,7 +427,8 @@
410 427 <text class="fs30">¥</text>
411 428 {{prom_price}}
412 429 </view>
413   - <view class="word-line fs24">¥{{filters.toFix(data.shop_price,2)}}</view>
  430 + <view wx:if="{{is_retail_price}}" class="word-line fs24">¥{{filters.toFix(data.market_price,2)}}</view>
  431 + <view wx:else class="word-line fs24">¥{{filters.toFix(data.shop_price,2)}}</view>
414 432 </view>
415 433 <!-- 这个是分享按钮 -->
416 434 <view class="xc-share-frame t-c shrink0" bindtap="clickShare">
... ... @@ -1504,6 +1522,7 @@
1504 1522 </view>
1505 1523 </view>
1506 1524 <view class="mask" catchtouchmove="true" wx:if="{{showRules}}"></view>
  1525 +
1507 1526 <!-- 选择门店的弹框,1.1版最新的 -->
1508 1527 <block wx:if="{{store==1}}">
1509 1528 <view class="mongolia-layer" bindtap="close_popup"></view>
... ...
pages/goods/goodsList/goodsList.js
... ... @@ -4,6 +4,7 @@
4 4 };
5 5 }(require("../../../utils/LoadMore.js")), e = getApp(), a = new t.default(), oo = e.globalData.setting, ut = require("../../../utils/util.js");
6 6 var regeneratorRuntime = require('../../../utils/runtime.js');
  7 +var com_fil= require('../com_screen.js');
7 8  
8 9 Page({
9 10 data: {
... ... @@ -16,6 +17,8 @@ Page({
16 17 openFilterModal: !1,
17 18 baseUrl: "/api/weshop/goods/page?1=1",
18 19 requestUrl: "",
  20 + old_req_url:'',
  21 +
19 22 tabname:"sort", //排序的字段
20 23 adname:"asc", //升降的字段
21 24 is_new:0,
... ... @@ -25,6 +28,19 @@ Page({
25 28 rq_data:null,
26 29 isToggle: false, //切换商品视图控制符
27 30 show_all:1, //判断显示
  31 +
  32 + is_retail_price:0, //是否显示零售价
  33 +
  34 + more_sort_arr:[
  35 + {name:'综合',value:'sort'},
  36 + {name:'新品',value:'on_time'},
  37 + {name:'评论',value:'comment_count'},
  38 + ],
  39 +
  40 + fil_cate_state:0,
  41 + fil_nation_state:0,
  42 + fil_brand_state:0,
  43 + fil_price_state:0,
28 44 },
29 45  
30 46 onLoad: function(t) {
... ... @@ -59,6 +75,7 @@ Page({
59 75 url += "&parent_id="+t.pid;
60 76 }
61 77 }
  78 + this.data.cat_id=t.cat_id;
62 79 }
63 80  
64 81 if (0 != t.brand_id && t.brand_id != undefined) { url += "&brand_id=" + t.brand_id; }
... ... @@ -153,7 +170,14 @@ Page({
153 170 }
154 171 })
155 172 }
  173 +
  174 +
  175 + this.data.old_req_url=url;
  176 + //进行筛选
  177 + this.set_screen(url);
  178 +
156 179 this.requestGoodsList(url);
  180 +
157 181 getApp().getConfig2(function(rs){
158 182 //计算等级价相关
159 183 var swithc_list=rs.switch_list;
... ... @@ -184,6 +208,11 @@ Page({
184 208 })
185 209 },500)
186 210 }
  211 +
  212 + if(sw_arr.is_retail_price){
  213 + th.setData({is_retail_price:1});
  214 + }
  215 +
187 216 });
188 217  
189 218 //调用接口判断商家plus有没有过期
... ... @@ -250,6 +279,7 @@ Page({
250 279 }
251 280 this.resetData(), this.requestGoodsList(url);
252 281 },
  282 +
253 283 requestGoodsList:function(t) {
254 284 if(this.data.loading) return false;
255 285 this.data.loading=1;
... ... @@ -259,6 +289,7 @@ Page({
259 289  
260 290 var user_id=getApp().globalData.user_id;
261 291 if(!user_id) user_id=0;
  292 +
262 293 //不是商品分组的,不是默认排序的
263 294 if(t.indexOf("group_id")==-1 || e.data.tabname!="sort" ){
264 295 t += "&orderField=" + e.data.tabname;
... ... @@ -266,8 +297,13 @@ Page({
266 297 }
267 298  
268 299 t +="&page=" + e.data.currentPage;
  300 +
  301 + wx.showLoading({});
  302 +
269 303 getApp().request.promiseGet(t, {data:{is_mainshow: 1, isonsale: 1, store_id: oo.stoid}}).then(async res=>{
270 304 th.data.loading=0;
  305 + wx.hideLoading();
  306 +
271 307 e.setData({is_go:1});
272 308 if(ut.ajax_ok(res)){
273 309 e.data.currentPage++;
... ... @@ -322,7 +358,7 @@ Page({
322 358 if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
323 359 var arr = res.data.data[0];
324 360 item.prom_price = arr.luck_goods_price;
325   - item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0);
  361 + // item.sales_sum=arr.buy_goodnum+(arr.virtual_qty?arr.virtual_qty:0);
326 362 }
327 363 })
328 364 break;
... ... @@ -336,10 +372,10 @@ Page({
336 372 if (prom != null && prom.is_end==0 && prom.end_time>now && (prom.start_time<now || (prom_type!=2 && prom.show_time && prom.show_time<now)) ) {
337 373 item.prom_price = res.data.data.price;
338 374 if(res.data.data.user_price) item.prom_price=res.data.data.user_price;
339   - var vNum=res.data.data.virtual_num?res.data.data.virtual_num:0;
340   - var vNum1=res.data.data.virtualNum?res.data.data.virtualNum:0;
341   - var vNum2=res.data.data.virtual?res.data.data.virtual:0;
342   - item.sales_sum=res.data.data.buy_num+(vNum+vNum1+vNum2);
  375 + // var vNum=res.data.data.virtual_num?res.data.data.virtual_num:0;
  376 + // var vNum1=res.data.data.virtualNum?res.data.data.virtualNum:0;
  377 + // var vNum2=res.data.data.virtual?res.data.data.virtual:0;
  378 + // item.sales_sum=res.data.data.buy_num+(vNum+vNum1+vNum2);
343 379 }else{
344 380 item.prom_type=0;
345 381 item.prom_id=0;
... ... @@ -450,8 +486,7 @@ Page({
450 486 })
451 487 },
452 488  
453   -
454   -
  489 +
455 490 // 切换显示
456 491 bindToggleDisplay() {
457 492 this.setData({
... ... @@ -459,14 +494,20 @@ Page({
459 494 });
460 495 },
461 496  
462   -
463 497 go_url:function (e) {
464 498 var url = e.currentTarget.dataset.url;
465 499 //var rq_data = JSON.stringify(this.data.rq_data);
466 500 //url += `&o=${rq_data}`;
467 501 // console.log('url!!!=======<<<<', url);
468 502 getApp().goto(url);
469   - }
  503 + },
  504 +
  505 + /*-- 和筛选相关的 --*/
  506 + bind_pk_sort(e){ com_fil.bind_pk_sort(e,this); },
  507 + set_screen(url){ com_fil.set_screen(url,this); },
  508 + filterGoods(e){ com_fil.filterGoods(e,this); },
  509 + open_more(e){ com_fil.open_more(e,this); },
  510 + clear_fil(){ com_fil.clear_fil(this); }
470 511  
471 512  
472 513 });
473 514 \ No newline at end of file
... ...
pages/goods/goodsList/goodsList.wxml
... ... @@ -27,30 +27,46 @@
27 27  
28 28 <view class="nav-box">
29 29 <view class="nav">
30   - <navigator bindtap="changeTab" class="nav-item" data-href="sort" data-ad="{{adname}}">综合
31   - <view class="ico-dg" wx:if="{{tabname=='sort'}}">
32   - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>
33   - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>
34   - </view>
  30 +
  31 +
  32 + <navigator class="nav-item">
  33 + <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name">
  34 + <text bindtap="changeTab" wx:if="{{tabname=='on_time'}}">新品</text>
  35 + <text wx:elif="{{tabname=='comment_count'}}">评论</text>
  36 + <text wx:else>综合</text>
  37 + </picker>
  38 + <view class="arrow_down"></view>
  39 +
35 40 </navigator>
  41 +
  42 +
36 43 <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量
37   - <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}">
38   - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>
39   - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>
  44 +<!-- <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}">-->
  45 +<!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->
  46 +<!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->
  47 +<!-- </view>-->
  48 + <view>
  49 + <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view>
  50 + <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view>
40 51 </view>
41 52  
42 53 </navigator>
43 54 <navigator bindtap="changeTab" class="nav-item" data-href="final_price" data-ad="{{adname}}">
44 55 价格
45   - <view class="ico-dg" wx:if="{{tabname=='final_price'}}">
46   - <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>
47   - <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>
  56 +<!-- <view class="ico-dg" wx:if="{{tabname=='final_price'}}">-->
  57 +<!-- <image class="wh100" src="{{iurl}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>-->
  58 +<!-- <image class="wh100" src="{{iurl}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>-->
  59 +<!-- </view>-->
  60 + <view>
  61 + <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view>
  62 + <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view>
48 63 </view>
49 64 </navigator>
50   - <!-- <navigator bindtap="openFilterModal" class="nav-item">筛选<view class="ico-filter">
51   - <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image>
52   - </view>
53   - </navigator> -->
  65 + <navigator bindtap="openFilterModal" class="nav-item">
  66 + 筛选<view class="ico-filter">
  67 + <image class="wh100" src="{{iurl}}/miniapp/images/xx.png"></image>
  68 + </view>
  69 + </navigator>
54 70  
55 71 <!-- <navigator class="nav-item search" url="/pages/goods/search/search">
56 72 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image>
... ... @@ -66,7 +82,7 @@
66 82 <view class="item-cont">
67 83 <view class="title ellipsis-2">{{item.goods_name}}</view>
68 84 <!-- 判断是否有活动价 -->
69   - <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 }}">
  85 + <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10 }}">
70 86 <view class="flex on">
71 87 <!-- 活动价 -->
72 88 <view class="price">
... ... @@ -74,7 +90,7 @@
74 90 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
75 91 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
76 92 </view>
77   -<!-- <view class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view>-->
  93 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view>
78 94 </view>
79 95  
80 96  
... ... @@ -101,7 +117,7 @@
101 117 </view>
102 118 </view>
103 119 <view class="comment">
104   -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>-->
  120 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view>
105 121 <view class="fs24 t-r">
106 122 <span>评论{{item.comment_count}}</span>
107 123 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -123,7 +139,7 @@
123 139 <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
124 140 <view class="flex ai-center">
125 141 <view class="price rmb">{{item.shop_price}}</view>
126   -<!-- <view class="word-line xc-ash mk_price rmb">{{item.market_price}}</view>-->
  142 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb">{{item.market_price}}</view>
127 143 </view>
128 144 <view class="comment">
129 145 <view class="flex ai-center">
... ... @@ -142,7 +158,7 @@
142 158 <block wx:else>
143 159 <view>
144 160 <view class="price rmb">{{item.shop_price}}</view>
145   -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>-->
  161 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view>
146 162 </view>
147 163 <!-- <view class="price">¥{{item.shop_price}}</view> -->
148 164 <view class="comment pdt10">
... ... @@ -157,7 +173,7 @@
157 173 <view wx:else>
158 174 <view class="flex ai-center">
159 175 <view class="price rmb">{{item.shop_price}}</view>
160   -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->
  176 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
161 177 </view>
162 178  
163 179 <view class="comment pdt10">
... ... @@ -189,12 +205,12 @@
189 205 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
190 206 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
191 207 </view>
192   -<!-- <view class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view>-->
  208 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mgl10 rmb fs24">{{item.market_price}}</view>
193 209 </view>
194 210  
195 211  
196 212 <view class="comment pdt10">
197   - <!-- <view class="word-line xc-ash">¥{{item.market_price}}</view> -->
  213 +<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
198 214 <view class="fs24 t-r">
199 215 <span>评论{{item.comment_count}}</span>
200 216 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -216,7 +232,7 @@
216 232 </view>
217 233 </view>
218 234 <view class="comment">
219   -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>-->
  235 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view>
220 236 <view class="fs24 t-r">
221 237 <span>评论{{item.comment_count}}</span>
222 238 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -226,7 +242,7 @@
226 242 <block wx:else>
227 243 <view class="price rmb">{{item.shop_price}}</view>
228 244 <view class="comment">
229   -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>-->
  245 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view>
230 246 <view class="fs24 t-r">
231 247 <span>评论{{item.comment_count}}</span>
232 248 <span class="pdl30">已售{{item.sales_sum}}</span>
... ... @@ -238,7 +254,7 @@
238 254 <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
239 255 <view class="flex ai-center">
240 256 <view class="price rmb">{{item.shop_price}}</view>
241   -<!-- <view class="word-line xc-ash mk_price rmb">{{item.market_price}}</view>-->
  257 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb">{{item.market_price}}</view>
242 258 </view>
243 259 <view class="comment">
244 260 <view class="flex ai-center">
... ... @@ -257,7 +273,7 @@
257 273 <block wx:else>
258 274 <view>
259 275 <view class="price rmb">{{item.shop_price}}</view>
260   -<!-- <view class="word-line xc-ash rmb">{{item.market_price}}</view>-->
  276 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb">{{item.market_price}}</view>
261 277 </view>
262 278 <!-- <view class="price">¥{{item.shop_price}}</view> -->
263 279 <view class="comment pdt10">
... ... @@ -272,7 +288,7 @@
272 288 <view wx:else>
273 289 <view class="">
274 290 <view class="price rmb">{{item.shop_price}}</view>
275   -<!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>-->
  291 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
276 292 </view>
277 293  
278 294 <view class="comment pdt10">
... ... @@ -297,42 +313,8 @@
297 313 <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>
298 314 </view>
299 315 </view>
300   -<view hidden="{{!openFilterModal}}">
301   - <view bindtap="closeFilterModal" class="cover-layer"></view>
302   - <view class="filter-modal">
303   - <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon>
304   - <button bindtap="restoreData" class="viewall-btn">显示全部分类</button>
305   - <view class="filter-box" wx:for="{{requestData.filter_spec}}" wx:key="{{index}}">
306   - <view class="filter-name">{{item.name}}</view>
307   - <view class="filter-items">
308   - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}">
309   - {{item.name}}</view>
310   - </view>
311   - </view>
312 316  
313   - <view class="filter-box" wx:for="{{requestData.filter_attr}}" wx:key="{{index}}">
314   - <view class="filter-name">{{item.name}}</view>
315   - <view class="filter-items">
316   - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}">
317   - {{item.name}}</view>
318   - </view>
319   - </view>
320   - <view class="filter-box" wx:if="{{requestData.filter_brand.length>0}}">
321   - <view class="filter-name">相关品牌</view>
322   - <view class="filter-items">
323   - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_brand}}" wx:key="{{index}}">
324   - {{item.name}}</view>
325   - </view>
326   - </view>
327   - <view class="filter-box" wx:if="{{requestData.filter_price.length>0}}">
328   - <view class="filter-name">价格区间</view>
329   - <view class="filter-items">
330   - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_price}}" wx:key="{{index}}">
331   - {{item.name}}</view>
332   - </view>
333   - </view>
334   - </view>
335   - </view>
  317 +<include src="../com_screen.wxml" />
336 318  
337 319 <share_box id="share"></share_box>
338 320 <view class="t-c fs32" wx:if="{{err_txt}}">
... ...
pages/goods/goodsList/goodsList.wxss
... ... @@ -165,54 +165,6 @@ page {
165 165 /* padding-right: 30rpx; */
166 166 }
167 167  
168   -.filter-modal {
169   - position: fixed;
170   - left: 150rpx;
171   - top: 0;
172   - right: 0;
173   - bottom: 0;
174   - z-index: 20;
175   - background-color: white;
176   - overflow-x: hidden;
177   - padding-bottom: 30rpx;
178   -}
179   -
180   -.filter-box {
181   - box-sizing: border-box;
182   - width: 100%;
183   - font-size: 28rpx;
184   - padding: 20rpx;
185   -}
186   -
187   -.filter-name {
188   - width: 100%;
189   - padding: 20rpx 0;
190   - word-break: keep-all;
191   - white-space: nowrap;
192   - text-overflow: ellipsis;
193   - overflow: hidden;
194   - font-size: 30rpx;
195   -}
196   -
197   -.filter-items {
198   - width: 100%;
199   -}
200   -
201   -.filter-item {
202   - float: left;
203   - width: fit-content;
204   - max-width: 500rpx;
205   - word-break: keep-all;
206   - white-space: nowrap;
207   - text-overflow: ellipsis;
208   - overflow: hidden;
209   - padding: 10rpx;
210   - border-radius: 10rpx;
211   - border: 1rpx #ddd solid;
212   - margin: 0 10rpx 10rpx 0;
213   - background-color: #fdfdfd;
214   - color: #666;
215   -}
216 168  
217 169 .viewall-btn {
218 170 margin-top: 20rpx;
... ... @@ -342,3 +294,5 @@ page {
342 294 color: white;
343 295 padding: 20rpx 50rpx;
344 296 }
  297 +
  298 +@import '../com_screen.wxss';
345 299 \ No newline at end of file
... ...
pages/goods/search/search.js
... ... @@ -4,6 +4,7 @@ var t = function (t) {
4 4 };
5 5 }(require("../../../utils/LoadMore.js")), ut = require("../../../utils/util.js"),
6 6 a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting;
  7 +const com_fil = require("../com_screen.js");
7 8  
8 9 Page({
9 10 data: {
... ... @@ -16,6 +17,7 @@ Page({
16 17 openSearchModal: !1,
17 18 baseUrl: "/api/weshop/goods/page?1=1",
18 19 requestUrl: "",
  20 + old_req_url:'',
19 21 //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ]
20 22 hotWords: null,
21 23 is_no_plus: 1,
... ... @@ -27,6 +29,17 @@ Page({
27 29 is_his: 0,
28 30 hiddenClear: true,
29 31 fliter_flag: false,
  32 +
  33 + more_sort_arr:[
  34 + {name:'综合',value:'sort'},
  35 + {name:'新品',value:'on_time'},
  36 + {name:'评论',value:'comment_count'},
  37 + ],
  38 +
  39 + fil_cate_state:0,
  40 + fil_nation_state:0,
  41 + fil_brand_state:0,
  42 + fil_price_state:0,
30 43 },
31 44  
32 45 onLoad: function (t) {
... ... @@ -86,34 +99,11 @@ Page({
86 99 var swithc_list = rs.switch_list;
87 100 var sw_arr = JSON.parse(swithc_list);
88 101 //---如果后台又开等级卡的开关---
89   - if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
90   - th.setData({ rank_switch: true });
91   - var user = getApp().globalData.userInfo;
92   - var ti = setInterval(function () {
93   - if (!user) return false;
94   - clearInterval(ti);
95   - //---回调卡的列表---
96   - th.getPlusCardType(function (ob) {
97   - th.setData({ card_list: ob.card_list });
98   - if (user.card_field) {
99   - var str = user['card_expiredate'].replace(/-/g, '/');
100   - var end = new Date(str);
101   - end = Date.parse(end) / 1000;
102   - var now = ut.gettimestamp();
103   -
104   - //--- 判断是等级会员,且在有效期范围内 ---
105   - if (user.card_field && now < end) {
106   - var card_name = ob.name_map.get(user.card_field);
107   - if (card_name && card_name.length > 7) card_name = card_name.substring(0, 8);
108   - th.setData({ card_field: user.card_field, card_name: card_name, card_list: ob.card_list });
109   - }
110   - }
111   - })
112   - }, 500)
  102 + ut.get_plus_name_price(sw_arr,th);
  103 + if(sw_arr.is_retail_price){
  104 + th.setData({is_retail_price:1});
113 105 }
114 106  
115   -
116   -
117 107 })
118 108 //e.init(this, "", "requestData");
119 109 var url = this.data.baseUrl;
... ... @@ -387,6 +377,10 @@ Page({
387 377 if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词");
388 378 this.data.key_str = t;
389 379 this.resetData();
  380 +
  381 + this.data.old_req_url=this.data.baseUrl + "&key_str=" + encodeURIComponent(t);
  382 +
  383 + this.set_screen(this.data.baseUrl + "&key_str=" + encodeURIComponent(t))
390 384 this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
391 385 this.historyRecord();
392 386 },
... ... @@ -571,4 +565,13 @@ Page({
571 565 openSearchModal: true,
572 566 });
573 567 },
  568 +
  569 + /*-- 和筛选相关的 --*/
  570 + bind_pk_sort(e){ com_fil.bind_pk_sort(e,this); },
  571 + set_screen(url){ com_fil.set_screen(url,this); },
  572 + filterGoods(e){ com_fil.filterGoods(e,this); },
  573 + open_more(e){ com_fil.open_more(e,this); },
  574 + clear_fil(){ com_fil.clear_fil(this); }
  575 +
  576 +
574 577 });
575 578 \ No newline at end of file
... ...
pages/goods/search/search.wxml
... ... @@ -46,28 +46,32 @@
46 46 <block wx:if="{{!openSearchModal}}">
47 47  
48 48 <view class="nav flex">
49   - <navigator bindtap="changeTab" class="nav-item f1" data-href="sort" data-ad="{{adname}}">综合
50   - <view class="ico-dg" wx:if="{{tabname=='sort'}}">
51   - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>
52   - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>
53   - </view>
  49 + <navigator bindtap="changeTab" class="nav-item f1" >
  50 + <picker bindchange="bind_pk_sort" value="{{index}}" range="{{more_sort_arr}}" range-key="name">
  51 + <text bindtap="changeTab" wx:if="{{tabname=='on_time'}}">新品</text>
  52 + <text wx:elif="{{tabname=='comment_count'}}">评论</text>
  53 + <text wx:else>综合</text>
  54 + </picker>
  55 + <view class="arrow_down"></view>
54 56 </navigator>
  57 +
  58 +
55 59 <navigator bindtap="changeTab" class="nav-item f1" data-href="sales_sum" data-ad="{{adname}}">销量
56   - <view class="ico-dg" wx:if="{{tabname=='sales_sum'}}">
57   - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>
58   - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>
59   - </view>
  60 + <view>
  61 + <view class="arrow_up {{tabname=='sales_sum' && adname=='asc'?'on':'' }} "></view>
  62 + <view class="arrow_down {{tabname=='sales_sum' && adname=='desc'?'on':'' }} "></view>
  63 + </view>
60 64 </navigator>
61 65 <navigator bindtap="changeTab" class="nav-item f1" data-href="final_price" data-ad="{{adname}}">价格
62   - <view class="ico-dg" wx:if="{{tabname=='final_price'}}">
63   - <image class="wh100" src="{{url}}/miniapp/images/dg.png" wx:if="{{adname=='desc'}}"></image>
64   - <image class="wh100" src="{{url}}/miniapp/images/up_s.png" wx:if="{{adname=='asc'}}"></image>
65   - </view>
  66 + <view>
  67 + <view class="arrow_up {{tabname=='final_price' && adname=='asc'?'on':'' }} "></view>
  68 + <view class="arrow_down {{tabname=='final_price' && adname=='desc'?'on':'' }} "></view>
  69 + </view>
66 70 </navigator>
67   - <!-- <navigator bindtap="openFilterModal" class="nav-item">筛选<view class="ico-filter">
  71 + <navigator bindtap="openFilterModal" class="nav-item f1">筛选<view class="ico-filter">
68 72 <image class="wh100" src="{{url}}/miniapp/images/xx.png"></image>
69 73 </view>
70   - </navigator> -->
  74 + </navigator>
71 75 <!-- <navigator bindtap="openSearchModal" class="nav-item nav-search">
72 76 <image class="wh100 search-img" src="{{url}}/miniapp/images/search.png"></image>
73 77 </navigator> -->
... ... @@ -83,7 +87,7 @@
83 87 <view class="item-cont">
84 88 <view class="title ellipsis-2">{{item.goods_name}}</view>
85 89 <!-- 判断是否有活动价,小程序没有有团购和拼单 -->
86   - <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7}}">
  90 + <block wx:if="{{(item.prom_price>0 || item.prom_integral) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}">
87 91 <!-- 活动价 -->
88 92 <view class="price">
89 93 <text wx:if="{{item.prom_integral}}">{{item.prom_integral}}积分</text>
... ... @@ -111,14 +115,14 @@
111 115 </view>
112 116 </view>
113 117 <view class="comment flex jc_sb">
114   -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
  118 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash">¥{{item.market_price}}</view>
115 119 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
116 120 </view>
117 121 </block>
118 122 <block wx:else>
119 123 <view class="price">¥{{item.shop_price}}</view>
120 124 <view class="comment flex jc_sb">
121   -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
  125 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash">¥{{item.market_price}}</view>
122 126 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
123 127 </view>
124 128 </block>
... ... @@ -127,7 +131,7 @@
127 131 <block wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
128 132 <view class="flex ai-center">
129 133 <view class="price">¥{{item.shop_price}}</view>
130   -<!-- <view class="word-line xc-ash mk_price">¥{{item.market_price}}</view>-->
  134 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price">¥{{item.market_price}}</view>
131 135 </view>
132 136 <view class="comment flex jc_sb">
133 137 <view class="flex ai_center">
... ... @@ -145,7 +149,7 @@
145 149 <block wx:else>
146 150 <view class="price">¥{{item.shop_price}}</view>
147 151 <view class="comment flex jc_sb">
148   -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
  152 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash">¥{{item.market_price}}</view>
149 153 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
150 154 </view>
151 155 </block>
... ... @@ -154,7 +158,7 @@
154 158 <block wx:else>
155 159 <view class="price">¥{{item.shop_price}}</view>
156 160 <view class="comment flex jc_sb">
157   -<!-- <view class="word-line xc-ash">¥{{item.market_price}}</view>-->
  161 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash">¥{{item.market_price}}</view>
158 162 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
159 163 </view>
160 164 </block>
... ... @@ -173,38 +177,5 @@
173 177  
174 178 </block>
175 179 </view>
176   -<view hidden="{{!openFilterModal}}">
177   - <view bindtap="closeFilterModal" class="cover-layer"></view>
178   - <view class="filter-modal">
179   - <icon bindtap="closeFilterModal" class="modal-close" color="gray" size="22" type="cancel"></icon>
180   - <button bindtap="restoreData" class="viewall-btn">显示全部分类</button>
181   - <view class="filter-box" wx:for="{{requestData.filter_spec}}" wx:key="{{index}}">
182   - <view class="filter-name">{{item.name}}</view>
183   - <view class="filter-items">
184   - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}">
185   - {{item.name}}</view>
186   - </view>
187   - </view>
188   - <view class="filter-box" wx:for="{{requestData.filter_attr}}" wx:key="{{index}}">
189   - <view class="filter-name">{{item.name}}</view>
190   - <view class="filter-items">
191   - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{item.item}}" wx:key="{{index}}">
192   - {{item.name}}</view>
193   - </view>
194   - </view>
195   - <view class="filter-box" wx:if="{{requestData.filter_brand.length>0}}">
196   - <view class="filter-name">相关品牌</view>
197   - <view class="filter-items">
198   - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_brand}}" wx:key="{{index}}">
199   - {{item.name}}</view>
200   - </view>
201   - </view>
202   - <view class="filter-box" wx:if="{{requestData.filter_price.length>0}}">
203   - <view class="filter-name">价格区间</view>
204   - <view class="filter-items">
205   - <view bindtap="filterGoods" class="filter-item" data-href="{{item.href}}" wx:for="{{requestData.filter_price}}" wx:key="{{index}}">
206   - {{item.name}}</view>
207   - </view>
208   - </view>
209   - </view>
210   -</view>
211 180 \ No newline at end of file
  181 +
  182 +<include src="../com_screen.wxml" />
212 183 \ No newline at end of file
... ...
pages/goods/search/search.wxss
... ... @@ -114,54 +114,6 @@
114 114 margin-top: 4rpx;
115 115 }
116 116  
117   -.filter-modal {
118   - position: fixed;
119   - left: 150rpx;
120   - top: 0;
121   - right: 0;
122   - bottom: 0;
123   - z-index: 20;
124   - background-color: white;
125   - overflow-x: hidden;
126   - padding-bottom: 30rpx;
127   -}
128   -
129   -.filter-box {
130   - box-sizing: border-box;
131   - width: 100%;
132   - font-size: 28rpx;
133   - padding: 20rpx;
134   -}
135   -
136   -.filter-name {
137   - width: 100%;
138   - padding: 20rpx 0;
139   - word-break: keep-all;
140   - white-space: nowrap;
141   - text-overflow: ellipsis;
142   - overflow: hidden;
143   - font-size: 30rpx;
144   -}
145   -
146   -.filter-items {
147   - width: 100%;
148   -}
149   -
150   -.filter-item {
151   - float: left;
152   - width: fit-content;
153   - max-width: 500rpx;
154   - word-break: keep-all;
155   - white-space: nowrap;
156   - text-overflow: ellipsis;
157   - overflow: hidden;
158   - padding: 10rpx;
159   - border-radius: 10rpx;
160   - border: 1rpx #ddd solid;
161   - margin: 0 10rpx 10rpx 0;
162   - background-color: #fdfdfd;
163   - color: #666;
164   -}
165 117  
166 118 .viewall-btn {
167 119 margin-top: 20rpx;
... ... @@ -439,4 +391,7 @@
439 391 width: 80%;
440 392 z-index: 1000;
441 393 transition: all .5s;
442   -}
443 394 \ No newline at end of file
  395 +}
  396 +
  397 +
  398 +@import '../com_screen.wxss';
444 399 \ No newline at end of file
... ...
pages/index/index/index.js
... ... @@ -86,6 +86,7 @@ Page({
86 86 is_ok_h5: 0, //判断要不要显示关注二维码
87 87  
88 88 container: null,
  89 + is_retail_price:0,
89 90 },
90 91  
91 92  
... ... @@ -125,6 +126,12 @@ Page({
125 126  
126 127 var th = this;
127 128 getApp().getConfig2(function (config2) {
  129 + var swithc_list = config2.switch_list;
  130 + var sw_arr = JSON.parse(swithc_list);
  131 + if(sw_arr.is_retail_price){
  132 + th.setData({is_retail_price:1});
  133 + }
  134 +
128 135 if (config2 && config2.is_overdue == 1) {
129 136 getApp().promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=5", {}).then(res => {
130 137 var o = res;
... ... @@ -789,7 +796,7 @@ Page({
789 796 let goodsGroupArr = this.data.goodsGroupArr
790 797 if (this.data.isTemplate && goodsGroupArr.length >0) {
791 798 goodsGroupArr.map(item=>{
792   - this[item].automore()
  799 + if(this[item]) this[item].automore()
793 800 })
794 801 }
795 802  
... ...
pages/index/index/index.wxml
... ... @@ -158,6 +158,7 @@
158 158 <!-- <view class="red-co mar-top10 is_seckill_height"> -->
159 159 <view class="co-red mar-top10">
160 160 <text class="fs20">¥</text>{{aitem.price}}
  161 + <text wx:if="{{is_retail_price}}" class="un_line">¥{{aitem.market_price}}</text>
161 162 </view>
162 163 </navigator>
163 164  
... ... @@ -201,7 +202,7 @@
201 202 <view class="co-red mar-top10 flex jc_sb ali-c">
202 203 <view>
203 204 <text><text class="fs20">¥</text>{{aitem.presell_price}}</text>
204   -<!-- <text class="un_line">¥{{aitem.shop_price}}</text>-->
  205 + <text wx:if="{{is_retail_price}}" class="un_line">¥{{aitem.market_price}}</text>
205 206 </view>
206 207 <view class="btn-buy">去抢购</view>
207 208 </view>
... ... @@ -238,7 +239,7 @@
238 239 <view>
239 240 <view class="flex ai-center">
240 241 <text class="rmb c-red">{{filter.price(item.group_price)}}</text>
241   -<!-- <view class="del fs22 c-a pdl10"><text class="rmb">{{item.shop_price}}</text></view>-->
  242 + <view wx:if="{{is_retail_price}}" class="del fs22 c-a pdl10"><text class="rmb">{{item.market_price}}</text></view>
242 243 </view>
243 244 <view class="flex jc_sb">
244 245 <progress class="pdr20 f1 progress" percent="{{filter.percent(item.num, item.group_num)}}" activeColor="#FF6768" backgroundColor="#d0d0d0" border-radius="12" stroke-width="12" data-content="{{item.num}}人已参团"></progress>
... ... @@ -324,7 +325,7 @@
324 325 <view class="fs40 flex xc-top15 {{aitem.is_team_tepy==0?'blue_c ai-bas':' red-co ai-bas'}}">
325 326 <text class="fs28 {{aitem.is_team_tepy==0?'martop4':''}}">¥</text>
326 327 <text style="margin-left:-5rpx">{{aitem.price}}</text>
327   -<!-- <span class="underline {{type==0?'martop18':''}}">¥{{aitem.shop_price}}</span>-->
  328 + <span wx:if="{{is_retail_price}}" class="underline {{type==0?'martop18':''}}">¥{{aitem.market_price}}</span>
328 329 </view>
329 330  
330 331 </view>
... ... @@ -400,7 +401,7 @@
400 401 <view>
401 402 <block wx:for="{{template_arr}}" >
402 403 <block wx:if="{{item.content.is_top==1}}">
403   - <view style="height:100rpx"></view>
  404 + <view style="height:91rpx"></view>
404 405 </block>
405 406 </block>
406 407  
... ...
pages/user/assistance/friend_assistance.js
... ... @@ -21,14 +21,16 @@ Page({
21 21 userId: 0, //任务用户的ID
22 22 s_num: 0, //分享的人数
23 23 taskId:0, //活动从表ID
24   - helpId:0,
  24 + helpId:0,
  25 + invalidTime:0, //任务失效时间戳
25 26 },
26 27  
27 28 /**
28 29 * 生命周期函数--监听页面加载
29 30 */
30 31 onLoad: function(options) {
31   -
  32 + console.log('助力——————————————————————————————');
  33 + console.log(options);
32 34 var th = this;
33 35  
34 36 var nav_b = th.selectComponent("#nav_b"); //组件的id
... ... @@ -38,7 +40,7 @@ Page({
38 40 if (options.userId) this.data.userId = options.userId;
39 41 //任务是不是为空
40 42 if (this.data.tasking == 0 || this.data.tasking == undefined) {
41   - this.data.tasking = decodeURIComponent(options.scene);
  43 + this.data.tasking = decodeURIComponent(options.scene);
42 44 }
43 45  
44 46 },
... ... @@ -73,10 +75,19 @@ Page({
73 75 storeId: os.stoid
74 76 }
75 77 }).then(res => {
  78 + console.log('任务时间-------------------------');
  79 + console.log(res);
76 80 if (res.data.code == 0) {
  81 +
77 82 th.data.userId = res.data.data.userId;
78 83 th.data.taskId = res.data.data.helpTaskId;
79   - th.data.helpId=res.data.data.helpFormId;
  84 + th.data.helpId=res.data.data.helpFormId;
  85 + // th.invalidTime = res.data.data.invalidTime
  86 + // th.setData({
  87 + // invalidTime:1662138310
  88 + // })
  89 + let openTime = res.data.data.openTime
  90 + th.getInvalidTime(openTime)
80 91 //获取活动的时间
81 92 return getApp().request.promiseGet("/api/weshop/marketing/help/help/act/get", {
82 93 data: {
... ... @@ -110,9 +121,45 @@ Page({
110 121 })
111 122  
112 123 }
113   - },
  124 + },
  125 + getInvalidTime(openTime=0){
  126 + let th = this
  127 + rq.get("/api/weshop/marketing/giftbag/helpinfo/get", {
  128 + data: {
  129 + storeId: os.stoid,
  130 + // userId: user_id,
  131 + taskId: th.data.taskId,
  132 + helpId:th.data.helpId
  133 + },
  134 + success: function (res) {
  135 + console.log('获取失效时间------');
  136 + console.log(res);
  137 + if (res.data.code == 0) {
  138 + let validTime=res.data.data.validTime
  139 + let invalidTime =0
  140 + if (openTime && validTime > 0) {
  141 + invalidTime = openTime*1 + validTime*60*60
  142 + }
  143 + th.setData({
  144 + invalidTime
  145 + });
  146 + }
  147 + }
  148 + })
  149 + },
114 150 //点击开启礼盒
115 151 cklie_button: function() {
  152 + //判断任务是否失效
  153 + let invalidTime = this.data.invalidTime
  154 + let nowTime = parseInt((new Date().getTime())/1000)
  155 + if (invalidTime > 0) {
  156 + let disTime = invalidTime - nowTime
  157 + if (disTime <=0) {
  158 + getApp().showWarning("该任务已失效");
  159 + return
  160 + }
  161 + }
  162 +
116 163 var th = this;
117 164 //--先判断会员状态--
118 165 var user_info = getApp().globalData.userInfo;
... ...
pages/user/assistance/task_assistance.js
... ... @@ -7,6 +7,7 @@ var e = getApp(),
7 7 s = e.globalData.setting,
8 8 os = s,
9 9 app_d = e.globalData;
  10 + var invalidSetTime = null
10 11 var regeneratorRuntime = require('../../../utils/runtime.js');
11 12 Page({
12 13 /**
... ... @@ -65,7 +66,15 @@ Page({
65 66 zltime: "", //助力时间
66 67 djs: "", //定时器的显示
67 68 //*********************************************end
68   -
  69 + //距离失效------
  70 + invalidTime:0,
  71 + invalidState:true,
  72 + invalidObj:{
  73 + h:'00',
  74 + m:'00',
  75 + s:'00'
  76 + },
  77 + //--------------
69 78 // Hei: 0,
70 79 max_sw_height: 0,
71 80  
... ... @@ -76,7 +85,7 @@ Page({
76 85 font_color:'',
77 86 },
78 87  
79   - /**
  88 + /**
80 89 * 生命周期函数--监听页面加载
81 90 */
82 91 onLoad: function (options) {
... ... @@ -443,6 +452,12 @@ Page({
443 452 },
444 453 //判断是否有领取任务 获取正在进行中的任务
445 454 get_user_task: function () {
  455 + invalidSetTime ? clearTimeout(invalidSetTime) :''
  456 + this.setData({
  457 + invalidObj:{ h:'00', m:'00',s:'00'},
  458 + invalidState:true,
  459 + invalidTime:0
  460 + })
446 461 var user_id = getApp().globalData.user_id;
447 462 var th = this;
448 463 var aitem = th.data.aitem;
... ... @@ -452,18 +467,83 @@ Page({
452 467 data: {
453 468 storeId: os.stoid,
454 469 userId: user_id,
455   - taskId: taskid
  470 + taskId: taskid
456 471 },
457 472 success: function (res) {
  473 + console.log('任务---------------------------------------');
  474 + console.log(res);
458 475 if (res.data.code == 0) {
459 476 var is_usertask = res.data.data;
460 477 th.setData({
461   - is_user_task: is_usertask
  478 + is_user_task: is_usertask,
462 479 });
  480 + th.getInvalidTime(taskid)
463 481 }
464 482 }
465 483 })
466 484 },
  485 + //获取失效时间
  486 + getInvalidTime(taskid){
  487 + let th = this
  488 + rq.get("/api/weshop/marketing/giftbag/helpinfo/get", {
  489 + data: {
  490 + storeId: os.stoid,
  491 + // userId: user_id,
  492 + taskId: taskid,
  493 + helpId:th.data.help_id
  494 + },
  495 + success: function (res) {
  496 + console.log('获取失效时间------');
  497 + console.log(res);
  498 + if (res.data.code == 0) {
  499 + let openTime =th.data.is_user_task ? th.data.is_user_task.openTime : 0
  500 + let validTime=res.data.data.validTime
  501 + let invalidTime =0
  502 + if (openTime && validTime > 0) {
  503 + invalidTime = openTime*1 + validTime*60*60
  504 + }
  505 + th.setData({
  506 + invalidTime
  507 + });
  508 +
  509 + th.invalid_count_down() //失效倒计时
  510 + }
  511 + }
  512 + })
  513 + },
  514 + // 距离失效倒计时
  515 + invalid_count_down(){
  516 +
  517 + let invalidTime = this.data.invalidTime
  518 + let nowTime = parseInt((new Date().getTime())/1000)
  519 + if (invalidTime) {
  520 + let disTime = invalidTime - nowTime
  521 + if (disTime>0) {
  522 + let h = parseInt(disTime/(60*60))
  523 + h = h*1 < 10 ? '0'+ h : h
  524 + let m= parseInt((disTime/60)%60)
  525 + m = m*1 < 10 ? '0' + m : m
  526 + let s = disTime % 60
  527 + s = s*1 < 10 ? '0'+s : s
  528 + this.setData({
  529 + 'invalidObj.h':h,
  530 + 'invalidObj.m':m,
  531 + 'invalidObj.s':s,
  532 + })
  533 + invalidSetTime=setTimeout(this.invalid_count_down,1000)
  534 + }else{
  535 + this.setData({
  536 + invalidObj:{ h:'00', m:'00',s:'00'},
  537 + invalidState:false
  538 + })
  539 + }
  540 + }else{
  541 + this.setData({
  542 + invalidObj:{h:'00', m:'00',s:'00'}
  543 + })
  544 + }
  545 + },
  546 +
467 547 //获取助力活动参与的人数
468 548 get_user_task_num: function () {
469 549 var th = this;
... ... @@ -686,11 +766,13 @@ Page({
686 766 ///二微码
687 767 var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
688 768 os.stoid + "?sceneValue=" + scene + "&pageValue=pages/user/assistance/friend_assistance";
689   - //读取文件成功则OK--
  769 + console.log('二维码路径');
  770 + console.log(path3);
  771 + //读取文件成功则OK--
690 772 wx.getImageInfo({
691 773 src: path3,
692 774 success: function (res) {
693   -
  775 +
694 776 var ewm_path = res.path; //
695 777 //var act_time="2019.06.26 - 2019.07.02"; //活动的时间
696 778 var bg_time = ut.formar_no_full(th.data.dynamic.beginDate,'.');
... ... @@ -939,6 +1021,10 @@ Page({
939 1021  
940 1022 //好友猜一猜
941 1023 save_share: function (e) {
  1024 + if (!this.data.invalidState) {
  1025 + getApp().showWarning("该任务已失效");
  1026 + return
  1027 + }
942 1028 var th = this;
943 1029 var aitem = this.data.aitem; //任务的数据集
944 1030 var sw_index = this.data.sw_index; //轮播的下标
... ... @@ -987,7 +1073,7 @@ Page({
987 1073 var block = th.data.block;
988 1074 if (images) {
989 1075 th.data.head_pic_arr.length = 0;
990   - for (var i in images) {s
  1076 + for (var i in images) {
991 1077 var img_path = images[i].headPic;
992 1078 img_path=img_path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
993 1079 img_path=img_path.replace("https://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
... ...
pages/user/assistance/task_assistance.wxml
... ... @@ -60,10 +60,11 @@
60 60 好友拆一拆
61 61 </view>
62 62 <!-- 任务超时失效 -->
63   - <!-- <view wx:if="{{is_user_task!=null&&is_user_task.status==0}}">
64   - <text>距离失效</text>
65   - <view><text>15</text>:<text>45</text>:<text>10</text></view>
66   - </view> -->
  63 + <view class="invalid" wx:if="{{ is_user_task!=null && is_user_task.status==0 && invalidTime !=0}}">
  64 + <text>距离失效:</text>
  65 + <view class="invalid_info" wx:if="{{invalidState}}"><text>{{invalidObj.h}}</text>:<text>{{invalidObj.m}}</text>:<text>{{invalidObj.s}}</text></view>
  66 + <view class="invalid_info" wx:else>该任务已失效</view>
  67 + </view>
67 68  
68 69 <view wx:if="{{is_user_task!=null&&is_user_task.status==1}}" class="task_clike fs40 t-c flex-center" data-libaoid="{{is_user_task.helpListGiftBagId}}"data-taskingid="{{is_user_task.id}}" bindtap="redeem_now"
69 70 style="background-color:#{{btn_color ? btn_color:'fbda0e'}};color:{{font_color?('#'+font_color):'white'}};">
... ...
pages/user/assistance/task_assistance.wxss
... ... @@ -256,3 +256,25 @@ line-height: 48rpx;
256 256 image{
257 257 -webkit-touch-callout:none
258 258 }
  259 +.invalid{
  260 + width: 100%;
  261 + height: 80rpx;
  262 + margin: 20rpx 0;
  263 + display: flex;
  264 + justify-content: center;
  265 + align-items: center;
  266 + color: #fff;
  267 +
  268 +}
  269 +.invalid_info{
  270 + width: 180rpx;
  271 + padding: 10rpx;
  272 + color: #000;
  273 + background-color: #fff;
  274 + margin-left: 20rpx;
  275 + border: 1rpx solid #fff;
  276 + border-radius: 10rpx;
  277 + display: flex;
  278 + align-items: center;
  279 + justify-content: space-around;
  280 +}
259 281 \ No newline at end of file
... ...
pages/user/index/index.wxml
... ... @@ -90,7 +90,7 @@
90 90 <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image>
91 91 <view class="member fs28 "> 加入plus会员预计可省3031元</view>
92 92 </view>
93   - <view class="xc-opening-button t-c" data-url="/pages/user/cardinfo/cardinfo" bindtap="goto">
  93 + <view class="xc-opening-button t-c" data-url="/packageE/pages/user/cardinfo/cardinfo" bindtap="goto">
94 94 <view class="xc-opening fs28">立即续费</view>
95 95 </view>
96 96 </view>
... ...
pages/user/plus/plus.js
... ... @@ -64,10 +64,27 @@ Page({
64 64 })
65 65 }
66 66 })
  67 +
  68 +
  69 + //二维码的带入
67 70 var fir_leader = options.scene;
68   - if (fir_leader) that.setData({
69   - fir_leader: fir_leader
70   - })
  71 + if (fir_leader){
  72 +
  73 + that.setData({
  74 + fir_leader: fir_leader
  75 + })
  76 +
  77 + //-- user_id代过来免登录 --
  78 + getApp().globalData.first_leader = fir_leader;
  79 + //调用接口判断是不是会员
  80 + getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + fir_leader, {}).then(res => {
  81 + if (res.data.code == 0) {
  82 + getApp().globalData.guide_id = res.data.data.id;
  83 + }
  84 + })
  85 + }
  86 +
  87 +
71 88 //--先判断会员状态--
72 89 var user_info = getApp().globalData.userInfo;
73 90 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
... ... @@ -157,7 +174,7 @@ Page({
157 174 success: function (e) {
158 175 var userInfo = e.data.data;
159 176 if (userInfo['card_field'] && !getApp().globalData.is_card_back) {
160   - var u_url = "/pages/user/cardinfo/cardinfo";
  177 + var u_url = "/packageE/pages/user/cardinfo/cardinfo";
161 178 wx.reLaunch({
162 179 url: u_url
163 180 })
... ... @@ -484,7 +501,7 @@ Page({
484 501 });
485 502 return false;
486 503 } else {
487   - var u_url = "/pages/user/cardinfo/cardinfo";
  504 + var u_url = "/packageE/pages/user/cardinfo/cardinfo";
488 505 wx.reLaunch({
489 506 url: u_url
490 507 })
... ...
utils/util.js
... ... @@ -697,7 +697,52 @@ module.exports = {
697 697 }
698 698 })
699 699 },
  700 + //检验等级价格
  701 + get_plus_name_price:function(sw_arr,th){
  702 + var that=this;
  703 + //---如果后台又开等级卡的开关---
  704 + if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
  705 + th.setData({
  706 + rank_switch: true
  707 + });
  708 + //---回调卡的列表---
  709 + th.getPlusCardType(function (ob) {
  710 + th.setData({
  711 + card_list: ob.card_list
  712 + });
  713 + var ti = setInterval(function () {
  714 + var user = getApp().globalData.userInfo;
  715 + if (!user) return false;
  716 + clearInterval(ti);
  717 +
  718 + if (user.card_field && user['card_expiredate']) {
  719 + var str = user['card_expiredate'].replace(/-/g, '/');
  720 + var end = new Date(str);
  721 + end = Date.parse(end) / 1000;
  722 + var now = that.gettimestamp();
  723 +
  724 + //--- 判断是等级会员,且在有效期范围内 ---
  725 + if (user.card_field && now < end) {
  726 + var card_name = ob.name_map.get(user.card_field);
  727 + if (card_name && card_name.length > 6) card_name = card_name.substring(0, 6);
  728 + var is_near_date = 0;
  729 + if (end - now < 60 * 60 * 30 * 24) is_near_date = 1; //如果小于30天
  730 +
  731 + th.setData({
  732 + card_field: user.card_field,
  733 + card_name: card_name,
  734 + card_list: ob.card_list,
  735 + is_near_date:is_near_date
  736 + });
  737 + }
  738 +
  739 + }
  740 +
  741 + }, 500)
  742 + })
700 743  
  744 + }
  745 + },
701 746  
702 747 unserialize: unserialize,
703 748 _throttle:_throttle,
... ...