修改首页搜索商品的数量不实时更新的bug

This commit is contained in:
赵毅 2025-10-24 17:26:58 +08:00
parent a139ec38c9
commit 884b7e5b38

View File

@ -185,7 +185,7 @@ export default {
}, },
// //
getShopCarList() { getShopCarList() {
request(apiArr.getCar, "POST").then((res) => { return request(apiArr.getCar, "POST").then((res) => {
this.value = res.total; this.value = res.total;
// //
this.goodsDetail = [].concat(res.same_day_cart_list || [], res.normal_cart_list || []) this.goodsDetail = [].concat(res.same_day_cart_list || [], res.normal_cart_list || [])
@ -408,7 +408,12 @@ export default {
this.isSearched = false; this.isSearched = false;
}, },
onShow() { onShow() {
this.getShopCarList(); this.getShopCarList().then(() => {
//
setTimeout(() => {
this.syncGoodsQuantities();
}, 100);
});
}, },
onReachBottom() { onReachBottom() {
if (this.flag) { if (this.flag) {