diff --git a/components/cartBtmList.vue b/components/cartBtmList.vue index a623d36..25058a7 100644 --- a/components/cartBtmList.vue +++ b/components/cartBtmList.vue @@ -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) { diff --git a/config/request.js b/config/request.js index d81baaa..045f520 100644 --- a/config/request.js +++ b/config/request.js @@ -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 }) diff --git a/pages/shoppingCar/index.vue b/pages/shoppingCar/index.vue index c1f6302..7826da4 100644 --- a/pages/shoppingCar/index.vue +++ b/pages/shoppingCar/index.vue @@ -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) {