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

1.修改支付结果回调;

parent e1a37f48
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
selectPayProjectObj: {}, selectPayProjectObj: {},
selectCount: 0, selectCount: 0,
dialogShow: false, dialogShow: false,
PaymentRsults: 1, PaymentRsults: -1,
allData: {}, allData: {},
// 交费项目详情信息 // 交费项目详情信息
ChargeProDetail: {}, ChargeProDetail: {},
...@@ -160,15 +160,9 @@ ...@@ -160,15 +160,9 @@
}) })
if (options.PaymentRsults) { if (options.PaymentRsults) {
this_.dialogShow = true this_.dialogShow = true
this.PaymentRsults = parseInt(options.PaymentRsults) this.PaymentRsults = parseInt(options.PaymentRsults);
// uni.showLoading({ // 上报支付结果
// mask: true, this.returnPaymentResult(uni.getStorageSync("prepayId"), this.PaymentRsults)
// title: "查询支付结果"
// })
// setTimeout(function() {
// uni.hideLoading()
// this_.returnPaymentResult(uni.getStorageSync("prepayId"))
// }, 1000)
} }
this.queryChargeProDetail() this.queryChargeProDetail()
}, },
...@@ -243,6 +237,13 @@ ...@@ -243,6 +237,13 @@
try { try {
console.log("dialogClosed"); console.log("dialogClosed");
this.dialogShow = false this.dialogShow = false
if (this.PaymentRsults == 1) {
// 支付成功返回交费项目列表
uni.redirectTo({
url: "../PayProject/PayProject"
})
return
}
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); console.log(e);
...@@ -411,14 +412,19 @@ ...@@ -411,14 +412,19 @@
} }
}, },
// 返回支付结果 // 返回支付结果
async returnPaymentResult(tradeId) { async returnPaymentResult(tradeId, payStatus) {
try { try {
if (!tradeId && !payStatus) {
return
}
let data = await this.$http.get({ let data = await this.$http.get({
url: orderApi + '/order-charge/app/charge/project/returnPaymentResult' 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({ uni.showToast({
icon: "none", icon: "none",
mask: true, mask: true,
...@@ -426,7 +432,6 @@ ...@@ -426,7 +432,6 @@
}) })
return return
} }
this_.dialogShow = true
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception
console.log(e); 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