feat: persistent registration toast, click to dismiss

This commit is contained in:
2026-07-26 21:32:01 +08:00
parent 605830ac34
commit c4675f7a15
2 changed files with 18 additions and 7 deletions
+1 -1
View File
@@ -141,7 +141,7 @@ const PageMarket = {
if (!email || !pass) { Toast.show('请输入邮箱和密码', 'error'); return; }
const res = await fetch('/api/market/register', { method: 'POST', headers: {'Content-Type':'application/json'}, body: JSON.stringify({email, password: pass, passwordConfirm: pass, name}) });
const data = await res.json();
Toast.show(data.error ? '注册失败' : '注册成功,请查收验证邮件', data.error ? 'error' : 'success');
Toast.show(data.error ? '注册失败' : '注册成功,请查收验证邮件(点击关闭)', data.error ? 'error' : 'success', data.error ? 3000 : 0);
if (!data.error) overlay.remove();
});
},