修复通知看不清问题

This commit is contained in:
yml
2026-05-22 22:02:45 +08:00
parent 4b6a12b08d
commit 14efed5ebf
10 changed files with 57 additions and 27 deletions
+10 -4
View File
@@ -40,17 +40,23 @@ onUnmounted(() => {
/* --------- 业务方法 --------- */
async function handleSendCode() {
if (!form.phone.trim()) {
showToast("请输入手机号");
showToast({ message: "请输入手机号", icon: "warning-o" });
return;
}
sending.value = true;
try {
await sendSmsCode(form.phone);
showToast("验证码已发送,开发环境请查看后端日志");
showToast({
message: "验证码已发送,开发环境请查看后端日志",
icon: "passed",
});
startCountDown();
} catch (error) {
showToast(readError(error, "验证码发送失败,请稍后重试"));
showToast({
message: readError(error, "验证码发送失败,请稍后重试"),
icon: "cross",
});
} finally {
sending.value = false;
}
@@ -79,7 +85,7 @@ async function handleLogin() {
await session.login(form.phone, form.code);
await router.push("/m/profile");
} catch {
showToast("登录失败,请检查手机号和验证码");
showToast({ message: "登录失败,请检查手机号和验证码", icon: "cross" });
} finally {
loading.value = false;
}