fix(测试计划): 修复测试计划报告无痕浏览器打开重定向登录页面

This commit is contained in:
xinxin.wu 2024-06-20 09:55:08 +08:00 committed by Craftsman
parent e12eb97757
commit 3cf65b590b
3 changed files with 13 additions and 3 deletions

View File

@ -81,7 +81,10 @@
} }
const { height } = useWindowSize(); const { height } = useWindowSize();
appStore.innerHeight = height.value; appStore.innerHeight = height.value;
if (userStore.id) {
userStore.initLocalConfig(); // userStore.initLocalConfig(); //
}
// @desc: TODO便 // @desc: TODO便
appStore.getProjectInfos(); appStore.getProjectInfos();
}); });

View File

@ -302,6 +302,9 @@
onBeforeMount(async () => { onBeforeMount(async () => {
try { try {
loading.value = true; loading.value = true;
if (!userStore.id) {
return;
}
const res = await getLocalConfig(); const res = await getLocalConfig();
if (Array.isArray(res)) { if (Array.isArray(res)) {
res.forEach((config) => { res.forEach((config) => {

View File

@ -114,7 +114,9 @@ const useUserStore = defineStore('user', {
appStore.setCurrentOrgId(res.lastOrganizationId || ''); appStore.setCurrentOrgId(res.lastOrganizationId || '');
appStore.setCurrentProjectId(res.lastProjectId || ''); appStore.setCurrentProjectId(res.lastProjectId || '');
this.setInfo(res); this.setInfo(res);
if (res) {
this.initLocalConfig(); // 获取本地执行配置 this.initLocalConfig(); // 获取本地执行配置
}
} catch (err) { } catch (err) {
clearToken(); clearToken();
throw err; throw err;
@ -129,7 +131,9 @@ const useUserStore = defineStore('user', {
appStore.setCurrentOrgId(res.lastOrganizationId || ''); appStore.setCurrentOrgId(res.lastOrganizationId || '');
appStore.setCurrentProjectId(res.lastProjectId || ''); appStore.setCurrentProjectId(res.lastProjectId || '');
this.setInfo(res); this.setInfo(res);
if (res) {
this.initLocalConfig(); // 获取本地执行配置 this.initLocalConfig(); // 获取本地执行配置
}
} catch (err) { } catch (err) {
clearToken(); clearToken();
throw err; throw err;