diff --git a/pages/cart/cart2/cart2.js b/pages/cart/cart2/cart2.js index a968569..16a5707 100644 --- a/pages/cart/cart2/cart2.js +++ b/pages/cart/cart2/cart2.js @@ -72,17 +72,17 @@ Page({ //选择的券列表 selected_quan_list:null, //选择的券的门店 - selected_quan_pick:null, + selected_quan_pick:null, is_close_quan:0, disabled:0, open_express:0,//控制选择物流名列表 的属性 - - is_express:0,//选中物流的属性 - expres_name:"",//点击选定 - isopen:0,//券的说明 - is_coupon:55555,//选择券的控制属性 + is_express:0, //选中物流的属性 + expres_name:"", //点击选定 + isopen:0, //券的说明 + is_coupon:null, //选择券的控制属性 is_shipping_code:"",//插入用户默认地址 + wu_arr_txt:"", //要更新的物流的字段 }, onLoad: function(t) { @@ -97,7 +97,6 @@ Page({ } }); - }, onUnload: function () { this.setData({ isclose: 1 })}, @@ -1400,26 +1399,32 @@ Page({ } return arr; }, - // // 开启物流的弹窗 - express_name:function(){ - this.setData({ open_express: 1}); + //// 开启物流的弹窗 + show_wu_arr:function(e){ + var wu_arr_txt=e.currentTarget.dataset.txt; + this.setData({ open_express: 1,wu_arr_txt:wu_arr_txt}); }, // 关闭物流的弹窗 close_express:function(){ this.setData({ open_express:0 }); }, - // 选择物流 + // 选择物流 click_express_name:function(e){ var express_name = e.currentTarget.dataset.name, shippingcode = e.currentTarget.dataset.shippingcode; - console.log("判断是不是11111111111111111111111111111", shippingcode); var index=e.currentTarget.dataset.idxe; - this.setData({ is_express: index, index: index, is_shipping_code: shippingcode}); + var ob={ is_express: index, is_shipping_code: shippingcode}; + ob[this.data.wu_arr_txt]=index; + this.setData(ob); }, + //点击确定物流 determine_expres:function(e){ this.setData({ open_express: 0}); - this.calculatePrice(); + if(this.data.is_b_now==1) + this.calculatePrice2(); + else + this.calculatePrice(); }, //点击打开优惠券使用说明 @@ -1452,7 +1457,8 @@ Page({ if (rse.data.code==0){ th.setData({ open_express: 0 }); //----计算此时购物车的价格---- - th.calculatePrice(); + if(th.data.is_b_now==1) th.calculatePrice2(); + else th.calculatePrice(); } } }) diff --git a/pages/cart/cart2/cart2.wxml b/pages/cart/cart2/cart2.wxml index 03015bb..5819a45 100644 --- a/pages/cart/cart2/cart2.wxml +++ b/pages/cart/cart2/cart2.wxml @@ -118,10 +118,10 @@ - - {{wu_arr[item.wind].name}} - - + + + {{wu_arr[item.wind].name}} + @@ -157,9 +157,7 @@ - - 门店:{{bn_pickname}} @@ -209,12 +207,9 @@ 物流 - - - {{wu_arr[index].name}} - - - + + {{wu_arr[index].name}} + @@ -419,9 +414,7 @@ - - @@ -439,7 +432,10 @@ - + + Γ @@ -465,5 +461,4 @@ - \ No newline at end of file