From ba8680b39200c8c4f5c37bd1c5cd7f017331439b Mon Sep 17 00:00:00 2001 From: woody Date: Tue, 5 Aug 2025 10:47:24 +0800 Subject: [PATCH] =?UTF-8?q?feat(pickArea):=20=E6=8F=90=E8=B4=A7=E4=B8=93?= =?UTF-8?q?=E5=8C=BA=E6=94=BE=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pay-modal/index.vue | 68 +++++ pages/mine/index.vue | 7 + pages/pickupArea/pickupArea.vue | 452 +++++++++++++++++--------------- pages/pickupList/index.vue | 168 ++++++------ pages/thOrder/index.vue | 315 +++++++++++----------- 5 files changed, 563 insertions(+), 447 deletions(-) create mode 100644 components/pay-modal/index.vue diff --git a/components/pay-modal/index.vue b/components/pay-modal/index.vue new file mode 100644 index 0000000..de48abf --- /dev/null +++ b/components/pay-modal/index.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/pages/mine/index.vue b/pages/mine/index.vue index d5a8b56..45a3599 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -277,6 +277,13 @@ export default { menuKey: 'wallet', ifshow: false, }, + { + url: '/pages/pickupArea/pickupArea', + name: '提货专区', + imgurl: '../../static/images/my_icon3.png', + menuKey: 'pickGoods', + ifshow: true, + }, { url: '/pages/bonus/index', name: '奖金明细', diff --git a/pages/pickupArea/pickupArea.vue b/pages/pickupArea/pickupArea.vue index 9b9fdc8..4c6cfb1 100644 --- a/pages/pickupArea/pickupArea.vue +++ b/pages/pickupArea/pickupArea.vue @@ -1,223 +1,245 @@ diff --git a/pages/pickupList/index.vue b/pages/pickupList/index.vue index bb270e7..77c1096 100644 --- a/pages/pickupList/index.vue +++ b/pages/pickupList/index.vue @@ -1,95 +1,93 @@ diff --git a/pages/thOrder/index.vue b/pages/thOrder/index.vue index 650a978..b86e7ce 100644 --- a/pages/thOrder/index.vue +++ b/pages/thOrder/index.vue @@ -1,22 +1,28 @@ - @@ -217,14 +236,15 @@ export default { }, { validator: (rule, value, callback) => { - return this.$u.test.mobile(value); + return this.$u.test.mobile(value) }, - message: "手机号格式不正确", - trigger: ["blur"], + message: '手机号格式不正确', + trigger: ['blur'], }, ], }, allData: [], + orderCode: '', } }, onLoad(option) { @@ -251,20 +271,19 @@ export default { quantity: allData[2].split('#')[0], pkId: allData[1].split('&')[0], }) - .then((res) => { + .then(res => { if (res.code == '200') { this.allData = res.data.detailList } }) }, getGenerate() { - api.generate().then((res) => { + api.generate().then(res => { uni.setStorageSync('mToken', res.msg) }) }, paySubmit() { - this.$refs.uForm.validate().then((res) => { - // this.pswShow = true + this.$refs.uForm.validate().then(res => { let allData = decodeURIComponent(window.location.href).split('=') let obj = { quantity: allData[2].split('#')[0], @@ -277,24 +296,20 @@ export default { recAddress: this.addressForm.recAddress, remark: this.addressForm.remark, } - api.payPickOrder(obj).then((res) => { + // this.pswShow = true + api.payPickOrder(obj).then(res => { if (res.code == 200) { // this.scanPayBfWx(8) - this.pswShow = false - let paramsPost = { orderCode: res.data, specialArea: 8 } - uni.navigateTo({ - url: - '/pages/pay/index?paramsPost=' + - JSON.stringify(paramsPost) + - '&businessType=1', - }) + + this.orderCode = res.data + this.pswShow = true // this.paramsPost = { orderCode: res.data, specialArea: 8 } } }) }) }, reset() { - this.$store.dispatch('GetInfo').then((res) => { + this.$store.dispatch('GetInfo').then(res => { uni.reLaunch({ url: '/pages/index/index', }) @@ -311,7 +326,7 @@ export default { this.wxPopup = false this.showSucce = true } else { - api.payStatus(data).then((res) => { + api.payStatus(data).then(res => { that.sucPay = res.data }) } @@ -329,7 +344,7 @@ export default { payChannel: val, payType: 2, } - api.unifiedorder(params).then((res) => { + api.unifiedorder(params).then(res => { this.wxPopup = true this.$nextTick(() => { new QRCode( @@ -350,7 +365,7 @@ export default { this.checkPayStatus(params) }, getPostAge(data) { - apis.pickPostAge(data).then((res) => { + apis.pickPostAge(data).then(res => { this.postage = res.data // this.totalAmont = // parseFloat(this.allGoodsData.priceAmount) + @@ -362,37 +377,43 @@ export default { .checkPwd({ pwd: this.password, }) - .then((res) => { + .then(res => { if (res.code == 200) { let allData = decodeURIComponent(window.location.href).split('=') let obj = { - quantity: allData[2].split('#')[0], - pkId: allData[1].split('&')[0], - recName: this.addressForm.recName, - recPhone: this.addressForm.recPhone, - recProvince: this.addressForm.recProvince, - recCity: this.addressForm.recCity, - recCounty: this.addressForm.recCounty, - recAddress: this.addressForm.recAddress, - remark: this.addressForm.remark, + orderCode: this.orderCode, + specialArea: 8, + payPwd: this.password, + pkSettleCountry: this.pkCountry || 1, + pkCountry: this.pkCountry || 1, } api - .payPickOrder(obj) - .then((res) => { + .payOthOrder(obj) + .then(res => { if (res.code == 200) { - // this.scanPayBfWx(8) this.pswShow = false - let paramsPost = { orderCode: res.data, specialArea: 8 } - uni.navigateTo({ - url: - '/pages/pay/index?paramsPost=' + - JSON.stringify(paramsPost) + - '&businessType=1', + uni.showToast({ + title: '提货成功', + icon: 'none', }) + setTimeout(() => { + uni.reLaunch({ + url: '/pages/mine/order/index', + }) + }, 500) + // this.scanPayBfWx(8) + // this.pswShow = false + // let paramsPost = { orderCode: res.data, specialArea: 8 } + // uni.navigateTo({ + // url: + // '/pages/pay/index?paramsPost=' + + // JSON.stringify(paramsPost) + + // '&businessType=1', + // }) // this.paramsPost = { orderCode: res.data, specialArea: 8 } } }) - .catch((err) => { + .catch(err => { this.isLoading.close() }) } @@ -480,10 +501,10 @@ export default { padding: 0 30rpx; // width: 750rpx; margin: 0 20rpx; - .goods-infot{ + .goods-infot { display: flex; } - .goods_infob{ + .goods_infob { padding: 10rpx 0; } .cover { @@ -511,7 +532,7 @@ export default { } .height-auto { height: 94rpx; - background: #005BAC; + background: #005bac; line-height: 94rpx; padding: 0 25rpx; display: flex; @@ -611,7 +632,7 @@ page { background-color: #fff; } .btn { - background-color: #005BAC; + background-color: #005bac; border: none; height: 92rpx; line-height: 92rpx; @@ -619,4 +640,4 @@ page { margin: 100rpx auto auto auto; width: 690rpx; } - \ No newline at end of file +