edit-sylive-kpidata
This commit is contained in:
@@ -148,15 +148,14 @@ class Sylive_entity{
|
||||
{
|
||||
if(!$params['cf_uid']){
|
||||
$u_row = $this->user_model->get(['userId'=>$params['uid']]);
|
||||
if($params['teamId']){
|
||||
if($u_row['teamId']){
|
||||
$t_level_id = $this->get_team_level($u_row['teamId']);
|
||||
$params['cf_uid'] = $t_level_id<3 ? $params['uid'] : 0;
|
||||
}
|
||||
if($params['organizationId']){
|
||||
if($u_row['organizationId']){
|
||||
$group_id = $this->get_level($u_row['organizationId']);
|
||||
$params['cf_uid'] = $group_id<4 ? $params['uid'] : 0;
|
||||
}
|
||||
|
||||
}
|
||||
if ($params['a_id'] && $params['uid'] && $params['cf_uid']) {
|
||||
$user = $this->user_model->get(['userId'=>$params['cf_uid']]);
|
||||
|
||||
@@ -12,6 +12,7 @@ abstract class Common extends CI_Controller{
|
||||
protected $data;
|
||||
protected $white_login_method=[]; //授权白名单
|
||||
protected $uid;
|
||||
protected $act_uid;
|
||||
protected $session;
|
||||
protected $log_dir = 'market/sylive';
|
||||
protected $secret = "market_sylive_h5_test";
|
||||
@@ -27,6 +28,7 @@ abstract class Common extends CI_Controller{
|
||||
if ($_SESSION[self::SESSION_KEY]) {
|
||||
$this->session = $_SESSION[self::SESSION_KEY];
|
||||
$this->uid = $this->session['uid'];
|
||||
$this->act_uid = $this->session['act_uid'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,6 +207,9 @@ class Wx extends Common{
|
||||
|
||||
public function _remap($method){
|
||||
try{
|
||||
if($this->act_uid){
|
||||
$this->session = $this->uid = '';
|
||||
}
|
||||
if(!in_array($method,$this->white_login_method) && !$this->uid){
|
||||
$ret = $this->set_auth();
|
||||
$openid = $ret['openid'];
|
||||
@@ -247,9 +252,9 @@ class Wx extends Common{
|
||||
}
|
||||
$act_data['pid'] = $p_user['userId'];
|
||||
}
|
||||
$this->act_user_model->add($act_data);
|
||||
$act_user['id'] = $this->act_user_model->add($act_data);
|
||||
}
|
||||
$_SESSION[self::SESSION_KEY] = ['uid' => $this->uid,'org_id'=>$row_wechat['organizationId'],'teamId'=>$row_wechat['teamId']];
|
||||
$_SESSION[self::SESSION_KEY] = ['uid' => $this->uid,'org_id'=>$row_wechat['organizationId'],'teamId'=>$row_wechat['teamId'],'act_id'=>$act_user['id']];
|
||||
echo ("<script>setTimeout('window.location.reload()', 1);</script>");exit;
|
||||
}
|
||||
return $this->$method();
|
||||
|
||||
Reference in New Issue
Block a user