From db6131a135212d69267371a658ffae5096669a33 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 12 Dec 2019 20:07:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 13 +++++++++++++ Application/Admin/Model/MemberModel.class.php | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 1d6b3fb72..590aa1db4 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -1541,4 +1541,17 @@ function getGameList($partner_id) { return $data; } +function getAdminData ($uid) { + $adminData = M('auth_group_access') + ->field('data_empower_type,data_president') + ->join('left join sys_auth_group on sys_auth_group_access.group_id=sys_auth_group.id') + ->where(array('uid'=>$uid))->find(); + + $promoteData = M('promote','tab_')->field('id')->where(array('admin_id'=>$uid))->select(); + $promoteData = implode(',',array_column($promoteData,'id')); + $adminData['data_president'] = $adminData['data_president'].','.$promoteData; + + return $adminData; +} + ?> diff --git a/Application/Admin/Model/MemberModel.class.php b/Application/Admin/Model/MemberModel.class.php index 49ac7baf0..8aa6a761b 100644 --- a/Application/Admin/Model/MemberModel.class.php +++ b/Application/Admin/Model/MemberModel.class.php @@ -71,11 +71,15 @@ class MemberModel extends Model { ); $this->save($data); + $adminData = getAdminData($user['uid']); + /* 记录登录SESSION和COOKIES */ $auth = array( 'uid' => $user['uid'], 'username' => $user['nickname'], 'last_login_time' => $user['last_login_time'], + 'data_empower_type'=>$adminData['data_empower_type'], + 'data_president'=>$adminData['data_president'] ); session('user_auth', $auth); session('user_auth_sign', data_auth_sign($auth));