清空token
This commit is contained in:
@@ -39,6 +39,16 @@
|
||||
<script src="js/common.js"></script>
|
||||
<script src="js/push-common.js"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
// 清空过期的Token
|
||||
var token_add_time = localStorage.getItem("user_token_add_time");
|
||||
var current_time = new Date().getTime();
|
||||
var nTime = current_time - token_add_time;
|
||||
var day = Math.floor(nTime/86400000);
|
||||
if (day >= 25) {
|
||||
localStorage.removeItem("user_token");
|
||||
localStorage.removeItem("user_token_add_time");
|
||||
}
|
||||
|
||||
document.getElementById("quotations").setAttribute("href", BASE_PATH + '/quotations/index');
|
||||
//document.getElementById("selfInfo").setAttribute("href", BASE_PATH + '/selfInfo/index');
|
||||
//mui初始化
|
||||
|
||||
Reference in New Issue
Block a user