Commit 7b2af723 authored by 李智书's avatar 李智书

1.修改支付结果回调;

parent e1a37f48
......@@ -140,7 +140,7 @@
selectPayProjectObj: {},
selectCount: 0,
dialogShow: false,
PaymentRsults: 1,
PaymentRsults: -1,
allData: {},
// 交费项目详情信息
ChargeProDetail: {},
......@@ -160,15 +160,9 @@
})
if (options.PaymentRsults) {
this_.dialogShow = true
this.PaymentRsults = parseInt(options.PaymentRsults)
// uni.showLoading({
// mask: true,
// title: "查询支付结果"
// })
// setTimeout(function() {
// uni.hideLoading()
// this_.returnPaymentResult(uni.getStorageSync("prepayId"))
// }, 1000)
this.PaymentRsults = parseInt(options.PaymentRsults);
// 上报支付结果
this.returnPaymentResult(uni.getStorageSync("prepayId"), this.PaymentRsults)
}
this.queryChargeProDetail()
},
......@@ -243,6 +237,13 @@
try {
console.log("dialogClosed");
this.dialogShow = false
if (this.PaymentRsults == 1) {
// 支付成功返回交费项目列表
uni.redirectTo({
url: "../PayProject/PayProject"
})
return
}
} catch (e) {
//TODO handle the exception
console.log(e);
......@@ -411,14 +412,19 @@
}
},
// 返回支付结果
async returnPaymentResult(tradeId) {
async returnPaymentResult(tradeId, payStatus) {
try {
if (!tradeId && !payStatus) {
return
}
let data = await this.$http.get({
url: orderApi + '/order-charge/app/charge/project/returnPaymentResult'
}, {
tradeId
tradeId,
payStatus
})
if (data.data.code != 200 || !data.data.data) {
console.log(data)
if (data.code != 200 || !data.data) {
uni.showToast({
icon: "none",
mask: true,
......@@ -426,7 +432,6 @@
})
return
}
this_.dialogShow = true
} catch (e) {
//TODO handle the exception
console.log(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment