fix: 未登录时启用离线开发模式后添加默认用户信息
This commit is contained in:
@@ -45,6 +45,16 @@ export const useSettingStore = defineStore(
|
|||||||
if (!userStore.userLoginResult.token) {
|
if (!userStore.userLoginResult.token) {
|
||||||
userStore.userLoginResult.token = 'test';
|
userStore.userLoginResult.token = 'test';
|
||||||
}
|
}
|
||||||
|
if (!userStore.userInfo) {
|
||||||
|
userStore.userInfo = {
|
||||||
|
id: '2',
|
||||||
|
username: 'lamp',
|
||||||
|
nickName: '内置超管',
|
||||||
|
mobile: '15211111110',
|
||||||
|
employeeId: '2',
|
||||||
|
tenantId: '1',
|
||||||
|
};
|
||||||
|
}
|
||||||
if (router.currentRoute.value.path === '/login') {
|
if (router.currentRoute.value.path === '/login') {
|
||||||
router.push({ path: '/' });
|
router.push({ path: '/' });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user