Compare commits
No commits in common. "15cb892cb681b6510873731bf465532b041c0dfc" and "6b19df867c757e74a4909ef6ccd3e7e7c90c6cb0" have entirely different histories.
15cb892cb6
...
6b19df867c
|
@ -607,6 +607,7 @@
|
||||||
|
|
||||||
payJZ() {
|
payJZ() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
if (that.openWay == 1) { //零钱支付
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '付款提示',
|
title: '付款提示',
|
||||||
content: '确认支付' + that.tpayMoney + '元吗?',
|
content: '确认支付' + that.tpayMoney + '元吗?',
|
||||||
|
@ -614,18 +615,16 @@
|
||||||
if (re.confirm) {
|
if (re.confirm) {
|
||||||
that.$queue.showLoading('支付中...')
|
that.$queue.showLoading('支付中...')
|
||||||
// console.log('用户点击确定');
|
// console.log('用户点击确定');
|
||||||
if (that.openWay == 1) { //零钱支付
|
|
||||||
that.$Request.post("/app/artificer/payOrders", {
|
that.$Request.post("/app/artificer/payOrders", {
|
||||||
ordersId: that.ordersId,
|
ordersId: that.ordersId,
|
||||||
}).then(ret => {
|
}).then(ret => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (ret.code == 0) {
|
if (ret.code == 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功'
|
title: '支付成功',
|
||||||
})
|
icon: 'none'
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
})
|
||||||
|
// that.getOrder()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -634,6 +633,11 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (re.cancel) {
|
||||||
|
// that.getOrder()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
} else if (that.openWay == 2) { //微信支付
|
} else if (that.openWay == 2) { //微信支付
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
let data = {
|
let data = {
|
||||||
|
@ -652,11 +656,10 @@
|
||||||
signType: ret.data.signType,
|
signType: ret.data.signType,
|
||||||
paySign: ret.data.sign,
|
paySign: ret.data.sign,
|
||||||
success: function(ret) {
|
success: function(ret) {
|
||||||
|
console.log(ret)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功'
|
title: '支付成功',
|
||||||
})
|
icon: 'none'
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
})
|
||||||
// that.getOrder()
|
// that.getOrder()
|
||||||
// this.$queue.showToast('支付成功');
|
// this.$queue.showToast('支付成功');
|
||||||
|
@ -688,12 +691,6 @@
|
||||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
if (rea.code == 0) {
|
if (rea.code == 0) {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.callPay(rea.data);
|
that.callPay(rea.data);
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -710,12 +707,6 @@
|
||||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
if (rea.code == 0) {
|
if (rea.code == 0) {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
const urlArr = window.location.href;
|
const urlArr = window.location.href;
|
||||||
const hostUrl = urlArr.split("/");
|
const hostUrl = urlArr.split("/");
|
||||||
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
||||||
|
@ -753,12 +744,6 @@
|
||||||
}
|
}
|
||||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||||
rea => {
|
rea => {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
const div = document.createElement('div')
|
const div = document.createElement('div')
|
||||||
div.innerHTML = rea.data //此处form就是后台返回接收到的数据
|
div.innerHTML = rea.data //此处form就是后台返回接收到的数据
|
||||||
|
@ -774,24 +759,12 @@
|
||||||
}
|
}
|
||||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||||
rea => {
|
rea => {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
that.setPayment('alipay', rea.data);
|
that.setPayment('alipay', rea.data);
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (re.cancel) {
|
|
||||||
// that.getOrder()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
},
|
||||||
saveJZ(classifyId) {
|
saveJZ(classifyId) {
|
||||||
let data = {
|
let data = {
|
||||||
|
@ -955,6 +928,7 @@
|
||||||
this.payJZ();
|
this.payJZ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (that.openWay == 1) { //零钱支付
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '付款提示',
|
title: '付款提示',
|
||||||
content: '确认支付' + that.tpayMoney + '元吗?',
|
content: '确认支付' + that.tpayMoney + '元吗?',
|
||||||
|
@ -962,7 +936,6 @@
|
||||||
if (re.confirm) {
|
if (re.confirm) {
|
||||||
that.$queue.showLoading('支付中...')
|
that.$queue.showLoading('支付中...')
|
||||||
console.log('用户点击确定');
|
console.log('用户点击确定');
|
||||||
if (that.openWay == 1) { //零钱支付
|
|
||||||
that.$Request.post("/app/artificer/payOrders", {
|
that.$Request.post("/app/artificer/payOrders", {
|
||||||
ordersId: that.ordersId,
|
ordersId: that.ordersId,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
@ -971,10 +944,7 @@
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功'
|
title: '支付成功'
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
// that.getOrder()
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.getOrder()
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
@ -982,6 +952,13 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (re.cancel) {
|
||||||
|
uni.hideLoading();
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
} else if (that.openWay == 2) { //微信支付
|
} else if (that.openWay == 2) { //微信支付
|
||||||
that.$queue.showLoading('支付中...')
|
that.$queue.showLoading('支付中...')
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
|
@ -1001,17 +978,17 @@
|
||||||
signType: ret.data.signType,
|
signType: ret.data.signType,
|
||||||
paySign: ret.data.sign,
|
paySign: ret.data.sign,
|
||||||
success: function(ret) {
|
success: function(ret) {
|
||||||
|
console.log(ret)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功'
|
title: '支付成功',
|
||||||
|
icon: 'none'
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.getOrder()
|
|
||||||
// that.getOrder()
|
// that.getOrder()
|
||||||
// this.$queue.showToast('支付成功');
|
// this.$queue.showToast('支付成功');
|
||||||
|
|
||||||
|
// uni.switchTab({
|
||||||
|
// url: '/pages/my/index'
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
fail: function(err) {
|
fail: function(err) {
|
||||||
// this.$queue.showToast('支付失败');
|
// this.$queue.showToast('支付失败');
|
||||||
|
@ -1036,12 +1013,6 @@
|
||||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
if (rea.code == 0) {
|
if (rea.code == 0) {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.callPay(rea.data);
|
that.callPay(rea.data);
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -1064,12 +1035,6 @@
|
||||||
// window.location = rea.mweb_url + url
|
// window.location = rea.mweb_url + url
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
if (rea.code == 0) {
|
if (rea.code == 0) {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
const urlArr = window.location.href;
|
const urlArr = window.location.href;
|
||||||
const hostUrl = urlArr.split("/");
|
const hostUrl = urlArr.split("/");
|
||||||
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
||||||
|
@ -1108,12 +1073,6 @@
|
||||||
}
|
}
|
||||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||||
rea => {
|
rea => {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
const div = document.createElement('div')
|
const div = document.createElement('div')
|
||||||
div.innerHTML = rea.data //此处form就是后台返回接收到的数据
|
div.innerHTML = rea.data //此处form就是后台返回接收到的数据
|
||||||
document.body.appendChild(div)
|
document.body.appendChild(div)
|
||||||
|
@ -1128,25 +1087,10 @@
|
||||||
}
|
}
|
||||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||||
rea => {
|
rea => {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.setPayment('alipay', rea.data);
|
that.setPayment('alipay', rea.data);
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (re.cancel) {
|
|
||||||
uni.hideLoading();
|
|
||||||
console.log('用户点击取消');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
},
|
||||||
callPay: function(response) {
|
callPay: function(response) {
|
||||||
if (typeof WeixinJSBridge === "undefined") {
|
if (typeof WeixinJSBridge === "undefined") {
|
||||||
|
|
|
@ -957,10 +957,11 @@
|
||||||
pay() {
|
pay() {
|
||||||
let that = this
|
let that = this
|
||||||
this.showpay = false
|
this.showpay = false
|
||||||
// if (this.paySel != 0) {
|
if (this.paySel != 0) {
|
||||||
// this.payJZ();
|
this.payJZ();
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
if (that.openWay == 1) { //零钱支付
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '付款提示',
|
title: '付款提示',
|
||||||
content: '确认支付' + that.tpayMoney + '元吗?',
|
content: '确认支付' + that.tpayMoney + '元吗?',
|
||||||
|
@ -968,7 +969,6 @@
|
||||||
if (re.confirm) {
|
if (re.confirm) {
|
||||||
that.$queue.showLoading('支付中...')
|
that.$queue.showLoading('支付中...')
|
||||||
console.log('用户点击确定');
|
console.log('用户点击确定');
|
||||||
if (that.openWay == 1) { //零钱支付
|
|
||||||
that.$Request.post("/app/artificer/payOrders", {
|
that.$Request.post("/app/artificer/payOrders", {
|
||||||
ordersId: that.ordersId,
|
ordersId: that.ordersId,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
@ -977,9 +977,6 @@
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功'
|
title: '支付成功'
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
// that.getOrder()
|
// that.getOrder()
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -988,6 +985,13 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else if (re.cancel) {
|
||||||
|
uni.hideLoading();
|
||||||
|
console.log('用户点击取消');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
} else if (that.openWay == 2) { //微信支付
|
} else if (that.openWay == 2) { //微信支付
|
||||||
that.$queue.showLoading('支付中...')
|
that.$queue.showLoading('支付中...')
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
|
@ -1007,11 +1011,10 @@
|
||||||
signType: ret.data.signType,
|
signType: ret.data.signType,
|
||||||
paySign: ret.data.sign,
|
paySign: ret.data.sign,
|
||||||
success: function(ret) {
|
success: function(ret) {
|
||||||
|
console.log(ret)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '支付成功'
|
title: '支付成功',
|
||||||
})
|
icon: 'none'
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
})
|
||||||
// that.getOrder()
|
// that.getOrder()
|
||||||
// this.$queue.showToast('支付成功');
|
// this.$queue.showToast('支付成功');
|
||||||
|
@ -1043,12 +1046,6 @@
|
||||||
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
if (rea.code == 0) {
|
if (rea.code == 0) {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.callPay(rea.data);
|
that.callPay(rea.data);
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -1071,12 +1068,6 @@
|
||||||
// window.location = rea.mweb_url + url
|
// window.location = rea.mweb_url + url
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
if (rea.code == 0) {
|
if (rea.code == 0) {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
const urlArr = window.location.href;
|
const urlArr = window.location.href;
|
||||||
const hostUrl = urlArr.split("/");
|
const hostUrl = urlArr.split("/");
|
||||||
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
|
||||||
|
@ -1102,12 +1093,6 @@
|
||||||
console.log(rea)
|
console.log(rea)
|
||||||
that.showpay = false
|
that.showpay = false
|
||||||
if (rea.code == 0) {
|
if (rea.code == 0) {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
|
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1121,12 +1106,6 @@
|
||||||
}
|
}
|
||||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||||
rea => {
|
rea => {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
const div = document.createElement('div')
|
const div = document.createElement('div')
|
||||||
div.innerHTML = rea.data //此处form就是后台返回接收到的数据
|
div.innerHTML = rea.data //此处form就是后台返回接收到的数据
|
||||||
document.body.appendChild(div)
|
document.body.appendChild(div)
|
||||||
|
@ -1141,25 +1120,10 @@
|
||||||
}
|
}
|
||||||
that.$Request.post('/app/aliPay/payOrder', data).then(
|
that.$Request.post('/app/aliPay/payOrder', data).then(
|
||||||
rea => {
|
rea => {
|
||||||
uni.showToast({
|
|
||||||
title: '支付成功'
|
|
||||||
})
|
|
||||||
uni.switchTab({
|
|
||||||
url: '/pages/my/index'
|
|
||||||
})
|
|
||||||
that.setPayment('alipay', rea.data);
|
that.setPayment('alipay', rea.data);
|
||||||
});
|
});
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (re.cancel) {
|
|
||||||
uni.hideLoading();
|
|
||||||
console.log('用户点击取消');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
},
|
},
|
||||||
callPay: function(response) {
|
callPay: function(response) {
|
||||||
if (typeof WeixinJSBridge === "undefined") {
|
if (typeof WeixinJSBridge === "undefined") {
|
||||||
|
|
Loading…
Reference in New Issue