feat(mobile-h5): add mock auth helpers for login page

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-08-10 14:39:48 +08:00
1 parent 0989d4ba0a
commit fd51a0bee4
3 files changed
+74

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
export function validateCredentials(username, password) {
const u = (username || '').trim()
const p = password || ''
if (!u) return { ok: false, code: 'EMPTY_USERNAME', message: '请输入用户名 / 工号' }
if (!p) return { ok: false, code: 'EMPTY_PASSWORD', message: '请输入密码' }
return { ok: true }
}