diff --git a/my/address/address.vue b/my/address/address.vue index 69f3d4a..08ca651 100644 --- a/my/address/address.vue +++ b/my/address/address.vue @@ -114,9 +114,9 @@ uni.reLaunch({ url:'/my/order/payModifyJsDetail' }) - }else if (this.isfa == 7) {//待补单 + }else if (this.isfa == 5) {//项目待补单 uni.reLaunch({ - url:'/my/order/payModifyTcMyDaiB' + url:'/my/order/payModifyDd' }) } diff --git a/my/order/pay.vue b/my/order/pay.vue index f48fae1..28331a6 100644 --- a/my/order/pay.vue +++ b/my/order/pay.vue @@ -362,15 +362,15 @@ 取消订单 - 修改订单 - - --> + 立即支付 充值 @@ -521,7 +521,7 @@ 立即预约 @@ -630,6 +630,31 @@ 确认支付 + + + + + + + + + + {{item.text}} + + + + + + + + 确认支付 + 确认支付 + + @@ -690,6 +715,7 @@ export default { data() { return { + showpayL:false, ordersId: '', tpayMoney: '', paySel: 0, @@ -803,7 +829,208 @@ this.openWay = 2; // #endif }, + mounted() { + }, methods: { + zhifu(){//立即支付 + this.showpayL=true + }, + // 套餐 次卡 疗程立即支付订单 + // 支付订单 + payTc() { + let that = this + that.showpayL = false + + if (that.openWay == 1) { //零钱支付 + uni.showModal({ + title: '付款提示', + content: '确认支付' + that.order.taxiMoney + '元吗?', + success: function(re) { + if (re.confirm) { + that.$queue.showLoading('支付中...') + console.log('用户点击确定'); + that.$Request.post("/app/artificer/payOrders", { + ordersId: that.order.ordersId, + userPackageDetailId : that.order.userPackageDetailId + }).then(res => { + uni.hideLoading(); + if (res.code == 0) { + uni.showToast({ + title: '支付成功' + }) + that.getOrder() + that.showpayL = false + } else { + uni.showToast({ + title: res.msg, + icon: 'none' + }) + } + }); + } else if (re.cancel) { + uni.hideLoading(); + console.log('用户点击取消'); + } + } + + }) + } else if (that.openWay == 2) { //微信支付 + that.$queue.showLoading('支付中...') + // #ifdef MP-WEIXIN + let data = { + ordersId: that.order.ordersId, + type: 3, + userPackageDetailId : that.order.userPackageDetailId + } + that.$Request.post('/app/wxPay/payOrder', data).then(ret => { + console.log(ret) + if (ret.code == 0) { + uni.hideLoading(); + uni.requestPayment({ + provider: 'wxpay', + timeStamp: ret.data.timestamp, + nonceStr: ret.data.noncestr, + package: ret.data.package, + signType: ret.data.signType, + paySign: ret.data.sign, + success: function(ret) { + console.log(ret) + uni.showToast({ + title: '支付成功', + icon: 'none' + }) + that.getOrder() + // this.$queue.showToast('支付成功'); + + that.showpayL = false + }, + fail: function(err) { + uni.hideLoading(); + // this.$queue.showToast('支付失败'); + uni.showToast({ + title: '支付失败', + icon: 'nones' + }); + that.getOrder() + } + }); + } + }); + // #endif + + // #ifdef H5 + let ua = navigator.userAgent.toLowerCase(); + if (ua.indexOf('micromessenger') != -1) { + let data = { + ordersId: that.order.ordersId, + type: 2, + userPackageDetailId : that.order.userPackageDetailId + } + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + + if (rea.code == 0) { + uni.hideLoading(); + that.callPay(rea.data); + that.getOrder() + that.showpayL = false + } else { + uni.hideLoading(); + uni.showToast({ + title: rea.msg, + icon: 'none' + }) + } + }); + } else { + let data = { + ordersId: that.order.ordersId, + type: 4, + userPackageDetailId : that.order.userPackageDetailId + } + // debugger; + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + // const urlArr = window.location.href; + // const hostUrl = urlArr.split("/"); + // const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; + // const url = '&redirect_url=' + callBack + 'my/order/pay'; + // window.location = rea.mweb_url + url + that.showpay = false + if (rea.code == 0) { + uni.hideLoading(); + const urlArr = window.location.href; + 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 + that.getOrder() + that.showpayL = false + } else { + uni.hideLoading(); + uni.showToast({ + title: rea.msg, + icon: 'none' + }) + } + }); + } + + // #endif + + // #ifdef APP + let data = { + ordersId: that.order.ordersId, + type: 1, + userPackageDetailId : that.order.userPackageDetailId + } + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + + if (rea.code == 0) { + uni.hideLoading(); + that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); + that.getOrder() + that.showpayL = false + }else{ + uni.hideLoading(); + } + }); + // #endif + } else if (that.openWay == 3) { //支付宝支付 + that.$queue.showLoading('支付中...') + // #ifdef H5 + let data = { + ordersId: that.order.ordersId, + type: 2, + userPackageDetailId : that.order.userPackageDetailId + } + that.$Request.post('/app/aliPay/payOrder', data).then( + rea => { + uni.hideLoading(); + const div = document.createElement('div') + div.innerHTML = rea.data //此处form就是后台返回接收到的数据 + document.body.appendChild(div) + document.forms[0].submit() + that.getOrder() + that.showpayL = false + }); + // #endif + + // #ifdef APP-PLUS + let data = { + ordersId: that.order.ordersId, + type: 1, + userPackageDetailId : that.order.userPackageDetailId + } + that.$Request.post('/app/aliPay/payOrder', data).then( + rea => { + uni.hideLoading(); + that.setPayment('alipay', rea.data); + that.getOrder() + that.showpayL = false + }); + // #endif + } + }, + taocanDaiBd(url,item){ this.$queue.setData('getJishi',''); this.$queue.setData('mainData',item); @@ -811,6 +1038,190 @@ url:url }) }, + // 立即支付订单 + payLj() { + let that = this + that.showpayL = false + if (that.openWay == 1) { //零钱支付 + uni.showModal({ + title: '付款提示', + content: '确认支付' + that.order.payMoney + '元吗?', + success: function(re) { + if (re.confirm) { + that.$queue.showLoading('支付中...') + console.log('用户点击确定'); + that.$Request.post("/app/artificer/payOrders", { + ordersId: that.order.ordersId, + }).then(res => { + uni.hideLoading(); + if (res.code == 0) { + uni.showToast({ + title: '支付成功' + }) + that.showpayL = false + that.getOrder() + // that.showorderS=false; + + } else { + uni.showToast({ + title: res.msg, + icon: 'none' + }) + } + }); + } else if (re.cancel) { + uni.hideLoading(); + console.log('用户点击取消'); + } + } + + }) + } else if (that.openWay == 2) { //微信支付 + that.$queue.showLoading('支付中...') + // #ifdef MP-WEIXIN + let data = { + ordersId: that.order.ordersId, + type: 3 + } + that.$Request.post('/app/wxPay/payOrder', data).then(ret => { + console.log(ret) + if (ret.code == 0) { + uni.hideLoading(); + uni.requestPayment({ + provider: 'wxpay', + timeStamp: ret.data.timestamp, + nonceStr: ret.data.noncestr, + package: ret.data.package, + signType: ret.data.signType, + paySign: ret.data.sign, + success: function(ret) { + console.log(ret) + uni.showToast({ + title: '支付成功', + icon: 'none' + }) + that.getOrder() + console.log(222) + that.showpayL = false + // this.$queue.showToast('支付成功'); + + // uni.switchTab({ + // url: '/pages/my/index' + // }) + }, + fail: function(err) { + // this.$queue.showToast('支付失败'); + uni.showToast({ + title: '支付失败', + icon: 'nones' + }); + that.getOrder() + } + }); + } + }); + // #endif + + // #ifdef H5 + let ua = navigator.userAgent.toLowerCase(); + if (ua.indexOf('micromessenger') != -1) { + let data = { + ordersId: that.order.ordersId, + type: 2 + } + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + + if (rea.code == 0) { + that.callPay(rea.data); + that.showpayL = false + that.getOrder() + } else { + uni.showToast({ + title: rea.msg, + icon: 'none' + }) + } + }); + } else { + let data = { + ordersId: that.order.ordersId, + type: 4 + } + // debugger; + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + // const urlArr = window.location.href; + // const hostUrl = urlArr.split("/"); + // const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; + // const url = '&redirect_url=' + callBack + 'my/order/pay'; + // window.location = rea.mweb_url + url + that.showpay = false + if (rea.code == 0) { + const urlArr = window.location.href; + 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 + that.showpayL = false + that.getOrder() + } else { + uni.showToast({ + title: rea.msg, + icon: 'none' + }) + } + }); + } + + // #endif + + // #ifdef APP + let data = { + ordersId: that.order.ordersId, + type: 1 + } + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + console.log(rea) + + if (rea.code == 0) { + that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); + that.showpayL = false + that.getOrder() + } + }); + // #endif + } else if (that.openWay == 3) { //支付宝支付 + that.$queue.showLoading('支付中...') + // #ifdef H5 + let data = { + ordersId: that.order.ordersId, + type: 2 + } + that.$Request.post('/app/aliPay/payOrder', data).then( + rea => { + const div = document.createElement('div') + div.innerHTML = rea.data //此处form就是后台返回接收到的数据 + document.body.appendChild(div) + document.forms[0].submit() + that.showpayL = false + that.getOrder() + }); + // #endif + + // #ifdef APP-PLUS + let data = { + ordersId: that.order.ordersId, + type: 1 + } + that.$Request.post('/app/aliPay/payOrder', data).then( + rea => { + that.setPayment('alipay', rea.data); + that.showpayL = false + that.getOrder() + }); + // #endif + } + }, + getOrder() { let data = { ordersId: this.ordersId @@ -1216,7 +1627,7 @@ earlyFinishReason: that.earlyFinishReason, } that.$Request.post('/app/artificer/accomplishOrders', data).then(res => { - if (res.code == 0) { + if (res.code == 0||res.code == 200) { uni.showToast({ title:'操作完成!' }) @@ -1631,9 +2042,21 @@ }); }, openpay(item) { - uni.navigateTo({ - url:'/my/order/payModifyDzhifu?ordersId='+item.ordersId - }) + this.$queue.setData('xiangmu',item); + if(item.userPackageDetailId!=null){ + uni.navigateTo({ + url:'/my/order/payModifyTcMy?ordersId='+item.ordersId + }) + }else if(item.userPackageDetailId!=null&&isSupplement=='1'){ + uni.navigateTo({ + url:'/my/order/payModifyDd?ordersId='+item.ordersId + }) + }else{ + uni.navigateTo({ + url:'/my/order/payModify?ordersId='+item.ordersId + }) + } + // this.showpay = true }, diff --git a/my/order/payModify.vue b/my/order/payModify.vue index 1909cf6..b48f95d 100644 --- a/my/order/payModify.vue +++ b/my/order/payModify.vue @@ -416,8 +416,9 @@ this.isTrue = true }, youhuijuan(){ + var moeny=(this.orderXm.price*this.number).toFixed(2) uni.navigateTo({ - url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'支付' + url:'/my/hongbao/youhuijuanList?price='+moeny+'&text='+'支付' }) }, openpay() {//验证 diff --git a/my/order/payModifyCi.vue b/my/order/payModifyCi.vue index 733fe65..113e8b9 100644 --- a/my/order/payModifyCi.vue +++ b/my/order/payModifyCi.vue @@ -364,8 +364,9 @@ this.isTrue = true }, youhuijuan(){ + var moeny=(this.orderXm.price*this.number).toFixed(2) uni.navigateTo({ - url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'次卡' + url:'/my/hongbao/youhuijuanList?price='+moeny+'&text='+'次卡' }) }, openpay() {//验证 diff --git a/my/order/payModifyDd.vue b/my/order/payModifyDd.vue index 3f6a962..d80564c 100644 --- a/my/order/payModifyDd.vue +++ b/my/order/payModifyDd.vue @@ -21,7 +21,7 @@ - {{orderXm.ordersMassageList[0].massageType.duration}}分钟 + {{orderXm.duration}}分钟 @@ -88,7 +88,7 @@ - + - - + --> 服务时间 @@ -567,7 +565,7 @@ }); } else { uni.navigateTo({ - url: '../address/address?id=' + 2 + url: '../address/address?id=' + 5 }) } @@ -658,7 +656,7 @@ address:that.province+that.city+that.district+that.detailaddress, artificerId:that.jishiName.artificerId, ordersMassageList:[ - {massageId: that.orderXm.massageTypeId,num: that.orderXm.massageNum}, + {massageId: that.orderXm.userPackageDetailId?that.orderXm.userPackageDetailId:that.orderXm.massageTypeId,num: that.orderXm.massageNum}, ], city:that.city, tripWay:that.orderXm.tripWay, diff --git a/my/order/payModifyLiao.vue b/my/order/payModifyLiao.vue index a587fbe..06c0235 100644 --- a/my/order/payModifyLiao.vue +++ b/my/order/payModifyLiao.vue @@ -364,8 +364,9 @@ this.isTrue = true }, youhuijuan(){ + var moeny=(this.orderXm.price*this.number).toFixed(2) uni.navigateTo({ - url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'疗程' + url:'/my/hongbao/youhuijuanList?price='+moeny+'&text='+'疗程' }) }, openpay() {//验证 diff --git a/my/order/payModifyTc.vue b/my/order/payModifyTc.vue index fc2186d..5a2fba3 100644 --- a/my/order/payModifyTc.vue +++ b/my/order/payModifyTc.vue @@ -394,8 +394,9 @@ this.isTrue = true }, youhuijuan(){ + var moeny=(this.orderXm.price*this.number).toFixed(2) uni.navigateTo({ - url:'/my/hongbao/youhuijuanList?price='+this.orderXm.price+'&text='+'套餐' + url:'/my/hongbao/youhuijuanList?price='+moeny+'&text='+'套餐' }) }, openpay() {//验证 diff --git a/my/order/payModifyTcMyDaiB.vue b/my/order/payModifyTcMyDaiB.vue index e47e902..643e947 100644 --- a/my/order/payModifyTcMyDaiB.vue +++ b/my/order/payModifyTcMyDaiB.vue @@ -4,13 +4,15 @@ (订单已超时) - 服务项目 - + diff --git a/my/order/payShengji.vue b/my/order/payShengji.vue index 283cc3a..7e51f7a 100644 --- a/my/order/payShengji.vue +++ b/my/order/payShengji.vue @@ -21,6 +21,7 @@ {{order.entryName}} + 待支付 待评价 服务中 @@ -241,7 +242,7 @@ 项目价格 - ¥{{order.oldMassagePrice}} + ¥{{order.massagePrice}} 服务时长 @@ -249,7 +250,7 @@ 升级差额 - ¥{{(order.massagePrice-order.oldMassagePrice).toFixed(2)}} + ¥{{(order.massagePrice - order.oldMassagePrice).toFixed(2)}} 会员折扣 @@ -470,7 +471,7 @@ 项目价格 - ¥{{order.oldMassagePrice}} + ¥{{order.massagePrice}} 服务时长 @@ -560,7 +561,7 @@ 充值 @@ -599,6 +600,13 @@ class="dingshi"> 去投诉 + + 去支付 + @@ -675,8 +683,32 @@ - + + + + + + + + + {{item.text}} + + + + + + + + 确认支付 + + + + @@ -871,6 +903,10 @@ // #endif }, methods: { + quzhifu(){//去支付 + this.showpay = true; + + }, saveJZS(artificerId) {//升级查询技师项目 let data = { artificerId: artificerId, @@ -951,7 +987,7 @@ if (res.code == 0) { that.tordersId = res.data.ordersId; that.tpayMoney = res.data.payMoney; - that.showpay = true; + that.showpayZ = true; that.paySel = 1; } else { that.$queue.showToast(res.msg) @@ -985,24 +1021,20 @@ }); }, - // 支付订单 - pay() { + // 待支付订单 + payDzF() { let that = this this.showpay = false - if (this.paySel != 0) { - this.payJZ(); - return; - } if (that.openWay == 1) { //零钱支付 uni.showModal({ title: '付款提示', - content: '确认支付' + that.tpayMoney + '元吗?', + content: '确认支付' + that.order.payMoney + '元吗?', success: function(re) { if (re.confirm) { that.$queue.showLoading('支付中...') console.log('用户点击确定'); that.$Request.post("/app/artificer/payOrders", { - ordersId: that.tordersId, + ordersId: that.order.ordersId, }).then(res => { uni.hideLoading(); if (res.code == 0) { @@ -1011,9 +1043,10 @@ }) that.getOrder() that.showorderS=false; - uni.switchTab({ - url:'/pages/order/index' - }) + that.showpay = false + // uni.switchTab({ + // url:'/pages/order/index' + // }) } else { uni.showToast({ title: res.msg, @@ -1053,6 +1086,7 @@ icon: 'none' }) that.getOrder() + that.showpay = false // this.$queue.showToast('支付成功'); // uni.switchTab({ @@ -1083,6 +1117,7 @@ that.showpay = false if (rea.code == 0) { that.callPay(rea.data); + that.showpay = false } else { uni.showToast({ title: rea.msg, @@ -1109,6 +1144,7 @@ const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const url = '&redirect_url=' + callBack + 'my/order/pay'; window.location = rea.data.mweb_url + url + that.showpay = false } else { uni.showToast({ title: rea.msg, @@ -1130,6 +1166,7 @@ that.showpay = false if (rea.code == 0) { that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); + that.showpay = false } }); // #endif @@ -1146,6 +1183,7 @@ div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) document.forms[0].submit() + that.showpay = false }); // #endif @@ -1157,6 +1195,189 @@ that.$Request.post('/app/aliPay/payOrder', data).then( rea => { that.setPayment('alipay', rea.data); + that.showpay = false + }); + // #endif + } + }, + // 支付订单 + pay() { + let that = this + this.showpay = false + if (this.paySel != 0) { + this.payJZ(); + return; + } + if (that.openWay == 1) { //零钱支付 + uni.showModal({ + title: '付款提示', + content: '确认支付' + that.tpayMoney + '元吗?', + success: function(re) { + if (re.confirm) { + that.$queue.showLoading('支付中...') + console.log('用户点击确定'); + that.$Request.post("/app/artificer/payOrders", { + ordersId: that.tordersId, + }).then(res => { + uni.hideLoading(); + if (res.code == 0) { + uni.showToast({ + title: '支付成功' + }) + that.getOrder() + that.showpayZ = false; + uni.switchTab({ + url:'/pages/order/index' + }) + } else { + uni.showToast({ + title: res.msg, + icon: 'none' + }) + } + }); + } else if (re.cancel) { + uni.hideLoading(); + console.log('用户点击取消'); + } + } + + }) + } else if (that.openWay == 2) { //微信支付 + that.$queue.showLoading('支付中...') + // #ifdef MP-WEIXIN + let data = { + ordersId: that.tordersId, + type: 3 + } + that.$Request.post('/app/wxPay/payOrder', data).then(ret => { + console.log(ret) + if (ret.code == 0) { + uni.hideLoading(); + uni.requestPayment({ + provider: 'wxpay', + timeStamp: ret.data.timestamp, + nonceStr: ret.data.noncestr, + package: ret.data.package, + signType: ret.data.signType, + paySign: ret.data.sign, + success: function(ret) { + console.log(ret) + uni.showToast({ + title: '支付成功', + icon: 'none' + }) + that.getOrder() + that.showpayZ = false; + // this.$queue.showToast('支付成功'); + + // uni.switchTab({ + // url: '/pages/my/index' + // }) + }, + fail: function(err) { + // this.$queue.showToast('支付失败'); + uni.showToast({ + title: '支付失败', + icon: 'nones' + }); + that.getOrder() + } + }); + } + }); + // #endif + + // #ifdef H5 + let ua = navigator.userAgent.toLowerCase(); + if (ua.indexOf('micromessenger') != -1) { + let data = { + ordersId: that.tordersId, + type: 2 + } + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + that.showpay = false + if (rea.code == 0) { + that.callPay(rea.data); + that.showpayZ = false; + } else { + uni.showToast({ + title: rea.msg, + icon: 'none' + }) + } + }); + } else { + let data = { + ordersId: that.tordersId, + type: 4 + } + // debugger; + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + // const urlArr = window.location.href; + // const hostUrl = urlArr.split("/"); + // const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; + // const url = '&redirect_url=' + callBack + 'my/order/pay'; + // window.location = rea.mweb_url + url + that.showpay = false + if (rea.code == 0) { + const urlArr = window.location.href; + 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 + that.showpayZ = false; + } else { + uni.showToast({ + title: rea.msg, + icon: 'none' + }) + } + }); + } + + // #endif + + // #ifdef APP + let data = { + ordersId: that.tordersId, + type: 1 + } + that.$Request.post('/app/wxPay/payOrder', data).then(rea => { + console.log(rea) + that.showpay = false + if (rea.code == 0) { + that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); + that.showpayZ = false; + } + }); + // #endif + } else if (that.openWay == 3) { //支付宝支付 + that.$queue.showLoading('支付中...') + // #ifdef H5 + let data = { + ordersId: that.tordersId, + type: 2 + } + that.$Request.post('/app/aliPay/payOrder', data).then( + rea => { + const div = document.createElement('div') + div.innerHTML = rea.data //此处form就是后台返回接收到的数据 + document.body.appendChild(div) + document.forms[0].submit() + that.showpayZ = false; + }); + // #endif + + // #ifdef APP-PLUS + let data = { + ordersId: that.tordersId, + type: 1 + } + that.$Request.post('/app/aliPay/payOrder', data).then( + rea => { + that.setPayment('alipay', rea.data); + that.showpayZ = false; }); // #endif } @@ -1417,7 +1638,8 @@ icon: 'none' }) that.getOrder() - + that.showpayZ = false; + } else { uni.showToast({ title: ret.msg, @@ -1433,7 +1655,7 @@ } else if (that.openWay == 2) { //微信支付 // #ifdef MP-WEIXIN let data = { - ordersId: that.ordersId, + ordersId: that.tordersId, type: 3 } that.$Request.post('/app/wxPay/payOrder', data).then(ret => { @@ -1455,10 +1677,11 @@ }) that.getOrder() // this.$queue.showToast('支付成功'); - + // uni.switchTab({ // url: '/pages/my/index' // }) + that.showpayZ = false; }, fail: function(err) { // this.$queue.showToast('支付失败'); @@ -1472,18 +1695,19 @@ } }); // #endif - + // #ifdef H5 let ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('micromessenger') != -1) { let data = { - ordersId: that.ordersId, + ordersId: that.tordersId, type: 2 } that.$Request.post('/app/wxPay/payOrder', data).then(rea => { that.showpay = false if (rea.code == 0) { that.callPay(rea.data); + that.showpayZ = false; } else { uni.showToast({ title: rea.msg, @@ -1493,7 +1717,7 @@ }); } else { let data = { - ordersId: that.ordersId, + ordersId: that.tordersId, type: 4 } that.$Request.post('/app/wxPay/payOrder', data).then(rea => { @@ -1504,6 +1728,7 @@ const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; const url = '&redirect_url=' + callBack + 'my/order/pay'; window.location = rea.data.mweb_url + url + that.showpayZ = false; } else { uni.showToast({ title: rea.msg, @@ -1512,9 +1737,9 @@ } }); } - + // #endif - + // #ifdef APP let data = { ordersId: that.order.ordersId, @@ -1525,13 +1750,14 @@ that.showpay = false if (rea.code == 0) { that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); + that.showpayZ = false; } }); // #endif } else if (that.openWay == 3) { //支付宝支付 // #ifdef H5 let data = { - ordersId: that.ordersId, + ordersId: that.tordersId, type: 2 } that.$Request.post('/app/aliPay/payOrder', data).then( @@ -1541,22 +1767,24 @@ div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) document.forms[0].submit() + that.showpayZ = false; }); // #endif - + // #ifdef APP-PLUS let data = { - ordersId: that.ordersId, + ordersId: that.tordersId, type: 1 } that.$Request.post('/app/aliPay/payOrder', data).then( rea => { that.showpay = false that.setPayment('alipay', rea.data); + that.showpayZ = false; }); // #endif } - + }, //支付选择 diff --git a/my/order/paydingTCX.vue b/my/order/paydingTCX.vue index 88b73d7..300f15d 100644 --- a/my/order/paydingTCX.vue +++ b/my/order/paydingTCX.vue @@ -843,7 +843,7 @@ } else if (that.openWay == 2) { //微信支付 // #ifdef MP-WEIXIN let data = { - ordersId: that.ordersId, + ordersId: that.order.ordersId, type: 3, userPackageDetailId : that.order.userPackageDetailId } @@ -888,12 +888,13 @@ let ua = navigator.userAgent.toLowerCase(); if (ua.indexOf('micromessenger') != -1) { let data = { - ordersId: that.ordersId, + ordersId: that.order.ordersId, type: 2, userPackageDetailId : that.order.userPackageDetailId } that.$Request.post('/app/wxPay/payOrder', data).then(rea => { - that.showpay = false + that.showpay = false; + uni.hideLoading(); if (rea.code == 0) { that.callPay(rea.data); uni.switchTab({ @@ -908,12 +909,13 @@ }); } else { let data = { - ordersId: that.ordersId, + ordersId: that.order.ordersId, type: 4, userPackageDetailId : that.order.userPackageDetailId } that.$Request.post('/app/wxPay/payOrder', data).then(rea => { - that.showpay = false + that.showpay = false; + uni.hideLoading(); if (rea.code == 0) { const urlArr = window.location.href; const hostUrl = urlArr.split("/"); @@ -942,7 +944,8 @@ } that.$Request.post('/app/wxPay/payOrder', data).then(rea => { console.log(rea) - that.showpay = false + that.showpay = false; + uni.hideLoading(); if (rea.code == 0) { that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); uni.switchTab({ @@ -954,7 +957,7 @@ } else if (that.openWay == 3) { //支付宝支付 // #ifdef H5 let data = { - ordersId: that.ordersId, + ordersId: that.order.ordersId, type: 2, userPackageDetailId : that.order.userPackageDetailId } @@ -964,7 +967,8 @@ const div = document.createElement('div') div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) - document.forms[0].submit() + document.forms[0].submit(); + uni.hideLoading(); uni.switchTab({ url:'/pages/order/index' }) @@ -979,7 +983,9 @@ } that.$Request.post('/app/aliPay/payOrder', data).then( rea => { + that.showpay = false + uni.hideLoading(); that.setPayment('alipay', rea.data); uni.switchTab({ url:'/pages/order/index' @@ -1064,6 +1070,7 @@ }) }, fail: function(err) { + uni.hideLoading(); // this.$queue.showToast('支付失败'); uni.showToast({ title: '支付失败', @@ -1087,11 +1094,13 @@ that.$Request.post('/app/wxPay/payOrder', data).then(rea => { that.showpay = false if (rea.code == 0) { + uni.hideLoading(); that.callPay(rea.data); uni.switchTab({ url:'/pages/order/index' }) } else { + uni.hideLoading(); uni.showToast({ title: rea.msg, icon: 'none' @@ -1113,6 +1122,7 @@ // window.location = rea.mweb_url + url that.showpay = false if (rea.code == 0) { + uni.hideLoading(); const urlArr = window.location.href; const hostUrl = urlArr.split("/"); const callBack = hostUrl[0] + "//" + hostUrl[2] + "/"; @@ -1122,6 +1132,7 @@ url:'/pages/order/index' }) } else { + uni.hideLoading(); uni.showToast({ title: rea.msg, icon: 'none' @@ -1142,10 +1153,13 @@ console.log(rea) that.showpay = false if (rea.code == 0) { + uni.hideLoading(); that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); uni.switchTab({ url:'/pages/order/index' }) + }else{ + uni.hideLoading(); } }); // #endif @@ -1159,6 +1173,7 @@ } that.$Request.post('/app/aliPay/payOrder', data).then( rea => { + uni.hideLoading(); const div = document.createElement('div') div.innerHTML = rea.data //此处form就是后台返回接收到的数据 document.body.appendChild(div) @@ -1177,6 +1192,7 @@ } that.$Request.post('/app/aliPay/payOrder', data).then( rea => { + uni.hideLoading(); that.setPayment('alipay', rea.data); uni.switchTab({ url:'/pages/order/index' @@ -1185,6 +1201,7 @@ // #endif } }, + //支付选择 selectWay: function(item) { this.openWay = item.id; diff --git a/pages.json b/pages.json index 9a0f6a9..5134f5b 100644 --- a/pages.json +++ b/pages.json @@ -963,7 +963,7 @@ { "path": "order/payModify", "style": { - "navigationBarTitleText": "修改订单", + "navigationBarTitleText": "订单", "navigationStyle": "custom", "app-plus": { "titleNView": false diff --git a/pages/my/cika.vue b/pages/my/cika.vue index 8140228..d981b86 100644 --- a/pages/my/cika.vue +++ b/pages/my/cika.vue @@ -64,7 +64,7 @@ - 已售{{item.sales}}w+ + 已售{{item.sales}} 查看 diff --git a/pages/my/fuwuGengduo.vue b/pages/my/fuwuGengduo.vue index da89908..8c9807c 100644 --- a/pages/my/fuwuGengduo.vue +++ b/pages/my/fuwuGengduo.vue @@ -28,15 +28,20 @@ {{item.price}} - /{{item.serviceCount?item.serviceCount:''}}{{item.type=='104'?'套':item.type=='105'||item.type=='106'?'次':'元'}} - ¥{{item.oldPrice}}/{{item.serviceCount?item.serviceCount:''}}{{item.type=='104'?'套':item.type=='105'||item.type=='106'?'次':'元'}} + /{{item.serviceCount?item.serviceCount:''}} + {{item.type=='105'||item.type=='106'?'次':'元'}} + + /套 + + ¥{{item.oldPrice}}/{{item.serviceCount?item.serviceCount:''}}{{item.type=='105'||item.type=='106'?'次':'元'}} + ¥{{item.oldPrice}}/套 @@ -45,7 +50,7 @@ - 已售{{item.sales}}w+ + 已售{{item.sales}} 查看 diff --git a/pages/my/fuwuliaocheng.vue b/pages/my/fuwuliaocheng.vue index bdc721c..545797e 100644 --- a/pages/my/fuwuliaocheng.vue +++ b/pages/my/fuwuliaocheng.vue @@ -64,7 +64,7 @@ - 已售{{item.sales}}w+ + 已售{{item.sales}} 查看 diff --git a/pages/my/fuwuxiangm.vue b/pages/my/fuwuxiangm.vue index 4bc9706..2b46680 100644 --- a/pages/my/fuwuxiangm.vue +++ b/pages/my/fuwuxiangm.vue @@ -44,7 +44,7 @@ - 已售{{item.sales}}w+ + 已售{{item.sales}} 查看 diff --git a/pages/my/historyMy.vue b/pages/my/historyMy.vue index f87d398..df32df8 100644 --- a/pages/my/historyMy.vue +++ b/pages/my/historyMy.vue @@ -17,7 +17,7 @@ {{item.content}} diff --git a/pages/my/indextaociliaoList.vue b/pages/my/indextaociliaoList.vue index 8510ca0..4eeca20 100644 --- a/pages/my/indextaociliaoList.vue +++ b/pages/my/indextaociliaoList.vue @@ -37,7 +37,7 @@ - 已售{{item.sales}}w+ + 已售{{item.sales}} 查看 diff --git a/pages/my/indextaociliaoList2.vue b/pages/my/indextaociliaoList2.vue index c1f9de3..9d8705d 100644 --- a/pages/my/indextaociliaoList2.vue +++ b/pages/my/indextaociliaoList2.vue @@ -41,7 +41,7 @@ --> + 已售{{item.sales}} 查看 diff --git a/pages/order/index.vue b/pages/order/index.vue index 1565eb5..3a45e05 100644 --- a/pages/order/index.vue +++ b/pages/order/index.vue @@ -66,19 +66,22 @@ @click="cancelOrder(item)"> 取消订单 - 修改订单 - - + --> + + 去支付 - - 联系客服 + + + 去支付 + + @click="goNav('/my/order/payModifyDd?ordersId='+item.ordersId,item)" class="btns xianshi"> 立即预约