This commit is contained in:
Mr.jiang 2024-07-16 17:20:51 +08:00
parent bfabf81bce
commit 831b28b65e
14 changed files with 3115 additions and 2672 deletions

View File

@ -840,8 +840,6 @@
payTc() {
let that = this
that.showpayL = false
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.taxiMoney + '元吗?',
@ -849,6 +847,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
userPackageDetailId : that.order.userPackageDetailId
@ -867,13 +866,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -930,9 +922,13 @@
if (rea.code == 0) {
uni.hideLoading();
that.callPay(rea.data);
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayL = false
that.callPay(rea.data);
} else {
uni.hideLoading();
uni.showToast({
@ -956,14 +952,18 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayL = false
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({
@ -986,9 +986,13 @@
if (rea.code == 0) {
uni.hideLoading();
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayL = false
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}else{
uni.hideLoading();
}
@ -1005,12 +1009,16 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayL = false
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.getOrder()
that.showpayL = false
});
// #endif
@ -1023,12 +1031,25 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.hideLoading();
that.setPayment('alipay', rea.data);
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayL = false
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
taocanDaiBd(url,item){
@ -1041,8 +1062,7 @@
//
payLj() {
let that = this
that.showpayL = false
if (that.openWay == 1) { //
that.showpayL = false;
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
@ -1050,6 +1070,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
@ -1069,13 +1090,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1101,7 +1115,7 @@
icon: 'none'
})
that.getOrder()
console.log(222)
that.showpayL = false
// this.$queue.showToast('');
@ -1132,9 +1146,13 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
if (rea.code == 0) {
that.callPay(rea.data);
uni.showToast({
title: '支付成功'
})
that.showpayL = false
that.getOrder()
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
@ -1156,13 +1174,17 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.showpayL = false
that.getOrder()
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,
@ -1183,9 +1205,13 @@
console.log(rea)
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.showToast({
title: '支付成功'
})
that.showpayL = false
that.getOrder()
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
// #endif
@ -1198,12 +1224,16 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
that.showpayL = false
that.getOrder()
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.showpayL = false
that.getOrder()
});
// #endif
@ -1214,12 +1244,25 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
uni.showToast({
title: '支付成功'
})
that.showpayL = false
that.getOrder()
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
getOrder() {
@ -1369,11 +1412,10 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
@ -1381,18 +1423,18 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(res => {
uni.hideLoading();
if (res.code == 0) {
console.log(111)
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
// that.getOrder()
// that.showorderS=false;
@ -1403,13 +1445,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1431,11 +1466,12 @@
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
that.getOrder()
console.log(222)
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
// this.$queue.showToast('');
// uni.switchTab({
@ -1465,6 +1501,13 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
that.callPay(rea.data);
} else {
uni.showToast({
@ -1487,6 +1530,12 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -1512,6 +1561,12 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -1525,6 +1580,12 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
@ -1539,10 +1600,24 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
getTimeStampWithoutSeconds(date) {

View File

@ -768,7 +768,6 @@
this.payJZ();
return;
}
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
@ -776,18 +775,18 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(res => {
uni.hideLoading();
if (res.code == 0) {
console.log(111)
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
// that.getOrder()
// that.showorderS=false;
@ -798,13 +797,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -824,18 +816,12 @@
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
that.getOrder()
console.log(222)
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
@ -860,6 +846,12 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
that.callPay(rea.data);
} else {
uni.showToast({
@ -882,6 +874,12 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -907,6 +905,12 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -920,6 +924,12 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
@ -934,10 +944,25 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
getTimeStampWithoutSeconds(date) {
@ -1176,8 +1201,6 @@
payJZ() {
let that = this;
if (that.openWay == 1) { //
console.log('1111')
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
@ -1185,6 +1208,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
// console.log('');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(ret => {
@ -1214,11 +1238,6 @@
})
}
});
} else if (re.cancel) {
that.getOrder()
}
}
})
} else if (that.openWay == 2) { //
// #ifdef MP-WEIXIN
let data = {
@ -1237,17 +1256,20 @@
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
if(that.jiazhong=='加钟'){
uni.navigateTo({
url:'/my/order/payJaZ?ordersId='+that.order.ordersId
})
}else if(that.shengji=='升级'){
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
}
},
fail: function(err) {
// this.$queue.showToast('');
@ -1272,6 +1294,20 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
if(that.jiazhong=='加钟'){
uni.navigateTo({
url:'/my/order/payJaZ?ordersId='+that.order.ordersId
})
}else if(that.shengji=='升级'){
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
}
that.callPay(rea.data);
} else {
uni.showToast({
@ -1288,6 +1324,20 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
if(that.jiazhong=='加钟'){
uni.navigateTo({
url:'/my/order/payJaZ?ordersId='+that.order.ordersId
})
}else if(that.shengji=='升级'){
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
}
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -1313,6 +1363,20 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
if(that.jiazhong=='加钟'){
uni.navigateTo({
url:'/my/order/payJaZ?ordersId='+that.order.ordersId
})
}else if(that.shengji=='升级'){
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
}
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -1325,6 +1389,20 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
if(that.jiazhong=='加钟'){
uni.navigateTo({
url:'/my/order/payJaZ?ordersId='+that.order.ordersId
})
}else if(that.shengji=='升级'){
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
}
that.showpay = false
const div = document.createElement('div')
div.innerHTML = rea.data //form
@ -1340,12 +1418,32 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
if(that.jiazhong=='加钟'){
uni.navigateTo({
url:'/my/order/payJaZ?ordersId='+that.order.ordersId
})
}else if(that.shengji=='升级'){
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
}
that.showpay = false
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
that.getOrder()
}
}
})
},
//

View File

@ -926,7 +926,6 @@
this.payJZ();
return;
}
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
@ -934,6 +933,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(res => {
@ -943,10 +943,8 @@
title: '支付成功'
})
that.getOrder()
that.showorderS=false;
uni.switchTab({
url:'/pages/order/index'
})
that.showorder=false;
} else {
uni.showToast({
title: res.msg,
@ -954,13 +952,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -980,12 +971,11 @@
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
that.getOrder()
that.showorder=false;
// this.$queue.showToast('');
// uni.switchTab({
@ -1015,6 +1005,11 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorder=false;
that.callPay(rea.data);
} else {
uni.showToast({
@ -1037,6 +1032,11 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorder=false;
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -1062,6 +1062,11 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorder=false;
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -1075,6 +1080,11 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorder=false;
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
@ -1089,10 +1099,24 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorder=false;
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
getTimeStampWithoutSeconds(date) {
@ -1335,8 +1359,6 @@
payJZ() {
let that = this;
if (that.openWay == 1) { //
console.log('1111')
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
@ -1344,6 +1366,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
// console.log('');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(ret => {
@ -1362,11 +1385,6 @@
})
}
});
} else if (re.cancel) {
that.getOrder()
}
}
})
} else if (that.openWay == 2) { //
// #ifdef MP-WEIXIN
let data = {
@ -1385,7 +1403,6 @@
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
@ -1420,6 +1437,11 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
that.callPay(rea.data);
} else {
uni.showToast({
@ -1436,6 +1458,11 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -1461,6 +1488,11 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -1474,6 +1506,11 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
@ -1489,11 +1526,22 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
that.getOrder()
}
}
})
},
//

View File

@ -475,12 +475,13 @@
});
},
liliaoshi(){
var that=this
uni.setStorage({
key: 'taocanDd',
data: '我的套餐',
success: function () {
uni.navigateTo({
url: '/pages/therapist/therapistDingdan'
url: '/pages/therapist/therapistDingdan?technicianType='+that.orderXm.level
})
}
});
@ -1201,16 +1202,10 @@
},
//
cancelOrder(e) {
let contentName = '';
let closeKC = this.$queue.getData('closeKC');
if (e.status == 7 || e.status == 8 && closeKC) {
let money = parseFloat(parseFloat(e.price) * parseFloat(closeKC)).toFixed(2);
contentName = '取消订单将扣除' + money + '元的手续费,并且车费将全部扣除!';
}
let that = this
uni.showModal({
title: '温馨提示',
content: '是否确认取消订单?' + contentName,
content: '是否确认取消订单?',
success: function(res) {
if (res.confirm) {
let data = {

View File

@ -1002,19 +1002,13 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
console.log("that.order.sumMoney",that.order)
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.sumMoney + '元吗?',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
@ -1034,13 +1028,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1065,15 +1052,12 @@
title: '支付成功',
icon: 'none'
})
that.getOrder()
// this.$queue.showToast('');
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
@ -1095,10 +1079,14 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
uni.showToast({
title: '支付成功',
icon: 'none'
})
uni.switchTab({
url:'/pages/order/index'
})
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
@ -1120,14 +1108,19 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
uni.switchTab({
url:'/pages/order/index'
})
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
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.showToast({
title: rea.msg,
@ -1148,11 +1141,21 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.showToast({
title: '支付成功',
icon: 'none'
})
uni.switchTab({
url:'/pages/order/index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}else{
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
}
});
// #endif
@ -1165,13 +1168,18 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
uni.switchTab({
url:'/pages/order/index'
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
@ -1182,13 +1190,27 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
uni.showToast({
title: '支付成功',
icon: 'none'
})
uni.switchTab({
url:'/pages/order/index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -794,6 +794,7 @@
ordersId: '',
tpayMoney: '',
paySel: 0,
showpayZ:false,
showorder: false,
showorderS: false,
orderList: [],
@ -1025,7 +1026,6 @@
payDzF() {
let that = this
this.showpay = false
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
@ -1033,6 +1033,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
@ -1043,7 +1044,6 @@
})
that.getOrder()
that.showorderS=false;
that.showpay = false
// uni.switchTab({
// url:'/pages/order/index'
// })
@ -1054,13 +1054,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1082,11 +1075,10 @@
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
that.getOrder()
that.showpay = false
that.showorderS=false;
// this.$queue.showToast('');
// uni.switchTab({
@ -1114,10 +1106,14 @@
type: 2
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorderS=false;
that.callPay(rea.data);
that.showpay = false
} else {
uni.showToast({
title: rea.msg,
@ -1137,14 +1133,19 @@
// 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.showToast({
title: '支付成功'
})
that.getOrder()
that.showorderS=false;
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.showpay = false
} else {
uni.showToast({
title: rea.msg,
@ -1163,10 +1164,15 @@
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorderS=false;
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
that.showpay = false
}
});
// #endif
@ -1179,11 +1185,16 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorderS=false;
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.showpay = false
});
// #endif
@ -1194,21 +1205,32 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorderS=false;
that.setPayment('alipay', rea.data);
that.showpay = false
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
//
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
@ -1216,6 +1238,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(res => {
@ -1226,9 +1249,9 @@
})
that.getOrder()
that.showpayZ = false;
uni.switchTab({
url:'/pages/order/index'
})
// uni.switchTab({
// url:'/pages/order/index'
// })
} else {
uni.showToast({
title: res.msg,
@ -1236,13 +1259,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1264,8 +1280,7 @@
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
@ -1298,8 +1313,13 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
@ -1321,12 +1341,17 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
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,
@ -1347,8 +1372,13 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
// #endif
@ -1361,11 +1391,16 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.showpayZ = false;
});
// #endif
@ -1376,11 +1411,25 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
getTimeStampWithoutSeconds(date) {

View File

@ -1000,19 +1000,14 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
console.log("that.order.sumMoney",that.order)
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.sumMoney + '元吗?',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
@ -1032,13 +1027,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1093,10 +1081,14 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
@ -1116,16 +1108,21 @@
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
// const url = '&redirect_url=' + callBack + 'my/order/pay';
// window.location = rea.mweb_url + url
that.showpay = false
that.showpay = false;
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
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
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.showToast({
title: rea.msg,
@ -1146,11 +1143,19 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}else{
uni.showToast({
icon:'error',
title: '支付失败!'
})
}
});
// #endif
@ -1163,13 +1168,17 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
@ -1180,13 +1189,25 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -632,11 +632,10 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
@ -644,6 +643,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/user/package/order/payOrder", {
ordersId: that.ordersId,
}).then(res => {
@ -663,13 +663,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -689,10 +682,11 @@
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
})
that.getOrder()
// this.$queue.showToast('');
@ -724,6 +718,12 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
})
that.callPay(rea.data);
} else {
uni.showToast({
@ -746,6 +746,12 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
})
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -771,6 +777,12 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -784,6 +796,12 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
@ -798,10 +816,25 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -1121,19 +1121,18 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
console.log("that.order.sumMoney",that.order)
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.sumMoney + '元吗?',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
@ -1142,10 +1141,11 @@
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
} else {
uni.showToast({
title: res.msg,
@ -1153,13 +1153,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1181,13 +1174,13 @@
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
// this.$queue.showToast('');
// uni.switchTab({
@ -1217,10 +1210,14 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
@ -1242,14 +1239,18 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
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
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.showToast({
title: rea.msg,
@ -1270,10 +1271,14 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
// #endif
@ -1286,13 +1291,17 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
@ -1303,13 +1312,26 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -632,11 +632,10 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
@ -644,6 +643,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/user/package/order/payOrder", {
ordersId: that.ordersId,
}).then(res => {
@ -663,13 +663,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -691,15 +684,11 @@
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
})
that.getOrder()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
@ -724,6 +713,12 @@
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
})
that.callPay(rea.data);
} else {
uni.showToast({
@ -746,6 +741,12 @@
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
})
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -771,6 +772,12 @@
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -784,6 +791,12 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
@ -798,10 +811,25 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -999,11 +999,10 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.taxiMoney + '元吗?',
@ -1011,6 +1010,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
userPackageDetailId : that.order.userPackageDetailId
@ -1031,13 +1031,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1060,11 +1053,9 @@
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
that.getOrder()
// this.$queue.showToast('');
uni.switchTab({
url:'/pages/order/index'
})
@ -1095,10 +1086,15 @@
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
that.callPay(rea.data);
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
that.callPay(rea.data);
} else {
uni.hideLoading();
uni.showToast({
@ -1123,14 +1119,19 @@
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
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
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.hideLoading();
uni.showToast({
@ -1154,10 +1155,15 @@
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}else{
uni.hideLoading();
}
@ -1174,13 +1180,18 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
@ -1193,13 +1204,27 @@
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.hideLoading();
that.setPayment('alipay', rea.data);
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
//

View File

@ -694,11 +694,6 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
@ -706,6 +701,7 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/user/package/order/payOrder", {
ordersId: that.ordersId,
}).then(res => {
@ -725,13 +721,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -753,10 +742,11 @@
success: function(ret) {
console.log(ret)
uni.showToast({
title: '支付成功',
icon: 'none'
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
that.getOrder()
// this.$queue.showToast('');
// uni.switchTab({
@ -784,8 +774,13 @@
type: 2
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
that.callPay(rea.data);
} else {
uni.showToast({
@ -806,8 +801,13 @@
// 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.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
@ -831,8 +831,13 @@
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
@ -846,6 +851,12 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
@ -860,10 +871,25 @@
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -1144,12 +1144,10 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
console.log("that.order.sumMoney",that.order)
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.sumMoney + '元吗?',
@ -1157,6 +1155,193 @@
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
uni.hideLoading();
if (res.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
} 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: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
// 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 => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.callPay(rea.data);
} 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) {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
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
} 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)
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
// #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 => {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.order.ordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
@ -1173,13 +1358,6 @@
})
}
});
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
}
})
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
@ -1312,6 +1490,7 @@
});
// #endif
}
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -10,9 +10,6 @@
<u-search class="flex-sub" placeholder="请输入技师名字" :focus="false" shape="square" v-model="artificerName"
:show-action="true" :animation="true" bg-color="#f5f5f5" color="#1A1A1A" @search="onSearch()"
action-text="搜索" @custom="onSearch()"></u-search>
<!-- <view class="flex align-center justify-between">
<selectSwitchDitu @change="switch1Change" />
</view> -->
</view>
</view>
<view class="liebiao" v-show="current === 0">
@ -24,16 +21,6 @@
<image class="touxiang-left-content-img" :src="item.artificerImg ? item.artificerImg : '../../static/logo.png'"
@click.stop="saveImgs(item.artificerImg)" mode="aspectFill"></image>
<!--<image class="touxiang-left-content-img" v-if="item.isHot == 1"
src="https://admin.sjajk.com/file/uploadPath/2023/02/16/9ae1b7e9fa931b5fc24cd8edecc10d9f.png"
style="width: 30rpx;height: 36rpx;position: absolute;z-index: 99;top: 40rpx;left: 110rpx;">
</image>
<view class="zpmore_view_left" v-if="item.technicianType==1" @click.stop="saveImgss(item.technicianType, 0)">
<image src="../../static/dituzhaoren1.png" mode=""></image>
</view> -->
<!--<span class="img-span">{{item.technicianType=='3'?'新手':item.technicianType=='4'?'专家':'资深'}}</span>-->
<image class="touxiang-frame" :src="item.technicianType=='3'?'../../static/vip/grade4.png':item.technicianType=='4'?'../../static/vip/grade5.png':'../../static/vip/grade6.png'"></image>
</view>
@ -55,7 +42,7 @@
</view>
</view>
<view class="flex align-center" v-if="item.tripWay != 3" >
<view class="flex align-center">
<image class="therapist-bottom-dingwei" src="../../static/dituzhaoren6.png"></image>
<view class="therapist-bottom-dingwei-text">
{{ item.distance }}
@ -105,127 +92,6 @@
</view>
<empty v-if="orderList.length == 0"></empty>
</view>
<view v-show="current === 1">
<view class="flex text-center flex-wrap"
style="margin-top: 60px;justify-content: space-between;">
<div id="txMapContainer" style="width: 100%;height: calc(100vh - 188px);">&nbsp;</div>
<!-- 地图地图 -->
</view>
<u-popup v-model="showPopup" mode="bottom" height="" closeable :mask-close-able="false">
<view id="popView">
<view class="flex align-center list-view" style="padding: 0px;">
<view class="touxiang-left-view" style="margin-bottom: 0px;padding-bottom: 0px;width: auto;">
<image
class="touxiang-left-content-img"
:src="getOrderByCurrentMarkerIndex().artificerImg ? getOrderByCurrentMarkerIndex().artificerImg : '../../static/logo.png'"
@click.stop="saveImgs(getOrderByCurrentMarkerIndex().artificerImg)"
mode="aspectFill"></image>
<image v-if="getOrderByCurrentMarkerIndex().isHot == 1"
class="touxiang-left-content-img"
src="https://admin.sjajk.com/file/uploadPath/2023/02/16/9ae1b7e9fa931b5fc24cd8edecc10d9f.png"
style="width: 30rpx;height: 36rpx;position: absolute;z-index: 99;top: 40rpx;left: 110rpx;">
</image>
<view class="zpmore_view_left" v-if="getOrderByCurrentMarkerIndex().isNewer==1" @click.stop="saveImgss(getOrderByCurrentMarkerIndex().isNewer, 0)">
<image src="../../static/dituzhaoren1.png" mode=""></image>
</view>
<!-- <view class="zpmore_view" v-if="getOrderByCurrentMarkerIndex().lifePhoto"
@click.stop="saveImgss(getOrderByCurrentMarkerIndex().lifePhoto, 0)">更多照片</view> -->
</view>
<view class="margin-left flex flex-direction dituList">
<view class="flex align-center" style="justify-content: start;">
<!-- <view class="flex align-center" style="width: 120rpx;">
<view class="text-bold text-30 margin-right-xs"
style="width: 100rpx;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;text-align: left;">
{{ getOrderByCurrentMarkerIndex().artificerName }}
</view>
</view> -->
<view class="flex align-center list-right-top">
<view class="list-right-top-view">
<view class="list-right-top-name">
{{ getOrderByCurrentMarkerIndex().artificerName }}
</view>
<view class="keyuyue">
<view class="keyuyue-btn keyuyue-jinri">
{{getOrderByCurrentMarkerIndex().state == 1?"可服务":getOrderByCurrentMarkerIndex().state == 2?"今日可约":"休息中"}}
</view>
<view class="keyuyue-btn keyuyue-time" v-if="getOrderByCurrentMarkerIndex().status == 1 && getOrderByCurrentMarkerIndex().time">{{ getOrderByCurrentMarkerIndex().time}}</view>
</view>
</view>
<!-- <view class="list-right-top-bottom">
{{item.technicianTypeName}}
</view> -->
</view>
</view>
<view class="therapist-mian-top">
<!-- <view v-if="getOrderByCurrentMarkerIndex().ordersScore">
<image src="../../static/images/start.png" style="width: 24upx;height: 22upx;">
</image>
<text class="margin-left-xs" style="color: #fe831e;">{{
getOrderByCurrentMarkerIndex().ordersScore }}.0</text>
</view> -->
<view class="therap-pin">
<!--<image src="../../static/dituzhaoren3.png" mode="">
</image>-->
<span>评论</span>
<view class="therapist-mian-view-text">
{{ getOrderByCurrentMarkerIndex().commentCount ? getOrderByCurrentMarkerIndex().commentCount : 0 }}
</view>
</view>
<view class="therap-pin" >
<!--<image src="../../static/dituzhaoren4.png" mode="">
</image>-->
<span>收藏</span>
<view class="therapist-mian-view-text">
{{ getOrderByCurrentMarkerIndex().collectCount ? getOrderByCurrentMarkerIndex().collectCount : 0 }}
</view>
</view>
</view>
<view class="therapist-mian-bottom">
<view class="flex flex-wrap align-center" v-if="getOrderByCurrentMarkerIndex().consortiaName">
<image class="therapist-bottom-img" src="../../static/dituzhaoren5.png">
</image>
<view class="therapist-mian-bottom-text">{{getOrderByCurrentMarkerIndex().consortiaName}}</view>
</view>
<view class="flex align-center" v-if="getOrderByCurrentMarkerIndex().tripWay != 3" >
<image class="therapist-bottom-dingwei" src="../../static/dituzhaoren6.png"></image>
<view class="therapist-bottom-dingwei-text">
{{ getOrderByCurrentMarkerIndex().distance }}
</view>
</view>
</view>
<view class="text-center make-now" v-if="getOrderByCurrentMarkerIndex().status == 1"
style="background: linear-gradient(90deg, #019C88, #0FA78B, #35C495);color: #ffffff;width: 100%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;"
@click.stop="goOrder(getOrderByCurrentMarkerIndex())">
确认
</view>
<view class="text-center make-now1" @click.stop="showTips()" v-else
style="background: #d9d9d9;color: #ffffff;width: 100%;border-radius: 30upx;height: 60upx;line-height: 60upx;margin-top: 10rpx;">
确认
</view>
</view>
</view>
</view>
</u-popup>
</view>
<view style="display:none;position: fixed;z-index: 999;bottom: 160rpx;" v-if="showTP">
<image src="https://admin.sjajk.com/file/uploadPath/2023/02/16/15ade225e9fa8a1d82b325c06dc2b653.png"
style="width: 690rpx;margin: 30rpx;height: 600rpx;"></image>
<view
style="position: absolute;bottom: 100rpx;width: 100%;text-align: center;display: flex;justify-content: center;">
<view>
<view style="color: #333333;font-size: 28rpx;"><text style="font-size: 44rpx;color:#ee6c54">{{
tpCount }}</text>人已投票</view>
<view class="tp_view" v-if="tpSel == 2" @tap="saveTP">投票</view>
<view class="ytp_view" v-if="tpSel == 1">已投票</view>
</view>
</view>
</view>
<!-- 经验筛选 -->
<u-select v-model="Cityshow" :list="cityList" @confirm="getCity"></u-select>
</view>
@ -460,9 +326,6 @@
this.initMap();
//this.initMapPointThread();
},
onUnload() {
//this.closeSocket();
},
methods: {
//
goOrder(e) {
@ -709,25 +572,7 @@
}
});
},
// selectCity(longitude, latitude) {
// this.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
// if (res.code == 0) {
// // this.city = res.data.city ? res.data.city : ''
// // uni.setStorageSync('city', res.data.city)
// let data = {
// num: 1,
// size: 10
// }
// this.getData(data)
// }
// });
// },
tanChange(index, item) {
this.orderIndex = index
this.tabIndex = item.id
this.page = 1
this.getlist()
},
//
openMsg() {
console.log('订阅消息')
@ -793,13 +638,6 @@
this.getlist()
},
getlist() {
// if (this.city === '') {
// return;
// }
// if (this.tabIndex == 0) {
// return;
// }
// let index = this.list[this.listIndex].id
let index = 2
let data = {
// id: curTab,
@ -837,22 +675,6 @@
} else {
this.orderList = [...this.orderList, ...res.data.list]
}
//
if (this.amap) {
// debugger;
console.log(this.orderList)
if (this.orderList.length > 0) {
let rmap = {};
let onLineArtificerList = this.orderList.filter((item) => item.status == 1);
onLineArtificerList.forEach(x => {
rmap[x.userId] = x.latitude + ',' + x.longitude; //
});
console.log('在orderList初始化', JSON.parse(JSON.stringify(rmap)));
this.pointMap = rmap;
this.creatMarker(rmap);
}
}
}
uni.stopPullDownRefresh();
})