|
|
@ -48,12 +48,14 @@ |
|
|
|
<view class="title flex-between">失效商品<span @click="delLoseGood('', 1)">清空失效商品</span></view> |
|
|
|
<view class="goodItem" v-for="(goodItem, goodIndex) in loseList" :key="goodIndex"> |
|
|
|
<view class="noSelect"></view> |
|
|
|
<image :src="showImg(goodItem.specifications_image)" mode="aspectFill"></image> |
|
|
|
<image :src="showImg(goodItem.specUrl)" mode="aspectFill"></image> |
|
|
|
<view class="contentBox"> |
|
|
|
<view class="title text-overflow">{{ goodItem.good_name }}</view> |
|
|
|
<view class="title text-overflow">{{ goodItem.goodsName }}</view> |
|
|
|
<view class="subTitle text-overflow">{{ |
|
|
|
goodItem.Specifications_name |
|
|
|
}}</view> |
|
|
|
goodItem.specValueOne |
|
|
|
}}-{{ |
|
|
|
goodItem.specValueTwo |
|
|
|
}}</view> |
|
|
|
<view class="priceBox flex-between"> |
|
|
|
<view class="price">{{ goodItem.salePrice }}</view> |
|
|
|
<view class="btn" @click="delLoseGood(goodItem.id, 0)">删除</view> |
|
|
@ -106,11 +108,14 @@ |
|
|
|
"/framework/cart/list", "DES" |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
|
this.list = res.data || []; |
|
|
|
const list = res.data || []; |
|
|
|
this.loseList = []; |
|
|
|
this.list.forEach((item) => { |
|
|
|
this.list = []; |
|
|
|
list.forEach((item) => { |
|
|
|
if (item.effectStatus == 1) { |
|
|
|
this.loseList.push(item); |
|
|
|
} else { |
|
|
|
this.list.push(item) |
|
|
|
} |
|
|
|
}); |
|
|
|
console.log("购物车数据更新:", this.list); |
|
|
@ -359,10 +364,35 @@ |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log("list参数", list); |
|
|
|
this.$store.commit("changeOrderSCart", list); |
|
|
|
// this.gotoPath('/subPackages/order/eCartOrder') |
|
|
|
this.gotoPath("/subPackages/order/gwcOrder"); |
|
|
|
this.Post({ |
|
|
|
bos: list, |
|
|
|
method: 'post' |
|
|
|
}, |
|
|
|
`/framework/cart/check-cart-items`, |
|
|
|
"DES" |
|
|
|
) |
|
|
|
.then((res) => { |
|
|
|
if (res.data.canOrder) { |
|
|
|
this.$store.commit("changeOrderSCart", list); |
|
|
|
this.gotoPath("/subPackages/order/gwcOrder"); |
|
|
|
} else { |
|
|
|
uni.showToast({ |
|
|
|
title: res.message, |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
this.getShoppingList() |
|
|
|
} |
|
|
|
|
|
|
|
}).catch((res) => { |
|
|
|
uni.showToast({ |
|
|
|
title: '部分商品无法下单,请重新加载购物车', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
setTimeout(() =>{ |
|
|
|
this.getShoppingList() |
|
|
|
},800) |
|
|
|
}) |
|
|
|
|
|
|
|
// this.gotoPath('/subPackages/goods/goodsOrder') |
|
|
|
}, |
|
|
|
}, |
|
|
|