|
|
@ -37,6 +37,7 @@ class AccountController { |
|
|
|
const { password, ...res } = await getAccountInfo({ username }); |
|
|
|
ctx.body = Response(0, "用户登录成功", { |
|
|
|
token: jwt.sign(res, JWT_SECRET, { expiresIn: "1d" }), |
|
|
|
name: res.name, |
|
|
|
}); |
|
|
|
} catch (err) { |
|
|
|
ctx.app.emit("error", userLoginError, ctx); |
|
|
|