Commit 0525ae005cfb78f399defa483a1034577d543df8
1 parent
85faa8d6
价格的优化
Showing
3 changed files
with
25 additions
and
7 deletions
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -146,6 +146,8 @@ Page({ | @@ -146,6 +146,8 @@ Page({ | ||
146 | title: '填写订单', | 146 | title: '填写订单', |
147 | }); | 147 | }); |
148 | self = this; | 148 | self = this; |
149 | + | ||
150 | + t.goods_price_y=t.goods_price; | ||
149 | this.setData({ | 151 | this.setData({ |
150 | is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, | 152 | is_b_now: t.is_bnow == undefined ? 0 : t.is_bnow, |
151 | param: t, | 153 | param: t, |
@@ -578,7 +580,6 @@ Page({ | @@ -578,7 +580,6 @@ Page({ | ||
578 | 580 | ||
579 | } | 581 | } |
580 | 582 | ||
581 | - | ||
582 | t.data.data.goods_price=th.data.param.goods_price; | 583 | t.data.data.goods_price=th.data.param.goods_price; |
583 | 584 | ||
584 | //用深拷贝把商品缓存起来,方便后面使用 | 585 | //用深拷贝把商品缓存起来,方便后面使用 |
@@ -750,6 +751,13 @@ Page({ | @@ -750,6 +751,13 @@ Page({ | ||
750 | } | 751 | } |
751 | } | 752 | } |
752 | 753 | ||
754 | + //价格要返回,在重新进来的时候 | ||
755 | + let goods_price_y=this.data.param.goods_price_y; | ||
756 | + this.setData({ | ||
757 | + show_ord_prom:{}, | ||
758 | + can_use_ord_prom:{}, | ||
759 | + 'param.goods_price':goods_price_y | ||
760 | + }) | ||
753 | 761 | ||
754 | //先获取是否有关闭使用优惠券 | 762 | //先获取是否有关闭使用优惠券 |
755 | getApp().getConfig2(function (ee) { | 763 | getApp().getConfig2(function (ee) { |
packageC/pages/presell/cart/cart2.js
@@ -284,6 +284,11 @@ Page({ | @@ -284,6 +284,11 @@ Page({ | ||
284 | }); | 284 | }); |
285 | } | 285 | } |
286 | 286 | ||
287 | + this.setData({ | ||
288 | + show_ord_prom:{}, | ||
289 | + can_use_ord_prom:{} | ||
290 | + }) | ||
291 | + | ||
287 | 292 | ||
288 | th.data.g_cart_q_time = null; | 293 | th.data.g_cart_q_time = null; |
289 | if (th.data.isclose == 0) { | 294 | if (th.data.isclose == 0) { |
@@ -843,8 +848,8 @@ Page({ | @@ -843,8 +848,8 @@ Page({ | ||
843 | // return false; | 848 | // return false; |
844 | // } | 849 | // } |
845 | 850 | ||
846 | - th.setData({dis_btn:1}) | ||
847 | - this.data.submit=0; | 851 | + th.setData({dis_btn:1,submit:1}) |
852 | + //this.data.submit=0; | ||
848 | 853 | ||
849 | wx.showLoading({ | 854 | wx.showLoading({ |
850 | title: "处理中.",mask:true | 855 | title: "处理中.",mask:true |
@@ -1261,14 +1266,14 @@ Page({ | @@ -1261,14 +1266,14 @@ Page({ | ||
1261 | if (th.data.bn_use_money == 1) { | 1266 | if (th.data.bn_use_money == 1) { |
1262 | if (amoney > order_m) { | 1267 | if (amoney > order_m) { |
1263 | order_m = parseFloat(order_m).toFixed(2); | 1268 | order_m = parseFloat(order_m).toFixed(2); |
1264 | - th.setData({ [txt]: order_m, [txt2]: 0, [txt3]: coupon_price, show_submit: 1,dis_btn:0 }) | 1269 | + th.setData({ [txt]: order_m, [txt2]: 0, [txt3]: coupon_price,submit: 0, show_submit: 1,dis_btn:0 }) |
1265 | } else { | 1270 | } else { |
1266 | order_m = parseFloat(order_m) - parseFloat(amoney); | 1271 | order_m = parseFloat(order_m) - parseFloat(amoney); |
1267 | order_m = order_m.toFixed(2); | 1272 | order_m = order_m.toFixed(2); |
1268 | - th.setData({ [txt]: amoney, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1,dis_btn:0 }) | 1273 | + th.setData({ [txt]: amoney, [txt2]: order_m, [txt3]: coupon_price,submit: 0, show_submit: 1,dis_btn:0 }) |
1269 | } | 1274 | } |
1270 | } else { | 1275 | } else { |
1271 | - th.setData({ [txt]: 0, [txt2]: order_m, [txt3]: coupon_price, show_submit: 1,dis_btn:0 }) | 1276 | + th.setData({ [txt]: 0, [txt2]: order_m, [txt3]: coupon_price,submit: 0, show_submit: 1,dis_btn:0 }) |
1272 | } | 1277 | } |
1273 | //优惠活动送积分 | 1278 | //优惠活动送积分 |
1274 | if (good.s_intValue) { | 1279 | if (good.s_intValue) { |
@@ -3365,7 +3370,7 @@ Page({ | @@ -3365,7 +3370,7 @@ Page({ | ||
3365 | //立即购买的时候,点击订单促销的参与 | 3370 | //立即购买的时候,点击订单促销的参与 |
3366 | set_can_use_ord_prom_now:function (e){ | 3371 | set_can_use_ord_prom_now:function (e){ |
3367 | 3372 | ||
3368 | - if(this.data.submit || this.data.dis_btn) return false; | 3373 | + if(this.data.submit) return false; |
3369 | this.data.submit=1; | 3374 | this.data.submit=1; |
3370 | 3375 | ||
3371 | let pickid=this.data.bn_pick; | 3376 | let pickid=this.data.bn_pick; |
packageE/pages/cart/cart2_pt/cart2_pt.js
@@ -688,6 +688,11 @@ Page({ | @@ -688,6 +688,11 @@ Page({ | ||
688 | } | 688 | } |
689 | } | 689 | } |
690 | 690 | ||
691 | + this.setData({ | ||
692 | + show_ord_prom:{}, | ||
693 | + can_use_ord_prom:{} | ||
694 | + }) | ||
695 | + | ||
691 | 696 | ||
692 | //先获取是否有关闭使用优惠券 | 697 | //先获取是否有关闭使用优惠券 |
693 | getApp().getConfig2(function (ee) { | 698 | getApp().getConfig2(function (ee) { |