Commit 8f4fedfc74af3a312f94505b275acb72207b4662
1 parent
bda47504
小问题
Showing
2 changed files
with
2 additions
and
4 deletions
packageB/pages/zuhegou/index/index.js
| ... | ... | @@ -440,6 +440,7 @@ Page({ |
| 440 | 440 | this.data.sele_index = index; |
| 441 | 441 | let title = ''; |
| 442 | 442 | self = this; |
| 443 | + th.data.s_cart_num=0; | |
| 443 | 444 | |
| 444 | 445 | //说明是加入购物车是时候 |
| 445 | 446 | this.data.is_zuhe_addcart = 1; |
| ... | ... | @@ -496,7 +497,7 @@ Page({ |
| 496 | 497 | success (res) { |
| 497 | 498 | if (res.confirm) { |
| 498 | 499 | console.log('用户点击确定'); |
| 499 | - if(th.data.sele_g.cart_num){ | |
| 500 | + if(th.data.sele_g.cart_num && th.data.sele_g.cart_num - th.data.sele_g.num>0){ | |
| 500 | 501 | |
| 501 | 502 | var updata = { |
| 502 | 503 | id: th.data.sele_g.cart_id, | ... | ... |