Commit bb5d0c8b72c40e4ff63eb1a8e36d7065f47d7705
1 parent
761c269c
1、购物车点击的bug优化
2、确认订单页面的优惠促销订单参与和不参与的bug优化
Showing
2 changed files
with
12 additions
and
4 deletions
packageE/pages/cart/cart2/cart2.js
@@ -2475,9 +2475,9 @@ Page({ | @@ -2475,9 +2475,9 @@ Page({ | ||
2475 | newd.is_past=1; | 2475 | newd.is_past=1; |
2476 | } | 2476 | } |
2477 | 2477 | ||
2478 | - //ord_goods.splice(pos+1,0,newd); | 2478 | + ord_goods.splice(pos+1,0,newd); |
2479 | th.data.old_cartlist[i].goods.splice(pos2+1,0,newd); | 2479 | th.data.old_cartlist[i].goods.splice(pos2+1,0,newd); |
2480 | - | 2480 | + |
2481 | var txt9 = "cartlist[" + i + "].goods["+(pos+1)+"]"; | 2481 | var txt9 = "cartlist[" + i + "].goods["+(pos+1)+"]"; |
2482 | th.setData({ [txt9]: newd }) | 2482 | th.setData({ [txt9]: newd }) |
2483 | 2483 | ||
@@ -8682,8 +8682,15 @@ Page({ | @@ -8682,8 +8682,15 @@ Page({ | ||
8682 | } | 8682 | } |
8683 | } | 8683 | } |
8684 | 8684 | ||
8685 | + //清理下赠品 | ||
8686 | + let n_goods=[]; | ||
8687 | + for (let ig = 0; ig <goods.length; ig++) { | ||
8688 | + if(!goods[ig].is_gift){ | ||
8689 | + n_goods.push(goods[ig]); | ||
8690 | + } | ||
8691 | + } | ||
8685 | //原始数据要有深拷贝不能有地址的牵连 | 8692 | //原始数据要有深拷贝不能有地址的牵连 |
8686 | - th.data.cartlist_y = JSON.parse(JSON.stringify(goods)) | 8693 | + th.data.cartlist_y = JSON.parse(JSON.stringify(n_goods)) |
8687 | 8694 | ||
8688 | 8695 | ||
8689 | //重新调用cart_next,进行下一步计算 | 8696 | //重新调用cart_next,进行下一步计算 |
pages/cart/cart/cart.js
@@ -1192,9 +1192,10 @@ Page({ | @@ -1192,9 +1192,10 @@ Page({ | ||
1192 | // if (this.data.btn_click) { | 1192 | // if (this.data.btn_click) { |
1193 | // return false; | 1193 | // return false; |
1194 | // } | 1194 | // } |
1195 | - | ||
1196 | setTimeout(() => { | 1195 | setTimeout(() => { |
1197 | if (this.data.up_dating == 1) return false; | 1196 | if (this.data.up_dating == 1) return false; |
1197 | + this.data.up_dating=1 | ||
1198 | + | ||
1198 | this.data.btn_click = 1; | 1199 | this.data.btn_click = 1; |
1199 | var a = t.currentTarget.dataset.item; | 1200 | var a = t.currentTarget.dataset.item; |
1200 | var b = t.currentTarget.dataset.pitems; | 1201 | var b = t.currentTarget.dataset.pitems; |