feat(mobile-h5): add mock auth helpers for login page
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0989d4ba0a
commit
fd51a0bee4
3 files changed
+74
No files matched your search
@@ -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 }
|
||||
}
|
||||
Reference in new issue
Block a user