fix(cart): 移除无用接口

This commit is contained in:
ywk 2025-04-07 11:21:11 +08:00
parent 6d925b04ae
commit e40c56e3af
2 changed files with 170 additions and 144 deletions

View File

@ -374,42 +374,49 @@ export default {
shoppingId: item,
});
});
api
.validShop({
specialArea: this.goodsCheck[0].specialArea,
deleteList: deleteList,
})
.then((res) => {
if (res.code == 200) {
this.tableData = response.data;
this.tableData.forEach((item) => {
this.$set(item, "quantity", 1);
uni.navigateTo({
url:
"/pages/regiest/index?specialArea=" +
this.goodsCheck[0].specialArea +
"&shoppArr=" +
JSON.stringify(shoppArr),
});
this.dialogVisible2 = true;
// api
// .energyShop({
// .validShop({
// specialArea: this.goodsCheck[0].specialArea,
// deleteList: deleteList,
// })
// .then((response) => {
// if (response.data && response.data.length > 0) {
// this.tableData = response.data;
// this.tableData.forEach((item) => {
// this.$set(item, "quantity", 1);
// });
// this.dialogVisible2 = true;
// } else {
// uni.navigateTo({
// url:
// "/pages/regiest/index?specialArea=" +
// this.goodsCheck[0].specialArea +
// "&shoppArr=" +
// JSON.stringify(shoppArr),
// });
// .then((res) => {
// if (res.code == 200) {
// // this.tableData = response.data;
// // this.tableData.forEach((item) => {
// // this.$set(item, "quantity", 1);
// // });
// // this.dialogVisible2 = true;
// // api
// // .energyShop({
// // specialArea: this.goodsCheck[0].specialArea,
// // deleteList: deleteList,
// // })
// // .then((response) => {
// // if (response.data && response.data.length > 0) {
// // this.tableData = response.data;
// // this.tableData.forEach((item) => {
// // this.$set(item, "quantity", 1);
// // });
// // this.dialogVisible2 = true;
// // } else {
// // uni.navigateTo({
// // url:
// // "/pages/regiest/index?specialArea=" +
// // this.goodsCheck[0].specialArea +
// // "&shoppArr=" +
// // JSON.stringify(shoppArr),
// // });
// // }
// // });
// }
// });
}
});
} else if (this.goodsCheck[0].specialArea == 21) {
if (
this.userInfo.registerShare == 0 ||
@ -473,42 +480,49 @@ export default {
shoppingId: item,
});
});
api
.validShop({
specialArea: this.goodsCheck[0].specialArea,
deleteList: deleteList,
})
.then((res) => {
if (res.code == 200) {
this.tableData = response.data;
this.tableData.forEach((item) => {
this.$set(item, "quantity", 1);
uni.navigateTo({
url:
"/pages/other/index?specialArea=" +
this.goodsCheck[0].specialArea +
"&shoppArr=" +
JSON.stringify(shoppArr),
});
this.dialogVisible2 = true;
// api
// .energyShop({
// .validShop({
// specialArea: this.goodsCheck[0].specialArea,
// deleteList: deleteList,
// })
// .then((response) => {
// if (response.data && response.data.length > 0) {
// this.tableData = response.data;
// this.tableData.forEach((item) => {
// this.$set(item, "quantity", 1);
// });
// this.dialogVisible2 = true;
// } else {
// uni.navigateTo({
// url:
// "/pages/other/index?specialArea=" +
// this.goodsCheck[0].specialArea +
// "&shoppArr=" +
// JSON.stringify(shoppArr),
// });
// .then((res) => {
// if (res.code == 200) {
// // this.tableData = response.data;
// // this.tableData.forEach((item) => {
// // this.$set(item, "quantity", 1);
// // });
// // this.dialogVisible2 = true;
// // api
// // .energyShop({
// // specialArea: this.goodsCheck[0].specialArea,
// // deleteList: deleteList,
// // })
// // .then((response) => {
// // if (response.data && response.data.length > 0) {
// // this.tableData = response.data;
// // this.tableData.forEach((item) => {
// // this.$set(item, "quantity", 1);
// // });
// // this.dialogVisible2 = true;
// // } else {
// // uni.navigateTo({
// // url:
// // "/pages/other/index?specialArea=" +
// // this.goodsCheck[0].specialArea +
// // "&shoppArr=" +
// // JSON.stringify(shoppArr),
// // });
// // }
// // });
// }
// });
}
});
} else if (this.goodsCheck[0].specialArea == 30) {
if (this.goodsCheck[0].orderItemsParams.length > 1) {
uni.showToast({

View File

@ -306,6 +306,7 @@ export default {
}
},
goBuy() {
console.log(this.goodsCheck[0]);
let shoppArr = this.goodsCheck[0].orderItemsParams.map((item) => {
return item.shoppingId;
});
@ -341,48 +342,52 @@ export default {
// })
// }
// })
let deleteList = [];
shoppArr.forEach((item) => {
deleteList.push({
shoppingId: item,
});
});
api
.validShop({
specialArea: this.goodsCheck[0].specialArea,
deleteList: deleteList,
})
.then((res) => {
if (res.code == 200) {
this.tableData = response.data;
this.tableData.forEach((item) => {
this.$set(item, "quantity", 1);
uni.navigateTo({
url:
"/pages/regiest/index?specialArea=" +
this.goodsCheck[0].specialArea +
"&shoppArr=" +
JSON.stringify(shoppArr),
});
this.dialogVisible2 = true;
// api
// .energyShop({
// .validShop({
// specialArea: this.goodsCheck[0].specialArea,
// deleteList: deleteList,
// })
// .then((response) => {
// if (response.data && response.data.length > 0) {
// this.tableData = response.data;
// this.tableData.forEach((item) => {
// this.$set(item, "quantity", 1);
// });
// this.dialogVisible2 = true;
// } else {
// uni.navigateTo({
// url:
// "/pages/regiest/index?specialArea=" +
// this.goodsCheck[0].specialArea +
// "&shoppArr=" +
// JSON.stringify(shoppArr),
// });
// .then((res) => {
// if (res.code == 200) {
// // api
// // .energyShop({
// // specialArea: this.goodsCheck[0].specialArea,
// // deleteList: deleteList,
// // })
// // .then((response) => {
// // if (response.data && response.data.length > 0) {
// // this.tableData = response.data;
// // this.tableData.forEach((item) => {
// // this.$set(item, "quantity", 1);
// // });
// // this.dialogVisible2 = true;
// // } else {
// // uni.navigateTo({
// // url:
// // "/pages/regiest/index?specialArea=" +
// // this.goodsCheck[0].specialArea +
// // "&shoppArr=" +
// // JSON.stringify(shoppArr),
// // });
// // }
// // });
// }
// });
}
});
} else if (this.goodsCheck[0].specialArea == 21) {
// uni.navigateTo({
// url:
@ -414,42 +419,49 @@ export default {
shoppingId: item,
});
});
api
.validShop({
specialArea: this.goodsCheck[0].specialArea,
deleteList: deleteList,
})
.then((res) => {
if (res.code == 200) {
this.tableData = response.data;
this.tableData.forEach((item) => {
this.$set(item, "quantity", 1);
uni.navigateTo({
url:
"/pages/other/index?specialArea=" +
this.goodsCheck[0].specialArea +
"&shoppArr=" +
JSON.stringify(shoppArr),
});
this.dialogVisible2 = true;
// api
// .energyShop({
// .validShop({
// specialArea: this.goodsCheck[0].specialArea,
// deleteList: deleteList,
// })
// .then((response) => {
// if (response.data && response.data.length > 0) {
// this.tableData = response.data;
// this.tableData.forEach((item) => {
// this.$set(item, "quantity", 1);
// });
// this.dialogVisible2 = true;
// } else {
// uni.navigateTo({
// url:
// "/pages/other/index?specialArea=" +
// this.goodsCheck[0].specialArea +
// "&shoppArr=" +
// JSON.stringify(shoppArr),
// });
// .then((res) => {
// if (res.code == 200) {
// // this.tableData = response.data;
// // this.tableData.forEach((item) => {
// // this.$set(item, "quantity", 1);
// // });
// // this.dialogVisible2 = true;
// // api
// // .energyShop({
// // specialArea: this.goodsCheck[0].specialArea,
// // deleteList: deleteList,
// // })
// // .then((response) => {
// // if (response.data && response.data.length > 0) {
// // this.tableData = response.data;
// // this.tableData.forEach((item) => {
// // this.$set(item, "quantity", 1);
// // });
// // this.dialogVisible2 = true;
// // } else {
// // uni.navigateTo({
// // url:
// // "/pages/other/index?specialArea=" +
// // this.goodsCheck[0].specialArea +
// // "&shoppArr=" +
// // JSON.stringify(shoppArr),
// // });
// // }
// // });
// }
// });
}
});
} else if (this.goodsCheck[0].specialArea == 30) {
if (this.goodsCheck[0].orderItemsParams.length > 1) {
uni.showToast({