fix(contract): 纯图片扫描 PDF 坐标高亮与 OCR 复核
This commit is contained in:
1 parent
ca312ea751
commit
ce1fd59f61
21 files changed
+1665
-54
No files matched your search
@@ -13,7 +13,7 @@ import { getAuthHeaders, logoutAuth } from '@/shared/utils/auth';
|
||||
import { isPublicPath } from '@/shared/constants/routes';
|
||||
|
||||
const router = useRouter();
|
||||
const { locale } = useI18n();
|
||||
const { locale, t } = useI18n();
|
||||
const { themePreference, initTheme, setThemePreference } = useTheme();
|
||||
const {
|
||||
messageDialogVisible,
|
||||
@@ -62,11 +62,16 @@ watch(themePreference, (newTheme) => {
|
||||
updateThemePreference(newTheme);
|
||||
});
|
||||
|
||||
/**
|
||||
* 处理接口返回未登录状态,提示用户重新登录并清理失效的本地登录信息。
|
||||
* 核心逻辑:忽略可选的 SSO 应用目录请求;其余未授权请求统一展示易懂提示,再执行登出。
|
||||
* @param event - 包含请求地址和状态码的全局未授权事件。
|
||||
*/
|
||||
const onUnauthorized = (event: Event) => {
|
||||
const url = String((event as CustomEvent<{ url?: string }>).detail?.url || '');
|
||||
// 外部应用目录是可选导航能力,加载失败只能隐藏入口,不能清除有效 HXOPS 登录态。
|
||||
if (/\/api\/sso\/apps(?:\?|$)/.test(url)) return;
|
||||
showMessageDialog('error', '认证已过期或无效,请重新登录');
|
||||
showMessageDialog('error', t('login.sessionExpiredHint'), t('login.sessionExpired'));
|
||||
logoutAuth();
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user