Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
fanxing_new
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 ee4353b9
authored
Jun 16, 2021
by
潘建波
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
code增加token
1 parent
7cc59b41
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
10 deletions
public/js/config.js
src/api/axios.js
src/api/baseUrl.js
src/views/Layout/menu.vue
src/views/Login.vue
public/js/config.js
View file @
ee4353b
...
...
@@ -2,7 +2,7 @@ window.config = {
"logstatus"
:
true
,
//是否开启日志收集
"hadertitle"
:
"AI视频分析平台"
,
//系统标题
"logintitle"
:
"AI视频分析平台"
,
//展示标题
"https"
:
tru
e
,
"https"
:
fals
e
,
"isvideo"
:
0
,
"bigtree"
:
false
,
//大数据展示树
"host"
:
"http://10.1.200.100:20080"
,
...
...
src/api/axios.js
View file @
ee4353b
...
...
@@ -37,11 +37,7 @@ service.interceptors.request.use(
let
atoken
=
localStorage
.
getItem
(
"atoken"
);
if
(
atoken
)
{
// 判断是否存在token,如果存在的话,则每个http header都加上token
if
(
config
.
url
.
indexOf
(
"codes"
)
>
-
1
)
{
//
}
else
{
config
.
headers
.
authorization
=
atoken
;
}
}
else
{
router
.
push
(
"/login"
).
catch
(
err
=>
{
err
});
// endLoading();
...
...
src/api/baseUrl.js
View file @
ee4353b
...
...
@@ -4,7 +4,7 @@ import axios from "axios";
switch
(
process
.
env
.
NODE_ENV
)
{
case
"development"
:
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
baseUrl
=
window
.
config
.
https
?
"https://192.168.9.245:20070"
:
"http://192.168.9.2
33
:20080"
;
// 测试环境url
baseUrl
=
window
.
config
.
https
?
"https://192.168.9.245:20070"
:
"http://192.168.9.2
45
:20080"
;
// 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
...
...
src/views/Layout/menu.vue
View file @
ee4353b
...
...
@@ -75,6 +75,7 @@ export default {
err
;
});
}
else
{
debugger
this
.
$router
.
push
(
"/"
).
catch
(
err
=>
{
err
;
});
...
...
src/views/Login.vue
View file @
ee4353b
...
...
@@ -180,10 +180,10 @@ export default {
//存储配置列表
this
.
storeConfList
();
//code列表
//
this.getCatesList();
//
this.getCodeList();
//
this.getCustomCode();
//
this.getEventList();
this
.
getCatesList
();
this
.
getCodeList
();
this
.
getCustomCode
();
this
.
getEventList
();
this
.
getDev
();
this
.
getMenu
(
res
.
user_unid
);
},
...
...
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