3
0
Fork 0

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