diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js index bb1c73e..77d1772 100644 --- a/pages/cart/cart2/cart2.js +++ b/pages/cart/cart2/cart2.js @@ -222,6 +222,7 @@ Page({ //先获取是否有关闭使用优惠券 getApp().getConfig2(function (ee) { var json_d = JSON.parse(ee.switch_list); + th.data.json_d=json_d; th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch}); @@ -266,7 +267,7 @@ Page({ th.get_wuliu(th.get_info(th.show_page)); } - }) + },1); //值在这里换 getApp().globalData.plus_buy_back=0; @@ -472,7 +473,11 @@ Page({ dis_t = item.distr_type ; } switch (dis_t) { - case 0: e_t = 1; break; + case 0: + e_t = 1; + //-- 系统后台有设置要默认的 -- + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) e_t=0; + break; case 1: e_t = 1; break; case 2: e_t = 0; break; } @@ -571,8 +576,13 @@ Page({ }else{ distr_t = t.data.data.distr_type; } + switch (distr_t){ - case 0: et=1; break; + case 0: + et=1; + //-- 系统后台有设置要默认的 -- + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) et=0; + break; case 1: et = 1; break; case 2: et = 0; break; } diff --git a/pages/cart/cart2_inte/cart2_inte.js b/pages/cart/cart2_inte/cart2_inte.js index a84df74..50de9a3 100644 --- a/pages/cart/cart2_inte/cart2_inte.js +++ b/pages/cart/cart2_inte/cart2_inte.js @@ -92,6 +92,7 @@ Page({ //先获取是否有关闭使用优惠券 getApp().getConfig2(function (ee) { var json_d = JSON.parse(ee.switch_list); + th.data.json_d=json_d; th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch}); @@ -135,7 +136,7 @@ Page({ //-----先获取物流,再获取用户信息,再展示页面----- th.get_wuliu(th.get_info(th.show_page)); } - }) + },1); }, @@ -302,7 +303,11 @@ Page({ distr_t = t.data.data.distr_type; } switch (distr_t){ - case 0: et=1; break; + case 0: + et=1; + //-- 系统后台有设置要默认的 -- + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) et=0; + break; case 1: et = 1; break; case 2: et = 0; break; } diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js index 533dac2..78d189b 100644 --- a/pages/cart/cart2_pt/cart2_pt.js +++ b/pages/cart/cart2_pt/cart2_pt.js @@ -177,6 +177,8 @@ Page({ switch (distr_t) { case 0: et = 1; + //-- 系统后台有设置要默认的 -- + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) et=0; break; case 1: et = 1; @@ -302,6 +304,7 @@ Page({ //先获取是否有关闭使用优惠券 getApp().getConfig2(function (ee) { var json_d = JSON.parse(ee.switch_list); + th.data.json_d=json_d; th.data.ispt_goods=json_d.ispt_goods; //是不是平摊到单品的控制参数赋值 th.setData({ is_close_quan: json_d.is_close_quan,sales_rules:ee.sales_rules,rank_switch:json_d.rank_switch}); @@ -345,7 +348,7 @@ Page({ //-----先获取物流,再获取用户信息,再展示页面----- th.get_wuliu(th.get_info(th.show_page)); } - }) + },1) }, diff --git a/pages/cart/cart_wk/cart_wk.js b/pages/cart/cart_wk/cart_wk.js index 2924b15..8487f2e 100644 --- a/pages/cart/cart_wk/cart_wk.js +++ b/pages/cart/cart_wk/cart_wk.js @@ -54,7 +54,12 @@ Page({ var th = this; this.data.order_id = options.order_id; //--初始化-- - this.get_wuliu(th.get_info(th.show_page)); + getApp().getConfig2(function (e){ + var json_d = JSON.parse(e.switch_list); + th.data.json_d=json_d; + th.get_wuliu(th.get_info(th.show_page)); + },1) + }, /** * 生命周期函数--监听页面显示 @@ -240,9 +245,12 @@ Page({ switch (distr_type) { case 0: exp_type = 1; + //-- 系统后台有设置要默认的 -- + if(th.data.json_d.pickupway && th.data.json_d.pickupway==1) exp_type=0; break; //自选 case 1: exp_type = 1; + break //自提 case 2: exp_type = 0;