This commit is contained in:
2026-09-02 10:26:43 +08:00
parent 433150dd0f
commit cbd1373358
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -29,8 +29,8 @@ function authRequest(path, data, options = {}) {
})
}
export function login(username, password) {
return authRequest('/auth/login', { username, password })
export function login(loginId, password) {
return authRequest('/auth/login', { loginId, password })
}
export function refresh(refreshToken) {
+2
View File
@@ -29,6 +29,8 @@ test('login uses the real auth endpoint and relaunches to the modular workbench'
for (const text of ['柏悦物流 · PDA作业端', '工号 / 用户名', '登录中']) assert.match(login, new RegExp(text))
assert.doesNotMatch(login, /DEMO_ACCOUNTS|快捷登录|作业仓库/)
assert.match(auth, /\/auth\/login/)
assert.match(auth, /authRequest\('\/auth\/login', \{ loginId, password \}\)/)
assert.doesNotMatch(auth, /authRequest\('\/auth\/login', \{ username, password \}\)/)
assert.match(login, /loginRequest\(userId, this\.form\.password\)/)
assert.match(login, /signInWithTokens\(tokens\)/)
assert.match(login, /form: \{ userId: '', password: '' \}/)