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

File diff suppressed because it is too large Load Diff

View File

@ -768,26 +768,25 @@
this.payJZ();
return;
}
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
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,146 +797,172 @@
})
}
});
} 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)
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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) {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
},
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.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
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.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
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) {
uni.showToast({
title: '支付成功'
})
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
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.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
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.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
that.setPayment('alipay', rea.data);
});
// #endif
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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
} 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 => {
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 => {
that.setPayment('alipay', rea.data);
});
// #endif
}
})
},
getTimeStampWithoutSeconds(date) {
@ -1176,15 +1201,14 @@
payJZ() {
let that = this;
if (that.openWay == 1) { //
console.log('1111')
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
// console.log('');
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
// console.log('');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(ret => {
@ -1206,7 +1230,7 @@
}
that.getOrder()
} else {
uni.showToast({
title: ret.msg,
@ -1214,138 +1238,212 @@
})
}
});
} else if (re.cancel) {
that.getOrder()
}
}
})
} else if (that.openWay == 2) { //
// #ifdef MP-WEIXIN
let data = {
ordersId: that.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()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
// #ifdef MP-WEIXIN
let data = {
ordersId: that.ordersId,
type: 3
}
});
}
});
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') != -1) {
let data = {
ordersId: that.ordersId,
type: 2
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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) {
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
})
}
},
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.ordersId,
type: 2
}
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({
title: rea.msg,
icon: 'none'
})
}
});
} else {
let data = {
ordersId: that.ordersId,
type: 4
}
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] + "/";
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) {
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));
}
});
// #endif
} else if (that.openWay == 3) { //
// #ifdef H5
let data = {
ordersId: that.ordersId,
type: 2
}
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
document.body.appendChild(div)
document.forms[0].submit()
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.ordersId,
type: 1
}
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 {
let data = {
ordersId: that.ordersId,
type: 4
} else if (re.cancel) {
that.getOrder()
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
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
} 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) { //
// #ifdef H5
let data = {
ordersId: that.ordersId,
type: 2
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
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.ordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
that.setPayment('alipay', rea.data);
});
// #endif
}
})
},
//

View File

