Commit 7d9075351d995f4750a0e0b830e070e1b74167b3
1 parent
8c124a60
购车车卡项加减修改
Showing
2 changed files
with
3 additions
and
4 deletions
pages/cart/cart/cart.js
| ... | ... | @@ -1097,7 +1097,7 @@ Page({ |
| 1097 | 1097 | goods_id: a.goods_id, |
| 1098 | 1098 | store_id: oo.stoid |
| 1099 | 1099 | }; |
| 1100 | - // this.postCardList_ser(e, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems); | |
| 1100 | + this.postCardList_ser(e, t.currentTarget.dataset.item, t.currentTarget.dataset.pitems); | |
| 1101 | 1101 | |
| 1102 | 1102 | }, |
| 1103 | 1103 | //-------------减数量--------------------- |
| ... | ... | @@ -1111,7 +1111,7 @@ Page({ |
| 1111 | 1111 | a = this.data.service_data[b].goods[a]; |
| 1112 | 1112 | this.data.btn_click = 1; |
| 1113 | 1113 | |
| 1114 | - if (a.goods_num - 1 < 0) { | |
| 1114 | + if (a.goods_num - 1 <= 0) { | |
| 1115 | 1115 | this.data.up_dating = 0; |
| 1116 | 1116 | return false; |
| 1117 | 1117 | } | ... | ... |
pages/cart/cart/cart.wxml
| ... | ... | @@ -128,8 +128,7 @@ |
| 128 | 128 | <view class="count"> |
| 129 | 129 | <view bindtap="{{items.goods_num <= 1 ? '':'subNum'}}" class="sub fs28 {{items.goods_num <= 1 ? 'active':''}}" data-pitems="{{pidx}}" data-item="{{idx}}">一</view> |
| 130 | 130 | <input class="goodadd" bindblur="valueToNum" data-pitems="{{pidx}}" data-item="{{idx}}" |
| 131 | - bindinput="refresh_input" | |
| 132 | - type="number" value="{{items.goods_num}}"></input> | |
| 131 | + bindinput="refresh_input" type="number" value="{{items.goods_num}}"></input> | |
| 133 | 132 | <view class="add" bindtap="addNum" data-pitems="{{pidx}}" data-item="{{idx}}">+</view> |
| 134 | 133 | </view> |
| 135 | 134 | </view> | ... | ... |