From 10c8105d297f4cf1c93e3f55326717f3d75fb3cb Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Wed, 13 Nov 2024 00:14:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service-uniapp-client/.env | 2 +- service-uniapp-client/mixins/order.js | 25 ++++++-- service-uniapp-client/pages/index/index.vue | 9 +-- service-uniapp-client/pages/index/order.vue | 2 +- service-uniapp-client/pages/index/technician.vue | 9 ++- service-uniapp-client/pages/mine/distribution.vue | 11 +++- service-uniapp-client/pages/mine/settled.vue | 2 +- service-uniapp-client/pages/mine/wallet.vue | 4 +- service-uniapp-client/pages/mine/withdraw.vue | 2 +- service-uniapp-client/pages/order/payOrder.vue | 14 +++-- service-uniapp-client/plugins/utils.js | 2 +- service-uniapp-technician/.env | 2 +- service-uniapp-technician/pages/login/mobile.vue | 5 +- service-uniapp-technician/pages/mine/settled.vue | 2 +- service-uniapp-technician/pages/mine/wallet.vue | 66 +++++++++++++++++----- service-uniapp-technician/plugins/api.js | 2 + service-uniapp-technician/static/icons/icon7.png | Bin 1295 -> 2120 bytes 17 files changed, 114 insertions(+), 45 deletions(-) diff --git a/service-uniapp-client/.env b/service-uniapp-client/.env index 5f0ca83..d15cf29 100644 --- a/service-uniapp-client/.env +++ b/service-uniapp-client/.env @@ -1,7 +1,7 @@ # 开发环境 -#VITE_GLOB_API=http://h5.xzaiyp.top/massage-api +#VITE_GLOB_API=http://h5.xzaiyp.top/massage-api-three #VITE_REDIRECT_URI=http://tairoudj.natapp1.cc # 生产环境 diff --git a/service-uniapp-client/mixins/order.js b/service-uniapp-client/mixins/order.js index 5482577..93e6776 100644 --- a/service-uniapp-client/mixins/order.js +++ b/service-uniapp-client/mixins/order.js @@ -1,4 +1,5 @@ import { showConfirmDialog } from 'vant'; +import { showDialog } from 'vant'; export default { @@ -39,17 +40,33 @@ export default { //立即支付 toPayOrder(item) { - this.$api('immediatelyPay', { + + let data = { addressId: item.addressId, - couponId: item.couponId, orderId: item.id, payType: item.payType, remark: item.remark, serviceTime: item.serviceTime - }, res => { + } + + // if(item.couponId){ + // data.couponId = couponId + // } + + this.$api('immediatelyPay', data, res => { if (res.code == 200) { - this.$wxPay(res, this.getOrderList, this.getOrderList) + if (item.payType == 1) { //余额支付 + showDialog({ + title: '支付成功', + message: '订单支付成功!请前往订单查看', + }).then(() => { + this.active = 2 + }); + }else{ + this.$wxPay(res, this.getOrderList, this.getOrderList) + } } + this.getOrderList() }) }, } diff --git a/service-uniapp-client/pages/index/index.vue b/service-uniapp-client/pages/index/index.vue index a8f3c7a..d09cd6b 100644 --- a/service-uniapp-client/pages/index/index.vue +++ b/service-uniapp-client/pages/index/index.vue @@ -43,7 +43,7 @@ --> - + - - 复制token - + diff --git a/service-uniapp-client/pages/index/order.vue b/service-uniapp-client/pages/index/order.vue index bca04d4..e2bf003 100644 --- a/service-uniapp-client/pages/index/order.vue +++ b/service-uniapp-client/pages/index/order.vue @@ -66,7 +66,7 @@ 再来一单 - + 立即评价 diff --git a/service-uniapp-client/pages/index/technician.vue b/service-uniapp-client/pages/index/technician.vue index 4e4331a..c030282 100644 --- a/service-uniapp-client/pages/index/technician.vue +++ b/service-uniapp-client/pages/index/technician.vue @@ -14,7 +14,7 @@ - + @@ -63,8 +63,8 @@ } }, onShow() { - this.getTechnicianList() this.initUserArea() + this.getTechnicianList() }, methods: { //list列表滑动到底部自动新增数据列表 @@ -102,8 +102,12 @@ this.area = area; this.showAeraPro = false; + this.queryParams.county = area + //更新所在地区 this.updateSessionPositon(area) + + this.getTechnicianList() }, //显示选择地区 @@ -124,6 +128,7 @@ if(!sessionStorage.getItem('position')) return this.getLocation() //获取(详细地址,包括省市区) let positionInfo = JSON.parse(sessionStorage.getItem('position')) this.area = positionInfo.addressDetail.district + this.queryParams.county = this.area }, //计算距离 diff --git a/service-uniapp-client/pages/mine/distribution.vue b/service-uniapp-client/pages/mine/distribution.vue index 98b454d..08f050a 100644 --- a/service-uniapp-client/pages/mine/distribution.vue +++ b/service-uniapp-client/pages/mine/distribution.vue @@ -21,8 +21,8 @@ 粉丝 - - 提现 + + 提现 二维码 @@ -87,6 +87,13 @@ this.$api('getUserInfo', {}, res => { if (res.code == 200) { this.userInfo = res.result; + if(this.userInfo.isDai == 'Y'){ + this.tabs = [ + { title : '费用明细' }, + { title : '提现记录' }, + { title : '收益记录' } + ] + } } }) }, diff --git a/service-uniapp-client/pages/mine/settled.vue b/service-uniapp-client/pages/mine/settled.vue index ce6e3f4..c036a8f 100644 --- a/service-uniapp-client/pages/mine/settled.vue +++ b/service-uniapp-client/pages/mine/settled.vue @@ -142,7 +142,7 @@ }else if(phone.trim() == ''){ return { title : '请填写手机号' , auth : false } }else if(phone){ - if(!/^1(3|4[0-9]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9\d)\d{8}$/.test(phone)){ + if(!/^1\d{10}$/.test(phone)){ return { title : '手机号格式不合法' , auth : false } } }else if(age){ diff --git a/service-uniapp-client/pages/mine/wallet.vue b/service-uniapp-client/pages/mine/wallet.vue index f1dbd29..394c549 100644 --- a/service-uniapp-client/pages/mine/wallet.vue +++ b/service-uniapp-client/pages/mine/wallet.vue @@ -12,9 +12,9 @@ 充值记录 - 提现记录 + 提现记录 下单记录 - 佣金记录 + 佣金记录 diff --git a/service-uniapp-client/pages/mine/withdraw.vue b/service-uniapp-client/pages/mine/withdraw.vue index 2bfa7d9..7e12351 100644 --- a/service-uniapp-client/pages/mine/withdraw.vue +++ b/service-uniapp-client/pages/mine/withdraw.vue @@ -75,7 +75,7 @@ uni.navigateTo({ url: '/pages/mine/distribution' }) - }, + }, getConfig() { //获取配置信息 this.$api('getConfig', {}, res => { if (res.code == 200) { diff --git a/service-uniapp-client/pages/order/payOrder.vue b/service-uniapp-client/pages/order/payOrder.vue index 3595407..68b97d1 100644 --- a/service-uniapp-client/pages/order/payOrder.vue +++ b/service-uniapp-client/pages/order/payOrder.vue @@ -373,7 +373,7 @@ this.$wxPay(res,this.paySusscess,this.paySusscess) } }else{ //不管订单是否支付成功,直接跳订单页面 - this.paySusscess() + this.paySusscess(1) } }) }, @@ -409,7 +409,7 @@ this.count = this.price - item.money }, - //显示选择地址弹框 + //选择地址 selectAddress(item) { if(!item.latitude && !item.longitude){ //判断地址信息有没有经纬度信息,避免出现距离计算出现问题 this.selectAddressPopupShow = false @@ -454,8 +454,10 @@ // this.initPrice() // } // }) - if(this.$route.query.setKmOpen=='Y'){ //是否打开了假距离 - this.distance = this.$route.query.distance + + + if(this.technicianDetail.setKmOpen=='Y'){ //是否打开了假距离 + this.distance = this.technicianDetail.setKm }else{ this.distance = Position.calculateDistance(this.address.latitude, this.address.longitude, this.technicianDetail.latitude, this.technicianDetail.longitude) } @@ -475,9 +477,9 @@ }, //支付成功(跳转订单) - paySusscess(){ + paySusscess(index = 2){ uni.reLaunch({ - url: '/pages/index/order?active=2' + url: '/pages/index/order?active=' + index }) }, diff --git a/service-uniapp-client/plugins/utils.js b/service-uniapp-client/plugins/utils.js index 64861ad..4981949 100644 --- a/service-uniapp-client/plugins/utils.js +++ b/service-uniapp-client/plugins/utils.js @@ -57,7 +57,7 @@ function verificationAll(data){ //验证手机号是否合法 function verificationPhone(phone){ - if(!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(phone)){ + if(!/^1\d{10}$/.test(phone)){ return false } return true diff --git a/service-uniapp-technician/.env b/service-uniapp-technician/.env index e234708..3aa08b3 100644 --- a/service-uniapp-technician/.env +++ b/service-uniapp-technician/.env @@ -1,7 +1,7 @@ # 开发环境 -#VITE_GLOB_API=http://h5.xzaiyp.top/massage-api +#VITE_GLOB_API=http://h5.xzaiyp.top/massage-api-three VITE_REDIRECT_URI=http://tairoudj.natapp1.cc diff --git a/service-uniapp-technician/pages/login/mobile.vue b/service-uniapp-technician/pages/login/mobile.vue index f22d52c..8ecc731 100644 --- a/service-uniapp-technician/pages/login/mobile.vue +++ b/service-uniapp-technician/pages/login/mobile.vue @@ -138,7 +138,8 @@ } .input-m{ - width: 96rpx; + width: 146rpx; + // width: 96rpx; height: 136rpx; background: #f8f8f8; border-radius: 16rpx; @@ -153,8 +154,6 @@ } .input-m.active{ - width: 90rpx; - height: 130rpx; border: 3rpx solid $uni-color; } diff --git a/service-uniapp-technician/pages/mine/settled.vue b/service-uniapp-technician/pages/mine/settled.vue index ea4d4ad..0cb2506 100644 --- a/service-uniapp-technician/pages/mine/settled.vue +++ b/service-uniapp-technician/pages/mine/settled.vue @@ -143,7 +143,7 @@ }else if(phone.trim() == ''){ return { title : '请填写手机号' , auth : false } }else if(phone){ - if(!/^1(3|4[0-9]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9\d)\d{8}$/.test(phone)){ + if(!/^1\d{10}$/.test(phone)){ return { title : '手机号格式不合法' , auth : false } } }else if(age){ diff --git a/service-uniapp-technician/pages/mine/wallet.vue b/service-uniapp-technician/pages/mine/wallet.vue index 64b5592..1bf29b5 100644 --- a/service-uniapp-technician/pages/mine/wallet.vue +++ b/service-uniapp-technician/pages/mine/wallet.vue @@ -4,7 +4,7 @@