更新登录时间

This commit is contained in:
LuChenQun 2021-04-06 14:01:51 +08:00 committed by GitHub
parent d4d65275d6
commit 075ff1fd0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -59,6 +59,7 @@ module.exports = class extends Base {
username: user.username username: user.username
}); });
user.token = token; user.token = token;
await this.model('users').where({ id: user.id }).update({ lastLogin: ['exp', 'NOW()'] });
this.json({ code: 0, data: user, msg: "登陆成功" }); this.json({ code: 0, data: user, msg: "登陆成功" });
} }
} catch (error) { } catch (error) {