Commit a532fb64 authored by wangchunxiang's avatar wangchunxiang

token

parent 282520e6
Pipeline #2079 failed with stages
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,5 +8,5 @@
<link rel="shortcut icon" href="./favicon.png"><link href="./css\1.css" rel="stylesheet"><link href="./css\index.css" rel="stylesheet"></head>
<body>
<div id="ice-container"></div>
<script type="text/javascript" src="./vendors~index.a924e8bb586f543bbe22.js"></script><script type="text/javascript" src="./index.6aecfbf00ee6a67ebfbb.js"></script></body>
<script type="text/javascript" src="./vendors~index.a924e8bb586f543bbe22.js"></script><script type="text/javascript" src="./index.7912559bb533e8120865.js"></script></body>
</html>
......@@ -20,11 +20,11 @@ axios.interceptors.request.use(config => {
if(!hasIt('login', config.url)){
let token = get('token');
if (token) {
if(get('overdue_data') < Date.now()){
clear();
window.location.href='/#/login';
return
}
// if(get('overdue_data') < Date.now()){
// clear();
// window.location.href='/#/login';
// return
// }
config.headers.token=token
} else {
window.location.href='/#/login';
......@@ -44,7 +44,7 @@ axios.interceptors.response.use(
return res.data;
} else {
error(res.msg);
if(res.code==402){
if(res.code==402||res.code==401){
clear();
window.location.href='/#/login';
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment