Merged
Merge Request #847 · created by 后端研发-苏明海


Dev


From dev into test

Merged by 后端研发-苏明海

1 participants

pages/user/order_detail/order_detail.js
@@ -654,23 +654,13 @@ Page({ @@ -654,23 +654,13 @@ Page({
654 th.toast(content); 654 th.toast(content);
655 return false; 655 return false;
656 } 656 }
657 - }else{  
658 - var redis_num = 0;  
659 - //------判断活动是否抢光-----  
660 - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +  
661 - os.stoid + "/" + goodsinfo.prom_type + "/" + goodsinfo.prom_id, {  
662 - }).then(res => {  
663 - redis_num = res.data.data;  
664 - });  
665 -  
666 - if (good.goods_num > redis_num) {  
667 -  
668 - var content=gg.goods_name+'超出商品活动库存,请取消订单';  
669 - th.toast(content);  
670 - return false;  
671 - }  
672 - }  
673 - 657 + }else if(goodsinfo.prom_type == 1 || goodsinfo.prom_type == 2 || goodsinfo.prom_type == 6 ) {
  658 + if(order.add_time+5*60<ut.gettimestamp()) {
  659 + var content = gg.goods_name + '该订单已经超时无法支付,请取消订单';
  660 + th.toast(content);
  661 + return false;
  662 + }
  663 + }
674 } 664 }
675 665
676 } 666 }
pages/user/order_list/order_list.js
@@ -460,7 +460,6 @@ Page({ @@ -460,7 +460,6 @@ Page({
460 } 460 }
461 }); 461 });
462 }, 462 },
463 -  
464 /*----------跳转支付-----------*/ 463 /*----------跳转支付-----------*/
465 async jumpToCart4(t) { 464 async jumpToCart4(t) {
466 var o_index = t.currentTarget.dataset.idx; 465 var o_index = t.currentTarget.dataset.idx;
@@ -835,17 +834,9 @@ Page({ @@ -835,17 +834,9 @@ Page({
835 th.toast(content); 834 th.toast(content);
836 return false; 835 return false;
837 } 836 }
838 - } else {  
839 - var redis_num = 0;  
840 - //------判断活动是否抢光-----  
841 - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +  
842 - os.stoid + "/" + goodsinfo.prom_type + "/" + goodsinfo.prom_id, {}).then(res => {  
843 - redis_num = res.data.data;  
844 - });  
845 -  
846 - if (good.goods_num > redis_num) {  
847 -  
848 - var content = gg.goods_name + '超出商品活动库存,请取消订单'; 837 + } else if(goodsinfo.prom_type == 1 || goodsinfo.prom_type == 2 || goodsinfo.prom_type == 6 ) {
  838 + if(order.add_time+5*60<ut.gettimestamp()) {
  839 + var content = gg.goods_name + '该订单已经超时无法支付,请取消订单';
849 th.toast(content); 840 th.toast(content);
850 return false; 841 return false;
851 } 842 }