This commit is contained in:
2020-07-03 17:44:58 +08:00
parent 5308f50e4e
commit f27d08c224
575 changed files with 82 additions and 4876 deletions

View File

@@ -85,6 +85,7 @@ export default {
},
// 结算
settlementOrder() {
// 拼接后端需要的数据形式
let id = [], temp = '';
this.checkedGoods.forEach(item => {
temp = item.cart_id + '|' + item.goods_num;
@@ -147,16 +148,14 @@ export default {
this.cartUpdateNumber(e.index, e.value);
},
async cartUpdateNumber(id, number) {
try {
await this.$u.api.cartUpdateNumber({
cart_id: id,
quantity: number,
}).then(res => {
this.getCartList();
})
} catch (error) {
await this.$u.api.cartUpdateNumber({
cart_id: id,
quantity: number,
}).then(res => {
this.getCartList();
}
}).catch(() => {
this.geCartList();
})
},
totalChange(e) {
// 切换所有商品的状态
@@ -193,16 +192,7 @@ export default {
}
},
onNavigationBarButtonTap(btn) {
console.log(btn);
// this.status = btn.text;
// #ifdef H5
if(this.status == '编辑'){
this.status = "完成";
} else {
this.status = "编辑";
}
console.log(this.status);
// #endif
// console.log(btn);
if(btn.index == 0){
let pages = getCurrentPages();
let page = pages[pages.length - 1];