Commit a43670b2df843ca388431231ed3113ce34657b8a
1 parent
e24ef618
活动未开始加入购物车确实会显示失效的优化
Showing
1 changed file
with
10 additions
and
1 deletions
pages/cart/cart/cart.js
| ... | ... | @@ -545,7 +545,16 @@ Page({ |
| 545 | 545 | } |
| 546 | 546 | }).then(res => { |
| 547 | 547 | if (res.data.code == 0) { |
| 548 | - prom = res.data.data | |
| 548 | + //开始时间已经开始的情况 | |
| 549 | + for(var i=0;i<res.data.data.length;i++){ | |
| 550 | + var a_item=res.data.data[i]; | |
| 551 | + if(a_item.s_time<now) { | |
| 552 | + if(!prom) prom=[]; | |
| 553 | + prom.push(a_item); | |
| 554 | + } | |
| 555 | + } | |
| 556 | + | |
| 557 | + | |
| 549 | 558 | } |
| 550 | 559 | }) |
| 551 | 560 | let prom_true = 0 | ... | ... |