fix: 即席查询从登记过的入口续票据,有效必须能进入查询

This commit is contained in:
2026-11-10 09:01:20 +08:00
parent 6140ca3d39
commit e3d7a05e0e
6 changed files with 75 additions and 28 deletions
+8 -2
View File
@@ -46,9 +46,15 @@ async function load() {
async function check(account: Account) {
checkingId.value = account.id;
try {
const result = await api<{ account: Account }>(`/api/admin/pool/${account.id}/check`, { method: "POST" });
const result = await api<{ account: Account; reason: string }>(`/api/admin/pool/${account.id}/check`, { method: "POST" });
accounts.value = accounts.value.map((item) => item.id === result.account.id ? result.account : item);
toast.success(result.account.credentialValid ? "凭证有效" : "凭证已失效");
if (result.reason === "adhoc") {
toast.warning("门户登录还在,但进入即席查询没有接上,请用这个大数据账号重新登录一次");
} else if (result.account.credentialValid) {
toast.success("凭证有效");
} else {
toast.warning("凭证已失效");
}
} catch (error) {
toast.error(error instanceof Error ? error.message : "检查失败");
} finally {