【类 型】:factor

【原  因】:权限管理字段更名  添加mastser 总管理员权限为4
【过  程】:
【影  响】:
This commit is contained in:
air 2025-06-25 10:45:11 +08:00
parent 80a3033b72
commit 169e9a129a
2 changed files with 6 additions and 3 deletions

View File

@ -168,7 +168,7 @@ class AdminController extends PublicController
$data['pwd'] = MD5(MD5($_REQUEST['pwd']));
$data['shop_id'] = $_REQUEST['shop_id'];
$data['addtime'] = time();
$data['qx'] = 5;
$data['role'] = $_REQUEST['role'];
//录入数据库
$adminDb = D('adminuser');

View File

@ -40,11 +40,14 @@ class LoginController extends Controller
$adminuserDb->where($where)->save($data); //最后登录时间写入数据库
//从program表拿用户头像
$adminInfo['photo'] = json_decode($adminInfo['photo'])[0]; //反序列化 取到头像名称
switch ($adminInfo['qx']) {
switch ($adminInfo['role']) {
case 4:
$adminInfo['power'] = 'admin';
$adminInfo['power'] = 'master';
break;
case 5:
$adminInfo['power'] = 'admin';
break;
case 6:
$adminInfo['power'] = 'editor';
break;
}