This commit is contained in:
wangwei01 2019-03-29 17:50:30 +08:00
parent a492457bc6
commit d19851ce23

View File

@ -43,6 +43,7 @@ class teamController{
public function teamInfo() public function teamInfo()
{ {
$team_uuid = $_REQUEST['team_uuid'];
$r = $this->getRedis($team_uuid); $r = $this->getRedis($team_uuid);
if(!$r){ if(!$r){
@ -50,7 +51,6 @@ class teamController{
}else{ }else{
$accountid = $_REQUEST['account_id']; $accountid = $_REQUEST['account_id'];
$sessionid = $_REQUEST['session_id']; $sessionid = $_REQUEST['session_id'];
$team_uuid = $_REQUEST['team_uuid'];
$user_db_str = $r->get(TEAMID_KEY . $team_uuid); $user_db_str = $r->get(TEAMID_KEY . $team_uuid);
if (empty($user_db_str)) { if (empty($user_db_str)) {
phpcommon\sendError(ERR_USER_BASE + 1,'session失效1'); phpcommon\sendError(ERR_USER_BASE + 1,'session失效1');
@ -235,6 +235,7 @@ class teamController{
echo 'is null'; echo 'is null';
}else{ }else{
$user_db_str = $r->get(TEAMID_KEY . $team_uuid); $user_db_str = $r->get(TEAMID_KEY . $team_uuid);
if (empty($user_db_str)){ if (empty($user_db_str)){
phpcommon\sendError(ERR_USER_BASE + 1,'session失效1'); phpcommon\sendError(ERR_USER_BASE + 1,'session失效1');
return; return;
@ -244,6 +245,14 @@ class teamController{
phpcommon\sendError(ERR_USER_BASE + 1,'session失效2'); phpcommon\sendError(ERR_USER_BASE + 1,'session失效2');
return; return;
} }
foreach ($user_db['member_list'] as $member) {
if ($member['account_id'] == $_REQUEST['account_id']){
if($member['idx'] != 1){
phpcommon\sendError(ERR_USER_BASE + 4,'你不是队长');
return;
}
}
}
$user_db['auto_fill'] = $_REQUEST['auto_fill']; $user_db['auto_fill'] = $_REQUEST['auto_fill'];
$r->set(TEAMID_KEY . $team_uuid, json_encode($user_db)); $r->set(TEAMID_KEY . $team_uuid, json_encode($user_db));
$r->pexpire(TEAMID_KEY . $team_uuid, 1000 * 3600); $r->pexpire(TEAMID_KEY . $team_uuid, 1000 * 3600);