Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-h5-ailipay
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a5efc0fc
authored
Jul 27, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
支付请求判断修复
1 parent
406b66c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
10 deletions
src/views/alipay/index.vue
src/views/alipay/index.vue
View file @
a5efc0f
...
@@ -287,21 +287,31 @@ export default {
...
@@ -287,21 +287,31 @@ export default {
duration
:
0
duration
:
0
})
})
createWxPayH5
(
params
).
then
((
result
)
=>
{
createWxPayH5
(
params
).
then
((
result
)
=>
{
console
.
log
(
result
,
'result'
)
const
{
tradeNO
}
=
JSON
.
parse
(
result
.
jsapiPayInfo
)
const
{
code
,
data
,
message
}
=
result
this
.
tradeNO
=
tradeNO
if
(
code
==
0
)
{
console
.
log
(
'tradeNO'
,
tradeNO
)
const
{
tradeNO
}
=
JSON
.
parse
(
result
.
jsapiPayInfo
)
this
.
tradeNO
&&
this
.
aliPayment
()
this
.
tradeNO
=
tradeNO
console
.
log
(
'tradeNO'
,
tradeNO
)
this
.
tradeNO
&&
this
.
aliPayment
()
}
else
{
this
.
$toast
.
fail
(
message
||
'支付失败'
)
}
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
}).
finally
(()
=>
{
}).
finally
(()
=>
{
this
.
$toast
.
clear
()
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
()
{
aliPayment
()
{
const
that
=
this
const
that
=
this
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment