save
This commit is contained in:
parent
a0e348a422
commit
93ceaa4cb1
@ -73,6 +73,8 @@ class AccountController extends Crud
|
|||||||
if (!$admin || !Util::passwordVerify($password, $admin->password)) {
|
if (!$admin || !Util::passwordVerify($password, $admin->password)) {
|
||||||
return $this->json(1, '账户不存在或密码错误');
|
return $this->json(1, '账户不存在或密码错误');
|
||||||
}
|
}
|
||||||
|
$admin->login_at = date('Y-m-d H:i:s');
|
||||||
|
$admin->save();
|
||||||
$this->removeLoginLimit($username);
|
$this->removeLoginLimit($username);
|
||||||
$admin = $admin->toArray();
|
$admin = $admin->toArray();
|
||||||
$session = $request->session();
|
$session = $request->session();
|
||||||
|
@ -1053,7 +1053,7 @@ EOF;
|
|||||||
const UPDATE_API = "$url_path_base/update";
|
const UPDATE_API = "$url_path_base/update";
|
||||||
|
|
||||||
// 获取数据库记录
|
// 获取数据库记录
|
||||||
layui.use(["form", "util, "popup"], function () {
|
layui.use(["form", "util", "popup"], function () {
|
||||||
let $ = layui.$;
|
let $ = layui.$;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: SELECT_API,
|
url: SELECT_API,
|
||||||
|
@ -14,6 +14,7 @@ use plugin\admin\app\model\Base;
|
|||||||
* @property string $mobile 手机
|
* @property string $mobile 手机
|
||||||
* @property string $created_at 创建时间
|
* @property string $created_at 创建时间
|
||||||
* @property string $updated_at 更新时间
|
* @property string $updated_at 更新时间
|
||||||
|
* @property string $login_at 登录时间
|
||||||
* @property string $roles 角色
|
* @property string $roles 角色
|
||||||
*/
|
*/
|
||||||
class Admin extends Base
|
class Admin extends Base
|
||||||
|
@ -132,6 +132,8 @@
|
|||||||
},{
|
},{
|
||||||
title: "ID",
|
title: "ID",
|
||||||
field: "id",
|
field: "id",
|
||||||
|
width: 100,
|
||||||
|
sort: true,
|
||||||
},{
|
},{
|
||||||
title: "用户名",
|
title: "用户名",
|
||||||
field: "username",
|
field: "username",
|
||||||
@ -147,13 +149,16 @@
|
|||||||
field: "avatar",
|
field: "avatar",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return '<img src="'+encodeURI(d['avatar'])+'" style="max-width:32px;max-height:32px;" alt="" />'
|
return '<img src="'+encodeURI(d['avatar'])+'" style="max-width:32px;max-height:32px;" alt="" />'
|
||||||
}
|
},
|
||||||
|
width: 90,
|
||||||
},{
|
},{
|
||||||
title: "邮箱",
|
title: "邮箱",
|
||||||
field: "email",
|
field: "email",
|
||||||
|
hide: true,
|
||||||
},{
|
},{
|
||||||
title: "手机",
|
title: "手机",
|
||||||
field: "mobile",
|
field: "mobile",
|
||||||
|
hide: true,
|
||||||
},{
|
},{
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
field: "created_at",
|
field: "created_at",
|
||||||
@ -162,6 +167,9 @@
|
|||||||
title: "更新时间",
|
title: "更新时间",
|
||||||
field: "updated_at",
|
field: "updated_at",
|
||||||
hide: true,
|
hide: true,
|
||||||
|
},{
|
||||||
|
title: "登录时间",
|
||||||
|
field: "login_at",
|
||||||
},{
|
},{
|
||||||
title: "角色",
|
title: "角色",
|
||||||
field: "roles",
|
field: "roles",
|
||||||
|
Loading…
Reference in New Issue
Block a user