diff --git a/config/baseUrl.js b/config/baseUrl.js index ccec153..6c26018 100644 --- a/config/baseUrl.js +++ b/config/baseUrl.js @@ -5,6 +5,7 @@ if (process.env.NODE_ENV === 'development') { // baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试 baseUrl = "https://api.nuttyreading.com/"; //线上正式' // baseUrl = "http://192.168.110.100:9200/pb/"; //张川川 + // baseUrl = "http://192.168.110.131:9200/pb/"; // 王亚男 } else if (process.env.NODE_ENV === 'production') { // 生产环境11 baseUrl = "https://api.nuttyreading.com/"; //线上正式 diff --git a/main.js b/main.js index 5314cb7..0e10eaa 100644 --- a/main.js +++ b/main.js @@ -92,6 +92,9 @@ Vue.component('common-order-submit', commonOrderSubmit); import CommonCourseVideo from 'edu-core/components/course-video' Vue.component('CommonCourseVideo', CommonCourseVideo); +import CommonRefundDestination from 'edu-core/components/order/refund-destination.vue' +Vue.component('common-refund-destination', CommonRefundDestination); + import commonCoupon from '@/pages/component/commonComponents/coupon/index.vue' Vue.component('common-coupon', commonCoupon); import commonGoodsList from '@/pages/component/commonComponents/goodsList.vue' diff --git a/manifest.json b/manifest.json index f9c3eca..8bb9f92 100644 --- a/manifest.json +++ b/manifest.json @@ -12,8 +12,8 @@ "src" : "图片路径" } ], - "versionName" : "2.0.48", - "versionCode" : 2048, + "versionName" : "2.0.49", + "versionCode" : 2049, "sassImplementationName" : "node-sass", "app-plus" : { "nvueCompiler" : "uni-app", diff --git a/package-lock.json b/package-lock.json index b899333..8edabee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "animate.css": "^4.1.1", "e-peanut": "file:", - "edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12", + "edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13", "element-plus": "^2.9.6", "epubjs": "^0.3.93", "jquery": "^2.2.4", @@ -435,8 +435,8 @@ "link": true }, "node_modules/edu-core": { - "version": "1.0.12", - "resolved": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577", + "version": "1.0.13", + "resolved": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#b5ece8b8abfeba98428f6e2191efae3312b5036f", "license": "ISC" }, "node_modules/element-plus": { @@ -4173,7 +4173,7 @@ "requires": { "animate.css": "^4.1.1", "e-peanut": "file:", - "edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12", + "edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13", "element-plus": "^2.9.6", "epubjs": "^0.3.93", "jquery": "^2.2.4", @@ -4494,8 +4494,8 @@ } }, "edu-core": { - "version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577", - "from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12" + "version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#b5ece8b8abfeba98428f6e2191efae3312b5036f", + "from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13" }, "element-plus": { "version": "2.11.5", @@ -7256,8 +7256,8 @@ } }, "edu-core": { - "version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#ea1dca213de69ac5a01a44a352ab33024edd2577", - "from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12" + "version": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#b5ece8b8abfeba98428f6e2191efae3312b5036f", + "from": "edu-core@git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13" }, "element-plus": { "version": "2.11.5", diff --git a/package.json b/package.json index 1120b3a..2c1085f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dependencies": { "animate.css": "^4.1.1", "e-peanut": "file:", - "edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.12", + "edu-core": "git+https://git.nuttyreading.com/chenghuan/edu-core.git#v1.0.13", "element-plus": "^2.9.6", "epubjs": "^0.3.93", "jquery": "^2.2.4", diff --git a/pages.json b/pages.json index 135cd9e..30ff843 100644 --- a/pages.json +++ b/pages.json @@ -170,6 +170,18 @@ } } }, + { + "path": "pages/bookShop/refundDestination", + "style": { + "navigationBarTitleText": "钱款去向", + "enablePullDownRefresh": false, + "app-plus": { + "bounce": "none", + "titleNView": false, + "popGesture": "none" + } + } + }, { "path": "pages/hufen/hufen", "style": { diff --git a/pages/bookShop/orderLCont.vue b/pages/bookShop/orderLCont.vue index a784fe3..0435948 100644 --- a/pages/bookShop/orderLCont.vue +++ b/pages/bookShop/orderLCont.vue @@ -90,6 +90,16 @@ v-if="orderContet.orderStatus == 5" >已超时 + 已退款 + 退款中 { + if (res.confirm) { + this.submitOrderRefund(); + } + }, + }); + }, + submitOrderRefund() { + if (!this.orderContet || !this.orderContet.orderId) return; + this.$http + .request({ + url: "book/buyOrder/refundOrder", + method: "POST", + data: { + order_id: this.orderContet.orderId, + }, + header: { + "Content-Type": "application/json", + }, + }) + .then((res) => { + if (res.code == 0) { + uni.showToast({ + icon: "none", + title: "退款成功", + }); + this.getOrderList(); + return; + } + uni.showToast({ + icon: "none", + title: (res && (res.msg || res.errMsg)) || "退款失败", + }); + }) + .catch((e) => { + uni.showToast({ + icon: "none", + title: (e && (e.msg || e.errMsg)) || "退款失败", + }); + }); + }, // 复制到剪切板 copyData(data) { uni.setClipboardData({ @@ -1188,10 +1247,19 @@ export default { text: "继续付款", }); } - if (this.orderContet.orderStatus == 0) { + // medicine:注释取消订单按钮 + // if (this.orderContet.orderStatus == 0) { + // this.customButton.push({ + // width: "160rpx", + // text: "取消订单", + // color: "#333", + // backgroundColor: "#f0f0f0", + // }); + // } + if (this.orderContet.refundableStatus === true) { this.customButton.push({ width: "160rpx", - text: "取消订单", + text: "申请退款", color: "#333", backgroundColor: "#f0f0f0", }); @@ -1214,6 +1282,10 @@ export default { this.titleStat = "待收到"; } else if (this.orderContet.orderStatus == 3) { this.titleStat = "已完成"; + } else if (this.orderContet.orderStatus == 6) { + this.titleStat = "已退款"; + } else if (this.orderContet.orderStatus == 7) { + this.titleStat = "退款中"; } if ( this.orderContet.orderStatus >= 2 && @@ -1256,10 +1328,28 @@ export default { }, }); }, + checkPayTimeout(payItem) { + const createTime = payItem && payItem.createTime; + if (!createTime) return true; + const createdAt = new Date(String(createTime).replace(/-/g, "/")).getTime(); + if (!createdAt) return true; + const expired = Date.now() - createdAt > 10 * 60 * 1000; + if (expired) { + uni.showModal({ + title: "提示", + content: "订单已超时,不能继续支付,请重新下单", + confirmText: "知道了", + showCancel: false, + }); + return false; + } + return true; + }, // 支付 goPay(payItem) { console.log(payItem, "订单数据"); + if (!this.checkPayTimeout(payItem)) return; if (payItem.paymentMethod == 2) { console.log("阿里支付"); setPay( @@ -1403,6 +1493,12 @@ export default { .orderState5 { background-color: #787878; } +.orderState6 { + background-color: #f56c6c; +} +.orderState7 { + background-color: #f56c6c; +} .guoqi { font-size: 28rpx; align-items: center; diff --git a/pages/bookShop/orderList.vue b/pages/bookShop/orderList.vue index 9900e96..e1a2c62 100644 --- a/pages/bookShop/orderList.vue +++ b/pages/bookShop/orderList.vue @@ -12,7 +12,7 @@ 已过期 + 已退款 + 退款中 @@ -392,17 +402,12 @@ 取消订单 - - - 申请售后 + 钱款去向 + 申请退款 - +