diff --git a/frontend/src/api/modules/setting/organizationAndProject.ts b/frontend/src/api/modules/setting/organizationAndProject.ts index 9b4a77f1c6..49193fd820 100644 --- a/frontend/src/api/modules/setting/organizationAndProject.ts +++ b/frontend/src/api/modules/setting/organizationAndProject.ts @@ -104,7 +104,7 @@ export function enableOrDisableProject(id: string, isEnable = true) { // 获取组织下拉选项 export function getSystemOrgOption() { - return MSR.post({ url: orgUrl.postOrgOptionsUrl }); + return MSR.post({ url: orgUrl.postOrgOptionsUrl }, { ignoreCancelToken: true }); } // 创建或更新项目 diff --git a/frontend/src/api/modules/user/index.ts b/frontend/src/api/modules/user/index.ts index 42ffaa584e..31009f9283 100644 --- a/frontend/src/api/modules/user/index.ts +++ b/frontend/src/api/modules/user/index.ts @@ -139,7 +139,7 @@ export function validLocalConfig(host: string) { // 个人设置-获取本地执行配置 export function getLocalConfig() { - return MSR.get({ url: GetLocalConfigUrl }); + return MSR.get({ url: GetLocalConfigUrl }, { ignoreCancelToken: true }); } // 个人设置-启用本地执行配置 diff --git a/frontend/src/components/business/ms-personal-drawer/components/localExec.vue b/frontend/src/components/business/ms-personal-drawer/components/localExec.vue index cb2331ace4..7cc39e53cc 100644 --- a/frontend/src/components/business/ms-personal-drawer/components/localExec.vue +++ b/frontend/src/components/business/ms-personal-drawer/components/localExec.vue @@ -54,52 +54,6 @@ - - @@ -240,65 +194,6 @@ } } - const testUiLoading = ref(false); - const uiConfig = ref({ - id: '', - userUrl: '', - enable: false, - type: 'UI', - status: 0, - }); - - async function testUi() { - if (uiConfig.value.userUrl.trim() === '') { - return; - } - try { - testUiLoading.value = true; - if (uiConfig.value.id) { - // 已经存在配置 - await updateLocalConfig({ - id: uiConfig.value.id, - userUrl: uiConfig.value.userUrl.trim(), - }); - } else { - const result = await addLocalConfig({ - type: 'UI', - userUrl: uiConfig.value.userUrl.trim(), - }); - uiConfig.value.id = result.id; - } - const res = await validLocalConfig(uiConfig.value.userUrl.trim()); - uiConfig.value.status = res === 'OK' ? 1 : 2; - if (res) { - Message.success(t('ms.personal.testPass')); - } else { - Message.error(t('ms.personal.testFail')); - } - } catch (error) { - // eslint-disable-next-line no-console - console.log(error); - } finally { - testUiLoading.value = false; - } - } - - async function handleUiPriorityBeforeChange(val: string | number | boolean) { - try { - if (val) { - await enableLocalConfig(uiConfig.value.id); - } else { - await disableLocalConfig(uiConfig.value.id); - } - Message.success(val ? t('ms.personal.uiLocalExecutionOpen') : t('ms.personal.uiLocalExecutionClose')); - return true; - } catch (error) { - // eslint-disable-next-line no-console - console.log(error); - return false; - } - } - onBeforeMount(async () => { try { loading.value = true; @@ -313,11 +208,6 @@ ...config, status: 'none', }; - } else if (config.type === 'UI') { - uiConfig.value = { - ...config, - status: 'none', - }; } }); } diff --git a/frontend/src/views/login/components/login-form.vue b/frontend/src/views/login/components/login-form.vue index c58732d723..3631a055a2 100644 --- a/frontend/src/views/login/components/login-form.vue +++ b/frontend/src/views/login/components/login-form.vue @@ -219,6 +219,7 @@ password: encrypted(values.password), authenticate: userInfo.value.authenticate, } as LoginData); + setLoginExpires(); setLongType(userInfo.value.authenticate); Message.success(t('login.form.login.success')); const { rememberPassword } = loginConfig.value; @@ -250,7 +251,6 @@ if (res) { appStore.setCurrentMenuConfig(res?.moduleIds || []); } - setLoginExpires(); router.push({ name: redirectHasPermission ? (redirect as string) : currentRouteName, query: {