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 5b242f46
authored
Sep 05, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加alert
1 parent
8941c3ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
src/views/alipay/index.vue
src/views/alipay/index.vue
View file @
5b242f4
...
@@ -130,7 +130,8 @@ export default {
...
@@ -130,7 +130,8 @@ export default {
this
.
merchantId
=
merchantId
this
.
merchantId
=
merchantId
this
.
merchantName
=
merchantName
this
.
merchantName
=
merchantName
console
.
log
(
appId
,
'appId'
)
console
.
log
(
appId
,
'appId'
)
console
.
log
(
'ap.getAuthCode'
,
ap
.
getAuthCode
)
// console.log('ap.getAuthCode', ap.getAuthCode)
alert
(
appId
)
// 请求用户授权
// 请求用户授权
ap
.
getAuthCode
({
ap
.
getAuthCode
({
// appId: '${appId}',
// appId: '${appId}',
...
@@ -139,9 +140,11 @@ export default {
...
@@ -139,9 +140,11 @@ export default {
// 主动授权:auth_user,静默授权:auth_base。或者其它scope
// 主动授权:auth_user,静默授权:auth_base。或者其它scope
scopes
:
[
'auth_base'
]
scopes
:
[
'auth_base'
]
},
function
(
res
)
{
},
function
(
res
)
{
console
.
log
(
'res.authCode'
,
res
.
authCode
)
alert
(
JSON
.
stringify
(
res
))
console
.
log
(
JSON
.
stringify
(
res
))
res
.
authCode
&&
that
.
getOpenId
(
res
.
authCode
)
res
.
authCode
&&
that
.
getOpenId
(
res
.
authCode
)
},
function
(
res
)
{
},
function
(
res
)
{
alert
(
JSON
.
stringify
(
res
))
console
.
log
(
'res.fail'
,
res
)
console
.
log
(
'res.fail'
,
res
)
// res.authCode && that.getOpenId(res.authCode)
// res.authCode && that.getOpenId(res.authCode)
})
})
...
@@ -159,16 +162,16 @@ export default {
...
@@ -159,16 +162,16 @@ export default {
},
},
methods
:
{
methods
:
{
getOpenId
(
code
)
{
getOpenId
(
code
)
{
// ap.alert(JSON.stringify(code))
console
.
log
(
'getOpenId'
,
code
)
console
.
log
(
'getOpenId'
,
code
)
console
.
log
(
alipayOauthToken
)
console
.
log
(
alipayOauthToken
)
// !code&&console.log('alipayOauthToken')
// !code&&console.log('alipayOauthToken')
code
&&
alipayOauthToken
({
code
}).
then
((
result
)
=>
{
code
&&
alipayOauthToken
({
code
}).
then
((
result
)
=>
{
alert
(
'alipayOauthToken'
,
JSON
.
stringify
(
result
))
console
.
log
(
'alipayOauthToken'
,
result
)
console
.
log
(
'alipayOauthToken'
,
result
)
const
{
userId
}
=
result
const
{
userId
}
=
result
this
.
userId
=
userId
this
.
userId
=
userId
// ap.alert(JSON.stringify(result))
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
alert
(
JSON
.
stringify
(
err
))
// ap.alert(JSON.stringify(err))
// ap.alert(JSON.stringify(err))
console
.
log
(
'err'
,
err
)
console
.
log
(
'err'
,
err
)
})
})
...
...
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