@ -926,14 +926,14 @@
this.payJZ();
return;
}
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
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,145 +952,171 @@
})
}
});
} 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()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorder=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 => {
that.showpay = false
if (rea.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorder=false;
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: '支付成功'
})
that.getOrder()
that.showorder=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
} 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) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorder=false;
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: '支付成功'
})
that.getOrder()
that.showorder=false;
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: '支付成功'
})
that.getOrder()
that.showorder=false;
that.setPayment('alipay', rea.data);
});
// #endif
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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
} 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 => {
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 => {
that.setPayment('alipay', rea.data);
});
// #endif
}
})
},
getTimeStampWithoutSeconds(date) {
@ -1335,15 +1359,14 @@
payJZ() {
let that = this;
if (that.openWay == 1) { //
console.log('1111')
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
// console.log('');
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
// console.log('');
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId,
}).then(ret => {
@ -1354,7 +1377,7 @@
icon: 'none'
})
that.getOrder()
} else {
uni.showToast({
title: ret.msg,
@ -1362,138 +1385,163 @@
})
}
});
} else if (re.cancel) {
that.getOrder()
}
}
})
} else if (that.openWay == 2) { //
// #ifdef MP-WEIXIN
let data = {
ordersId: that.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()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
// #ifdef MP-WEIXIN
let data = {
ordersId: that.ordersId,
type: 3
}
});
}
});
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') != -1) {
let data = {
ordersId: that.ordersId,
type: 2
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
that.showpay = false
if (rea.code == 0) {
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
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.ordersId,
type: 2
}
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({
title: rea.msg,
icon: 'none'
})
}
});
} else {
let data = {
ordersId: that.ordersId,
type: 4
}
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] + "/";
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) {
uni.showToast({
title: '支付成功',
icon: 'none'
})
that.getOrder()
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
// #endif
} else if (that.openWay == 3) { //
// #ifdef H5
let data = {
ordersId: that.ordersId,
type: 2
}
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)
document.forms[0].submit()
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.ordersId,
type: 1
}
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 {
let data = {
ordersId: that.ordersId,
type: 4
} else if (re.cancel) {
that.getOrder()
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
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
} 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) { //
// #ifdef H5
let data = {
ordersId: that.ordersId,
type: 2
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
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.ordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.showpay = false
that.setPayment('alipay', rea.data);
});
// #endif
}
})
},
//

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 + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
if (that.openWay == 1) { //
that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId,
}).then(res => {
@ -1034,161 +1028,189 @@
})
}
});
} 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()
// this.$queue.showToast('');
uni.switchTab({
url:'/pages/order/index'
})
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} 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
uni.switchTab({
url:'/pages/order/index'
})
} 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.$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'
})
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
},
fail: function(err) {
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
}
});
}
});
// #endif
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
// #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: '支付成功',
icon: 'none'
})
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: '支付成功',
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
} 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) {
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
} 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: '支付成功',
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()
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.order.ordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
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('用户点击取消');
}
});
// #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()
uni.switchTab({
url:'/pages/order/index'
})
});
// #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);
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
}
})
},
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,14 +1026,14 @@
payDzF() {
let that = this
this.showpay = false
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
uni.showModal({
title: '付款提示',
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 => {
@ -1043,7 +1044,6 @@
})
that.getOrder()
that.showorderS=false;
that.showpay = false
// uni.switchTab({
// url:'/pages/order/index'
// })
@ -1054,168 +1054,191 @@
})
}
});
} 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()
that.showpay = false
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
that.showpay = false
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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: '支付成功'
})
that.getOrder()
that.showorderS=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) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorderS=false;
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
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
} 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) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showorderS=false;
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: '支付成功'
})
that.getOrder()
that.showorderS=false;
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: '支付成功'
})
that.getOrder()
that.showorderS=false;
that.setPayment('alipay', rea.data);
});
// #endif
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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.showpay = false
} 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));
that.showpay = false
}
});
// #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.showpay = false
});
// #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.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('用户点击确定');
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.tpayMoney + '元吗?',
success: function(re) {
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,151 +1259,177 @@
})
}
});
} 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()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.tordersId,
type: 3
}
});
}
});
// #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'
})
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: '支付成功'
})
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) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
that.callPay(rea.data);
} 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) {
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
} 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) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}
});
// #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 => {
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()
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.tordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
uni.showToast({
title: '支付成功'
})
that.getOrder()
that.showpayZ = false;
that.setPayment('alipay', rea.data);
});
// #endif
}
});
} else {
let data = {
ordersId: that.tordersId,
type: 4
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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
}
})
},
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 + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
uni.showModal({
title: '付款提示',
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,161 +1027,187 @@
})
}
});
} 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()
// this.$queue.showToast('');
uni.switchTab({
url:'/pages/order/index'
})
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} 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
uni.switchTab({
url:'/pages/order/index'
})
} 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.$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.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
uni.switchTab({
url:'/pages/order/index'
})
uni.switchTab({
url:'/pages/order/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) {
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
} 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('用户点击取消');
}
});
// #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()
uni.switchTab({
url:'/pages/order/index'
})
});
// #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);
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -632,18 +632,18 @@
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 + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
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,145 +663,178 @@
})
}
});
} 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()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'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) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
})
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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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
} 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 => {
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 => {
that.setPayment('alipay', rea.data);
});
// #endif
}
})
},
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)
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.sumMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
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,163 +1153,185 @@
})
}
});
} 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()
uni.switchTab({
url:'/pages/order/index'
})
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
uni.switchTab({
url:'/pages/order/index'
})
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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) {
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
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 {
let data = {
ordersId: that.order.ordersId,
type: 4
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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
uni.switchTab({
url:'/pages/order/index'
})
} 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));
uni.switchTab({
url:'/pages/order/index'
})
}
});
// #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()
uni.switchTab({
url:'/pages/order/index'
})
});
// #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);
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -632,18 +632,18 @@
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 + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
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,145 +663,173 @@
})
}
});
} 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()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'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) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
})
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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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
} 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 => {
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 => {
that.setPayment('alipay', rea.data);
});
// #endif
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -999,18 +999,18 @@
pay() {
let that = this
this.showpay = false
if (this.paySel != 0) {
this.payJZ();
return;
}
if (that.openWay == 1) { //
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.taxiMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.taxiMoney + '元吗?',
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,
userPackageDetailId : that.order.userPackageDetailId
@ -1031,175 +1031,200 @@
})
}
});
} 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('');
uni.switchTab({
url:'/pages/order/index'
})
},
fail: function(err) {
uni.hideLoading();
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3,
userPackageDetailId : that.order.userPackageDetailId
}
});
}
});
// #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 => {
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'
})
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: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
},
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 => {
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
that.callPay(rea.data);
} 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();
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
} 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 => {
console.log(rea)
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
}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();
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()
});
// #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();
uni.showToast({
title: '支付成功'
})
that.getOrder()
uni.switchTab({
url:'/pages/order/index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4,
userPackageDetailId : that.order.userPackageDetailId
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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
uni.switchTab({
url:'/pages/order/index'
})
} 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 => {
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
} 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()
uni.switchTab({
url:'/pages/order/index'
})
});
// #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);
uni.switchTab({
url:'/pages/order/index'
})
});
// #endif
}
})
},
//

View File

@ -694,18 +694,14 @@
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 + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.payMoney + '元吗?',
success: function(re) {
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,145 +721,175 @@
})
}
});
} 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()
// this.$queue.showToast('');
// uni.switchTab({
// url: '/pages/my/index'
// })
},
fail: function(err) {
// this.$queue.showToast('');
uni.showToast({
title: '支付失败',
icon: 'nones'
});
that.getOrder()
} else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN
let data = {
ordersId: that.order.ordersId,
type: 3
}
});
}
});
// #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) {
that.callPay(rea.data);
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
// 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) {
uni.showToast({
title: '支付成功'
})
uni.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'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
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] + "/";
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)
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));
}
});
// #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.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)
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.redirectTo({
url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
})
that.setPayment('alipay', rea.data);
});
// #endif
}
});
} else {
let data = {
ordersId: that.order.ordersId,
type: 4
} else if (re.cancel) {
uni.hideLoading();
console.log('用户点击取消');
}
// 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
} 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 => {
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 => {
that.setPayment('alipay', rea.data);
});
// #endif
}
})
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {

View File

@ -1144,19 +1144,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)
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.sumMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
// if (this.paySel != 0) {
// this.payJZ();
// return;
// }
uni.showModal({
title: '付款提示',
content: '确认支付' + that.order.sumMoney + '元吗?',
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 => {
@ -1165,6 +1164,9 @@
uni.showToast({
title: '支付成功'
})
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder()
} else {
uni.showToast({
@ -1173,13 +1175,189 @@
})
}
});
} 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: '支付成功'
})
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 => {
uni.hideLoading();
if (res.code == 0) {
uni.showToast({
title: '支付成功'
})
that.getOrder()
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
} 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();
})