解除注释
This commit is contained in:
1 parent
5bca68c010
commit
220af7f756
1 file changed
+25
-25
+25
-25
@@ -175,8 +175,8 @@ onShow(async () => {
|
||||
})
|
||||
try {
|
||||
await getDetail()
|
||||
// await getShopCar()
|
||||
// await getClassify()
|
||||
await getShopCar()
|
||||
await getClassify()
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
title: "加载失败",
|
||||
@@ -222,29 +222,29 @@ const getPorduct = async () => {
|
||||
size: 9999,
|
||||
})
|
||||
state.goodsList = data.records
|
||||
// state.goodsList.forEach((i) => {
|
||||
// if (i && i.foodSPURespVOList && i.foodSPURespVOList.length) {
|
||||
// i.foodSPURespVOList.forEach((j) => {
|
||||
// j.productCount = 0;
|
||||
// j.productId = j.id;
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// const goodsList = [...state.goodsList];
|
||||
// if (state.carList && state.carList.length) {
|
||||
// for (const i of goodsList) {
|
||||
// if (i && i.foodSPURespVOList && i.foodSPURespVOList.length) {
|
||||
// for (const j of i.foodSPURespVOList) {
|
||||
// for (const v of state.carList) {
|
||||
// if (j.id == v.productId) {
|
||||
// j.productCount = v.productCount;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// state.goodsList = goodsList;
|
||||
state.goodsList.forEach((i) => {
|
||||
if (i && i.foodSPURespVOList && i.foodSPURespVOList.length) {
|
||||
i.foodSPURespVOList.forEach((j) => {
|
||||
j.productCount = 0
|
||||
j.productId = j.id
|
||||
})
|
||||
}
|
||||
})
|
||||
const goodsList = [...state.goodsList]
|
||||
if (state.carList && state.carList.length) {
|
||||
for (const i of goodsList) {
|
||||
if (i && i.foodSPURespVOList && i.foodSPURespVOList.length) {
|
||||
for (const j of i.foodSPURespVOList) {
|
||||
for (const v of state.carList) {
|
||||
if (j.id == v.productId) {
|
||||
j.productCount = v.productCount
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
state.goodsList = goodsList
|
||||
}
|
||||
|
||||
const doClassify = async (i: any) => {
|
||||
|
||||
Reference in new issue
Block a user