1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-12 04:00:23 +08:00

finish reset password & fix login

This commit is contained in:
源文雨
2023-03-14 13:53:59 +08:00
parent c14eb49661
commit 4553be7c8a
6 changed files with 115 additions and 39 deletions

View File

@@ -55,7 +55,7 @@ export default [
(item) => item.username === username && password === item.password,
)
if (!checkUser) {
return resultError('Incorrect account or password')
return resultError('Incorrect account or password!')
}
const { userId, username: _username, token, realName, desc, roles } = checkUser
return resultSuccess({
@@ -68,6 +68,19 @@ export default [
})
},
},
// mock reset password
{
url: '/basic-api/resetPassword',
timeout: 200,
method: 'post',
response: ({ body }) => {
const { username, phonenum } = body
return resultSuccess({
msg:
'已将用户' + username + '电话' + phonenum + '的重置请求上报, 请耐心等待管理员与您联系!',
})
},
},
{
url: '/basic-api/getUserInfo',
method: 'get',