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(); this.payJZ();
return; return;
} }
if (that.openWay == 1) { // uni.showModal({
uni.showModal({ title: '付款提示',
title: '付款提示', content: '确认支付' + that.tpayMoney + '元吗?',
content: '确认支付' + that.tpayMoney + '元吗?', success: function(re) {
success: function(re) { 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.tordersId, ordersId: that.tordersId,
}).then(res => { }).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 0) { if (res.code == 0) {
console.log(111)
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.navigateTo({
url:'/my/order/payShengji?ordersId='+that.tordersId
})
// that.getOrder() // that.getOrder()
// that.showorderS=false; // that.showorderS=false;
@ -798,146 +797,172 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { uni.showToast({
that.showpay = false title: '支付成功'
if (rea.code == 0) { })
that.callPay(rea.data); uni.navigateTo({
} else { url:'/my/order/payShengji?ordersId='+that.tordersId
uni.showToast({ })
title: rea.msg, },
icon: 'none' 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.order.ordersId, console.log('用户点击取消');
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
} 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) { getTimeStampWithoutSeconds(date) {
@ -1176,15 +1201,14 @@
payJZ() { payJZ() {
let that = this; let that = this;
if (that.openWay == 1) { // uni.showModal({
console.log('1111') title: '付款提示',
uni.showModal({ content: '确认支付' + that.tpayMoney + '元吗?',
title: '付款提示', success: function(re) {
content: '确认支付' + that.tpayMoney + '元吗?', if (re.confirm) {
success: function(re) { that.$queue.showLoading('支付中...')
if (re.confirm) { // console.log('');
that.$queue.showLoading('支付中...') if (that.openWay == 1) { //
// console.log('');
that.$Request.post("/app/artificer/payOrders", { that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId, ordersId: that.tordersId,
}).then(ret => { }).then(ret => {
@ -1206,7 +1230,7 @@
} }
that.getOrder() that.getOrder()
} else { } else {
uni.showToast({ uni.showToast({
title: ret.msg, title: ret.msg,
@ -1214,138 +1238,212 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
that.getOrder() // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.ordersId,
}) type: 3
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { uni.showToast({
that.showpay = false title: '支付成功',
if (rea.code == 0) { icon: 'none'
that.callPay(rea.data); })
} else {
uni.showToast({ if(that.jiazhong=='加钟'){
title: rea.msg, uni.navigateTo({
icon: 'none' 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 { } else if (re.cancel) {
let data = { that.getOrder()
ordersId: that.ordersId,
type: 4
} }
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(); this.payJZ();
return; return;
} }
if (that.openWay == 1) { // uni.showModal({
uni.showModal({ title: '付款提示',
title: '付款提示', content: '确认支付' + that.tpayMoney + '元吗?',
content: '确认支付' + that.tpayMoney + '元吗?', success: function(re) {
success: function(re) { 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.tordersId, ordersId: that.tordersId,
}).then(res => { }).then(res => {
@ -943,10 +943,8 @@
title: '支付成功' title: '支付成功'
}) })
that.getOrder() that.getOrder()
that.showorderS=false; that.showorder=false;
uni.switchTab({
url:'/pages/order/index'
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -954,145 +952,171 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { uni.showToast({
that.showpay = false title: '支付成功'
if (rea.code == 0) { })
that.callPay(rea.data); that.getOrder()
} else { that.showorder=false;
uni.showToast({ // this.$queue.showToast('');
title: rea.msg,
icon: 'none' // 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.order.ordersId, console.log('用户点击取消');
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
} 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) { getTimeStampWithoutSeconds(date) {
@ -1335,15 +1359,14 @@
payJZ() { payJZ() {
let that = this; let that = this;
if (that.openWay == 1) { // uni.showModal({
console.log('1111') title: '付款提示',
uni.showModal({ content: '确认支付' + that.tpayMoney + '元吗?',
title: '付款提示', success: function(re) {
content: '确认支付' + that.tpayMoney + '元吗?', if (re.confirm) {
success: function(re) { that.$queue.showLoading('支付中...')
if (re.confirm) { // console.log('');
that.$queue.showLoading('支付中...') if (that.openWay == 1) { //
// console.log('');
that.$Request.post("/app/artificer/payOrders", { that.$Request.post("/app/artificer/payOrders", {
ordersId: that.tordersId, ordersId: that.tordersId,
}).then(ret => { }).then(ret => {
@ -1354,7 +1377,7 @@
icon: 'none' icon: 'none'
}) })
that.getOrder() that.getOrder()
} else { } else {
uni.showToast({ uni.showToast({
title: ret.msg, title: ret.msg,
@ -1362,138 +1385,163 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
that.getOrder() // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.ordersId,
}) type: 3
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { uni.showToast({
that.showpay = false title: '支付成功',
if (rea.code == 0) { icon: 'none'
that.callPay(rea.data); })
} else { that.getOrder()
uni.showToast({ // this.$queue.showToast('');
title: rea.msg,
icon: 'none' // 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 { } else if (re.cancel) {
let data = { that.getOrder()
ordersId: that.ordersId,
type: 4
} }
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(){ liliaoshi(){
var that=this
uni.setStorage({ uni.setStorage({
key: 'taocanDd', key: 'taocanDd',
data: '我的套餐', data: '我的套餐',
success: function () { success: function () {
uni.navigateTo({ uni.navigateTo({
url: '/pages/therapist/therapistDingdan' url: '/pages/therapist/therapistDingdan?technicianType='+that.orderXm.level
}) })
} }
}); });
@ -1201,16 +1202,10 @@
}, },
// //
cancelOrder(e) { 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 let that = this
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否确认取消订单?' + contentName, content: '是否确认取消订单?',
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
let data = { let data = {

View File

@ -1002,19 +1002,13 @@
pay() { pay() {
let that = this let that = this
this.showpay = false this.showpay = false
if (this.paySel != 0) { uni.showModal({
this.payJZ(); title: '付款提示',
return; content: '确认支付' + that.order.payMoney + '元吗?',
} success: function(re) {
if (that.openWay == 1) { // if (re.confirm) {
console.log("that.order.sumMoney",that.order) that.$queue.showLoading('支付中...')
uni.showModal({ if (that.openWay == 1) { //
title: '付款提示',
content: '确认支付' + that.order.sumMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
that.$Request.post("/app/artificer/payOrders", { that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId, ordersId: that.order.ordersId,
}).then(res => { }).then(res => {
@ -1034,161 +1028,189 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { console.log(ret)
that.showpay = false uni.showToast({
if (rea.code == 0) { title: '支付成功',
that.callPay(rea.data); icon: 'none'
uni.switchTab({ })
url:'/pages/order/index' uni.switchTab({
}) url:'/pages/order/index'
} else { })
uni.showToast({ that.getOrder()
title: rea.msg, },
icon: 'none' fail: function(err) {
}) uni.showToast({
} title: '支付失败',
}); icon: 'nones'
} else { });
let data = { that.getOrder()
ordersId: that.order.ordersId, }
type: 4 });
} }
// debugger; });
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { // #endif
// 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)); // #ifdef H5
uni.switchTab({ let ua = navigator.userAgent.toLowerCase();
url:'/pages/order/index' 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) { callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") { if (typeof WeixinJSBridge === "undefined") {

View File

@ -794,6 +794,7 @@
ordersId: '', ordersId: '',
tpayMoney: '', tpayMoney: '',
paySel: 0, paySel: 0,
showpayZ:false,
showorder: false, showorder: false,
showorderS: false, showorderS: false,
orderList: [], orderList: [],
@ -1025,14 +1026,14 @@
payDzF() { payDzF() {
let that = this let that = this
this.showpay = false this.showpay = false
if (that.openWay == 1) { // uni.showModal({
uni.showModal({ title: '付款提示',
title: '付款提示', content: '确认支付' + that.order.payMoney + '元吗?',
content: '确认支付' + that.order.payMoney + '元吗?', success: function(re) {
success: function(re) { 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.order.ordersId, ordersId: that.order.ordersId,
}).then(res => { }).then(res => {
@ -1043,7 +1044,6 @@
}) })
that.getOrder() that.getOrder()
that.showorderS=false; that.showorderS=false;
that.showpay = false
// uni.switchTab({ // uni.switchTab({
// url:'/pages/order/index' // url:'/pages/order/index'
// }) // })
@ -1054,168 +1054,191 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { console.log(ret)
that.showpay = false uni.showToast({
if (rea.code == 0) { title: '支付成功'
that.callPay(rea.data); })
that.showpay = false that.getOrder()
} else { that.showorderS=false;
uni.showToast({ // this.$queue.showToast('');
title: rea.msg,
icon: 'none' // 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.order.ordersId, console.log('用户点击取消');
type: 4
} }
// debugger;
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
// const urlArr = window.location.href;
// const hostUrl = urlArr.split("/");
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
// const url = '&redirect_url=' + callBack + 'my/order/pay';
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url
that.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() { 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 + '元吗?', success: function(re) {
success: function(re) { 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.tordersId, ordersId: that.tordersId,
}).then(res => { }).then(res => {
@ -1226,9 +1249,9 @@
}) })
that.getOrder() that.getOrder()
that.showpayZ = false; that.showpayZ = false;
uni.switchTab({ // uni.switchTab({
url:'/pages/order/index' // url:'/pages/order/index'
}) // })
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -1236,151 +1259,177 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.tordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.tordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { console.log(ret)
that.showpay = false uni.showToast({
if (rea.code == 0) { title: '支付成功'
that.callPay(rea.data); })
that.showpayZ = false; that.getOrder()
} else { that.showpayZ = false;
uni.showToast({ // this.$queue.showToast('');
title: rea.msg,
icon: 'none' // 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.tordersId, console.log('用户点击取消');
type: 4
} }
// debugger;
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
// const urlArr = window.location.href;
// const hostUrl = urlArr.split("/");
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
// const url = '&redirect_url=' + callBack + 'my/order/pay';
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url
that.showpayZ = false;
} else {
uni.showToast({
title: rea.msg,
icon: 'none'
})
}
});
} }
// #endif })
// #ifdef APP
let data = {
ordersId: that.tordersId,
type: 1
}
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
console.log(rea)
that.showpay = false
if (rea.code == 0) {
that.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data));
that.showpayZ = false;
}
});
// #endif
} else if (that.openWay == 3) { //
that.$queue.showLoading('支付中...')
// #ifdef H5
let data = {
ordersId: that.tordersId,
type: 2
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
const div = document.createElement('div')
div.innerHTML = rea.data //form
document.body.appendChild(div)
document.forms[0].submit()
that.showpayZ = false;
});
// #endif
// #ifdef APP-PLUS
let data = {
ordersId: that.tordersId,
type: 1
}
that.$Request.post('/app/aliPay/payOrder', data).then(
rea => {
that.setPayment('alipay', rea.data);
that.showpayZ = false;
});
// #endif
}
}, },
getTimeStampWithoutSeconds(date) { getTimeStampWithoutSeconds(date) {

View File

@ -1000,19 +1000,14 @@
pay() { pay() {
let that = this let that = this
this.showpay = false this.showpay = false
if (this.paySel != 0) { uni.showModal({
this.payJZ(); title: '付款提示',
return; content: '确认支付' + that.order.payMoney + '元吗?',
} success: function(re) {
if (that.openWay == 1) { // if (re.confirm) {
console.log("that.order.sumMoney",that.order) that.$queue.showLoading('支付中...')
uni.showModal({ console.log('用户点击确定');
title: '付款提示', if (that.openWay == 1) { //
content: '确认支付' + that.order.sumMoney + '元吗?',
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
that.$Request.post("/app/artificer/payOrders", { that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId, ordersId: that.order.ordersId,
}).then(res => { }).then(res => {
@ -1032,161 +1027,187 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { console.log(ret)
that.showpay = false uni.showToast({
if (rea.code == 0) { title: '支付成功',
that.callPay(rea.data); icon: 'none'
uni.switchTab({ })
url:'/pages/order/index' that.getOrder()
}) // this.$queue.showToast('');
} 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.isCheckPay(rea.code, 'wxpay', JSON.stringify(rea.data)); uni.switchTab({
uni.switchTab({ url:'/pages/order/index'
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) { callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") { if (typeof WeixinJSBridge === "undefined") {

View File

@ -632,18 +632,18 @@
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.order.payMoney + '元吗?',
content: '确认支付' + that.order.payMoney + '元吗?', success: function(re) {
success: function(re) { if (re.confirm) {
if (re.confirm) { that.$queue.showLoading('支付中...')
that.$queue.showLoading('支付中...') console.log('用户点击确定');
console.log('用户点击确定'); if (that.openWay == 1) { //
that.$Request.post("/app/user/package/order/payOrder", { that.$Request.post("/app/user/package/order/payOrder", {
ordersId: that.ordersId, ordersId: that.ordersId,
}).then(res => { }).then(res => {
@ -663,145 +663,178 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { uni.showToast({
that.showpay = false title: '支付成功'
if (rea.code == 0) { })
that.callPay(rea.data); uni.redirectTo({
} else { url:'/pages/my/indextaociliaoList?type='+105+'&name='+'index'
uni.showToast({ })
title: rea.msg, that.getOrder()
icon: 'none' // 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.order.ordersId, console.log('用户点击取消');
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
} 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) { callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") { if (typeof WeixinJSBridge === "undefined") {

View File

@ -1121,19 +1121,18 @@
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({
console.log("that.order.sumMoney",that.order) title: '付款提示',
uni.showModal({ content: '确认支付' + that.order.payMoney + '元吗?',
title: '付款提示', success: function(re) {
content: '确认支付' + that.order.sumMoney + '元吗?', if (re.confirm) {
success: function(re) { that.$queue.showLoading('支付中...')
if (re.confirm) { console.log('用户点击确定');
that.$queue.showLoading('支付中...') if (that.openWay == 1) { //
console.log('用户点击确定');
that.$Request.post("/app/artificer/payOrders", { that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId, ordersId: that.order.ordersId,
}).then(res => { }).then(res => {
@ -1142,10 +1141,11 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
that.getOrder()
uni.switchTab({ uni.switchTab({
url:'/pages/order/index' url:'/pages/order/index'
}) })
that.getOrder()
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -1153,163 +1153,185 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { console.log(ret)
that.showpay = false uni.showToast({
if (rea.code == 0) { title: '支付成功'
that.callPay(rea.data); })
uni.switchTab({ uni.switchTab({
url:'/pages/order/index' url:'/pages/order/index'
}) })
} else { that.getOrder()
uni.showToast({
title: rea.msg, // this.$queue.showToast('');
icon: 'none'
}) // 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.order.ordersId, console.log('用户点击取消');
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.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) { callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") { if (typeof WeixinJSBridge === "undefined") {

View File

@ -632,18 +632,18 @@
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.order.payMoney + '元吗?',
content: '确认支付' + that.order.payMoney + '元吗?', success: function(re) {
success: function(re) { if (re.confirm) {
if (re.confirm) { that.$queue.showLoading('支付中...')
that.$queue.showLoading('支付中...') console.log('用户点击确定');
console.log('用户点击确定'); if (that.openWay == 1) { //
that.$Request.post("/app/user/package/order/payOrder", { that.$Request.post("/app/user/package/order/payOrder", {
ordersId: that.ordersId, ordersId: that.ordersId,
}).then(res => { }).then(res => {
@ -663,145 +663,173 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { console.log(ret)
that.showpay = false uni.showToast({
if (rea.code == 0) { title: '支付成功'
that.callPay(rea.data); })
} else { uni.redirectTo({
uni.showToast({ url:'/pages/my/indextaociliaoList?type='+106+'&name='+'index'
title: rea.msg, })
icon: 'none' },
}) 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.order.ordersId, console.log('用户点击取消');
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
} 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) { callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") { if (typeof WeixinJSBridge === "undefined") {

View File

@ -999,18 +999,18 @@
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.order.taxiMoney + '元吗?',
content: '确认支付' + that.order.taxiMoney + '元吗?', success: function(re) {
success: function(re) { 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.order.ordersId, ordersId: that.order.ordersId,
userPackageDetailId : that.order.userPackageDetailId userPackageDetailId : that.order.userPackageDetailId
@ -1031,175 +1031,200 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3,
}) userPackageDetailId : that.order.userPackageDetailId
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2, paySign: ret.data.sign,
userPackageDetailId : that.order.userPackageDetailId success: function(ret) {
} console.log(ret)
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { uni.showToast({
that.showpay = false title: '支付成功'
if (rea.code == 0) { })
uni.hideLoading(); that.getOrder()
that.callPay(rea.data); uni.switchTab({
uni.switchTab({ url:'/pages/order/index'
url:'/pages/order/index' })
}) },
} else { fail: function(err) {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ // this.$queue.showToast('');
title: rea.msg, uni.showToast({
icon: 'none' 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.order.ordersId, console.log('用户点击取消');
type: 4,
userPackageDetailId : that.order.userPackageDetailId
} }
// debugger;
that.$Request.post('/app/wxPay/payOrder', data).then(rea => {
// const urlArr = window.location.href;
// const hostUrl = urlArr.split("/");
// const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
// const url = '&redirect_url=' + callBack + 'my/order/pay';
// window.location = rea.mweb_url + url
that.showpay = false
if (rea.code == 0) {
uni.hideLoading();
const urlArr = window.location.href;
const hostUrl = urlArr.split("/");
const callBack = hostUrl[0] + "//" + hostUrl[2] + "/";
const url = '&redirect_url=' + callBack + 'my/order/pay';
window.location = rea.data.mweb_url + url
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() { pay() {
let that = this let that = this
this.showpay = false this.showpay = false
if (this.paySel != 0) { uni.showModal({
this.payJZ(); title: '付款提示',
return; content: '确认支付' + that.order.payMoney + '元吗?',
} success: function(re) {
if (that.openWay == 1) { // if (re.confirm) {
uni.showModal({ that.$queue.showLoading('支付中...')
title: '付款提示', console.log('用户点击确定');
content: '确认支付' + that.order.payMoney + '元吗?', if (that.openWay == 1) { //
success: function(re) {
if (re.confirm) {
that.$queue.showLoading('支付中...')
console.log('用户点击确定');
that.$Request.post("/app/user/package/order/payOrder", { that.$Request.post("/app/user/package/order/payOrder", {
ordersId: that.ordersId, ordersId: that.ordersId,
}).then(res => { }).then(res => {
@ -725,145 +721,175 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #ifdef MP-WEIXIN
} let data = {
} ordersId: that.order.ordersId,
type: 3
})
} 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()
} }
}); that.$Request.post('/app/wxPay/payOrder', data).then(ret => {
} console.log(ret)
}); if (ret.code == 0) {
// #endif uni.hideLoading();
uni.requestPayment({
// #ifdef H5 provider: 'wxpay',
let ua = navigator.userAgent.toLowerCase(); timeStamp: ret.data.timestamp,
if (ua.indexOf('micromessenger') != -1) { nonceStr: ret.data.noncestr,
let data = { package: ret.data.package,
ordersId: that.order.ordersId, signType: ret.data.signType,
type: 2 paySign: ret.data.sign,
} success: function(ret) {
that.$Request.post('/app/wxPay/payOrder', data).then(rea => { console.log(ret)
that.showpay = false uni.showToast({
if (rea.code == 0) { title: '支付成功'
that.callPay(rea.data); })
} else { uni.redirectTo({
uni.showToast({ url:'/pages/my/indextaociliaoList?type='+that.orderXm.type+'&name='+'index'
title: rea.msg, })
icon: 'none' // 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 { } else if (re.cancel) {
let data = { uni.hideLoading();
ordersId: that.order.ordersId, console.log('用户点击取消');
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
} 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) { callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") { if (typeof WeixinJSBridge === "undefined") {

View File

@ -1144,19 +1144,18 @@
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({
console.log("that.order.sumMoney",that.order) title: '付款提示',
uni.showModal({ content: '确认支付' + that.order.sumMoney + '元吗?',
title: '付款提示', success: function(re) {
content: '确认支付' + that.order.sumMoney + '元吗?', if (re.confirm) {
success: function(re) { that.$queue.showLoading('支付中...')
if (re.confirm) { console.log('用户点击确定');
that.$queue.showLoading('支付中...') if (that.openWay == 1) { //
console.log('用户点击确定');
that.$Request.post("/app/artificer/payOrders", { that.$Request.post("/app/artificer/payOrders", {
ordersId: that.order.ordersId, ordersId: that.order.ordersId,
}).then(res => { }).then(res => {
@ -1165,6 +1164,9 @@
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
uni.switchTab({
url:'/pages/order/index'
})
that.getOrder() that.getOrder()
} else { } else {
uni.showToast({ uni.showToast({
@ -1173,13 +1175,189 @@
}) })
} }
}); });
} else if (re.cancel) { } else if (that.openWay == 2) { //
uni.hideLoading(); that.$queue.showLoading('支付中...')
console.log('用户点击取消'); // #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) { // } else if (that.openWay == 2) { //
that.$queue.showLoading('支付中...') that.$queue.showLoading('支付中...')
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
@ -1312,6 +1490,7 @@
}); });
// #endif // #endif
} }
}, },
callPay: function(response) { callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") { if (typeof WeixinJSBridge === "undefined") {

View File

@ -10,9 +10,6 @@
<u-search class="flex-sub" placeholder="请输入技师名字" :focus="false" shape="square" v-model="artificerName" <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()" :show-action="true" :animation="true" bg-color="#f5f5f5" color="#1A1A1A" @search="onSearch()"
action-text="搜索" @custom="onSearch()"></u-search> action-text="搜索" @custom="onSearch()"></u-search>
<!-- <view class="flex align-center justify-between">
<selectSwitchDitu @change="switch1Change" />
</view> -->
</view> </view>
</view> </view>
<view class="liebiao" v-show="current === 0"> <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'" <image class="touxiang-left-content-img" :src="item.artificerImg ? item.artificerImg : '../../static/logo.png'"
@click.stop="saveImgs(item.artificerImg)" mode="aspectFill"></image> @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> <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> </view>
@ -55,7 +42,7 @@
</view> </view>
</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> <image class="therapist-bottom-dingwei" src="../../static/dituzhaoren6.png"></image>
<view class="therapist-bottom-dingwei-text"> <view class="therapist-bottom-dingwei-text">
{{ item.distance }} {{ item.distance }}
@ -105,127 +92,6 @@
</view> </view>
<empty v-if="orderList.length == 0"></empty> <empty v-if="orderList.length == 0"></empty>
</view> </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> <u-select v-model="Cityshow" :list="cityList" @confirm="getCity"></u-select>
</view> </view>
@ -460,9 +326,6 @@
this.initMap(); this.initMap();
//this.initMapPointThread(); //this.initMapPointThread();
}, },
onUnload() {
//this.closeSocket();
},
methods: { methods: {
// //
goOrder(e) { 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() { openMsg() {
console.log('订阅消息') console.log('订阅消息')
@ -793,13 +638,6 @@
this.getlist() this.getlist()
}, },
getlist() { getlist() {
// if (this.city === '') {
// return;
// }
// if (this.tabIndex == 0) {
// return;
// }
// let index = this.list[this.listIndex].id
let index = 2 let index = 2
let data = { let data = {
// id: curTab, // id: curTab,
@ -837,22 +675,6 @@
} else { } else {
this.orderList = [...this.orderList, ...res.data.list] 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(); uni.stopPullDownRefresh();
}) })