|
|
|
@ -169,7 +169,7 @@ |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
uni.showToast({ |
|
|
|
|
icon: 'none', |
|
|
|
|
title: '支付成功!', |
|
|
|
|
title: '支付成功', |
|
|
|
|
duration: 1000 |
|
|
|
|
}); |
|
|
|
|
const ob = { |
|
|
|
@ -229,73 +229,48 @@ |
|
|
|
|
id: that.orderDetail.orderInfo.belongingPayOrderId, |
|
|
|
|
returnUrl: '' |
|
|
|
|
}; |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '支付中...', |
|
|
|
|
mask: true |
|
|
|
|
}); |
|
|
|
|
submitOrder(obj).then((res) => { |
|
|
|
|
console.log('支付结果', res) |
|
|
|
|
const data = res.data; |
|
|
|
|
// 打开轮询任务 |
|
|
|
|
|
|
|
|
|
if (data.status === 0) { |
|
|
|
|
|
|
|
|
|
// 打开轮询任务 |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '支付中...', |
|
|
|
|
mask: true |
|
|
|
|
}); |
|
|
|
|
that.createQueryInterval(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// that.clearQueryInterval(); |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// icon: 'none', |
|
|
|
|
// title: '支付成功!', |
|
|
|
|
// duration: 1000 |
|
|
|
|
// }); |
|
|
|
|
// const ob = { |
|
|
|
|
// orderNumber: that.orderDetail.orderInfo.orderNumber |
|
|
|
|
// }; |
|
|
|
|
// printTicket(ob) |
|
|
|
|
// .then((ress) => { |
|
|
|
|
// console.log('ress',ress); |
|
|
|
|
// const datas = JSON.stringify(that.orderDetail.orderInfo |
|
|
|
|
// .ticketList); |
|
|
|
|
// // console.log(data) |
|
|
|
|
// uni.navigateTo({ |
|
|
|
|
// url: '/pages/payResult/payResult?status=success&detail=' + |
|
|
|
|
// datas + '&tickets=' + ress.data |
|
|
|
|
// }); |
|
|
|
|
// }) |
|
|
|
|
// .catch((err) => { |
|
|
|
|
// console.log(err); |
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
// 已支付 |
|
|
|
|
else if (response.data.status === 10) { |
|
|
|
|
else if (data.status === 10) { |
|
|
|
|
that.clearQueryInterval(); |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
uni.showToast({ |
|
|
|
|
icon: 'none', |
|
|
|
|
title: '支付成功!', |
|
|
|
|
title: '支付成功', |
|
|
|
|
duration: 1000 |
|
|
|
|
}); |
|
|
|
|
const ob = { |
|
|
|
|
orderNumber: that.orderDetail.orderInfo.orderNumber |
|
|
|
|
}; |
|
|
|
|
printTicket(ob) |
|
|
|
|
.then((ress) => { |
|
|
|
|
|
|
|
|
|
const datas = JSON.stringify(that.orderDetail.orderInfo |
|
|
|
|
.ticketList); |
|
|
|
|
// console.log(data) |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/payResult/payResult?status=success&detail=' + |
|
|
|
|
datas + '&tickets=' + ress.data |
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
printTicket(ob) |
|
|
|
|
.then((ress) => { |
|
|
|
|
|
|
|
|
|
const datas = JSON.stringify(that.orderDetail.orderInfo |
|
|
|
|
.ticketList); |
|
|
|
|
console.log('ress',ress) |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/payResult/payResult?status=success&detail=' + |
|
|
|
|
datas + '&tickets=' + ress.data |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch((err) => { |
|
|
|
|
console.log(err); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
.catch((err) => { |
|
|
|
|
console.log(err); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
return |
|
|
|
|
},1000) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
|