Commit fd6901dc50dfdbb1cd479e8c2f54c02e15f7e503

Authored by yvan.ni
1 parent 18b982a8

物流默认的时候,

pages/cart/cart2/cart2.js
@@ -222,6 +222,7 @@ Page({ @@ -222,6 +222,7 @@ Page({
222 //先获取是否有关闭使用优惠券 222 //先获取是否有关闭使用优惠券
223 getApp().getConfig2(function (ee) { 223 getApp().getConfig2(function (ee) {
224 var json_d = JSON.parse(ee.switch_list); 224 var json_d = JSON.parse(ee.switch_list);
  225 + th.data.json_d=json_d;
225 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 226 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
226 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch}); 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,7 +267,7 @@ Page({
266 th.get_wuliu(th.get_info(th.show_page)); 267 th.get_wuliu(th.get_info(th.show_page));
267 } 268 }
268 269
269 - }) 270 + },1);
270 271
271 //值在这里换 272 //值在这里换
272 getApp().globalData.plus_buy_back=0; 273 getApp().globalData.plus_buy_back=0;
@@ -472,7 +473,11 @@ Page({ @@ -472,7 +473,11 @@ Page({
472 dis_t = item.distr_type ; 473 dis_t = item.distr_type ;
473 } 474 }
474 switch (dis_t) { 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 case 1: e_t = 1; break; 481 case 1: e_t = 1; break;
477 case 2: e_t = 0; break; 482 case 2: e_t = 0; break;
478 } 483 }
@@ -571,8 +576,13 @@ Page({ @@ -571,8 +576,13 @@ Page({
571 }else{ 576 }else{
572 distr_t = t.data.data.distr_type; 577 distr_t = t.data.data.distr_type;
573 } 578 }
  579 +
574 switch (distr_t){ 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 case 1: et = 1; break; 586 case 1: et = 1; break;
577 case 2: et = 0; break; 587 case 2: et = 0; break;
578 } 588 }
pages/cart/cart2_inte/cart2_inte.js
@@ -92,6 +92,7 @@ Page({ @@ -92,6 +92,7 @@ Page({
92 //先获取是否有关闭使用优惠券 92 //先获取是否有关闭使用优惠券
93 getApp().getConfig2(function (ee) { 93 getApp().getConfig2(function (ee) {
94 var json_d = JSON.parse(ee.switch_list); 94 var json_d = JSON.parse(ee.switch_list);
  95 + th.data.json_d=json_d;
95 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 96 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
96 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch}); 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,7 +136,7 @@ Page({
135 //-----先获取物流,再获取用户信息,再展示页面----- 136 //-----先获取物流,再获取用户信息,再展示页面-----
136 th.get_wuliu(th.get_info(th.show_page)); 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,7 +303,11 @@ Page({
302 distr_t = t.data.data.distr_type; 303 distr_t = t.data.data.distr_type;
303 } 304 }
304 switch (distr_t){ 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 case 1: et = 1; break; 311 case 1: et = 1; break;
307 case 2: et = 0; break; 312 case 2: et = 0; break;
308 } 313 }
pages/cart/cart2_pt/cart2_pt.js
@@ -177,6 +177,8 @@ Page({ @@ -177,6 +177,8 @@ Page({
177 switch (distr_t) { 177 switch (distr_t) {
178 case 0: 178 case 0:
179 et = 1; 179 et = 1;
  180 + //-- 系统后台有设置要默认的 --
  181 + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) et=0;
180 break; 182 break;
181 case 1: 183 case 1:
182 et = 1; 184 et = 1;
@@ -302,6 +304,7 @@ Page({ @@ -302,6 +304,7 @@ Page({
302 //先获取是否有关闭使用优惠券 304 //先获取是否有关闭使用优惠券
303 getApp().getConfig2(function (ee) { 305 getApp().getConfig2(function (ee) {
304 var json_d = JSON.parse(ee.switch_list); 306 var json_d = JSON.parse(ee.switch_list);
  307 + th.data.json_d=json_d;
305 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 308 th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值
306 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch}); 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,7 +348,7 @@ Page({
345 //-----先获取物流,再获取用户信息,再展示页面----- 348 //-----先获取物流,再获取用户信息,再展示页面-----
346 th.get_wuliu(th.get_info(th.show_page)); 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,7 +54,12 @@ Page({
54 var th = this; 54 var th = this;
55 this.data.order_id = options.order_id; 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,9 +245,12 @@ Page({
240 switch (distr_type) { 245 switch (distr_type) {
241 case 0: 246 case 0:
242 exp_type = 1; 247 exp_type = 1;
  248 + //-- 系统后台有设置要默认的 --
  249 + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) exp_type=0;
243 break; //自选 250 break; //自选
244 case 1: 251 case 1:
245 exp_type = 1; 252 exp_type = 1;
  253 +
246 break //自提 254 break //自提
247 case 2: 255 case 2:
248 exp_type = 0; 256 exp_type = 0;