dyb
戴余标 1 year ago
parent 8473cdc3d5
commit 048ed843b8

@ -131,6 +131,7 @@ class Callback extends Controller
if (isset($userInfo['userid']) && $userInfo['userid']) { if (isset($userInfo['userid']) && $userInfo['userid']) {
Session::set('wxuser_id', $userInfo['userid']); Session::set('wxuser_id', $userInfo['userid']);
$adminUser = db('admin_user')->where('wxwork_id', $userInfo['userid'])->find(); $adminUser = db('admin_user')->where('wxwork_id', $userInfo['userid'])->find();
if($adminUser['status']==1){
if ($adminUser) { if ($adminUser) {
Session::set('user_id', $adminUser['id']); Session::set('user_id', $adminUser['id']);
@ -157,6 +158,7 @@ class Callback extends Controller
return redirect('http://web.lbschem.com:8088/?authkey=wxwork&sessionid='.session_id()); return redirect('http://web.lbschem.com:8088/?authkey=wxwork&sessionid='.session_id());
} }
} }
}
return redirect('http://web.lbschem.com:8088/'); return redirect('http://web.lbschem.com:8088/');
} }
} }

@ -31,7 +31,7 @@ class Customer extends ApiCommon
{ {
$action = [ $action = [
'permission' => ['exceldownload', 'setfollow', 'delete'], 'permission' => ['exceldownload', 'setfollow', 'delete'],
'allow' => ['read', 'system', 'count', 'poolauthority', 'level'] 'allow' => ['read', 'system', 'count', 'poolauthority', 'level','type']
]; ];
Hook::listen('check_auth', $action); Hook::listen('check_auth', $action);
$request = Request::instance(); $request = Request::instance();
@ -1195,7 +1195,7 @@ class Customer extends ApiCommon
* @since 2021-03-29 * @since 2021-03-29
* @author fanqi * @author fanqi
*/ */
public function Type() public function type()
{ {
$data = db('admin_field')->where(['types' => 'crm_customer', 'field' => 'crm_lthugd'])->value('options'); $data = db('admin_field')->where(['types' => 'crm_customer', 'field' => 'crm_lthugd'])->value('options');

@ -155,15 +155,16 @@ class Customer extends Common
}); });
}; };
} }
// 过滤角色
// 过滤角色
$groupIds = db('admin_access')->where("user_id", array("eq", $user_id))->column("group_id"); $groupIds = db('admin_access')->where("user_id", array("eq", $user_id))->column("group_id");
if (!in_array(1,$groupIds)){ if (!in_array(1,$groupIds)){
$groupNameArray = db('admin_group')->where("pid", array("eq", 2))->where("id", array("in", $groupIds))->column("title"); $groupNameArray = db('admin_group')->where("pid", array("eq", 2))->where("id", array("in", $groupIds))->column("title");
if ($groupNameArray) if ($groupNameArray){
$map['customer.crm_lthugd'] = array('in', $groupNameArray); $map['customer.crm_lthugd'] = array('in', $groupNameArray);
} }
}
# 代办事项 - 待进入公海 # 代办事项 - 待进入公海
$remindWhere = []; $remindWhere = [];
if ($is_remind) { if ($is_remind) {
@ -300,8 +301,8 @@ class Customer extends Common
} }
} }
$data = []; $data = [];
$data['list'] = $list ?: [];
$data['dataCount'] = $dataCount ?: 0; $data['dataCount'] = $dataCount ?: 0;
$data['list'] = $list ?: [];
return $data; return $data;
} }

Loading…
Cancel
Save