Commit d0f44009abba0f5046f1af5ed6255066468d7a9c

Authored by yvan.ni
1 parent c6ba77c8

小程序OA单优化的内容提交

Showing 50 changed files with 1475 additions and 541 deletions
@@ -51,7 +51,7 @@ App({ @@ -51,7 +51,7 @@ App({
51 config: null, //门店参数 51 config: null, //门店参数
52 config2: null, //门店配置 52 config2: null, //门店配置
53 code: null, 53 code: null,
54 - user_id:null,// qa-6519858,// 54 + user_id:null,// 6520352,// qa-6519858,//
55 // user_id:6520314,// qa-6519858,// 55 // user_id:6520314,// qa-6519858,//
56 // user_id:14148118,// qa-6519858,// 56 // user_id:14148118,// qa-6519858,//
57 buy_now: null, 57 buy_now: null,
@@ -928,7 +928,7 @@ App({ @@ -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 return this.request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=" + type + "", {}).then(res => { 933 return this.request.promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=" + type + "", {}).then(res => {
934 if (res.data.code == 0) { 934 if (res.data.code == 0) {
@@ -938,8 +938,18 @@ App({ @@ -938,8 +938,18 @@ App({
938 if (item.is_sy == 0) { 938 if (item.is_sy == 0) {
939 var now = Date.parse(new Date()); now = now / 1000; 939 var now = Date.parse(new Date()); now = now / 1000;
940 if (item.end_time < now) { 940 if (item.end_time < now) {
  941 +
  942 + if(func){
  943 + func(0)
  944 + return false;
  945 + }
941 return 0 946 return 0
942 } 947 }
  948 + if(func){
  949 + func(1)
  950 + return false;
  951 + }
  952 +
943 return 1; 953 return 1;
944 } 954 }
945 } 955 }
app.wxss
@@ -380,7 +380,7 @@ button { @@ -380,7 +380,7 @@ button {
380 .modal-close { 380 .modal-close {
381 position: absolute; 381 position: absolute;
382 right: 25rpx; 382 right: 25rpx;
383 - top:40rpx; 383 + top:16rpx;
384 } 384 }
385 .no-data { 385 .no-data {
386 width: 100%; 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 \ No newline at end of file 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 \ No newline at end of file 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,6 +66,14 @@
66 margin: 0rpx; 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 .s7_gk7 image { 77 .s7_gk7 image {
70 width: 100%; 78 width: 100%;
71 height: 100%; 79 height: 100%;
components/diy_goodsGroup/diy_goodsGroup.js
@@ -56,6 +56,11 @@ Component({ @@ -56,6 +56,11 @@ Component({
56 title_class: "", 56 title_class: "",
57 is_no_plus: 1, 57 is_no_plus: 1,
58 container: null, 58 container: null,
  59 +
  60 + //判断接口是不是调用完成
  61 + is_get:0,
  62 +
  63 + is_retail_price:0 //是否显示零售价
59 }, 64 },
60 65
61 lifetimes: { 66 lifetimes: {
@@ -315,6 +320,12 @@ Component({ @@ -315,6 +320,12 @@ Component({
315 getApp().getConfig2(function (e) { 320 getApp().getConfig2(function (e) {
316 var swithc_list = e.switch_list; 321 var swithc_list = e.switch_list;
317 var sw_arr = JSON.parse(swithc_list); 322 var sw_arr = JSON.parse(swithc_list);
  323 +
  324 + if(sw_arr.is_retail_price){
  325 + th.setData({is_retail_price:1});
  326 + }
  327 +
  328 +
318 //---如果后台又开等级卡的开关--- 329 //---如果后台又开等级卡的开关---
319 if (sw_arr.rank_switch && sw_arr.rank_switch == "2") { 330 if (sw_arr.rank_switch && sw_arr.rank_switch == "2") {
320 th.setData({ 331 th.setData({
@@ -571,11 +582,12 @@ Component({ @@ -571,11 +582,12 @@ Component({
571 for (var i = 0; i < rData.length; i += 3) { 582 for (var i = 0; i < rData.length; i += 3) {
572 arr.push(rData.slice(i, i + 3)); 583 arr.push(rData.slice(i, i + 3));
573 } 584 }
574 - th.setData({ goods_array: arr, page: th.data.currentPage - 1, }); 585 + th.setData({ goods_array: arr, page: th.data.currentPage - 1,is_get:1 });
575 } else { 586 } else {
576 th.setData({ 587 th.setData({
577 goods_array: th.data.requestData, 588 goods_array: th.data.requestData,
578 page: th.data.currentPage - 1, 589 page: th.data.currentPage - 1,
  590 + is_get:1
579 }); 591 });
580 } 592 }
581 593
components/diy_goodsGroup/diy_goodsGroup.wxml
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 </block> 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 <!--1个列表的时候--> 29 <!--1个列表的时候-->
30 <view class="zs_goods_wai" wx:if='{{object.column==1}}'> 30 <view class="zs_goods_wai" wx:if='{{object.column==1}}'>
31 <block wx:for="{{goods_array}}"> 31 <block wx:for="{{goods_array}}">
@@ -67,7 +67,7 @@ @@ -67,7 +67,7 @@
67 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> 67 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
68 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> 68 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
69 </view> 69 </view>
70 -<!-- <view class='del'>¥{{item.market_price}}</view>--> 70 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
71 </block> 71 </block>
72 <block wx:else> 72 <block wx:else>
73 73
@@ -89,10 +89,10 @@ @@ -89,10 +89,10 @@
89 </view> 89 </view>
90 <view class="flex" style="line-height: 28rpx;"> 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 </view> 96 </view>
97 </block> 97 </block>
98 <blocK wx:else> 98 <blocK wx:else>
@@ -105,10 +105,10 @@ @@ -105,10 +105,10 @@
105 </view> 105 </view>
106 <view class="flex" style="line-height: 28rpx;"> 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 </view> 112 </view>
113 </blocK> 113 </blocK>
114 </block> 114 </block>
@@ -122,10 +122,10 @@ @@ -122,10 +122,10 @@
122 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> 122 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
123 </view> 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 </view> 130 </view>
131 <view class="flex" style="line-height: 28rpx;"> 131 <view class="flex" style="line-height: 28rpx;">
@@ -150,10 +150,10 @@ @@ -150,10 +150,10 @@
150 </view> 150 </view>
151 <view class="flex" style="line-height: 28rpx;"> 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 </view> 157 </view>
158 </block> 158 </block>
159 </block> 159 </block>
@@ -161,7 +161,7 @@ @@ -161,7 +161,7 @@
161 161
162 <block wx:else> 162 <block wx:else>
163 <view class='wz_red'>¥{{item.shop_price}}</view> 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 </block> 165 </block>
166 166
167 </block> 167 </block>
@@ -237,7 +237,7 @@ @@ -237,7 +237,7 @@
237 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> 237 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
238 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> 238 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
239 </view> 239 </view>
240 -<!-- <view class='del'>¥{{item.market_price}}</view>--> 240 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
241 </block> 241 </block>
242 <block wx:else> 242 <block wx:else>
243 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> 243 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
@@ -258,10 +258,10 @@ @@ -258,10 +258,10 @@
258 </view> 258 </view>
259 <view class="flex" style="line-height: 28rpx;"> 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 </view> 265 </view>
266 </block> 266 </block>
267 <blocK wx:else> 267 <blocK wx:else>
@@ -274,10 +274,10 @@ @@ -274,10 +274,10 @@
274 </view> 274 </view>
275 <view class="flex" style="line-height: 28rpx;"> 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 </view> 281 </view>
282 </blocK> 282 </blocK>
283 </block> 283 </block>
@@ -291,10 +291,10 @@ @@ -291,10 +291,10 @@
291 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> 291 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
292 </view> 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 </view> 299 </view>
300 <view class="flex" style="line-height: 28rpx;"> 300 <view class="flex" style="line-height: 28rpx;">
@@ -319,17 +319,17 @@ @@ -319,17 +319,17 @@
319 </view> 319 </view>
320 <view class="flex" style="line-height: 28rpx;"> 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 </view> 326 </view>
327 </block> 327 </block>
328 </block> 328 </block>
329 </block> 329 </block>
330 <block wx:else> 330 <block wx:else>
331 <view class='wz_red'>¥{{item.shop_price}}</view> 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 </block> 333 </block>
334 </block> 334 </block>
335 </view> 335 </view>
@@ -406,7 +406,7 @@ @@ -406,7 +406,7 @@
406 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> 406 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
407 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> 407 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
408 </view> 408 </view>
409 -<!-- <view class='del'>¥{{item.market_price}}</view>--> 409 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
410 </block> 410 </block>
411 <block wx:else> 411 <block wx:else>
412 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}"> 412 <block wx:if="{{g_filter.is_has_rank(rank_switch,item)}}">
@@ -427,10 +427,10 @@ @@ -427,10 +427,10 @@
427 </view> 427 </view>
428 <view class="flex" style="line-height: 28rpx;"> 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 </view> 434 </view>
435 </block> 435 </block>
436 <blocK wx:else> 436 <blocK wx:else>
@@ -443,10 +443,10 @@ @@ -443,10 +443,10 @@
443 </view> 443 </view>
444 <view class="flex" style="line-height: 28rpx;"> 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 </view> 450 </view>
451 </blocK> 451 </blocK>
452 </block> 452 </block>
@@ -460,10 +460,10 @@ @@ -460,10 +460,10 @@
460 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view> 460 <view class="fs35 wz_red">{{filter.toFix(item.shop_price,2)}}</view>
461 </view> 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 </view> 468 </view>
469 <view class="flex" style="line-height: 28rpx;"> 469 <view class="flex" style="line-height: 28rpx;">
@@ -488,17 +488,17 @@ @@ -488,17 +488,17 @@
488 </view> 488 </view>
489 <view class="flex" style="line-height: 28rpx;"> 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 </view> 495 </view>
496 </block> 496 </block>
497 </block> 497 </block>
498 </block> 498 </block>
499 <block wx:else> 499 <block wx:else>
500 <view class='wz_red'>¥{{item.shop_price}}</view> 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 </block> 502 </block>
503 </block> 503 </block>
504 </view> 504 </view>
@@ -577,7 +577,7 @@ @@ -577,7 +577,7 @@
577 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> 577 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
578 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text> 578 <text wx:if="{{item.prom_price}}">¥{{item.prom_price}}</text>
579 </view> 579 </view>
580 -<!-- <view class='del'>¥{{item.market_price}}</view>--> 580 + <view wx:if="{{is_retail_price}}" class='del'>¥{{item.market_price}}</view>
581 </block> 581 </block>
582 <!-- 不是活动的情况 --> 582 <!-- 不是活动的情况 -->
583 <block wx:else> 583 <block wx:else>
@@ -600,10 +600,10 @@ @@ -600,10 +600,10 @@
600 </view> 600 </view>
601 <view class="flex" style="line-height: 28rpx;"> 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 </view> 607 </view>
608 </block> 608 </block>
609 <blocK wx:else> 609 <blocK wx:else>
@@ -616,10 +616,10 @@ @@ -616,10 +616,10 @@
616 </view> 616 </view>
617 <view class="flex" style="line-height: 28rpx;"> 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 </view> 623 </view>
624 </blocK> 624 </blocK>
625 </block> 625 </block>
@@ -633,10 +633,10 @@ @@ -633,10 +633,10 @@
633 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> 633 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
634 </view> 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 </view> 641 </view>
642 <view class="flex" style="line-height: 28rpx;"> 642 <view class="flex" style="line-height: 28rpx;">
@@ -660,10 +660,10 @@ @@ -660,10 +660,10 @@
660 </view> 660 </view>
661 <view class="flex" style="line-height: 28rpx;"> 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 </view> 667 </view>
668 </block> 668 </block>
669 </block> 669 </block>
@@ -671,7 +671,7 @@ @@ -671,7 +671,7 @@
671 671
672 <block wx:else> 672 <block wx:else>
673 <view class='wz_red'>¥{{item.shop_price}}</view> 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 </block> 675 </block>
676 676
677 </block> 677 </block>
@@ -772,7 +772,7 @@ @@ -772,7 +772,7 @@
772 <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text> 772 <text wx:if="{{aitem.prom_integral && aitem.prom_price}}">+</text>
773 <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text> 773 <text wx:if="{{aitem.prom_price}}">¥{{aitem.prom_price}}</text>
774 </view> 774 </view>
775 -<!-- <view class='del'>¥{{aitem.market_price}}</view>--> 775 + <view wx:if="{{is_retail_price}}" class='del'>¥{{aitem.market_price}}</view>
776 </block> 776 </block>
777 <block wx:else> 777 <block wx:else>
778 <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}"> 778 <block wx:if="{{g_filter.is_has_rank(rank_switch,aitem)}}">
@@ -793,10 +793,10 @@ @@ -793,10 +793,10 @@
793 </view> 793 </view>
794 <view class="flex" style="line-height: 28rpx;"> 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 </view> 800 </view>
801 </block> 801 </block>
802 <blocK wx:else> 802 <blocK wx:else>
@@ -809,10 +809,10 @@ @@ -809,10 +809,10 @@
809 </view> 809 </view>
810 <view class="flex" style="line-height: 28rpx;"> 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 </view> 816 </view>
817 </blocK> 817 </blocK>
818 </block> 818 </block>
@@ -826,10 +826,10 @@ @@ -826,10 +826,10 @@
826 <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view> 826 <view class="fs35 wz_red">{{filter.toFix(aitem.shop_price,2)}}</view>
827 </view> 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 </view> 834 </view>
835 <view class="flex" style="line-height: 28rpx;"> 835 <view class="flex" style="line-height: 28rpx;">
@@ -854,17 +854,17 @@ @@ -854,17 +854,17 @@
854 </view> 854 </view>
855 <view class="flex" style="line-height: 28rpx;"> 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 </view> 861 </view>
862 </block> 862 </block>
863 </block> 863 </block>
864 </block> 864 </block>
865 <block wx:else> 865 <block wx:else>
866 <view class='wz_red'>¥{{aitem.shop_price}}</view> 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 </block> 868 </block>
869 </block> 869 </block>
870 </view> 870 </view>
@@ -898,5 +898,8 @@ @@ -898,5 +898,8 @@
898 </swiper> 898 </swiper>
899 899
900 </view> 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 </view> 905 </view>
903 \ No newline at end of file 906 \ No newline at end of file
components/diy_goodsGroup/diy_goodsGroup.wxss
@@ -912,6 +912,7 @@ top: 10rpx; @@ -912,6 +912,7 @@ top: 10rpx;
912 text-align: center; 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,7 +59,19 @@ Component({
59 59
60 60
61 init: function (g_id) { 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 if (g_id.data && g_id.data.length > 0) { 75 if (g_id.data && g_id.data.length > 0) {
64 //--先把商品ID串起来-- 76 //--先把商品ID串起来--
65 g_id.data.forEach(function (val, ind) { 77 g_id.data.forEach(function (val, ind) {
components/diy_groupbuy/diy_groupbuy.wxml
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 <view class='sp_wz'> 39 <view class='sp_wz'>
40 <view class='sp_wzi'>{{aitem.goods_name}}</view> 40 <view class='sp_wzi'>{{aitem.goods_name}}</view>
41 <view class='sp_jg'>¥{{aitem.price}}</view> 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 </view> 43 </view>
44 <!-- <view class="progress_box"> 44 <!-- <view class="progress_box">
45 <text class="on_sale_list">已买:{{aitem.buy_num + aitem.virtual_num}}件</text> 45 <text class="on_sale_list">已买:{{aitem.buy_num + aitem.virtual_num}}件</text>
@@ -94,7 +94,7 @@ @@ -94,7 +94,7 @@
94 </view> 94 </view>
95 <view> 95 <view>
96 <view class='sp_jg'>¥{{aitem.price}}</view> 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 </view> 98 </view>
99 </view> 99 </view>
100 </view> 100 </view>
components/diy_luckyGo/diy_luckyGo.js
@@ -60,7 +60,18 @@ Component({ @@ -60,7 +60,18 @@ Component({
60 // 这里是一个自定义方法 60 // 这里是一个自定义方法
61 customMethod: function () { }, 61 customMethod: function () { },
62 init: function (g_id) { 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 if (g_id.data_type == 2) { 75 if (g_id.data_type == 2) {
65 if (g_id.data && g_id.data.length > 0) { 76 if (g_id.data && g_id.data.length > 0) {
66 //--先把商品ID串起来-- 77 //--先把商品ID串起来--
components/diy_luckyGo/diy_luckyGo.wxml
@@ -27,9 +27,9 @@ @@ -27,9 +27,9 @@
27 27
28 <view class="ellipsis-2 name fs28 clearbadge">{{aitem.title}}</view> 28 <view class="ellipsis-2 name fs28 clearbadge">{{aitem.title}}</view>
29 <view> 29 <view>
30 - <view class="flex ai-center"> 30 + <view class="flex ai-center" style="align-items: center;">
31 <text class="rmb c-red">{{filters.price(aitem.group_price)}}</text> 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 </view> 33 </view>
34 </view> 34 </view>
35 35
components/diy_pingd_buy/diy_pingd_buy.js
@@ -65,8 +65,22 @@ Component({ @@ -65,8 +65,22 @@ Component({
65 // 这里是一个自定义方法 65 // 这里是一个自定义方法
66 customMethod: function() {}, 66 customMethod: function() {},
67 init: function(g_id) { 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 index = 0, 84 index = 0,
71 goodsidlist=""; 85 goodsidlist="";
72 86
components/diy_pingd_buy/diy_pingd_buy.wxml
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 <view class='sp_wz_p'> 46 <view class='sp_wz_p'>
47 <view class='sp_wzi_p'>{{aitem.title}}</view> 47 <view class='sp_wzi_p'>{{aitem.title}}</view>
48 <view class='sp_jg_p'>¥{{aitem.price}}</view> 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 <view class="tuan_set_num"> 51 <view class="tuan_set_num">
52 <view class="co-red2">{{aitem.ct_num}}人团</view> 52 <view class="co-red2">{{aitem.ct_num}}人团</view>
@@ -91,7 +91,7 @@ @@ -91,7 +91,7 @@
91 </view> 91 </view>
92 <view class="money"> 92 <view class="money">
93 <view class='sp_jg_p'>¥{{aitem.price}}</view> 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 </view> 95 </view>
96 <view class="o1_sj_p" wx:if="{{aitem.end_time>newTime}}"> 96 <view class="o1_sj_p" wx:if="{{aitem.end_time>newTime}}">
97 <image class="time_img" src="{{iurl}}/miniapp/images/time.png"></image> 97 <image class="time_img" src="{{iurl}}/miniapp/images/time.png"></image>
components/diy_pregoods/diy_pregoods.js
@@ -33,7 +33,19 @@ Component({ @@ -33,7 +33,19 @@ Component({
33 methods: { 33 methods: {
34 // 这里是一个自定义方法 34 // 这里是一个自定义方法
35 init: function(g_id) { 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 if(g_id && g_id.length>0){ 49 if(g_id && g_id.length>0){
38 //--先把商品ID串起来-- 50 //--先把商品ID串起来--
39 g_id.forEach(function(val, ind) { 51 g_id.forEach(function(val, ind) {
components/diy_pregoods/diy_pregoods.wxml
@@ -57,7 +57,7 @@ @@ -57,7 +57,7 @@
57 <view class='sp_wz'> 57 <view class='sp_wz'>
58 <view class='sp_wzi'>{{aitem.act_name}}</view> 58 <view class='sp_wzi'>{{aitem.act_name}}</view>
59 <view class='sp_jg'>¥{{aitem.presell_price}}</view> 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 </view> 61 </view>
62 62
63 </view> 63 </view>
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 </view> 88 </view>
89 <view class="money"> 89 <view class="money">
90 <view class='sp_jg'>¥{{aitem.presell_price}}</view> 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 </view> 92 </view>
93 93
94 <block wx:if="{{aitem.end_time<newTime}}"> 94 <block wx:if="{{aitem.end_time<newTime}}">
components/diy_seckill/diy_seckill.js
@@ -78,7 +78,19 @@ Component({ @@ -78,7 +78,19 @@ Component({
78 // 这里是一个自定义方法 78 // 这里是一个自定义方法
79 customMethod: function () { }, 79 customMethod: function () { },
80 init: function (g_id) { 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 if (g_id.data_type == 2) { 94 if (g_id.data_type == 2) {
83 if (g_id.data && g_id.data.length > 0) { 95 if (g_id.data && g_id.data.length > 0) {
84 //--先把商品ID串起来-- 96 //--先把商品ID串起来--
components/diy_seckill/diy_seckill.wxml
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 <view class='sp_wz'> 82 <view class='sp_wz'>
83 <view class='sp_wzi ellipsis-2'>{{aitem.goods_name}}</view> 83 <view class='sp_wzi ellipsis-2'>{{aitem.goods_name}}</view>
84 <view class='sp_jg'>¥{{aitem.price}}</view> 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 </view> 86 </view>
87 87
88 </view> 88 </view>
components/goods_list/goods_list.js
@@ -18,14 +18,29 @@ Component({ @@ -18,14 +18,29 @@ Component({
18 max_card_field: "", 18 max_card_field: "",
19 card_list: null, 19 card_list: null,
20 is_no_plus: 1, 20 is_no_plus: 1,
  21 +
  22 + is_retail_price:0
  23 +
21 }, 24 },
22 properties: { 25 properties: {
23 // 这⾥定义了innerText属性,属性值可以在组件使⽤时指定 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 pageLifetimes: { 40 pageLifetimes: {
27 //要处理一下,游客登录后的界面的变化,主要还该是改变会员 41 //要处理一下,游客登录后的界面的变化,主要还该是改变会员
28 show: function () { 42 show: function () {
  43 +
29 this.init(); 44 this.init();
30 if (getApp().globalData.login_back == 1) { 45 if (getApp().globalData.login_back == 1) {
31 getApp().globalData.login_back == 0; 46 getApp().globalData.login_back == 0;
@@ -81,6 +96,7 @@ Component({ @@ -81,6 +96,7 @@ Component({
81 }, 500) 96 }, 500)
82 }) 97 })
83 } 98 }
  99 +
84 }) 100 })
85 101
86 } 102 }
components/goods_list/goods_list.wxml
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <!-- 判断是否有活动价 --> 17 <!-- 判断是否有活动价 -->
18 <block wx:if="{{(item.prom_price>0 || item.prom_integral>0) && item.prom_id>0 && item.prom_type!=7 && item.prom_type!=10}}"> 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 <view class="pdt10"> 19 <view class="pdt10">
20 - <view class="money flex xc-wc"> 20 + <view class="money flex xc-wc" style="line-height:28rpx">
21 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text> 21 <text wx:if="{{item.prom_integral}}"><text class="fs35" style="font-weight: bold;">{{item.prom_integral}}</text>积分</text>
22 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> 22 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
23 <!-- 活动价 --> 23 <!-- 活动价 -->
@@ -26,13 +26,16 @@ @@ -26,13 +26,16 @@
26 <view class="fs35">{{item.prom_price}}</view> 26 <view class="fs35">{{item.prom_price}}</view>
27 </view> 27 </view>
28 </view> 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 </view> 39 </view>
37 40
38 </block> 41 </block>
@@ -54,15 +57,20 @@ @@ -54,15 +57,20 @@
54 </view> 57 </view>
55 </view> 58 </view>
56 </view> 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 </block> 72 </block>
65 - <blocK wx:else> 73 + <block wx:else>
66 <view class="money flex"> 74 <view class="money flex">
67 <!-- 办卡价 --> 75 <!-- 办卡价 -->
68 <view class="flex xc-wc"> 76 <view class="flex xc-wc">
@@ -70,14 +78,14 @@ @@ -70,14 +78,14 @@
70 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> 78 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
71 </view> 79 </view>
72 </view> 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 </block> 89 </block>
82 <block wx:else> 90 <block wx:else>
83 <!-- 如果商品有设置等级价⼤于0的 --> 91 <!-- 如果商品有设置等级价⼤于0的 -->
@@ -89,10 +97,10 @@ @@ -89,10 +97,10 @@
89 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> 97 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
90 </view> 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 </view> 104 </view>
97 <view class="flexr"> 105 <view class="flexr">
98 <!-- 等级价 --> 106 <!-- 等级价 -->
@@ -114,13 +122,13 @@ @@ -114,13 +122,13 @@
114 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> 122 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
115 </view> 123 </view>
116 </view> 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 </block> 132 </block>
125 </block> 133 </block>
126 </block> 134 </block>
@@ -133,13 +141,13 @@ @@ -133,13 +141,13 @@
133 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view> 141 <view class="fs35">{{filter.toFix(item.shop_price,2)}}</view>
134 </view> 142 </view>
135 </view> 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 </view> 151 </view>
144 </block> 152 </block>
145 </view> 153 </view>
custom-tab-bar/index.js
@@ -20,6 +20,12 @@ Component({ @@ -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 if(getApp().globalData.dis_buy_obj){ 30 if(getApp().globalData.dis_buy_obj){
25 var arr = getApp().globalData.dis_buy_obj; 31 var arr = getApp().globalData.dis_buy_obj;
packageA/pages/goodsInfo/goodsInfo.js
@@ -914,7 +914,7 @@ Page({ @@ -914,7 +914,7 @@ Page({
914 // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 914 // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
915 let actInfo = th.data.sele_g; 915 let actInfo = th.data.sele_g;
916 await th.get_buy_num2().then(function (data) { 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 let promcardbuynum = data.data.data.promcardbuynum; 918 let promcardbuynum = data.data.data.promcardbuynum;
919 let buyedNum = promcardbuynum; // 自己已经购买的数量b 919 let buyedNum = promcardbuynum; // 自己已经购买的数量b
920 let canBuyNum = limited - buyedNum; // 自己还可购买的数量c 920 let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
@@ -1242,7 +1242,7 @@ Page({ @@ -1242,7 +1242,7 @@ Page({
1242 // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购 1242 // 如果限购数量a<=redis可购买数量d, 当增加数量t>a,提示超出限购
1243 let actInfo = th.data.sele_g; 1243 let actInfo = th.data.sele_g;
1244 await th.get_buy_num2().then(function (data) { 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 let promcardbuynum = data.data.data.promcardbuynum; 1246 let promcardbuynum = data.data.data.promcardbuynum;
1247 let buyedNum = promcardbuynum; // 自己已经购买的数量b 1247 let buyedNum = promcardbuynum; // 自己已经购买的数量b
1248 let canBuyNum = limited - buyedNum; // 自己还可购买的数量c 1248 let canBuyNum = limited - buyedNum; // 自己还可购买的数量c
packageA/pages/profile/profile.js
@@ -586,6 +586,18 @@ Page({ @@ -586,6 +586,18 @@ Page({
586 this.setData({head_pic:uu.head_pic,nickname:uu.nickname}) 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 app.request.get(url1, { 601 app.request.get(url1, {
590 success:async function(res) { 602 success:async function(res) {
591 if(res.data.code == 0) { 603 if(res.data.code == 0) {
@@ -1132,7 +1144,7 @@ Page({ @@ -1132,7 +1144,7 @@ Page({
1132 1144
1133 //-- 需要推荐人 -- 1145 //-- 需要推荐人 --
1134 if(this.data.reg_info.introducer_state){ 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 if (tjrname == "" || tjrname == null) { 1148 if (tjrname == "" || tjrname == null) {
1137 //app.my_warnning("请输入推荐人", 0, this); 1149 //app.my_warnning("请输入推荐人", 0, this);
1138 //return false; 1150 //return false;
packageA/pages/profile/profile.wxml
@@ -29,8 +29,17 @@ @@ -29,8 +29,17 @@
29 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.introducer_state}}"> 29 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.introducer_state}}">
30 <view class="user-name-txt">推荐人:</view> 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 <block wx:if="{{!user['fromuser_id']}}"> 44 <block wx:if="{{!user['fromuser_id']}}">
36 <view class="c-red pdl20 fs24" wx:if="{{reg_info.introducer && reg_info.introducer_state && (reg_info.introducer_type == 0)}}">+{{reg_info.introducer}}积分</view> 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,10 +540,12 @@ Page({
540 this.data.is_zuhe_addcart = 1; 540 this.data.is_zuhe_addcart = 1;
541 if (!haveAdded) { 541 if (!haveAdded) {
542 542
543 -  
544 - 543 + //购买的商品的数量默认超量的数量
545 th.data.sele_g = this.data.list[index]; 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 if (!th.data.def_pick_store || 551 if (!th.data.def_pick_store ||
@@ -664,8 +666,11 @@ Page({ @@ -664,8 +666,11 @@ Page({
664 async check_pk_store_conut(func,is_no_msg,gd,by_num){ 666 async check_pk_store_conut(func,is_no_msg,gd,by_num){
665 var th=this; 667 var th=this;
666 if(this.data.sales_rules!=2){ 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 //门店库存no 675 //门店库存no
671 var pkno= gd && gd.pickup_no?gd.pickup_no:this.data.def_pick_store.pickup_no; 676 var pkno= gd && gd.pickup_no?gd.pickup_no:this.data.def_pick_store.pickup_no;
@@ -784,9 +789,17 @@ Page({ @@ -784,9 +789,17 @@ Page({
784 this.data.sele_index = index; 789 this.data.sele_index = index;
785 th.data.goodsInputNum = th.data.sele_g.num + 1; 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 th.check_pk_store_conut(function(){ 799 th.check_pk_store_conut(function(){
788 if (th.data.sele_g.cart_num) { 800 if (th.data.sele_g.cart_num) {
789 th.data.s_cart_num = th.data.sele_g.cart_num + 1; 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 th.add_cart_func(); 804 th.add_cart_func();
792 }) 805 })
@@ -1195,7 +1208,7 @@ Page({ @@ -1195,7 +1208,7 @@ Page({
1195 if (th.data.adding) return false; 1208 if (th.data.adding) return false;
1196 th.data.adding = 1; 1209 th.data.adding = 1;
1197 //-------如果购物车中有相关的数据--------- 1210 //-------如果购物车中有相关的数据---------
1198 - if (th.data.goodsInputNum > 1) { 1211 + if (th.data.list[index].num > 0) {
1199 var item = th.data.sele_g; 1212 var item = th.data.sele_g;
1200 if (th.data.goodsInputNum > o.store_count) { 1213 if (th.data.goodsInputNum > o.store_count) {
1201 th.data.adding = 0; 1214 th.data.adding = 0;
@@ -2000,6 +2013,13 @@ Page({ @@ -2000,6 +2013,13 @@ Page({
2000 } 2013 }
2001 2014
2002 var num = item.goods_num; 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 if (item.cbuy > -1 && item.cbuy < item.goods_num) { 2023 if (item.cbuy > -1 && item.cbuy < item.goods_num) {
2004 num = item.cbuy; 2024 num = item.cbuy;
2005 } 2025 }
@@ -2024,6 +2044,9 @@ Page({ @@ -2024,6 +2044,9 @@ Page({
2024 updata['guide_id'] = getApp().globalData.guide_id; 2044 updata['guide_id'] = getApp().globalData.guide_id;
2025 updata['guide_type'] = 0; 2045 updata['guide_type'] = 0;
2026 } 2046 }
  2047 + if(is_num_change){
  2048 + updata['goods_num']=num;
  2049 + }
2027 2050
2028 getApp().request.put("/api/weshop/cart/update", { 2051 getApp().request.put("/api/weshop/cart/update", {
2029 data: updata, 2052 data: updata,
pages/activity/pind_list/pind_list.js
@@ -18,6 +18,7 @@ Page({ @@ -18,6 +18,7 @@ Page({
18 iurl: os.imghost, 18 iurl: os.imghost,
19 ad_data: null, 19 ad_data: null,
20 max_sw_height: 200, 20 max_sw_height: 200,
  21 + is_retail_price:0
21 }, 22 },
22 23
23 //------初始化加载---------- 24 //------初始化加载----------
@@ -29,6 +30,16 @@ Page({ @@ -29,6 +30,16 @@ Page({
29 var th = this; 30 var th = this;
30 getApp().getConfig(); 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 if (first_leader) { 43 if (first_leader) {
33 getApp().globalData.first_leader = first_leader; 44 getApp().globalData.first_leader = first_leader;
34 //调用接口判断是不是会员 45 //调用接口判断是不是会员
pages/activity/pind_list/pind_list.wxml
@@ -43,7 +43,7 @@ @@ -43,7 +43,7 @@
43 <view class="fs20 flex xc-people-val-frame" 43 <view class="fs20 flex xc-people-val-frame"
44 style="border-color:{{type==1?'#d60021':'#059de5'}};margin-left:{{type==1?'15rpx':'0rpx'}}"> 44 style="border-color:{{type==1?'#d60021':'#059de5'}};margin-left:{{type==1?'15rpx':'0rpx'}}">
45 <view class=" flex-center val-img {{type==1?'red-b':'blue_b'}}"> 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 </view> 47 </view>
48 <text class="{{type==1?'red-co':'blue_c ai-bas'}}" style="margin-left:8rpx; margin-right:8rpx">{{item.ct_num}}人团</text> 48 <text class="{{type==1?'red-co':'blue_c ai-bas'}}" style="margin-left:8rpx; margin-right:8rpx">{{item.ct_num}}人团</text>
49 </view> 49 </view>
@@ -63,20 +63,20 @@ @@ -63,20 +63,20 @@
63 <text class='tui-conutdown-box'>{{item.djs.min}}</text>分 63 <text class='tui-conutdown-box'>{{item.djs.min}}</text>分
64 <text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒 64 <text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒
65 </view> 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 <view> 67 <view>
68 68
69 <view class="fs40 flex xc-top15 {{type==1?'red-co ai-bas':'blue_c xc-lihe42 ai-bas'}}"> 69 <view class="fs40 flex xc-top15 {{type==1?'red-co ai-bas':'blue_c xc-lihe42 ai-bas'}}">
70 <text class="fs28 {{type==0?'martop13':''}}">¥</text> 70 <text class="fs28 {{type==0?'martop13':''}}">¥</text>
71 <text style="margin-left:-5rpx">{{item.price}}</text> 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 </view> 73 </view>
74 74
75 </view> 75 </view>
76 <view class="kill-btn"> 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 <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> 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 <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> 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,11 +94,11 @@
94 <view class="theader" > 94 <view class="theader" >
95 <view bindtap='tip' data-ty="1" class="xc-border-right flex-center timeac left {{type==1?'active':''}}"> 95 <view bindtap='tip' data-ty="1" class="xc-border-right flex-center timeac left {{type==1?'active':''}}">
96 <image class="xc-bottom" 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 火热进行中</view> 98 火热进行中</view>
99 <view bindtap='tip' data-ty="0" class=" flex-center timeac right {{type==0?'active':''}}"> 99 <view bindtap='tip' data-ty="0" class=" flex-center timeac right {{type==0?'active':''}}">
100 <image class="xc-bottom" 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 即将开始</view> 102 即将开始</view>
103 </view> 103 </view>
104 104
pages/activity/seckill_list/seckill_list.js
@@ -17,6 +17,7 @@ Page({ @@ -17,6 +17,7 @@ Page({
17 isshow: 0, 17 isshow: 0,
18 ad_data: null, 18 ad_data: null,
19 max_sw_height: 200, 19 max_sw_height: 200,
  20 + is_retail_price:0
20 }, 21 },
21 22
22 //------初始化加载---------- 23 //------初始化加载----------
@@ -37,6 +38,16 @@ Page({ @@ -37,6 +38,16 @@ Page({
37 console.log(first_leader); 38 console.log(first_leader);
38 getApp().getConfig(); 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 if (first_leader) { 51 if (first_leader) {
41 getApp().globalData.first_leader = first_leader; 52 getApp().globalData.first_leader = first_leader;
42 //调用接口判断是不是会员 53 //调用接口判断是不是会员
pages/activity/seckill_list/seckill_list.wxml
@@ -68,8 +68,8 @@ @@ -68,8 +68,8 @@
68 </view> 68 </view>
69 <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" > 69 <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" >
70 <view class="fs28" style="line-height: 16px;">¥</view> 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 </view> 73 </view>
74 74
75 </view> 75 </view>
@@ -79,7 +79,7 @@ @@ -79,7 +79,7 @@
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> --> 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 <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> 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 <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> 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 </view> 83 </view>
84 </view> 84 </view>
85 </view> 85 </view>
pages/cart/cart2/cart2.js
@@ -137,7 +137,11 @@ Page({ @@ -137,7 +137,11 @@ Page({
137 dis_config:null, 137 dis_config:null,
138 bn_use_commission:0, //是不是使用佣金 138 bn_use_commission:0, //是不是使用佣金
139 cart_use_commission:0, 139 cart_use_commission:0,
140 - cart_commission:0 140 + cart_commission:0,
  141 +
  142 + //订单所有搭配购的
  143 + all_collocation_list:[]
  144 +
141 }, 145 },
142 onLoad: function (t) { 146 onLoad: function (t) {
143 wx.setNavigationBarTitle({ title: "填写订单", }) 147 wx.setNavigationBarTitle({ title: "填写订单", })
@@ -391,7 +395,11 @@ Page({ @@ -391,7 +395,11 @@ Page({
391 //to.get_allsto(function (e) { 395 //to.get_allsto(function (e) {
392 //th.setData({ allsto: e }); 396 //th.setData({ allsto: e });
393 //-------获取购物车已经选择的商品-------- 397 //-------获取购物车已经选择的商品--------
  398 + if(!th.data.old_cartlist)
394 th.get_cart(); 399 th.get_cart();
  400 + else{
  401 + th.calculatePrice();
  402 + }
395 //}) 403 //})
396 } 404 }
397 }); 405 });
@@ -413,6 +421,72 @@ Page({ @@ -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=res.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 get_cart: function () { 492 get_cart: function () {
@@ -594,7 +668,10 @@ Page({ @@ -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 //在分组的时候,就不要再调用接口,await 677 //在分组的时候,就不要再调用接口,await
@@ -662,6 +739,17 @@ Page({ @@ -662,6 +739,17 @@ Page({
662 if (car_item.cut_price1) arr[j].card_cut_price += car_item.cut_price1; 739 if (car_item.cut_price1) arr[j].card_cut_price += car_item.cut_price1;
663 740
664 arr[j].goods.push(car_item); 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 find = 1; 753 find = 1;
666 break; 754 break;
667 } 755 }
@@ -715,6 +803,7 @@ Page({ @@ -715,6 +803,7 @@ Page({
715 } 803 }
716 } 804 }
717 805
  806 +
718 var ie = { 807 var ie = {
719 pickup_id: pcid, 808 pickup_id: pcid,
720 pname: pikname, 809 pname: pikname,
@@ -734,6 +823,13 @@ Page({ @@ -734,6 +823,13 @@ Page({
734 823
735 //-- 把等级卡会优惠多少钱装进去 -- 824 //-- 把等级卡会优惠多少钱装进去 --
736 if (car_item.cut_price1) ie.card_cut_price += car_item.cut_price1; 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 arr.push(ie); 833 arr.push(ie);
738 } 834 }
739 } 835 }
@@ -927,7 +1023,6 @@ Page({ @@ -927,7 +1023,6 @@ Page({
927 wx.navigateBack({delta: 1}) 1023 wx.navigateBack({delta: 1})
928 },1000) 1024 },1000)
929 1025
930 -  
931 return false 1026 return false
932 } 1027 }
933 1028
@@ -972,6 +1067,8 @@ Page({ @@ -972,6 +1067,8 @@ Page({
972 et = th.data.bn_exp_type; 1067 et = th.data.bn_exp_type;
973 m_wind = th.data.index; 1068 m_wind = th.data.index;
974 } 1069 }
  1070 + th.data.m_wind = m_wind;
  1071 +
975 //---是不是购买等级卡成功的返回---等级卡显示的判断--- 1072 //---是不是购买等级卡成功的返回---等级卡显示的判断---
976 var is_card_back = getApp().globalData.is_card_back; 1073 var is_card_back = getApp().globalData.is_card_back;
977 if (is_card_back) { 1074 if (is_card_back) {
@@ -990,9 +1087,16 @@ Page({ @@ -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 gd.prom_type = gg.prom_type ? gg.prom_type : 0; 1096 gd.prom_type = gg.prom_type ? gg.prom_type : 0;
994 gd.prom_id = gg.prom_id ? gg.prom_id : 0; 1097 gd.prom_id = gg.prom_id ? gg.prom_id : 0;
995 1098
  1099 +
996 if(gd.whsle_id>0){ 1100 if(gd.whsle_id>0){
997 gd.prom_type =gg.prom_type=0; 1101 gd.prom_type =gg.prom_type=0;
998 gd.prom_id =gg.prom_id=0; 1102 gd.prom_id =gg.prom_id=0;
@@ -1051,6 +1155,7 @@ Page({ @@ -1051,6 +1155,7 @@ Page({
1051 1155
1052 } 1156 }
1053 1157
  1158 +
1054 //如果立即购买那边过来,就要读取接口,查看活动的优惠内容 1159 //如果立即购买那边过来,就要读取接口,查看活动的优惠内容
1055 if (gg.prom_type == 3) { 1160 if (gg.prom_type == 3) {
1056 t.data.data.prom_id = gg.prom_id; 1161 t.data.data.prom_id = gg.prom_id;
@@ -1100,10 +1205,12 @@ Page({ @@ -1100,10 +1205,12 @@ Page({
1100 //计算价格 1205 //计算价格
1101 th.calculatePrice2(); 1206 th.calculatePrice2();
1102 //获取优惠券 1207 //获取优惠券
1103 - th.get_buy_now_quan(); 1208 + th.get_buy_now_quan();
1104 1209
1105 }) 1210 })
1106 } else { 1211 } else {
  1212 +
  1213 +
1107 //--看是不是搭配促销-- 1214 //--看是不是搭配促销--
1108 if (gg.prom_type == 5) { 1215 if (gg.prom_type == 5) {
1109 t.data.data.prom_id = gg.prom_id; 1216 t.data.data.prom_id = gg.prom_id;
@@ -1122,91 +1229,26 @@ Page({ @@ -1122,91 +1229,26 @@ Page({
1122 } 1229 }
1123 th.setData({ collocation_goods: gg.collocation_goods }); 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)); 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 + }
1129 1243
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 - }  
1149 -  
1150 - }  
1151 - //自选的时候,系统配置了默认的配送方式是物流的时候  
1152 - if (distr_t == 0 && th.data.json_d.pickupway && th.data.json_d.pickupway == 1) {  
1153 - et = 0;  
1154 } 1244 }
1155 1245
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 -  
1203 - cart_arr.push(ie);  
1204 - if(cart_commission){  
1205 - th.setData({cart_commission});  
1206 - }  
1207 -  
1208 1246
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 th.setData({ 1253 th.setData({
1212 bn_goods: gd, bn_pickname: gg.pick_name, index: m_wind, 1254 bn_goods: gd, bn_pickname: gg.pick_name, index: m_wind,
@@ -1228,8 +1270,6 @@ Page({ @@ -1228,8 +1270,6 @@ Page({
1228 th.get_cart_quan(); 1270 th.get_cart_quan();
1229 }); 1271 });
1230 1272
1231 -  
1232 -  
1233 } else { 1273 } else {
1234 //计算价格 1274 //计算价格
1235 th.calculatePrice2(); 1275 th.calculatePrice2();
@@ -1540,7 +1580,6 @@ Page({ @@ -1540,7 +1580,6 @@ Page({
1540 } 1580 }
1541 } 1581 }
1542 1582
1543 -  
1544 o_price -= (item_map.price - item_map.prom_price); 1583 o_price -= (item_map.price - item_map.prom_price);
1545 //如果有限制使用优惠券,就要减掉参与的活动商品的钱 1584 //如果有限制使用优惠券,就要减掉参与的活动商品的钱
1546 if (!item_map.is_xz_yh) q_conditin = o_price; 1585 if (!item_map.is_xz_yh) q_conditin = o_price;
@@ -1622,6 +1661,9 @@ Page({ @@ -1622,6 +1661,9 @@ Page({
1622 } 1661 }
1623 1662
1624 }, 1663 },
  1664 +
  1665 +
  1666 +
1625 calclate_lbNum(r_data) { 1667 calclate_lbNum(r_data) {
1626 let send_lb = this.data.send_lb; 1668 let send_lb = this.data.send_lb;
1627 //g_lb_num我的礼包 g_zxlb_num专享礼包 1669 //g_lb_num我的礼包 g_zxlb_num专享礼包
@@ -4307,6 +4349,13 @@ Page({ @@ -4307,6 +4349,13 @@ Page({
4307 ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif"; 4349 ob[txt] = this.data.imgUrl + "/miniapp/images/default_g_img.gif";
4308 this.setData(ob); 4350 this.setData(ob);
4309 }, 4351 },
  4352 + cart_set_err1: function (e) {
  4353 + var txt = e.currentTarget.dataset.err;
  4354 + var ob = {};
  4355 + ob[txt] = "/miniapp/images/default_g_img.gif";
  4356 + this.setData(ob);
  4357 + },
  4358 +
4310 //--验证是否已经冻结-- 4359 //--验证是否已经冻结--
4311 check_is_frozenQuan: function (quanlist, frozenQuan, isby) { 4360 check_is_frozenQuan: function (quanlist, frozenQuan, isby) {
4312 console.log("券列表", quanlist); 4361 console.log("券列表", quanlist);
@@ -5400,10 +5449,9 @@ Page({ @@ -5400,10 +5449,9 @@ Page({
5400 th.setData({ [txt9]: new_pk_list_goods, send_gf: this.data.send_gf }); 5449 th.setData({ [txt9]: new_pk_list_goods, send_gf: this.data.send_gf });
5401 this.data.old_cartlist[index].goods = new_pk_list_goods; 5450 this.data.old_cartlist[index].goods = new_pk_list_goods;
5402 5451
5403 -  
5404 console.log(this.data.send_gf, "----"); 5452 console.log(this.data.send_gf, "----");
5405 -  
5406 th.calculatePrice(); 5453 th.calculatePrice();
  5454 +
5407 } else { 5455 } else {
5408 var new_pk_list_goods = []; 5456 var new_pk_list_goods = [];
5409 //-- 当是立即购买的时候 -- 5457 //-- 当是立即购买的时候 --
@@ -5552,6 +5600,206 @@ Page({ @@ -5552,6 +5600,206 @@ Page({
5552 } else { 5600 } else {
5553 func(); 5601 func();
5554 } 5602 }
  5603 + },
  5604 +
  5605 + //子组件返回的优化
  5606 + select_coll(e){
  5607 + console.log("--1111--aaa--");
  5608 + console.log(e);
  5609 + //-- 如果是购物车的选择添加搭配商品 --
  5610 + if(e.detail.is_cart==1){
  5611 + this.select_coll_buy_cart(e.detail);
  5612 + }else{
  5613 + this.select_coll_buy_now(e.detail);
  5614 + }
  5615 + },
  5616 +
  5617 + //立即购买的时候,选中和不选中搭配商品
  5618 + async select_coll_buy_now(e){
  5619 + var th=this;
  5620 + //--按钮变灰色 --
  5621 + th.setData({submit:1});
  5622 + //如果是选中
  5623 + if(e.selected){
  5624 + var item=this.data.all_collocation_list[e.index];
  5625 + item.goods_num=1;
  5626 + item.goods_price=item.price;
  5627 + item.is_collocation=1;
  5628 +
  5629 + var coll_arr=[];
  5630 + if(this.data.collocation_goods && this.data.collocation_goods.length){
  5631 + coll_arr=this.data.collocation_goods;
  5632 + }
  5633 + coll_arr.push(item);
  5634 + this.setData({collocation_goods:coll_arr});
  5635 + //让主商品的活动变成5,搭配购
  5636 + this.setData({'bn_goods.prom_type':5, 'bn_goods.prom_id':coll_arr[0].prom_id });
  5637 +
  5638 + var is_has_main=coll_arr.findIndex(function(e){
  5639 + return e.goods_id==th.data.bn_goods.goods_id;
  5640 + })
  5641 +
  5642 + //要进行深拷贝
  5643 + var coll_arr_new=JSON.parse(JSON.stringify(coll_arr));
  5644 + coll_arr_new.unshift(this.data.bn_goods);
  5645 +
  5646 + await th.get_collocation_list(coll_arr_new);
  5647 + //计算价格
  5648 + th.calculatePrice2();
  5649 + th.get_cart_quan();
  5650 +
  5651 + }else{
  5652 + var item=this.data.all_collocation_list[e.index];
  5653 + var coll_arr=this.data.collocation_goods;
  5654 + var find=coll_arr.findIndex(function (e){
  5655 + e.goods_id=item.goods_id;
  5656 + })
  5657 + coll_arr.splice(find,1);
  5658 +
  5659 + //当coll_arr的长度等于1的时候,说明没有选中搭配商品,只有主商品了
  5660 + if(!coll_arr || coll_arr.length<1){
  5661 + //让主商品的活动变成0,取消搭配购
  5662 + this.setData({'bn_goods.prom_type':0, 'bn_goods.prom_id':0,collocation_goods:[] });
  5663 + //计算价格
  5664 + th.calculatePrice2();
  5665 + //获取优惠券
  5666 + th.get_buy_now_quan();
  5667 +
  5668 + }else{
  5669 + this.setData({collocation_goods:coll_arr});
  5670 + //要进行深拷贝
  5671 + var coll_arr_new=JSON.parse(JSON.stringify(coll_arr));
  5672 + coll_arr_new.unshift(this.data.bn_goods);
  5673 + await th.get_collocation_list(coll_arr);
  5674 + //计算价格
  5675 + th.calculatePrice2();
  5676 + th.get_cart_quan();
  5677 + }
  5678 + }
  5679 + },
  5680 + //购物车购买的时候,选中和不选中搭配商品
  5681 + async select_coll_buy_cart(e){
  5682 + var th=this;
  5683 + var cart_index=e.cart_index;
  5684 + var index=e.index;
  5685 +
  5686 + var collocationList=this.data.cartlist[cart_index].collocationList;
  5687 + var item=collocationList[cart_index];
  5688 + var goods=this.data.cartlist[cart_index].goods;
  5689 + var txt='cartlist['+cart_index+'].goods';
  5690 + var txt2='cartlist['+cart_index+'].collocationList['+index+'].selected';
  5691 +
  5692 + //-- 如果是选中 --
  5693 + if(e.selected){
  5694 + item.goods_num=1;
  5695 + item.goods_price=item.price;
  5696 + item.prom_type=5;
  5697 + item.is_collocation=1;
  5698 +
  5699 + goods.push(item);
  5700 +
  5701 + th.setData({[txt]:goods,[txt2]:1});
  5702 +
  5703 + th.data.old_cartlist=JSON.parse(JSON.stringify(this.data.cartlist));
  5704 + th.calculatePrice();
  5705 + //th.get_cart_quan();
  5706 +
  5707 + }else{
  5708 + var fd=goods.findIndex(function (e){
  5709 + return e.goods_id ==item.goods_id && e.prom_type ==5;
  5710 + })
  5711 +
  5712 + goods.splice(fd,1);
  5713 + th.setData({[txt]:goods,[txt2]:0});
  5714 + th.data.old_cartlist=JSON.parse(JSON.stringify(this.data.cartlist));
  5715 +
  5716 + th.calculatePrice();
  5717 + //th.get_cart_quan();
  5718 + }
  5719 + },
  5720 +
  5721 + //-- 搭配购的获取搭配商品的购物车计算价格的数组格式 --
  5722 + async get_collocation_list(narr){
  5723 + var gg = to.get_b_now();
  5724 + var th=this;
  5725 + var cart_arr = new Array();
  5726 + //-- 搭配促销的门店配送方式的修复 --
  5727 + var et = 1;
  5728 + var distr_t = 0; // 配送方式 0=用户自选 1=自提 2=物流
  5729 + for (var hi in narr) {
  5730 + var dis_t = narr[hi].distr_type;
  5731 + if (dis_t == 2) {
  5732 + th.setData({ is_all_zt: 0 });
  5733 + et = 0;
  5734 + }
  5735 + if (dis_t > 0) {
  5736 + distr_t = dis_t;
  5737 + }
  5738 +
  5739 + //-- 如果有一件代发的商品或者不是同城配送的配送 --
  5740 + if(narr[hi].is_same_city!=1 || narr[hi].whsle_id>0){
  5741 + th.setData({show_same_city:0})
  5742 + }
  5743 + }
  5744 + //自选的时候,系统配置了默认的配送方式是物流的时候
  5745 + if (distr_t == 0 && th.data.json_d.pickupway && th.data.json_d.pickupway == 1) {
  5746 + et = 0; th.setData({ is_all_zt: 0 });
  5747 + }
  5748 +
  5749 + var m_wind=th.data.m_wind;
  5750 + var ie = {
  5751 + pickup_id: gg.pick_id,
  5752 + pname: gg.pick_name,
  5753 + goods: narr,
  5754 + exp_type: et,
  5755 + wind: m_wind,
  5756 + distr_t: distr_t,
  5757 + bn_t_exp_t: distr_t,
  5758 + goods_price: 0,
  5759 + shipping_price: 0,
  5760 + user_money: 0,
  5761 + total_amount: 0,
  5762 + order_amount: 0,
  5763 + user_note: ""
  5764 + };
  5765 +
  5766 + var cart_commission=0;
  5767 + //-- 循环计算一下线下取价 --
  5768 + //计算佣金的商品
  5769 + var commission_gds=[];
  5770 + for (var c = 0; c < narr.length; c++) {
  5771 + var hr={
  5772 + goods_id:narr[c].goods_id,
  5773 + goods_num:narr[c].goods_num,
  5774 + prom_type:0,
  5775 + prom_id:0,
  5776 + }
  5777 + commission_gds.push(hr);
  5778 +
  5779 + }
  5780 +
  5781 + //获取购物车的佣金,此处要优化调用接口,获取佣金
  5782 + var req_d = {
  5783 + user_id:getApp().globalData.user_id,goods_ids:commission_gds,store_id: os.stoid
  5784 + }
  5785 + var back_data=null;
  5786 + await getApp().request.promisePost("/api/weshop/order/getrebateSum", {
  5787 + is_json: 1, data: req_d
  5788 + }).then(rs => {
  5789 + if (rs.data.code == 0) back_data =rs.data.data;
  5790 + });
  5791 +
  5792 + if(back_data && parseFloat(back_data)) {
  5793 + ie.can_usecommise =parseFloat(back_data);
  5794 + cart_commission = ie.can_usecommise;
  5795 + }
  5796 +
  5797 + cart_arr.push(ie);
  5798 + if(cart_commission){
  5799 + th.setData({cart_commission});
  5800 + }
  5801 +
  5802 + th.data.old_cartlist = cart_arr;
5555 } 5803 }
5556 5804
5557 5805
pages/cart/cart2/cart2.json
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "navigationBarTitleText": "填写订单", 2 "navigationBarTitleText": "填写订单",
3 "enablePullDownRefresh": false, 3 "enablePullDownRefresh": false,
4 "usingComponents": { 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 \ No newline at end of file 9 \ No newline at end of file
pages/cart/cart2/cart2.wxml
@@ -108,6 +108,11 @@ @@ -108,6 +108,11 @@
108 </navigator> 108 </navigator>
109 </view> 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 <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}"> 117 <view class="plus_buy fs28" wx:if="{{item.card_cut_price>0}}">
113 <view class="flex"> 118 <view class="flex">
@@ -127,10 +132,6 @@ @@ -127,10 +132,6 @@
127 <view bindtap="buycard" class="card_op">立即开通</view> 132 <view bindtap="buycard" class="card_op">立即开通</view>
128 </view> 133 </view>
129 134
130 -  
131 -  
132 -  
133 -  
134 <view class="set-mes bdr_b-14"> 135 <view class="set-mes bdr_b-14">
135 <view wx:if="{{order.store_prom}}"> 136 <view wx:if="{{order.store_prom}}">
136 <icon color="#f23030" size="16" type="info"></icon> 137 <icon color="#f23030" size="16" type="info"></icon>
@@ -217,7 +218,6 @@ @@ -217,7 +218,6 @@
217 </view> 218 </view>
218 </block> 219 </block>
219 </view> 220 </view>
220 -  
221 <!-- 赠品的显示 --> 221 <!-- 赠品的显示 -->
222 <view wx:if="{{send_gf[item.pickup_id]}}"> 222 <view wx:if="{{send_gf[item.pickup_id]}}">
223 <block wx:for="{{send_gf[item.pickup_id]}}" wx:for-item="iter"> 223 <block wx:for="{{send_gf[item.pickup_id]}}" wx:for-item="iter">
@@ -252,6 +252,7 @@ @@ -252,6 +252,7 @@
252 </view> 252 </view>
253 253
254 254
  255 +
255 <!-- 留言 --> 256 <!-- 留言 -->
256 <view class="coupon-mes flex-vertical"> 257 <view class="coupon-mes flex-vertical">
257 <view>留言</view> 258 <view>留言</view>
@@ -332,7 +333,7 @@ @@ -332,7 +333,7 @@
332 <view class="goods-img" style="position: relative"> 333 <view class="goods-img" style="position: relative">
333 <image src="{{imgUrl}}/miniapp/images/giveaway.png" class="gift_image"></image> 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 </view> 337 </view>
337 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> 338 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
338 <view class="goods-name ellipsis-2">{{item.goods_name}}</view> 339 <view class="goods-name ellipsis-2">{{item.goods_name}}</view>
@@ -356,7 +357,7 @@ @@ -356,7 +357,7 @@
356 <!-- 搭配购买的功能实现 --> 357 <!-- 搭配购买的功能实现 -->
357 <view class="order-detail" wx:for="{{collocation_goods}}"> 358 <view class="order-detail" wx:for="{{collocation_goods}}">
358 <view class="goods-img"> 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 </view> 361 </view>
361 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}"> 362 <navigator class="order-cont" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}">
362 <view class="goods-name ellipsis-2">{{item.goods_name}}</view> 363 <view class="goods-name ellipsis-2">{{item.goods_name}}</view>
@@ -375,6 +376,10 @@ @@ -375,6 +376,10 @@
375 </view> 376 </view>
376 </block> 377 </block>
377 378
  379 + <!-- 使用搭配 -->
  380 + <cart_collect_temp bind:childFun="select_coll" all_collocation_list="{{all_collocation_list}}" />
  381 +
  382 +
378 <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 --> 383 <!-- 如果是等级卡的商品,会员没有注册,要提醒注册 -->
379 <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}"> 384 <view class="plus_buy fs28" wx:if="{{card_cut_price>0}}">
380 <view class="flex"> 385 <view class="flex">
@@ -441,8 +446,6 @@ @@ -441,8 +446,6 @@
441 </view> 446 </view>
442 447
443 448
444 -  
445 -  
446 <view class="set-mes bdr_b-14"> 449 <view class="set-mes bdr_b-14">
447 450
448 <view wx:if="{{order.store_prom}}"> 451 <view wx:if="{{order.store_prom}}">
@@ -478,8 +481,6 @@ @@ -478,8 +481,6 @@
478 </view> 481 </view>
479 </view> 482 </view>
480 483
481 -  
482 -  
483 <!-- 留言 --> 484 <!-- 留言 -->
484 <view class="coupon-mes flex-vertical"> 485 <view class="coupon-mes flex-vertical">
485 <view>留言</view> 486 <view>留言</view>
pages/goods/categoryList/categoryList.js
@@ -75,6 +75,8 @@ Page({ @@ -75,6 +75,8 @@ Page({
75 load: 0, 75 load: 0,
76 xmlist: null, 76 xmlist: null,
77 77
  78 + is_retail_price:0 //是否显示零售价
  79 +
78 80
79 }, 81 },
80 82
@@ -192,6 +194,11 @@ Page({ @@ -192,6 +194,11 @@ Page({
192 }) 194 })
193 }, 500) 195 }, 500)
194 } 196 }
  197 +
  198 + if(sw_arr.is_retail_price){
  199 + th.setData({is_retail_price:1});
  200 + }
  201 +
195 }); 202 });
196 }, 203 },
197 onShow: function () { 204 onShow: function () {
pages/goods/categoryList/categoryList.wxml
@@ -592,7 +592,7 @@ @@ -592,7 +592,7 @@
592 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> 592 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
593 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text> 593 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
594 </view> 594 </view>
595 - <!-- <view class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>--> 595 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb mgl10 fs24">{{item.market_price}}</view>
596 </view> 596 </view>
597 597
598 <view class="comment"> 598 <view class="comment">
@@ -621,7 +621,7 @@ @@ -621,7 +621,7 @@
621 </view> 621 </view>
622 </view> 622 </view>
623 <view class="comment flex jc_sb"> 623 <view class="comment flex jc_sb">
624 - <!-- <view class="word-line xc-ash rmb fs24">{{item.market_price}}</view>--> 624 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24">{{item.market_price}}</view>
625 <view class="fs22 pdt10 t-r"> 625 <view class="fs22 pdt10 t-r">
626 <span>评论{{item.comment_count}}</span> 626 <span>评论{{item.comment_count}}</span>
627 <span class="pdl30">已售{{item.sales_sum}}</span> 627 <span class="pdl30">已售{{item.sales_sum}}</span>
@@ -631,7 +631,7 @@ @@ -631,7 +631,7 @@
631 <block wx:else> 631 <block wx:else>
632 <view class="flex ai-center"> 632 <view class="flex ai-center">
633 <view class="price rmb">{{item.shop_price}}</view> 633 <view class="price rmb">{{item.shop_price}}</view>
634 - <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> 634 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
635 </view> 635 </view>
636 636
637 <view class="comment"> 637 <view class="comment">
@@ -647,7 +647,7 @@ @@ -647,7 +647,7 @@
647 <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}"> 647 <block wx:if="{{g_filter.get_card_price(item,card_list,0)}}">
648 <view class="flex ai-center"> 648 <view class="flex ai-center">
649 <view class="price rmb">{{item.shop_price}}</view> 649 <view class="price rmb">{{item.shop_price}}</view>
650 - <!-- <view class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>--> 650 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash mk_price rmb fs24 mgl10">{{item.market_price}}</view>
651 </view> 651 </view>
652 <view class="comment"> 652 <view class="comment">
653 <view class="flex ai-center"> 653 <view class="flex ai-center">
@@ -668,8 +668,8 @@ @@ -668,8 +668,8 @@
668 </block> 668 </block>
669 <block wx:else> 669 <block wx:else>
670 <view class="flex ai-center"> 670 <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>--> 671 + <view class="price rmb">{{item.shop_price}}</view>
  672 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
673 </view> 673 </view>
674 <!-- <view class="price">¥{{item.shop_price}}</view> --> 674 <!-- <view class="price">¥{{item.shop_price}}</view> -->
675 <view class="comment"> 675 <view class="comment">
@@ -685,7 +685,7 @@ @@ -685,7 +685,7 @@
685 <block wx:else> 685 <block wx:else>
686 <view class="flex ai-center"> 686 <view class="flex ai-center">
687 <view class="price rmb">{{item.shop_price}}</view> 687 <view class="price rmb">{{item.shop_price}}</view>
688 - <!-- <view class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>--> 688 + <view wx:if="{{is_retail_price}}" class="word-line xc-ash rmb fs24 mgl10">{{item.market_price}}</view>
689 </view> 689 </view>
690 <!-- <view class="price">¥{{item.shop_price}}</view> --> 690 <!-- <view class="price">¥{{item.shop_price}}</view> -->
691 <view class="comment"> 691 <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 \ No newline at end of file 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 \ No newline at end of file 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 \ No newline at end of file 80 \ No newline at end of file
pages/goods/goodsInfo/goodsInfo.js
@@ -255,7 +255,9 @@ Page({ @@ -255,7 +255,9 @@ Page({
255 share_hidden: false, 255 share_hidden: false,
256 all_activity_list: null, //所有活动的列表 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,7 +426,8 @@ Page({
424 store_config: e, 426 store_config: e,
425 sys_switch: json_d, 427 sys_switch: json_d,
426 is_closecoupon: json_d.is_closecoupon, 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 ee.init(gid); 432 ee.init(gid);
430 //------几人评价------- 433 //------几人评价-------
@@ -750,8 +753,11 @@ Page({ @@ -750,8 +753,11 @@ Page({
750 fir_quan = res1.data.data.pageData; 753 fir_quan = res1.data.data.pageData;
751 }) 754 })
752 } 755 }
  756 +
  757 + let arr=[]
  758 +
753 //过滤不是本商品的单品优惠券------------------- 759 //过滤不是本商品的单品优惠券-------------------
754 - if(fir_quan.length > 0 ){ 760 + if(fir_quan && fir_quan.length > 0 ){
755 let goodInfo = ee.data.data 761 let goodInfo = ee.data.data
756 for (let index = fir_quan.length-1; index >= 0; index--) { 762 for (let index = fir_quan.length-1; index >= 0; index--) {
757 if (fir_quan[index].useobjecttype==20) { //判断是单品优惠券 763 if (fir_quan[index].useobjecttype==20) { //判断是单品优惠券
@@ -759,15 +765,18 @@ Page({ @@ -759,15 +765,18 @@ Page({
759 fir_quan.splice(index,1) 765 fir_quan.splice(index,1)
760 } 766 }
761 } 767 }
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); 768 + }
  769 +
  770 + let length = fir_quan.length
  771 + if (length <= 3) {
  772 + arr=fir_quan
  773 + }else{
  774 + arr=fir_quan.splice(0,3);
  775 + }
  776 +
770 } 777 }
  778 +
  779 +
771 //--------获取视频图片--------- 780 //--------获取视频图片---------
772 await getApp().request.promiseGet("/api/weshop/goodsVideos/get/" + os.stoid + "/" + ee.data.gid, { 781 await getApp().request.promiseGet("/api/weshop/goodsVideos/get/" + os.stoid + "/" + ee.data.gid, {
773 1: 1 782 1: 1
@@ -6963,7 +6972,28 @@ Page({ @@ -6963,7 +6972,28 @@ Page({
6963 var prom_id=e.currentTarget.dataset.prom; 6972 var prom_id=e.currentTarget.dataset.prom;
6964 var index=e.currentTarget.dataset.index; 6973 var index=e.currentTarget.dataset.index;
6965 getApp().goto("/packageD/pages/gift/gift?prom_id="+prom_id+"&index="+index); 6974 getApp().goto("/packageD/pages/gift/gift?prom_id="+prom_id+"&index="+index);
  6975 + },
  6976 +
  6977 + pre_gallery_img(e){
  6978 +
  6979 + this.data.show_prew_img=1;
  6980 +
  6981 + var index = e.currentTarget.dataset.index;
  6982 + getApp().globalData.no_clear=1;
  6983 +
  6984 + var url=this.data.gallery[index].image_url;
  6985 + var url_arr=[];
  6986 +
  6987 + for(var i in this.data.gallery){
  6988 + url_arr.push(this.data.gallery[i].image_url)
6966 } 6989 }
6967 6990
6968 6991
  6992 + wx.previewImage({
  6993 + current: url, // 当前显示图片的http链接
  6994 + urls: url_arr,// 需要预览的图片http链接列表
  6995 + });
  6996 + }
  6997 +
  6998 +
6969 }) 6999 })
pages/goods/goodsInfo/goodsInfo.wxml
@@ -45,8 +45,8 @@ @@ -45,8 +45,8 @@
45 <video bindfullscreenchange="screenChange" class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video> 45 <video bindfullscreenchange="screenChange" class="xc-videos" src="{{iurl+mapurl}}" id="{{index}}" wx:if="{{_index == index}}"></video>
46 </view> 46 </view>
47 </swiper-item> 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 </swiper-item> 50 </swiper-item>
51 </swiper> 51 </swiper>
52 <block wx:if="{{mapurl}}"> 52 <block wx:if="{{mapurl}}">
@@ -124,9 +124,9 @@ @@ -124,9 +124,9 @@
124 <view class="flex fs35 xc-qtsign">¥</view> 124 <view class="flex fs35 xc-qtsign">¥</view>
125 <view class="fs50 val">{{prom_price}}</view> 125 <view class="fs50 val">{{prom_price}}</view>
126 </view> 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 </view> 130 </view>
131 131
132 <view class="abs white xc-nanber"> 132 <view class="abs white xc-nanber">
@@ -260,9 +260,15 @@ @@ -260,9 +260,15 @@
260 <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text> 260 <text class="rel_txt" wx:if="{{prom_integral && prom_price}}">+</text>
261 <text class="rel_txt" wx:if="{{prom_price}}">{{filters.toFix(prom_price,2)}}元</text> 261 <text class="rel_txt" wx:if="{{prom_price}}">{{filters.toFix(prom_price,2)}}元</text>
262 <text class="rel_txt" wx:if="{{!prom_integral && !prom_price}}">0积分</text> 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 &nbsp;&nbsp;&nbsp;¥{{filters.toFix(data.shop_price,2)}} 269 &nbsp;&nbsp;&nbsp;¥{{filters.toFix(data.shop_price,2)}}
265 </text> 270 </text>
  271 +
266 </view> 272 </view>
267 <!-- 这个是分享按钮 --> 273 <!-- 这个是分享按钮 -->
268 <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> --> 274 <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> -->
@@ -302,18 +308,29 @@ @@ -302,18 +308,29 @@
302 </view> 308 </view>
303 <text class="rel yuan">¥</text> 309 <text class="rel yuan">¥</text>
304 {{filters.toFix(data[card_field],2)}} 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 </block> 320 </block>
309 <block wx:elif="{{prom_type!=2}}"> 321 <block wx:elif="{{prom_type!=2}}">
310 322
311 323
312 <text class="yuan">¥</text> 324 <text class="yuan">¥</text>
313 {{filters.toFix(data.shop_price,2)}} 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 </block> 334 </block>
318 </view> 335 </view>
319 </view> 336 </view>
@@ -410,7 +427,8 @@ @@ -410,7 +427,8 @@
410 <text class="fs30">¥</text> 427 <text class="fs30">¥</text>
411 {{prom_price}} 428 {{prom_price}}
412 </view> 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 </view> 432 </view>
415 <!-- 这个是分享按钮 --> 433 <!-- 这个是分享按钮 -->
416 <view class="xc-share-frame t-c shrink0" bindtap="clickShare"> 434 <view class="xc-share-frame t-c shrink0" bindtap="clickShare">
@@ -1504,6 +1522,7 @@ @@ -1504,6 +1522,7 @@
1504 </view> 1522 </view>
1505 </view> 1523 </view>
1506 <view class="mask" catchtouchmove="true" wx:if="{{showRules}}"></view> 1524 <view class="mask" catchtouchmove="true" wx:if="{{showRules}}"></view>
  1525 +
1507 <!-- 选择门店的弹框,1.1版最新的 --> 1526 <!-- 选择门店的弹框,1.1版最新的 -->
1508 <block wx:if="{{store==1}}"> 1527 <block wx:if="{{store==1}}">
1509 <view class="mongolia-layer" bindtap="close_popup"></view> 1528 <view class="mongolia-layer" bindtap="close_popup"></view>
pages/goods/goodsList/goodsList.js
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 }; 4 };
5 }(require("../../../utils/LoadMore.js")), e = getApp(), a = new t.default(), oo = e.globalData.setting, ut = require("../../../utils/util.js"); 5 }(require("../../../utils/LoadMore.js")), e = getApp(), a = new t.default(), oo = e.globalData.setting, ut = require("../../../utils/util.js");
6 var regeneratorRuntime = require('../../../utils/runtime.js'); 6 var regeneratorRuntime = require('../../../utils/runtime.js');
  7 +var com_fil= require('../com_screen.js');
7 8
8 Page({ 9 Page({
9 data: { 10 data: {
@@ -16,6 +17,8 @@ Page({ @@ -16,6 +17,8 @@ Page({
16 openFilterModal: !1, 17 openFilterModal: !1,
17 baseUrl: "/api/weshop/goods/page?1=1", 18 baseUrl: "/api/weshop/goods/page?1=1",
18 requestUrl: "", 19 requestUrl: "",
  20 + old_req_url:'',
  21 +
19 tabname:"sort", //排序的字段 22 tabname:"sort", //排序的字段
20 adname:"asc", //升降的字段 23 adname:"asc", //升降的字段
21 is_new:0, 24 is_new:0,
@@ -25,6 +28,19 @@ Page({ @@ -25,6 +28,19 @@ Page({
25 rq_data:null, 28 rq_data:null,
26 isToggle: false, //切换商品视图控制符 29 isToggle: false, //切换商品视图控制符
27 show_all:1, //判断显示 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 onLoad: function(t) { 46 onLoad: function(t) {
@@ -59,6 +75,7 @@ Page({ @@ -59,6 +75,7 @@ Page({
59 url += "&parent_id="+t.pid; 75 url += "&parent_id="+t.pid;
60 } 76 }
61 } 77 }
  78 + this.data.cat_id=t.cat_id;
62 } 79 }
63 80
64 if (0 != t.brand_id && t.brand_id != undefined) { url += "&brand_id=" + t.brand_id; } 81 if (0 != t.brand_id && t.brand_id != undefined) { url += "&brand_id=" + t.brand_id; }
@@ -153,7 +170,14 @@ Page({ @@ -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 this.requestGoodsList(url); 179 this.requestGoodsList(url);
  180 +
157 getApp().getConfig2(function(rs){ 181 getApp().getConfig2(function(rs){
158 //计算等级价相关 182 //计算等级价相关
159 var swithc_list=rs.switch_list; 183 var swithc_list=rs.switch_list;
@@ -184,6 +208,11 @@ Page({ @@ -184,6 +208,11 @@ Page({
184 }) 208 })
185 },500) 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 //调用接口判断商家plus有没有过期 218 //调用接口判断商家plus有没有过期
@@ -250,6 +279,7 @@ Page({ @@ -250,6 +279,7 @@ Page({
250 } 279 }
251 this.resetData(), this.requestGoodsList(url); 280 this.resetData(), this.requestGoodsList(url);
252 }, 281 },
  282 +
253 requestGoodsList:function(t) { 283 requestGoodsList:function(t) {
254 if(this.data.loading) return false; 284 if(this.data.loading) return false;
255 this.data.loading=1; 285 this.data.loading=1;
@@ -259,6 +289,7 @@ Page({ @@ -259,6 +289,7 @@ Page({
259 289
260 var user_id=getApp().globalData.user_id; 290 var user_id=getApp().globalData.user_id;
261 if(!user_id) user_id=0; 291 if(!user_id) user_id=0;
  292 +
262 //不是商品分组的,不是默认排序的 293 //不是商品分组的,不是默认排序的
263 if(t.indexOf("group_id")==-1 || e.data.tabname!="sort" ){ 294 if(t.indexOf("group_id")==-1 || e.data.tabname!="sort" ){
264 t += "&orderField=" + e.data.tabname; 295 t += "&orderField=" + e.data.tabname;
@@ -266,8 +297,13 @@ Page({ @@ -266,8 +297,13 @@ Page({
266 } 297 }
267 298
268 t +="&page=" + e.data.currentPage; 299 t +="&page=" + e.data.currentPage;
  300 +
  301 + wx.showLoading({});
  302 +
269 getApp().request.promiseGet(t, {data:{is_mainshow: 1, isonsale: 1, store_id: oo.stoid}}).then(async res=>{ 303 getApp().request.promiseGet(t, {data:{is_mainshow: 1, isonsale: 1, store_id: oo.stoid}}).then(async res=>{
270 th.data.loading=0; 304 th.data.loading=0;
  305 + wx.hideLoading();
  306 +
271 e.setData({is_go:1}); 307 e.setData({is_go:1});
272 if(ut.ajax_ok(res)){ 308 if(ut.ajax_ok(res)){
273 e.data.currentPage++; 309 e.data.currentPage++;
@@ -322,7 +358,7 @@ Page({ @@ -322,7 +358,7 @@ Page({
322 if (res.data.code == 0 && res.data.data && res.data.data.length > 0) { 358 if (res.data.code == 0 && res.data.data && res.data.data.length > 0) {
323 var arr = res.data.data[0]; 359 var arr = res.data.data[0];
324 item.prom_price = arr.luck_goods_price; 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 break; 364 break;
@@ -336,10 +372,10 @@ Page({ @@ -336,10 +372,10 @@ Page({
336 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)) ) { 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 item.prom_price = res.data.data.price; 373 item.prom_price = res.data.data.price;
338 if(res.data.data.user_price) item.prom_price=res.data.data.user_price; 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 }else{ 379 }else{
344 item.prom_type=0; 380 item.prom_type=0;
345 item.prom_id=0; 381 item.prom_id=0;
@@ -450,8 +486,7 @@ Page({ @@ -450,8 +486,7 @@ Page({
450 }) 486 })
451 }, 487 },
452 488
453 -  
454 - 489 +
455 // 切换显示 490 // 切换显示
456 bindToggleDisplay() { 491 bindToggleDisplay() {
457 this.setData({ 492 this.setData({
@@ -459,14 +494,20 @@ Page({ @@ -459,14 +494,20 @@ Page({
459 }); 494 });
460 }, 495 },
461 496
462 -  
463 go_url:function (e) { 497 go_url:function (e) {
464 var url = e.currentTarget.dataset.url; 498 var url = e.currentTarget.dataset.url;
465 //var rq_data = JSON.stringify(this.data.rq_data); 499 //var rq_data = JSON.stringify(this.data.rq_data);
466 //url += `&o=${rq_data}`; 500 //url += `&o=${rq_data}`;
467 // console.log('url!!!=======<<<<', url); 501 // console.log('url!!!=======<<<<', url);
468 getApp().goto(url); 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 \ No newline at end of file 514 \ No newline at end of file
pages/goods/goodsList/goodsList.wxml
@@ -27,30 +27,46 @@ @@ -27,30 +27,46 @@
27 27
28 <view class="nav-box"> 28 <view class="nav-box">
29 <view class="nav"> 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 </navigator> 40 </navigator>
  41 +
  42 +
36 <navigator bindtap="changeTab" class="nav-item" data-href="sales_sum" data-ad="{{adname}}">销量 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 </view> 51 </view>
41 52
42 </navigator> 53 </navigator>
43 <navigator bindtap="changeTab" class="nav-item" data-href="final_price" data-ad="{{adname}}"> 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 </view> 63 </view>
49 </navigator> 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 <!-- <navigator class="nav-item search" url="/pages/goods/search/search"> 71 <!-- <navigator class="nav-item search" url="/pages/goods/search/search">
56 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image> 72 <image class="wh100 search-img" src="{{iurl}}/miniapp/images/search.png"></image>
@@ -74,7 +90,7 @@ @@ -74,7 +90,7 @@
74 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> 90 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
75 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text> 91 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
76 </view> 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 </view> 94 </view>
79 95
80 96
@@ -101,7 +117,7 @@ @@ -101,7 +117,7 @@
101 </view> 117 </view>
102 </view> 118 </view>
103 <view class="comment"> 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 <view class="fs24 t-r"> 121 <view class="fs24 t-r">
106 <span>评论{{item.comment_count}}</span> 122 <span>评论{{item.comment_count}}</span>
107 <span class="pdl30">已售{{item.sales_sum}}</span> 123 <span class="pdl30">已售{{item.sales_sum}}</span>
@@ -123,7 +139,7 @@ @@ -123,7 +139,7 @@
123 <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}"> 139 <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
124 <view class="flex ai-center"> 140 <view class="flex ai-center">
125 <view class="price rmb">{{item.shop_price}}</view> 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 </view> 143 </view>
128 <view class="comment"> 144 <view class="comment">
129 <view class="flex ai-center"> 145 <view class="flex ai-center">
@@ -142,7 +158,7 @@ @@ -142,7 +158,7 @@
142 <block wx:else> 158 <block wx:else>
143 <view> 159 <view>
144 <view class="price rmb">{{item.shop_price}}</view> 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 </view> 162 </view>
147 <!-- <view class="price">¥{{item.shop_price}}</view> --> 163 <!-- <view class="price">¥{{item.shop_price}}</view> -->
148 <view class="comment pdt10"> 164 <view class="comment pdt10">
@@ -157,7 +173,7 @@ @@ -157,7 +173,7 @@
157 <view wx:else> 173 <view wx:else>
158 <view class="flex ai-center"> 174 <view class="flex ai-center">
159 <view class="price rmb">{{item.shop_price}}</view> 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 </view> 177 </view>
162 178
163 <view class="comment pdt10"> 179 <view class="comment pdt10">
@@ -189,12 +205,12 @@ @@ -189,12 +205,12 @@
189 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text> 205 <text wx:if="{{item.prom_integral && item.prom_price}}">+</text>
190 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text> 206 <text wx:if="{{item.prom_price}}" class="rmb">{{item.prom_price}}</text>
191 </view> 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 </view> 209 </view>
194 210
195 211
196 <view class="comment pdt10"> 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 <view class="fs24 t-r"> 214 <view class="fs24 t-r">
199 <span>评论{{item.comment_count}}</span> 215 <span>评论{{item.comment_count}}</span>
200 <span class="pdl30">已售{{item.sales_sum}}</span> 216 <span class="pdl30">已售{{item.sales_sum}}</span>
@@ -216,7 +232,7 @@ @@ -216,7 +232,7 @@
216 </view> 232 </view>
217 </view> 233 </view>
218 <view class="comment"> 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 <view class="fs24 t-r"> 236 <view class="fs24 t-r">
221 <span>评论{{item.comment_count}}</span> 237 <span>评论{{item.comment_count}}</span>
222 <span class="pdl30">已售{{item.sales_sum}}</span> 238 <span class="pdl30">已售{{item.sales_sum}}</span>
@@ -226,7 +242,7 @@ @@ -226,7 +242,7 @@
226 <block wx:else> 242 <block wx:else>
227 <view class="price rmb">{{item.shop_price}}</view> 243 <view class="price rmb">{{item.shop_price}}</view>
228 <view class="comment"> 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 <view class="fs24 t-r"> 246 <view class="fs24 t-r">
231 <span>评论{{item.comment_count}}</span> 247 <span>评论{{item.comment_count}}</span>
232 <span class="pdl30">已售{{item.sales_sum}}</span> 248 <span class="pdl30">已售{{item.sales_sum}}</span>
@@ -238,7 +254,7 @@ @@ -238,7 +254,7 @@
238 <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}"> 254 <view wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
239 <view class="flex ai-center"> 255 <view class="flex ai-center">
240 <view class="price rmb">{{item.shop_price}}</view> 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 </view> 258 </view>
243 <view class="comment"> 259 <view class="comment">
244 <view class="flex ai-center"> 260 <view class="flex ai-center">
@@ -257,7 +273,7 @@ @@ -257,7 +273,7 @@
257 <block wx:else> 273 <block wx:else>
258 <view> 274 <view>
259 <view class="price rmb">{{item.shop_price}}</view> 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 </view> 277 </view>
262 <!-- <view class="price">¥{{item.shop_price}}</view> --> 278 <!-- <view class="price">¥{{item.shop_price}}</view> -->
263 <view class="comment pdt10"> 279 <view class="comment pdt10">
@@ -272,7 +288,7 @@ @@ -272,7 +288,7 @@
272 <view wx:else> 288 <view wx:else>
273 <view class=""> 289 <view class="">
274 <view class="price rmb">{{item.shop_price}}</view> 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 </view> 292 </view>
277 293
278 <view class="comment pdt10"> 294 <view class="comment pdt10">
@@ -297,42 +313,8 @@ @@ -297,42 +313,8 @@
297 <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator> 313 <navigator bindtap="go_url" class="lookat" data-url="/pages/index/index/index">回到首页</navigator>
298 </view> 314 </view>
299 </view> 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 <share_box id="share"></share_box> 319 <share_box id="share"></share_box>
338 <view class="t-c fs32" wx:if="{{err_txt}}"> 320 <view class="t-c fs32" wx:if="{{err_txt}}">
pages/goods/goodsList/goodsList.wxss
@@ -165,54 +165,6 @@ page { @@ -165,54 +165,6 @@ page {
165 /* padding-right: 30rpx; */ 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 .viewall-btn { 169 .viewall-btn {
218 margin-top: 20rpx; 170 margin-top: 20rpx;
@@ -342,3 +294,5 @@ page { @@ -342,3 +294,5 @@ page {
342 color: white; 294 color: white;
343 padding: 20rpx 50rpx; 295 padding: 20rpx 50rpx;
344 } 296 }
  297 +
  298 +@import '../com_screen.wxss';
345 \ No newline at end of file 299 \ No newline at end of file
pages/goods/search/search.js
@@ -4,6 +4,7 @@ var t = function (t) { @@ -4,6 +4,7 @@ var t = function (t) {
4 }; 4 };
5 }(require("../../../utils/LoadMore.js")), ut = require("../../../utils/util.js"), 5 }(require("../../../utils/LoadMore.js")), ut = require("../../../utils/util.js"),
6 a = getApp(), e = new t.default(), rq = a.request, oo = a.globalData.setting; 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 Page({ 9 Page({
9 data: { 10 data: {
@@ -16,6 +17,7 @@ Page({ @@ -16,6 +17,7 @@ Page({
16 openSearchModal: !1, 17 openSearchModal: !1,
17 baseUrl: "/api/weshop/goods/page?1=1", 18 baseUrl: "/api/weshop/goods/page?1=1",
18 requestUrl: "", 19 requestUrl: "",
  20 + old_req_url:'',
19 //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ] 21 //hotWords: [ [ "手机", "小米", "iphone" ], [ "三星", "华为", "冰箱" ] ]
20 hotWords: null, 22 hotWords: null,
21 is_no_plus: 1, 23 is_no_plus: 1,
@@ -27,6 +29,17 @@ Page({ @@ -27,6 +29,17 @@ Page({
27 is_his: 0, 29 is_his: 0,
28 hiddenClear: true, 30 hiddenClear: true,
29 fliter_flag: false, 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 onLoad: function (t) { 45 onLoad: function (t) {
@@ -112,6 +125,10 @@ Page({ @@ -112,6 +125,10 @@ Page({
112 }, 500) 125 }, 500)
113 } 126 }
114 127
  128 + if(sw_arr.is_retail_price){
  129 + th.setData({is_retail_price:1});
  130 + }
  131 +
115 132
116 133
117 }) 134 })
@@ -387,6 +404,10 @@ Page({ @@ -387,6 +404,10 @@ Page({
387 if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词"); 404 if ("string" != typeof t || "" == t) return a.showWarning("请输入关键词");
388 this.data.key_str = t; 405 this.data.key_str = t;
389 this.resetData(); 406 this.resetData();
  407 +
  408 + this.data.old_req_url=this.data.baseUrl + "&key_str=" + encodeURIComponent(t);
  409 +
  410 + this.set_screen(this.data.baseUrl + "&key_str=" + encodeURIComponent(t))
390 this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t)); 411 this.requestSearch(this.data.baseUrl + "&key_str=" + encodeURIComponent(t));
391 this.historyRecord(); 412 this.historyRecord();
392 }, 413 },
@@ -571,4 +592,13 @@ Page({ @@ -571,4 +592,13 @@ Page({
571 openSearchModal: true, 592 openSearchModal: true,
572 }); 593 });
573 }, 594 },
  595 +
  596 + /*-- 和筛选相关的 --*/
  597 + bind_pk_sort(e){ com_fil.bind_pk_sort(e,this); },
  598 + set_screen(url){ com_fil.set_screen(url,this); },
  599 + filterGoods(e){ com_fil.filterGoods(e,this); },
  600 + open_more(e){ com_fil.open_more(e,this); },
  601 + clear_fil(){ com_fil.clear_fil(this); }
  602 +
  603 +
574 }); 604 });
575 \ No newline at end of file 605 \ No newline at end of file
pages/goods/search/search.wxml
@@ -46,28 +46,32 @@ @@ -46,28 +46,32 @@
46 <block wx:if="{{!openSearchModal}}"> 46 <block wx:if="{{!openSearchModal}}">
47 47
48 <view class="nav flex"> 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 </navigator> 56 </navigator>
  57 +
  58 +
55 <navigator bindtap="changeTab" class="nav-item f1" data-href="sales_sum" data-ad="{{adname}}">销量 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 </navigator> 64 </navigator>
61 <navigator bindtap="changeTab" class="nav-item f1" data-href="final_price" data-ad="{{adname}}">价格 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 </navigator> 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 <image class="wh100" src="{{url}}/miniapp/images/xx.png"></image> 72 <image class="wh100" src="{{url}}/miniapp/images/xx.png"></image>
69 </view> 73 </view>
70 - </navigator> --> 74 + </navigator>
71 <!-- <navigator bindtap="openSearchModal" class="nav-item nav-search"> 75 <!-- <navigator bindtap="openSearchModal" class="nav-item nav-search">
72 <image class="wh100 search-img" src="{{url}}/miniapp/images/search.png"></image> 76 <image class="wh100 search-img" src="{{url}}/miniapp/images/search.png"></image>
73 </navigator> --> 77 </navigator> -->
@@ -111,14 +115,14 @@ @@ -111,14 +115,14 @@
111 </view> 115 </view>
112 </view> 116 </view>
113 <view class="comment flex jc_sb"> 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 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> 119 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
116 </view> 120 </view>
117 </block> 121 </block>
118 <block wx:else> 122 <block wx:else>
119 <view class="price">¥{{item.shop_price}}</view> 123 <view class="price">¥{{item.shop_price}}</view>
120 <view class="comment flex jc_sb"> 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 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> 126 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
123 </view> 127 </view>
124 </block> 128 </block>
@@ -127,7 +131,7 @@ @@ -127,7 +131,7 @@
127 <block wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}"> 131 <block wx:if="{{g_filter.get_card_price(item,card_list,0) && is_no_plus}}">
128 <view class="flex ai-center"> 132 <view class="flex ai-center">
129 <view class="price">¥{{item.shop_price}}</view> 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 </view> 135 </view>
132 <view class="comment flex jc_sb"> 136 <view class="comment flex jc_sb">
133 <view class="flex ai_center"> 137 <view class="flex ai_center">
@@ -145,7 +149,7 @@ @@ -145,7 +149,7 @@
145 <block wx:else> 149 <block wx:else>
146 <view class="price">¥{{item.shop_price}}</view> 150 <view class="price">¥{{item.shop_price}}</view>
147 <view class="comment flex jc_sb"> 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 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> 153 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
150 </view> 154 </view>
151 </block> 155 </block>
@@ -154,7 +158,7 @@ @@ -154,7 +158,7 @@
154 <block wx:else> 158 <block wx:else>
155 <view class="price">¥{{item.shop_price}}</view> 159 <view class="price">¥{{item.shop_price}}</view>
156 <view class="comment flex jc_sb"> 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 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view> 162 <view>评论{{item.comment_count}} 已售{{item.sales_sum}}</view>
159 </view> 163 </view>
160 </block> 164 </block>
@@ -173,38 +177,5 @@ @@ -173,38 +177,5 @@
173 177
174 </block> 178 </block>
175 </view> 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 \ No newline at end of file 180 \ No newline at end of file
  181 +
  182 +<include src="../com_screen.wxml" />
212 \ No newline at end of file 183 \ No newline at end of file
pages/goods/search/search.wxss
@@ -114,54 +114,6 @@ @@ -114,54 +114,6 @@
114 margin-top: 4rpx; 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 .viewall-btn { 118 .viewall-btn {
167 margin-top: 20rpx; 119 margin-top: 20rpx;
@@ -439,4 +391,7 @@ @@ -439,4 +391,7 @@
439 width: 80%; 391 width: 80%;
440 z-index: 1000; 392 z-index: 1000;
441 transition: all .5s; 393 transition: all .5s;
442 -}  
443 \ No newline at end of file 394 \ No newline at end of file
  395 +}
  396 +
  397 +
  398 +@import '../com_screen.wxss';
444 \ No newline at end of file 399 \ No newline at end of file
pages/index/index/index.js
@@ -86,6 +86,7 @@ Page({ @@ -86,6 +86,7 @@ Page({
86 is_ok_h5: 0, //判断要不要显示关注二维码 86 is_ok_h5: 0, //判断要不要显示关注二维码
87 87
88 container: null, 88 container: null,
  89 + is_retail_price:0,
89 }, 90 },
90 91
91 92
@@ -125,6 +126,12 @@ Page({ @@ -125,6 +126,12 @@ Page({
125 126
126 var th = this; 127 var th = this;
127 getApp().getConfig2(function (config2) { 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 if (config2 && config2.is_overdue == 1) { 135 if (config2 && config2.is_overdue == 1) {
129 getApp().promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=5", {}).then(res => { 136 getApp().promiseGet("/store/storemoduleendtime/page?store_id=" + os.stoid + "&type=5", {}).then(res => {
130 var o = res; 137 var o = res;
@@ -789,7 +796,7 @@ Page({ @@ -789,7 +796,7 @@ Page({
789 let goodsGroupArr = this.data.goodsGroupArr 796 let goodsGroupArr = this.data.goodsGroupArr
790 if (this.data.isTemplate && goodsGroupArr.length >0) { 797 if (this.data.isTemplate && goodsGroupArr.length >0) {
791 goodsGroupArr.map(item=>{ 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,6 +158,7 @@
158 <!-- <view class="red-co mar-top10 is_seckill_height"> --> 158 <!-- <view class="red-co mar-top10 is_seckill_height"> -->
159 <view class="co-red mar-top10"> 159 <view class="co-red mar-top10">
160 <text class="fs20">¥</text>{{aitem.price}} 160 <text class="fs20">¥</text>{{aitem.price}}
  161 + <text wx:if="{{is_retail_price}}" class="un_line">¥{{aitem.market_price}}</text>
161 </view> 162 </view>
162 </navigator> 163 </navigator>
163 164
@@ -201,7 +202,7 @@ @@ -201,7 +202,7 @@
201 <view class="co-red mar-top10 flex jc_sb ali-c"> 202 <view class="co-red mar-top10 flex jc_sb ali-c">
202 <view> 203 <view>
203 <text><text class="fs20">¥</text>{{aitem.presell_price}}</text> 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 </view> 206 </view>
206 <view class="btn-buy">去抢购</view> 207 <view class="btn-buy">去抢购</view>
207 </view> 208 </view>
@@ -238,7 +239,7 @@ @@ -238,7 +239,7 @@
238 <view> 239 <view>
239 <view class="flex ai-center"> 240 <view class="flex ai-center">
240 <text class="rmb c-red">{{filter.price(item.group_price)}}</text> 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 </view> 243 </view>
243 <view class="flex jc_sb"> 244 <view class="flex jc_sb">
244 <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> 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,7 +325,7 @@
324 <view class="fs40 flex xc-top15 {{aitem.is_team_tepy==0?'blue_c ai-bas':' red-co ai-bas'}}"> 325 <view class="fs40 flex xc-top15 {{aitem.is_team_tepy==0?'blue_c ai-bas':' red-co ai-bas'}}">
325 <text class="fs28 {{aitem.is_team_tepy==0?'martop4':''}}">¥</text> 326 <text class="fs28 {{aitem.is_team_tepy==0?'martop4':''}}">¥</text>
326 <text style="margin-left:-5rpx">{{aitem.price}}</text> 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 </view> 329 </view>
329 330
330 </view> 331 </view>
@@ -400,7 +401,7 @@ @@ -400,7 +401,7 @@
400 <view> 401 <view>
401 <block wx:for="{{template_arr}}" > 402 <block wx:for="{{template_arr}}" >
402 <block wx:if="{{item.content.is_top==1}}"> 403 <block wx:if="{{item.content.is_top==1}}">
403 - <view style="height:100rpx"></view> 404 + <view style="height:91rpx"></view>
404 </block> 405 </block>
405 </block> 406 </block>
406 407
pages/user/plus/plus.js
@@ -64,10 +64,27 @@ Page({ @@ -64,10 +64,27 @@ Page({
64 }) 64 })
65 } 65 }
66 }) 66 })
  67 +
  68 +
  69 + //二维码的带入
67 var fir_leader = options.scene; 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 var user_info = getApp().globalData.userInfo; 89 var user_info = getApp().globalData.userInfo;
73 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { 90 if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {