增加修改初始密码提示

This commit is contained in:
巴掌 committed 2021-12-30 11:15:10 +08:00
1 parent 636f983117
commit d096d2aa1a
6 files changed
+20 -7

No files matched your search

+6
View File
@@ -48,6 +48,12 @@ class Index extends AdminBase
$admin = new \app\admin\model\Admin;
$list['xingming'] = $admin->where('id',session('user_id'))
->value('xingming');
$create_time = $admin->where('id',session('user_id'))
->value('create_time');
$create_time = date("Y-m-d G:i:s", $create_time);
$jyshijian = config('shangma.mimaguoqi');
$list['create_time'] = strtotime("$create_time+".$jyshijian." day");
$list['group'] = $admin->searchOne(session('user_id'))->groupnames;
$list['server'] = request()->server();
+3 -3
View File
@@ -43,13 +43,13 @@
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<blockquote class="layui-elem-quote">
为了信息安全,请及时
<blockquote class="layui-elem-quote" style="color: red;">
您正在使用初始密码,为了保障信息安全,初始密码将于{$list.create_time}停用,请及时
<span>
<b><a onclick="xadmin.open('修改密码','/admin/info/editpassword','400','250')" style="color: red; font-size: 14px;">
修改密码</a></b>
</span>
。修改方法:右上角->姓名->修改密码。
。
</blockquote>
</div>
</div>
+7 -1
View File
@@ -69,8 +69,14 @@ class Index extends BaseController
$admin = new \app\admin\model\Admin;
$userinfo = $admin::where('username|phone', $list['username'])
->where('status', 1)
->field('id, lastip, username, ip, denglucishu, lasttime, thistime, password')
->field('id, lastip, username, ip, denglucishu, lasttime, thistime, password, create_time')
->find();
$jyshijian = config('shangma.mimaguoqi');
$now = time();
$jinyong = strtotime("$userinfo->create_time+".$jyshijian." day");
if ($jinyong < $now && $list['password'] == '123456') {
$userinfo->status = false;
}
// 将本次信息上传到服务器上
$userinfo->lastip = $userinfo->ip;
$userinfo->ip = request()->ip();
Loaded 3 of 6 files, more files were not shown because too many files have changed in this diff. Show more