From d35d73df910856ef2c7d552f7bd0980cbc07327a Mon Sep 17 00:00:00 2001 From: "Mr.jiang" <714156421@qq.com> Date: Tue, 2 Jul 2024 20:57:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=20=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=8D=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my/address/address.vue | 4 + my/hongbao/youhuijuan.vue | 163 +++++++++++++++++++-------------- my/hongbao/youhuijuanList.vue | 123 ++++++++++++++----------- my/order/pay.vue | 18 ++-- my/order/payModifyJsDetail.vue | 82 ++++++++--------- my/order/payding.vue | 62 +++++++++++-- my/order/paydingTCX.vue | 57 ++++++++++-- my/vip/index.vue | 20 ++-- pages/index/index.vue | 6 +- pages/my/fuwuDateil.vue | 31 +++++-- pages/my/fuwuxiangm.vue | 2 +- pages/order/index.vue | 14 +-- 12 files changed, 367 insertions(+), 215 deletions(-) diff --git a/my/address/address.vue b/my/address/address.vue index 56d1c22..83a28a6 100644 --- a/my/address/address.vue +++ b/my/address/address.vue @@ -110,6 +110,10 @@ uni.reLaunch({ url:'/my/order/payModifyTcMy' }) + }else if (this.isfa == 6) { + uni.reLaunch({ + url:'/my/order/payModifyJsDetail' + }) } }, diff --git a/my/hongbao/youhuijuan.vue b/my/hongbao/youhuijuan.vue index 5900866..1cd88f0 100644 --- a/my/hongbao/youhuijuan.vue +++ b/my/hongbao/youhuijuan.vue @@ -7,76 +7,84 @@ - - - - - - {{item.money}} - + + + + diff --git a/my/order/pay.vue b/my/order/pay.vue index 0a2d784..d61089a 100644 --- a/my/order/pay.vue +++ b/my/order/pay.vue @@ -10,13 +10,13 @@ 服务项目 - - {{order.ordersMassageList[0].massageType.title}} + {{order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.title:order.ordersMassageList[0].userPackageDetail.title}} 待支付 @@ -35,14 +35,14 @@ - {{order.ordersMassageList[0].massageType.duration}}分钟 + {{order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.duration:order.ordersMassageList[0].userPackageDetail.duration}}分钟 - {{order.massagePrice}} + {{order.price}} @@ -142,15 +142,15 @@ 项目名称 - {{order.ordersMassageList[0].massageType.title}} + {{order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.title:order.ordersMassageList[0].userPackageDetail.title}} 服务时长 - {{order.ordersMassageList[0].massageType.duration}}分钟 + {{order.ordersMassageList[0].massageType?order.ordersMassageList[0].massageType.duration:order.ordersMassageList[0].userPackageDetail.duration}}分钟 项目价格 - ¥{{order.massagePrice}} + ¥{{order.price}} 会员折扣 @@ -162,7 +162,7 @@ - ¥{{order.massageMoney}} + ¥{{order.price}} @@ -204,7 +204,7 @@ 订单费用: {{order.massageMoney}} + style="font-size: 26rpx;font-weight: bold;">{{order.price}} 出行费用: diff --git a/my/order/payModifyJsDetail.vue b/my/order/payModifyJsDetail.vue index 27062f6..1873371 100644 --- a/my/order/payModifyJsDetail.vue +++ b/my/order/payModifyJsDetail.vue @@ -68,7 +68,7 @@ - + 技师 {{jishiName.technicianTypeName}} @@ -76,7 +76,6 @@ {{jishiName.artificerName}} 选择不同技师价格可能不一样哦~ - @@ -313,7 +312,7 @@ let fullDate = `${month}-${days}` let Time = year + '-' + fullDate this.yearsDate = Time; - + this.orderXm=this.$queue.getData('mainData'); this.jishiName=this.$queue.getData('getJishi'); if(this.jishiName){ this.getMsTime(Time); @@ -369,6 +368,42 @@ // #endif }, methods: { + goOrder() {//生成orderId + let that = this + let data = { + address:that.province+that.city+that.district+that.detailaddress, + artificerId:that.jishiName.artificerId, + userPackageDetailId:that.userPackageDetailId, + phone:that.mobile, + userName:that.name, + tripWay:that.jishiName.tripWay, + city:that.city, + couponId: that.couponId, + userId: uni.getStorageSync('userId'), + longitude:that.longitude, + latitude:that.latitude, + serveTime:that.startTime, + remark:that.textareaData, + ordersMassageList:[ + {massageId: that.userPackageDetailId? that.userPackageDetailId:that.orderXm.massageTypeId,num: that.number}, + ] + } + that.$Request.postJson("/app/artificer/insertOrders", data).then(res => { + that.showorder = false + if (res.code == 0) { + that.ordersId = res.data.ordersId; + that.tpayMoney = res.data.payMoney; + // that.showpay = true; + that.paySel = 1; + uni.navigateTo({ + url:'/my/order/payding?ordersId='+ res.data.ordersId + }) + } else { + that.$queue.showToast(res.msg) + } + + }); + }, changeValue(value){ this.number=value }, @@ -418,7 +453,7 @@ }, youhuijuan(){ uni.navigateTo({ - url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'支付' + url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'技师支付' }) }, openpay() {//验证 @@ -559,7 +594,7 @@ }); } else { uni.navigateTo({ - url: '../address/address?id=' + 2 + url: '../address/address?id=' + 6 }) } @@ -644,42 +679,7 @@ } }); }, - goOrder() {//生成orderId - let that = this - let data = { - address:that.province+that.city+that.district+that.detailaddress, - artificerId:that.jishiName.artificerId, - userPackageDetailId:that.userPackageDetailId, - phone:that.mobile, - userName:that.name, - tripWay:that.jishiName.tripWay, - city:that.city, - couponId: that.couponId, - userId: uni.getStorageSync('userId'), - longitude:that.longitude, - latitude:that.latitude, - serveTime:that.startTime, - remark:that.textareaData, - ordersMassageList:[ - {massageId: that.userPackageDetailId? that.userPackageDetailId:that.ordersId,num: that.number}, - ] - } - that.$Request.postJson("/app/artificer/insertOrders", data).then(res => { - that.showorder = false - if (res.code == 0) { - that.ordersId = res.data.ordersId; - that.tpayMoney = res.data.payMoney; - // that.showpay = true; - that.paySel = 1; - uni.navigateTo({ - url:'/my/order/payding?ordersId='+ res.data.ordersId - }) - } else { - that.$queue.showToast(res.msg) - } - - }); - }, + payJZ() { let that = this; if (that.openWay == 1) { //零钱支付 diff --git a/my/order/payding.vue b/my/order/payding.vue index 7448b89..1d56b45 100644 --- a/my/order/payding.vue +++ b/my/order/payding.vue @@ -162,7 +162,7 @@ 小计: {{order.massageMoney}} + style="font-size: 35rpx;font-weight: bold;">{{order.massagePrice}} 出行费用 @@ -233,7 +233,7 @@ 订单费用: {{order.massageMoney}} + style="font-size: 26rpx;font-weight: bold;">{{order.massagePrice}} 出行费用: @@ -873,6 +873,9 @@ title: '支付成功', icon: 'none' }) + uni.switchTab({ + url:'/pages/order/index' + }) that.getOrder() } else { @@ -913,9 +916,9 @@ that.getOrder() // this.$queue.showToast('支付成功'); - // uni.switchTab({ - // url: '/pages/my/index' - // }) + uni.switchTab({ + url: '/pages/my/index' + }) }, fail: function(err) { // this.$queue.showToast('支付失败'); @@ -940,6 +943,9 @@ that.$Request.post('/app/wxPay/payOrder', data).then(rea => { that.showpay = false if (rea.code == 0) { + uni.switchTab({ + url:'/pages/order/index' + }) that.callPay(rea.data); } else { uni.showToast({ @@ -960,7 +966,10 @@ const hostUrl = urlArr.split("/"); const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const url = '&redirect_url=' + callBack + 'my/order/pay'; - window.location = rea.data.mweb_url + url + window.location = rea.data.mweb_url + url; + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: rea.msg, @@ -981,6 +990,9 @@ console.log(rea) that.showpay = false if (rea.code == 0) { + uni.switchTab({ + url:'/pages/order/index' + }) that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); } }); @@ -998,6 +1010,9 @@ div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) document.forms[0].submit() + uni.switchTab({ + url:'/pages/order/index' + }) }); // #endif @@ -1009,6 +1024,9 @@ that.$Request.post('/app/aliPay/payOrder', data).then( rea => { that.showpay = false + uni.switchTab({ + url:'/pages/order/index' + }) that.setPayment('alipay', rea.data); }); // #endif @@ -1155,6 +1173,9 @@ uni.showToast({ title: '支付成功' }) + uni.switchTab({ + url:'/pages/order/index' + }) that.getOrder() } else { uni.showToast({ @@ -1197,9 +1218,9 @@ that.getOrder() // this.$queue.showToast('支付成功'); - // uni.switchTab({ - // url: '/pages/my/index' - // }) + uni.switchTab({ + url:'/pages/order/index' + }) }, fail: function(err) { // this.$queue.showToast('支付失败'); @@ -1225,6 +1246,9 @@ that.showpay = false if (rea.code == 0) { that.callPay(rea.data); + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: rea.msg, @@ -1251,6 +1275,9 @@ const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const url = '&redirect_url=' + callBack + 'my/order/pay'; window.location = rea.data.mweb_url + url + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: rea.msg, @@ -1271,7 +1298,11 @@ console.log(rea) that.showpay = false if (rea.code == 0) { + that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); + uni.switchTab({ + url:'/pages/order/index' + }) } }); // #endif @@ -1288,6 +1319,9 @@ div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) document.forms[0].submit() + uni.switchTab({ + url:'/pages/order/index' + }) }); // #endif @@ -1299,6 +1333,9 @@ that.$Request.post('/app/aliPay/payOrder', data).then( rea => { that.setPayment('alipay', rea.data); + uni.switchTab({ + url:'/pages/order/index' + }) }); // #endif } @@ -1400,6 +1437,9 @@ uni.hideLoading(); if (res.code == 0) { that.getOrder() + uni.switchTab({ + url:'/pages/order/index' + }) } else { that.$queue.showToast(res.msg); } @@ -1425,7 +1465,9 @@ that.$Request.post('/app/artificer/accomplishOrders', data).then(res => { uni.hideLoading(); if (res.code == 0) { - uni.navigateBack() + uni.switchTab({ + url:'/pages/order/index' + }) } else { that.$queue.showToast(res.msg); } diff --git a/my/order/paydingTCX.vue b/my/order/paydingTCX.vue index 9a248a4..d3720bf 100644 --- a/my/order/paydingTCX.vue +++ b/my/order/paydingTCX.vue @@ -794,7 +794,9 @@ icon: 'none' }) that.getOrder() - + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: ret.msg, @@ -834,9 +836,9 @@ that.getOrder() // this.$queue.showToast('支付成功'); - // uni.switchTab({ - // url: '/pages/my/index' - // }) + uni.switchTab({ + url:'/pages/order/index' + }) }, fail: function(err) { // this.$queue.showToast('支付失败'); @@ -863,6 +865,9 @@ that.showpay = false if (rea.code == 0) { that.callPay(rea.data); + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: rea.msg, @@ -884,6 +889,9 @@ const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const url = '&redirect_url=' + callBack + 'my/order/pay'; window.location = rea.data.mweb_url + url + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: rea.msg, @@ -906,6 +914,9 @@ that.showpay = false if (rea.code == 0) { that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); + uni.switchTab({ + url:'/pages/order/index' + }) } }); // #endif @@ -923,6 +934,9 @@ div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) document.forms[0].submit() + uni.switchTab({ + url:'/pages/order/index' + }) }); // #endif @@ -936,6 +950,9 @@ rea => { that.showpay = false that.setPayment('alipay', rea.data); + uni.switchTab({ + url:'/pages/order/index' + }) }); // #endif } @@ -967,6 +984,9 @@ title: '支付成功' }) that.getOrder() + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: res.msg, @@ -1008,10 +1028,9 @@ }) that.getOrder() // this.$queue.showToast('支付成功'); - - // uni.switchTab({ - // url: '/pages/my/index' - // }) + uni.switchTab({ + url:'/pages/order/index' + }) }, fail: function(err) { // this.$queue.showToast('支付失败'); @@ -1038,6 +1057,9 @@ that.showpay = false if (rea.code == 0) { that.callPay(rea.data); + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: rea.msg, @@ -1065,6 +1087,9 @@ const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const url = '&redirect_url=' + callBack + 'my/order/pay'; window.location = rea.data.mweb_url + url + uni.switchTab({ + url:'/pages/order/index' + }) } else { uni.showToast({ title: rea.msg, @@ -1087,6 +1112,9 @@ that.showpay = false if (rea.code == 0) { that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); + uni.switchTab({ + url:'/pages/order/index' + }) } }); // #endif @@ -1104,6 +1132,9 @@ div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) document.forms[0].submit() + uni.switchTab({ + url:'/pages/order/index' + }) }); // #endif @@ -1116,6 +1147,9 @@ that.$Request.post('/app/aliPay/payOrder', data).then( rea => { that.setPayment('alipay', rea.data); + uni.switchTab({ + url:'/pages/order/index' + }) }); // #endif } @@ -1333,6 +1367,9 @@ uni.hideLoading(); if (res.code == 0) { that.getOrder() + uni.switchTab({ + url:'/pages/order/index' + }) } else { that.$queue.showToast(res.msg); } @@ -1358,7 +1395,9 @@ that.$Request.post('/app/artificer/accomplishOrders', data).then(res => { uni.hideLoading(); if (res.code == 0) { - uni.navigateBack() + uni.switchTab({ + url:'/pages/order/index' + }) } else { that.$queue.showToast(res.msg); } diff --git a/my/vip/index.vue b/my/vip/index.vue index 57b3281..4a7a21f 100644 --- a/my/vip/index.vue +++ b/my/vip/index.vue @@ -162,14 +162,7 @@ this.getMemberList() this.getMoney() this.getIsVip() - this.vipData=this.$queue.getData('isVIP') - console.log("isVIP------------------->",this.vipData) - if(this.vipData=='1'){ - this.vipShow=true; - }else{ - this.vipData=[] - this.vipShow=false - } + }, methods: { select(e) { @@ -185,7 +178,16 @@ getvipEndTime() { this.$Request.get("/app/UserVip/selectUserVip").then(res => { if (res.code == 0) { - var data= res.data.endTime||{} + var data= res.data.endTime||{}; + this.$queue.setData('isVIP',res.data.isVip) + this.vipData=res.data.isVip + console.log("isVIP------------------->",this.vipData) + if(this.vipData=='1'){ + this.vipShow=true; + }else{ + this.vipData=[] + this.vipShow=false + } this.timeVipEnd = data.slice(0,16); this.getVipList(res.data.vipNameType) } diff --git a/pages/index/index.vue b/pages/index/index.vue index 9ef816e..1a1fe35 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -912,7 +912,7 @@ this.$Request.get("/app/massage/package/findPage", { type:'104', page:'1', - limit:'2' + limit:'4' }).then(res => { if (res.code == 0) { if (res.data) { @@ -926,7 +926,7 @@ by: '3', status:'1', page:'1', - limit:'2' + limit:'4' }).then(res => { if (res.code == 0) { if (res.data) { @@ -1255,6 +1255,7 @@ width: 336.81rpx; display: flex; flex-direction: column; + margin-top: 7px; } .tuijian-view{ width: 100%; @@ -1269,6 +1270,7 @@ display: flex; flex-direction: row; justify-content: space-between; + flex-wrap: wrap; align-items: center; margin-top: 15px; } diff --git a/pages/my/fuwuDateil.vue b/pages/my/fuwuDateil.vue index 7ce8e32..5b3d064 100644 --- a/pages/my/fuwuDateil.vue +++ b/pages/my/fuwuDateil.vue @@ -1,7 +1,7 @@