Commit 01e8d045faa160ed7575a565330549c4b9ab1db0
1 parent
ec472586
订单促销,优惠券使用的优化
Showing
4 changed files
with
42 additions
and
1 deletions
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
| @@ -2241,6 +2241,13 @@ Page({ | @@ -2241,6 +2241,13 @@ Page({ | ||
| 2241 | good.prom_type=0; | 2241 | good.prom_type=0; |
| 2242 | good.prom_id=0; | 2242 | good.prom_id=0; |
| 2243 | good.discount_field=discount_field; | 2243 | good.discount_field=discount_field; |
| 2244 | + | ||
| 2245 | + //把优惠券的使用还原 | ||
| 2246 | + th.setData({ | ||
| 2247 | + selected_quan_list: null, | ||
| 2248 | + using_quan: {} | ||
| 2249 | + }) | ||
| 2250 | + | ||
| 2244 | }else{ | 2251 | }else{ |
| 2245 | good=ut.deep_cp(th.data.old_bn_goods); | 2252 | good=ut.deep_cp(th.data.old_bn_goods); |
| 2246 | param.goods_price=good.goods_price; | 2253 | param.goods_price=good.goods_price; |
| @@ -2255,6 +2262,10 @@ Page({ | @@ -2255,6 +2262,10 @@ Page({ | ||
| 2255 | mark:true | 2262 | mark:true |
| 2256 | }) | 2263 | }) |
| 2257 | th.calculatePrice2() | 2264 | th.calculatePrice2() |
| 2265 | + | ||
| 2266 | + if(!th.data.can_use_ord_prom[pickid]){ | ||
| 2267 | + th.get_buy_now_quan(); | ||
| 2268 | + } | ||
| 2258 | } | 2269 | } |
| 2259 | 2270 | ||
| 2260 | 2271 |
packageC/pages/presell/cart/cart2.js
| @@ -3332,6 +3332,12 @@ Page({ | @@ -3332,6 +3332,12 @@ Page({ | ||
| 3332 | good.integral=0; | 3332 | good.integral=0; |
| 3333 | good.discount_field=discount_field; | 3333 | good.discount_field=discount_field; |
| 3334 | 3334 | ||
| 3335 | + //把优惠券的使用还原 | ||
| 3336 | + th.setData({ | ||
| 3337 | + selected_quan_list: null, | ||
| 3338 | + using_quan: {} | ||
| 3339 | + }) | ||
| 3340 | + | ||
| 3335 | }else{ | 3341 | }else{ |
| 3336 | good=ut.deep_cp(th.data.old_bn_goods); | 3342 | good=ut.deep_cp(th.data.old_bn_goods); |
| 3337 | } | 3343 | } |
| @@ -3344,6 +3350,10 @@ Page({ | @@ -3344,6 +3350,10 @@ Page({ | ||
| 3344 | mark:true | 3350 | mark:true |
| 3345 | }) | 3351 | }) |
| 3346 | th.calculatePrice2() | 3352 | th.calculatePrice2() |
| 3353 | + | ||
| 3354 | + if(!th.data.can_use_ord_prom[pickid]){ | ||
| 3355 | + th.get_buy_now_quan(); | ||
| 3356 | + } | ||
| 3347 | } | 3357 | } |
| 3348 | 3358 | ||
| 3349 | 3359 |
packageE/pages/cart/cart2/cart2.js
| @@ -4031,7 +4031,7 @@ Page({ | @@ -4031,7 +4031,7 @@ Page({ | ||
| 4031 | //---如果有选择优惠券的情况下--- | 4031 | //---如果有选择优惠券的情况下--- |
| 4032 | var quan_price = 0, bn_pick = th.data.bn_pick; | 4032 | var quan_price = 0, bn_pick = th.data.bn_pick; |
| 4033 | var quan_no = null; | 4033 | var quan_no = null; |
| 4034 | - if (th.data.using_quan[bn_pick] != null && th.data.using_quan[bn_pick] != undefined) | 4034 | + if (th.data.using_quan && th.data.using_quan[bn_pick] != null && th.data.using_quan[bn_pick] != undefined) |
| 4035 | quan_no = th.data.using_quan[bn_pick].coupon_no; | 4035 | quan_no = th.data.using_quan[bn_pick].coupon_no; |
| 4036 | 4036 | ||
| 4037 | if (quan_no) { | 4037 | if (quan_no) { |
| @@ -9085,6 +9085,12 @@ Page({ | @@ -9085,6 +9085,12 @@ Page({ | ||
| 9085 | //-- 转成普通商品 --- | 9085 | //-- 转成普通商品 --- |
| 9086 | good.prom_type=0; | 9086 | good.prom_type=0; |
| 9087 | good.prom_id=0; | 9087 | good.prom_id=0; |
| 9088 | + | ||
| 9089 | + th.setData({ | ||
| 9090 | + selected_quan_list: null, | ||
| 9091 | + using_quan:{} | ||
| 9092 | + }) | ||
| 9093 | + | ||
| 9088 | }else{ | 9094 | }else{ |
| 9089 | good=ut.deep_cp(th.data.old_bn_goods); | 9095 | good=ut.deep_cp(th.data.old_bn_goods); |
| 9090 | } | 9096 | } |
| @@ -9097,6 +9103,10 @@ Page({ | @@ -9097,6 +9103,10 @@ Page({ | ||
| 9097 | mark:true | 9103 | mark:true |
| 9098 | }) | 9104 | }) |
| 9099 | th.calculatePrice2() | 9105 | th.calculatePrice2() |
| 9106 | + | ||
| 9107 | + if(!th.data.can_use_ord_prom[pickid]){ | ||
| 9108 | + th.get_buy_now_quan(); | ||
| 9109 | + } | ||
| 9100 | } | 9110 | } |
| 9101 | 9111 | ||
| 9102 | 9112 |
packageE/pages/cart/cart2_pt/cart2_pt.js
| @@ -2407,6 +2407,12 @@ Page({ | @@ -2407,6 +2407,12 @@ Page({ | ||
| 2407 | good.prom_type=0; | 2407 | good.prom_type=0; |
| 2408 | good.prom_id=0; | 2408 | good.prom_id=0; |
| 2409 | good.discount_field=discount_field; | 2409 | good.discount_field=discount_field; |
| 2410 | + | ||
| 2411 | + //把优惠券的使用还原 | ||
| 2412 | + th.setData({ | ||
| 2413 | + selected_quan_list: null, | ||
| 2414 | + using_quan: {} | ||
| 2415 | + }) | ||
| 2410 | }else{ | 2416 | }else{ |
| 2411 | good=ut.deep_cp(th.data.old_bn_goods); | 2417 | good=ut.deep_cp(th.data.old_bn_goods); |
| 2412 | } | 2418 | } |
| @@ -2419,6 +2425,10 @@ Page({ | @@ -2419,6 +2425,10 @@ Page({ | ||
| 2419 | mark:true | 2425 | mark:true |
| 2420 | }) | 2426 | }) |
| 2421 | th.calculatePrice2() | 2427 | th.calculatePrice2() |
| 2428 | + | ||
| 2429 | + if(!th.data.can_use_ord_prom[pickid]){ | ||
| 2430 | + th.get_buy_now_quan(); | ||
| 2431 | + } | ||
| 2422 | } | 2432 | } |
| 2423 | 2433 | ||
| 2424 | 2434 |