From c25d31ea7995d2fbcaf60610869c3e2a4f3a36d4 Mon Sep 17 00:00:00 2001 From: chen-xin-zhi <3588068430@qq.com> Date: Tue, 11 Mar 2025 22:04:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=AE=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/global.js | 8 +- common/globalFunction.js | 7 + pages.json | 28 + .../photoProductsOrderDetail.vue | 14 +- pages/coupon/component/couponPopup.vue | 6 +- pages/mine/main/main.vue | 42 +- pages/mine/mineorders/mineorders.vue | 1 + .../myGeneralOrderDetail.vue | 637 +++++++++++++++ pages/my-order/myOrderList/myOrderList.vue | 760 ++++++++++++++++++ .../myServiceOrderDetail.vue | 616 ++++++++++++++ .../my-order/researchOrder/researchOrder.vue | 77 ++ .../order/product-waitpay/product-waitpay.vue | 8 +- pages/order/serviceWaitPay/serviceWaitPay.vue | 4 +- .../order/singleGoodOrder/singleGoodOrder.vue | 6 +- .../singleServiceWait/singleServiceWait.vue | 44 +- .../ProductDetails/ProductDetails.vue | 8 +- pages/workshop/component/timeSelect.vue | 20 +- 17 files changed, 2219 insertions(+), 67 deletions(-) create mode 100644 pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail.vue create mode 100644 pages/my-order/myOrderList/myOrderList.vue create mode 100644 pages/my-order/myServiceOrderDetail/myServiceOrderDetail.vue create mode 100644 pages/my-order/researchOrder/researchOrder.vue diff --git a/common/global.js b/common/global.js index 5f6caf2..7812dec 100644 --- a/common/global.js +++ b/common/global.js @@ -12,12 +12,6 @@ export const stateList = [ msg: '等待卖家发货', tips: '耐心等待工艺品发货~' }, - { - state: '退款中', - img: '', - msg: '退款审核中', - tips: '请君耐心等待退款结果' - }, { state: '已退款', img: 'https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FlPnvgqCp-yituikuan.png', @@ -67,7 +61,7 @@ export const serviceStateList = [ tips: '希望下次能让君满意' }, { - state: '已完成', + state: '交易成功', img: '', msg: '订单完成,感谢您的支持', tips: '感谢您的支持' diff --git a/common/globalFunction.js b/common/globalFunction.js index 954d910..73f6150 100644 --- a/common/globalFunction.js +++ b/common/globalFunction.js @@ -9,4 +9,11 @@ export const dealResult = (res) => { return false } return response.data +} + + + +export const JudgeIsNullity = (val) => { + if (val === null || val === undefined || val === '') return true + return false } \ No newline at end of file diff --git a/pages.json b/pages.json index 554c210..f62dde3 100644 --- a/pages.json +++ b/pages.json @@ -1,5 +1,33 @@ { "pages": [ + { + "path" : "pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/my-order/myServiceOrderDetail/myServiceOrderDetail", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/my-order/myOrderList/myOrderList", + "style" : + { + "navigationBarTitleText" : "" + } + }, + { + "path" : "pages/my-order/researchOrder/researchOrder", + "style" : + { + "navigationBarTitleText" : "" + } + }, { "path" : "pages/home/home", "style" : diff --git a/pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue b/pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue index 169c246..c6d1129 100644 --- a/pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue +++ b/pages/book/photoProductsOrderDetail/photoProductsOrderDetail.vue @@ -250,7 +250,7 @@ content: '支付失败,原因为:' + e.errMsg, showCancel: false }) - console.log('e.errMsg--->',e.errMsg); + // console.log('e.errMsg--->',e.errMsg); }, complete() { uni.redirectTo({ @@ -285,7 +285,7 @@ } } - + @@ -445,7 +445,15 @@ diff --git a/pages/my-order/myOrderList/myOrderList.vue b/pages/my-order/myOrderList/myOrderList.vue new file mode 100644 index 0000000..d5006fb --- /dev/null +++ b/pages/my-order/myOrderList/myOrderList.vue @@ -0,0 +1,760 @@ + + + + + diff --git a/pages/my-order/myServiceOrderDetail/myServiceOrderDetail.vue b/pages/my-order/myServiceOrderDetail/myServiceOrderDetail.vue new file mode 100644 index 0000000..ad92da5 --- /dev/null +++ b/pages/my-order/myServiceOrderDetail/myServiceOrderDetail.vue @@ -0,0 +1,616 @@ + + + + + diff --git a/pages/my-order/researchOrder/researchOrder.vue b/pages/my-order/researchOrder/researchOrder.vue new file mode 100644 index 0000000..228197e --- /dev/null +++ b/pages/my-order/researchOrder/researchOrder.vue @@ -0,0 +1,77 @@ + + + + + diff --git a/pages/order/product-waitpay/product-waitpay.vue b/pages/order/product-waitpay/product-waitpay.vue index b74001f..e22d0fd 100644 --- a/pages/order/product-waitpay/product-waitpay.vue +++ b/pages/order/product-waitpay/product-waitpay.vue @@ -411,17 +411,13 @@ const wxPay = async( oid )=> { //传入订单id showCancel: false }) uni.redirectTo({ - url: '/pages/order/product-paysuccess/product-paysuccess?oid=' + JSON.stringify(oid) + url: '/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail?id=' + oid }) console.log('支付成功res--->',res); }, fail(e) { - // uni.showModal({ - // content: '支付失败,原因为:' + e.errMsg, - // showCancel: false - // }) uni.redirectTo({ - url: '/pages/order/product-paysuccess/product-paysuccess?oid=' + JSON.stringify(oid) + url: '/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail?id=' + oid }) console.log('e.errMsg--->',e.errMsg); } diff --git a/pages/order/serviceWaitPay/serviceWaitPay.vue b/pages/order/serviceWaitPay/serviceWaitPay.vue index 5567bf3..a97a752 100644 --- a/pages/order/serviceWaitPay/serviceWaitPay.vue +++ b/pages/order/serviceWaitPay/serviceWaitPay.vue @@ -395,13 +395,13 @@ showCancel: false }) uni.redirectTo({ - url: '/pages/order/service-paystatus/service-paystatus?oid=' + JSON.stringify(oid) + url: '/pages/my-order/myServiceOrderDetail/myServiceOrderDetail?id=' + oid }) console.log('支付成功res--->',res); }, fail(e) { uni.redirectTo({ - url: '/pages/order/service-paystatus/service-paystatus?oid=' + JSON.stringify(oid) + url: '/pages/my-order/myServiceOrderDetail/myServiceOrderDetail?id=' + oid }) console.log('e.errMsg--->',e.errMsg); } diff --git a/pages/order/singleGoodOrder/singleGoodOrder.vue b/pages/order/singleGoodOrder/singleGoodOrder.vue index 1256859..4aab560 100644 --- a/pages/order/singleGoodOrder/singleGoodOrder.vue +++ b/pages/order/singleGoodOrder/singleGoodOrder.vue @@ -515,17 +515,17 @@ const wxPay = async ( oid )=> { //传入订单id showCancel: false }) uni.redirectTo({ - url: '/pages/order/product-paysuccess/product-paysuccess?oid=' + JSON.stringify(oid) + url: '/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail?id=' + oid }) console.log('支付成功res--->',res); }, fail(e) { uni.showModal({ - content: '支付失败,原因为:' + e.errMsg, + content: '支付失败', showCancel: false }) uni.redirectTo({ - url: '/pages/order/product-paysuccess/product-paysuccess?oid=' + JSON.stringify(oid) + url: '/pages/my-order/myGeneralOrderDetail/myGeneralOrderDetail?id=' + oid }) console.log('e.errMsg--->',e.errMsg); } diff --git a/pages/order/singleServiceWait/singleServiceWait.vue b/pages/order/singleServiceWait/singleServiceWait.vue index 6ac783f..b7c51fa 100644 --- a/pages/order/singleServiceWait/singleServiceWait.vue +++ b/pages/order/singleServiceWait/singleServiceWait.vue @@ -7,7 +7,7 @@ class="shrink-0 image" src="https://carbon2.obs.cn-north-4.myhuaweicloud.com:443/feiyi%2Ftest%2F0%2FXymRmdOc-lianxiren.png" /> - {{ contactRealInfo.name }} {{ contactRealInfo.phone }} + {{ contactRealInfo.name }} {{ contactRealInfo.phone }} {{ item.cartExperienceGoodVO }} --> 【 服务类 】 {{singleService.name}} - 已选时间:{{ bookDate }}星期二 + 已选时间:{{ bookDate }} {{ getWeekday(bookDate) }} {{ timeSlot }} @@ -104,10 +104,9 @@ - 订单备注 - - 备注建议提前协商(250字以内) - + 订单备注 + @@ -148,6 +147,7 @@ import contactsComponentVue from '../component/contactsComponent.vue'; //联系人弹窗\ import contactPopVue from '../../mine/component/contactPop.vue'; //新增联系人弹窗 import couponPopupVue from '../../coupon/component/couponPopup.vue'; +import { dealResult } from '../../../common/globalFunction'; const sumprice = ref(0) //总价格 const popup = ref(null) //弹窗对象 const contactRealInfo = ref({ @@ -306,10 +306,13 @@ orderItemMainInfoAddRequestList: toRaw(postCartArr.value) } }) - console.log('后台返回订单响应==>',resOrder.data); - if(resOrder.data.code === 1) { - wxPay(resOrder.data.data) + if (!dealResult(resOrder)) { + hideLoading() + isShow.value = false + return } + console.log('后台返回订单响应==>',resOrder.data); + wxPay(resOrder.data.data) } //减少当前商品数量 @@ -369,13 +372,13 @@ showCancel: false }) uni.redirectTo({ - url: '/pages/order/service-paystatus/service-paystatus?oid=' + JSON.stringify(oid) + url: '/pages/my-order/myServiceOrderDetail/myServiceOrderDetail?id=' + oid }) console.log('支付成功res--->',res); }, fail(e) { uni.redirectTo({ - url: '/pages/order/service-paystatus/service-paystatus?oid=' + JSON.stringify(oid) + url: '/pages/my-order/myServiceOrderDetail/myServiceOrderDetail?id=' + oid }) console.log('e.errMsg--->',e.errMsg); } @@ -481,6 +484,13 @@ console.log('============================>', myCouponList.value) } + + function getWeekday(dateStr) { + const date = new Date(dateStr); + const weekdays = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; + return weekdays[date.getDay()]; + } +