Commit fd6901dc50dfdbb1cd479e8c2f54c02e15f7e503

Authored by yvan.ni
1 parent 18b982a8

物流默认的时候,

pages/cart/cart2/cart2.js
... ... @@ -222,6 +222,7 @@ Page({
222 222 //先获取是否有关闭使用优惠券
223 223 getApp().getConfig2(function (ee) {
224 224 var json_d = JSON.parse(ee.switch_list);
  225 + th.data.json_d=json_d;
225 226 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
226 227 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
227 228  
... ... @@ -266,7 +267,7 @@ Page({
266 267 th.get_wuliu(th.get_info(th.show_page));
267 268 }
268 269  
269   - })
  270 + },1);
270 271  
271 272 //值在这里换
272 273 getApp().globalData.plus_buy_back=0;
... ... @@ -472,7 +473,11 @@ Page({
472 473 dis_t = item.distr_type ;
473 474 }
474 475 switch (dis_t) {
475   - case 0: e_t = 1; break;
  476 + case 0:
  477 + e_t = 1;
  478 + //-- 系统后台有设置要默认的 --
  479 + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) e_t=0;
  480 + break;
476 481 case 1: e_t = 1; break;
477 482 case 2: e_t = 0; break;
478 483 }
... ... @@ -571,8 +576,13 @@ Page({
571 576 }else{
572 577 distr_t = t.data.data.distr_type;
573 578 }
  579 +
574 580 switch (distr_t){
575   - case 0: et=1; break;
  581 + case 0:
  582 + et=1;
  583 + //-- 系统后台有设置要默认的 --
  584 + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) et=0;
  585 + break;
576 586 case 1: et = 1; break;
577 587 case 2: et = 0; break;
578 588 }
... ...
pages/cart/cart2_inte/cart2_inte.js
... ... @@ -92,6 +92,7 @@ Page({
92 92 //先获取是否有关闭使用优惠券
93 93 getApp().getConfig2(function (ee) {
94 94 var json_d = JSON.parse(ee.switch_list);
  95 + th.data.json_d=json_d;
95 96 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
96 97 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
97 98  
... ... @@ -135,7 +136,7 @@ Page({
135 136 //-----先获取物流,再获取用户信息,再展示页面-----
136 137 th.get_wuliu(th.get_info(th.show_page));
137 138 }
138   - })
  139 + },1);
139 140  
140 141  
141 142 },
... ... @@ -302,7 +303,11 @@ Page({
302 303 distr_t = t.data.data.distr_type;
303 304 }
304 305 switch (distr_t){
305   - case 0: et=1; break;
  306 + case 0:
  307 + et=1;
  308 + //-- 系统后台有设置要默认的 --
  309 + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) et=0;
  310 + break;
306 311 case 1: et = 1; break;
307 312 case 2: et = 0; break;
308 313 }
... ...
pages/cart/cart2_pt/cart2_pt.js
... ... @@ -177,6 +177,8 @@ Page({
177 177 switch (distr_t) {
178 178 case 0:
179 179 et = 1;
  180 + //-- 系统后台有设置要默认的 --
  181 + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) et=0;
180 182 break;
181 183 case 1:
182 184 et = 1;
... ... @@ -302,6 +304,7 @@ Page({
302 304 //先获取是否有关闭使用优惠券
303 305 getApp().getConfig2(function (ee) {
304 306 var json_d = JSON.parse(ee.switch_list);
  307 + th.data.json_d=json_d;
305 308 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
306 309 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch});
307 310  
... ... @@ -345,7 +348,7 @@ Page({
345 348 //-----先获取物流,再获取用户信息,再展示页面-----
346 349 th.get_wuliu(th.get_info(th.show_page));
347 350 }
348   - })
  351 + },1)
349 352  
350 353  
351 354 },
... ...
pages/cart/cart_wk/cart_wk.js
... ... @@ -54,7 +54,12 @@ Page({
54 54 var th = this;
55 55 this.data.order_id = options.order_id;
56 56 //--初始化--
57   - this.get_wuliu(th.get_info(th.show_page));
  57 + getApp().getConfig2(function (e){
  58 + var json_d = JSON.parse(e.switch_list);
  59 + th.data.json_d=json_d;
  60 + th.get_wuliu(th.get_info(th.show_page));
  61 + },1)
  62 +
58 63 },
59 64 /**
60 65 * 生命周期函数--监听页面显示
... ... @@ -240,9 +245,12 @@ Page({
240 245 switch (distr_type) {
241 246 case 0:
242 247 exp_type = 1;
  248 + //-- 系统后台有设置要默认的 --
  249 + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) exp_type=0;
243 250 break; //自选
244 251 case 1:
245 252 exp_type = 1;
  253 +
246 254 break //自提
247 255 case 2:
248 256 exp_type = 0;
... ...