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 @@
确认支付
+
+
+
+
@@ -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 @@
-
+
+
+
+
+
-
修改订单
-
-
+ -->
+
+
去支付
-
- 联系客服
+
+
+ 去支付
+
+ @click="goNav('/my/order/payModifyDd?ordersId='+item.ordersId,item)" class="btns xianshi">
立即预约
- 已售{{item.sales}}w+
+ 已售{{item.sales}}