Commit a5efc0fc by 张立顺

支付请求判断修复

1 parent 406b66c4
......@@ -287,21 +287,31 @@ export default {
duration: 0
})
createWxPayH5(params).then((result) => {
console.log(result, 'result')
const { code, data, message } = result
if (code == 0) {
const { tradeNO } = JSON.parse(result.jsapiPayInfo)
this.tradeNO = tradeNO
console.log('tradeNO', tradeNO)
this.tradeNO && this.aliPayment()
} else {
this.$toast.fail(message || '支付失败')
}
const { tradeNO } = JSON.parse(result.jsapiPayInfo)
this.tradeNO = tradeNO
console.log('tradeNO', tradeNO)
this.tradeNO && this.aliPayment()
}).catch((err) => {
console.log(err)
}).finally(() => {
this.$toast.clear()
})
// createWxPayH5(params).then((result) => {
// console.log(result, 'result')
// const { code, data, message } = result
// if (code == 0) {
// const { tradeNO } = JSON.parse(result.jsapiPayInfo)
// this.tradeNO = tradeNO
// console.log('tradeNO', tradeNO)
// this.tradeNO && this.aliPayment()
// } else {
// this.$toast.fail(message || '支付失败')
// }
// }).catch((err) => {
// console.log(err)
// }).finally(() => {
// this.$toast.clear()
// })
},
aliPayment() {
const that = this
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!