Merge branch 'main' into perf/tailwindcss-class

This commit is contained in:
xiaoxian521
2026-01-13 15:22:38 +08:00
36 changed files with 334 additions and 186 deletions

View File

@@ -73,23 +73,21 @@ const onLogin = async (formEl: FormInstance | undefined) => {
username: ruleForm.username,
password: ruleForm.password
})
.then(res => {
if (res.success) {
// 获取后端路由
return initRouter().then(() => {
disabled.value = true;
router
.push(getTopMenu(true).path)
.then(() => {
message(t("login.pureLoginSuccess"), { type: "success" });
})
.finally(() => (disabled.value = false));
});
} else {
message(t("login.pureLoginFail"), { type: "error" });
}
.then(async () => {
// 获取后端路由
await initRouter();
disabled.value = true;
router.push(getTopMenu(true).path).then(() => {
message(t("login.pureLoginSuccess"), { type: "success" });
});
})
.finally(() => (loading.value = false));
.catch(_err => {
message(t("login.pureLoginFail"), { type: "error" });
})
.finally(() => {
disabled.value = false;
loading.value = false;
});
}
});
};