3
0
Fork 0

fix(api): rm cart api

This commit is contained in:
ywk 2025-04-07 11:04:19 +08:00
parent d90402bc38
commit 6d925b04ae
3 changed files with 109 additions and 89 deletions

View File

@ -381,28 +381,33 @@ export default {
})
.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),
});
}
});
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) {
@ -475,28 +480,33 @@ export default {
})
.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/other/index?specialArea=" +
this.goodsCheck[0].specialArea +
"&shoppArr=" +
JSON.stringify(shoppArr),
});
}
});
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) {

View File

@ -9,7 +9,7 @@ module.exports = (vm) => {
// 初始化请求配置
uni.$u.http.setConfig((config) => {
// config.baseURL = 'https://p1.hzs413.com/inter-api';
config.baseURL = 'http://60.205.203.247/prod-api';
config.baseURL = 'http://192.168.0.100:8080';
config.timeout = 30000;
return config
})

View File

@ -354,28 +354,33 @@ export default {
})
.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),
});
}
});
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) {
@ -416,28 +421,33 @@ export default {
})
.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/other/index?specialArea=" +
this.goodsCheck[0].specialArea +
"&shoppArr=" +
JSON.stringify(shoppArr),
});
}
});
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) {