mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-16 07:33:49 +08:00
v3.1.0 1、【新增】9种登录背景图和样式; 2、【新增】全局字体大小切换; 3、【新增】主题颜色切换; 4、【新增】移除cookie保存token,改为使用localStorage; 5、【优化】升级 ant design vue 到最新版本;
This commit is contained in:
@@ -25,8 +25,10 @@ import smartEnumPlugin from '/@/plugins/smart-enums-plugin';
|
||||
import { buildRoutes, router } from '/@/router';
|
||||
import { store } from '/@/store';
|
||||
import { useUserStore } from '/@/store/modules/system/user';
|
||||
import 'ant-design-vue/dist/reset.css';
|
||||
import '/@/theme/index.less';
|
||||
import { getTokenFromCookie } from '/@/utils/cookie-util';
|
||||
import { localRead } from '/@/utils/local-util.js';
|
||||
import LocalStorageKeyConst from '/@/constants/local-storage-key-const.js';
|
||||
|
||||
/*
|
||||
* -------------------- ※ 着重 解释说明下main.js的初始化逻辑 begin ※ --------------------
|
||||
@@ -82,7 +84,7 @@ function initVue() {
|
||||
}
|
||||
|
||||
//不需要获取用户信息、用户菜单、用户菜单动态路由,直接初始化vue即可
|
||||
let token = getTokenFromCookie();
|
||||
let token = localRead(LocalStorageKeyConst.USER_TOKEN);
|
||||
if (!token) {
|
||||
initVue();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user