fix: 未登录时启用离线开发模式后添加默认用户信息

This commit is contained in:
yangsy
2026-01-08 14:07:40 +08:00
parent 653981c0e7
commit c273ae21d9

View File

@@ -45,6 +45,16 @@ export const useSettingStore = defineStore(
if (!userStore.userLoginResult.token) {
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') {
router.push({ path: '/' });
}