fix(admin): 优化提示

This commit is contained in:
sophie committed 2026-07-17 13:19:10 +08:00
1 parent fc4631218b
commit 6a26a4dba8
6 files changed
+28 -12

No files matched your search

@@ -239,8 +239,20 @@ export function useLoginAuth(deps: LoginDeps, options: LoginAuthOptions) {
}
};
/**
* 发起企业微信登录(OAuth 跳转)。
* 核心逻辑:功能未就绪时提示用户;就绪后按 Casdoor/直连企微获取授权 URL 并跳转。
* @returns Promise<void>
*/
const handleWecomLogin = async () => {
if (!config.auth?.wecom?.enabled) return;
// TODO: 企微登录开发完成后改为 true
const wecomLoginReady = false;
if (!wecomLoginReady) {
msg.info(t('login.wecomComingSoon'));
return;
}
const wecomCfg = config.auth.wecom as { loginViaCasdoor?: boolean; callbackPath?: string; authorizeApi?: string };
const viaCasdoor = Boolean(wecomCfg?.loginViaCasdoor);
try {