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

View File

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