Skip to content

Commit

Permalink
更新登录时间
Browse files Browse the repository at this point in the history
  • Loading branch information
luchenqun authored Apr 6, 2021
1 parent d4d6527 commit 075ff1f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/controller/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.exports = class extends Base {
username: user.username
});
user.token = token;
await this.model('users').where({ id: user.id }).update({ lastLogin: ['exp', 'NOW()'] });
this.json({ code: 0, data: user, msg: "登陆成功" });
}
} catch (error) {
Expand Down

0 comments on commit 075ff1f

Please sign in to comment.