Commit ee4353b9 by 潘建波

code增加token

1 parent 7cc59b41
......@@ -2,7 +2,7 @@ window.config = {
"logstatus":true, //是否开启日志收集
"hadertitle":"AI视频分析平台",//系统标题
"logintitle":"AI视频分析平台",//展示标题
"https": true,
"https": false,
"isvideo":0,
"bigtree":false,//大数据展示树
"host":"http://10.1.200.100:20080",
......
......@@ -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();
......
......@@ -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.233:20080"; // 测试环境url
baseUrl = window.config.https?"https://192.168.9.245:20070":"http://192.168.9.245:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
// baseUrl = "http://192.168.9.61:8086";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
......
......@@ -75,6 +75,7 @@ export default {
err;
});
} else {
debugger
this.$router.push("/").catch(err => {
err;
});
......
......@@ -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);
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!