Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bf234785
authored
Aug 09, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 修改
parent
6c5bbeab
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
.env.develop
+2
-2
src/utils/request.js
+3
-3
No files found.
.env.develop
View file @
bf234785
NODE_ENV='development'
NODE_ENV='development'
VUE_APP_BASE_API='http://172.16.4.219:8090'
VUE_APP_BASE_API='http://server.bdideal.com'
\ No newline at end of file
\ No newline at end of file
src/utils/request.js
View file @
bf234785
import
axios
from
'axios'
import
axios
from
'axios'
import
store
from
'../store'
//
import store from '../store'
import
{
import
{
getToken
,
getToken
,
removeToken
removeToken
...
@@ -17,8 +17,8 @@ const service = axios.create({
...
@@ -17,8 +17,8 @@ const service = axios.create({
// request拦截器
// request拦截器
service
.
interceptors
.
request
.
use
(
service
.
interceptors
.
request
.
use
(
config
=>
{
config
=>
{
if
(
store
.
getters
.
token
)
{
if
(
getToken
()
)
{
config
.
headers
[
'visual
-t
oken'
]
=
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
config
.
headers
[
'visual
T
oken'
]
=
getToken
()
// 让每个请求携带自定义token 请根据实际情况自行修改
}
}
return
config
return
config
},
},
...
...
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