From ff66593f4f5c3c4dec941794e45b7bfb5788047b Mon Sep 17 00:00:00 2001 From: chenghuan Date: Thu, 12 Mar 2026 11:48:07 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8=E9=87=91=E9=A2=9D=E6=9F=A5=E8=AF=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将manifest.json中的版本号从1.0.56更新至1.0.57 - 在开发环境恢复使用本地测试API地址 - 在订单详情页新增优惠券金额查询功能,当订单包含优惠券时自动查询并显示优惠金额 --- config/baseUrl.js | 4 ++-- manifest.json | 4 ++-- pages/bookShop/orderLCont.vue | 29 ++++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/config/baseUrl.js b/config/baseUrl.js index bb878b7..ee0be03 100644 --- a/config/baseUrl.js +++ b/config/baseUrl.js @@ -2,8 +2,8 @@ let baseUrl = ""; let socketUrl = ""; if (process.env.NODE_ENV === 'development') { // 开发环境 - // baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 - baseUrl = "https://api.nuttyreading.com/"; // 线上正式 + baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 + // baseUrl = "https://api.nuttyreading.com/"; // 线上正式 } else if (process.env.NODE_ENV === 'production') { // 生产环境11 //baseUrl = "http://192.168.110.100:9200/pb/"; // 张川川 diff --git a/manifest.json b/manifest.json index b91c2c7..780c3c3 100644 --- a/manifest.json +++ b/manifest.json @@ -13,8 +13,8 @@ "src" : "图片路径" } ], - "versionName" : "1.0.56", - "versionCode" : 1056, + "versionName" : "1.0.57", + "versionCode" : 1057, "app-plus" : { "nvueCompiler" : "weex", "compatible" : { diff --git a/pages/bookShop/orderLCont.vue b/pages/bookShop/orderLCont.vue index d87442f..839cfe3 100644 --- a/pages/bookShop/orderLCont.vue +++ b/pages/bookShop/orderLCont.vue @@ -1029,6 +1029,29 @@ export default { orderTabCLi(e) { this.orderListTab = e; }, + async getCouponDetail(id) { + await this.$http + .request({ + url: "common/coupon/getCouponHistoryInfo", + method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档 + data: { + id, + }, + header: { + //默认 无 说明:请求头 + "Content-Type": "application/json", + }, + }) + .then(async (res) => { + if (res.code != 0) return this.$commonJS.showToast(res.errMsg); + this.orderContet.couponAmount = + res.couponHistory.couponEntity.couponAmount; + }) + .catch((e) => { + console.log(e); + this.$commonJS.showToast(e.errMsg); + }); + }, // 获取订单详情 getOrderList() { console.log("this.orderType", this.orderType); @@ -1045,12 +1068,16 @@ export default { "Content-Type": "application/json", }, }) - .then((res) => { + .then(async (res) => { this.customButton = []; console.log("订单详情", res); this.orderContet = res.data.buyOrder; this.goodsList = res.data.productInfo; this.consigneeShow = true; + // 存在优惠券信息,就查询优惠券集体金额 + if (this.orderContet.couponId && this.orderContet.couponId != null) { + await this.getCouponDetail(this.orderContet.couponId); + } if ( this.orderContet.orderStatus == 2 && this.sheetList.length > 0 &&