|
|
@@ -10,7 +10,17 @@ import DashboardDesigner from '../components/dashboardDesigner/layout'
|
|
|
import zhCN from 'antd/lib/locale-provider/zh_CN'
|
|
|
import Demo from '../demo';
|
|
|
|
|
|
-localStorage.setItem("isAuthenticated", "false");
|
|
|
+if (!window.localStorage.getItem("isAuthenticated")) {
|
|
|
+ window.localStorage.setItem("isAuthenticated", "false");
|
|
|
+}else {
|
|
|
+ /**
|
|
|
+ * 是否过期
|
|
|
+ * 1.是-----设置isAuthenticated为false
|
|
|
+ */
|
|
|
+ if(new Date(+window.localStorage.getItem("expireTime")) < new Date()) {
|
|
|
+ window.localStorage.setItem("isAuthenticated", "false");
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
function RouterConfig({ history }) {
|
|
|
return (
|