Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayPc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
mingPayPc
Commits
6dcb6030
Commit
6dcb6030
authored
Jul 11, 2019
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
token过多问题
parent
f2edd76b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
config.js
src/api/config.js
+2
-7
No files found.
src/api/config.js
View file @
6dcb6030
...
...
@@ -2,6 +2,7 @@ import * as dd from 'dingtalk-jsapi'
import
axios
from
'axios'
import
qs
from
'qs'
import
{
MINGPAY_CONSTANT
}
from
'./constant'
axios
.
defaults
.
headers
[
'Authorization'
]
=
`Bearer
${
localStorage
.
getItem
(
'token'
)}
`
const
config
=
{
ddconfig
:
()
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -62,13 +63,7 @@ const config = {
code
:
info
.
code
,
orgId
:
localStorage
.
getItem
(
'orgId'
)
})
return
axios
.
post
(
`http://139.196.213.18:8300/v1/auth/token?
${
senddate
}
`
,
{
headers
:
{
'Authorization'
:
`Bearer
${
localStorage
.
getItem
(
'token'
)}
`
}
}
).
then
((
res
)
=>
{
return
axios
.
post
(
`http://139.196.213.18:8300/v1/auth/token?
${
senddate
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
'0'
)
{
localStorage
.
setItem
(
'token'
,
res
.
data
.
data
.
accessToken
.
access_token
)
localStorage
.
setItem
(
'userId'
,
res
.
data
.
data
.
oapiUser
.
userid
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment