Commit 2c23981297a9c291b731e355dfda4561d149e802
1 parent
509f53cb
秒杀指定门店不可售
Showing
2 changed files
with
15 additions
and
4 deletions
pages/user/order_detail/order_detail.js
| ... | ... | @@ -455,7 +455,7 @@ Page({ |
| 455 | 455 | return e.pickup_id==order.pickup_id; |
| 456 | 456 | }) |
| 457 | 457 | if(idx0<0){ |
| 458 | - getApp().confirmBox(gg.goods_name + "的指定门店不匹配"); | |
| 458 | + getApp().confirmBox(gg.goods_name + "的门店不可售"); | |
| 459 | 459 | th.setData({ paying: 0 }); |
| 460 | 460 | return false; |
| 461 | 461 | } |
| ... | ... | @@ -978,6 +978,19 @@ Page({ |
| 978 | 978 | } |
| 979 | 979 | //----------如果有活动,并且在进行中,就不计算线下库存--------------- |
| 980 | 980 | if (prom) { |
| 981 | + | |
| 982 | + //指定门店的控制 | |
| 983 | + if (goodsinfo.prom_type == 1 && prom.pick_up_lists) { | |
| 984 | + var idx0=prom.pick_up_lists.findIndex(function (e){ | |
| 985 | + return e.pickup_id==order.pick_id; | |
| 986 | + }) | |
| 987 | + if(idx0<0){ | |
| 988 | + getApp().confirmBox(goodsinfo.goods_name + "秒杀活动的门店不可售"); | |
| 989 | + th.setData({ paying: 0 }); | |
| 990 | + return false; | |
| 991 | + } | |
| 992 | + } | |
| 993 | + | |
| 981 | 994 | var now = ut.gettimestamp(); |
| 982 | 995 | if (prom.is_end == 1 && prom.end_time < now) { |
| 983 | 996 | var content = goodsinfo.goods_name + '商品的活动已经结束,请取消订单' | ... | ... |
pages/user/order_list/order_list.js
| ... | ... | @@ -1295,16 +1295,14 @@ Page({ |
| 1295 | 1295 | |
| 1296 | 1296 | //指定门店的控制 |
| 1297 | 1297 | if (goodsinfo.prom_type == 1 && prom.pick_up_lists) { |
| 1298 | - | |
| 1299 | 1298 | var idx0=prom.pick_up_lists.findIndex(function (e){ |
| 1300 | 1299 | return e.pickup_id==order.pick_id; |
| 1301 | 1300 | }) |
| 1302 | 1301 | if(idx0<0){ |
| 1303 | 1302 | getApp().confirmBox(goodsinfo.goods_name + "秒杀活动的门店不可售"); |
| 1304 | - wx.hideLoading(); | |
| 1303 | + th.setData({ paying: 0 }); | |
| 1305 | 1304 | return false; |
| 1306 | 1305 | } |
| 1307 | - | |
| 1308 | 1306 | } |
| 1309 | 1307 | |
| 1310 | 1308 | ... | ... |