1
This commit is contained in:
parent
b2386e0fd7
commit
1a72d40b49
@ -131,7 +131,8 @@ class RoleController{
|
|||||||
$account_id = $_REQUEST['account_id'];
|
$account_id = $_REQUEST['account_id'];
|
||||||
$user_name = $_REQUEST['name'];
|
$user_name = $_REQUEST['name'];
|
||||||
$avatar_url = $_REQUEST['avatar_url'];
|
$avatar_url = $_REQUEST['avatar_url'];
|
||||||
$switch_id = $_REQUEST['switch_id'];
|
$switch_id = 1;
|
||||||
|
$switch_id = isset($_REQUEST['switch_id']);
|
||||||
//登录校验
|
//登录校验
|
||||||
$login = loginVerify($account_id, $_REQUEST['session_id']);
|
$login = loginVerify($account_id, $_REQUEST['session_id']);
|
||||||
if (!$login) {
|
if (!$login) {
|
||||||
|
@ -23,6 +23,31 @@ class TeamController{
|
|||||||
}
|
}
|
||||||
$team_uuid = $node_id . '_' . md5($_REQUEST['account_id']) . time();
|
$team_uuid = $node_id . '_' . md5($_REQUEST['account_id']) . time();
|
||||||
|
|
||||||
|
$cloth_id = 0;
|
||||||
|
$hair_id = 0;
|
||||||
|
$color_id = 0;
|
||||||
|
$hat_id = 0;
|
||||||
|
$rank = 1;
|
||||||
|
$equip_id = 0;
|
||||||
|
if (isset($_REQUEST['cloth_id'])) {
|
||||||
|
$cloth_id = $_REQUEST['cloth_id'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['hair_id'])) {
|
||||||
|
$hair_id = $_REQUEST['hair_id'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['color_id'])) {
|
||||||
|
$color_id = $_REQUEST['color_id'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['hat_id'])) {
|
||||||
|
$hat_id = $_REQUEST['hat_id'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['rank'])) {
|
||||||
|
$rank = $_REQUEST['rank'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['equip_id'])) {
|
||||||
|
$equip_id = $_REQUEST['equip_id'];
|
||||||
|
}
|
||||||
|
|
||||||
$team_db = array(
|
$team_db = array(
|
||||||
'team_uuid' => $team_uuid,
|
'team_uuid' => $team_uuid,
|
||||||
'auto_fill' => $_REQUEST['auto_fill'],
|
'auto_fill' => $_REQUEST['auto_fill'],
|
||||||
@ -33,6 +58,12 @@ class TeamController{
|
|||||||
'account_id' => $_REQUEST['account_id'],
|
'account_id' => $_REQUEST['account_id'],
|
||||||
'name' => $_REQUEST['name'],
|
'name' => $_REQUEST['name'],
|
||||||
'avatar_url' => $_REQUEST['avatar_url'],
|
'avatar_url' => $_REQUEST['avatar_url'],
|
||||||
|
'cloth_id' => $cloth_id,
|
||||||
|
'hair_id' => $hair_id,
|
||||||
|
'color_id' => $color_id,
|
||||||
|
'hat_id' => $hat_id,
|
||||||
|
'rank' => $rank,
|
||||||
|
'equip_id' => $equip_id
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
@ -75,6 +106,12 @@ class TeamController{
|
|||||||
'account_id' => $member['account_id'],
|
'account_id' => $member['account_id'],
|
||||||
'name' => $member['name'],
|
'name' => $member['name'],
|
||||||
'avatar_url' => $member['avatar_url'],
|
'avatar_url' => $member['avatar_url'],
|
||||||
|
'cloth_id' => $member['cloth_id'],
|
||||||
|
'hair_id' => $member['hair_id'],
|
||||||
|
'color_id' => $member['color_id'],
|
||||||
|
'hat_id' => $member['hat_id'],
|
||||||
|
'rank' => $member['rank'],
|
||||||
|
'equip_id' => $member['equip_id'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
@ -99,7 +136,6 @@ class TeamController{
|
|||||||
|
|
||||||
|
|
||||||
$user_db_str = $r->get(TEAMID_KEY.$team_uuid);
|
$user_db_str = $r->get(TEAMID_KEY.$team_uuid);
|
||||||
error_log($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;
|
||||||
@ -127,11 +163,42 @@ class TeamController{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$cloth_id = 0;
|
||||||
|
$hair_id = 0;
|
||||||
|
$color_id = 0;
|
||||||
|
$hat_id = 0;
|
||||||
|
$rank = 1;
|
||||||
|
$equip_id = 0;
|
||||||
|
if (isset($_REQUEST['cloth_id'])) {
|
||||||
|
$cloth_id = $_REQUEST['cloth_id'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['hair_id'])) {
|
||||||
|
$hair_id = $_REQUEST['hair_id'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['color_id'])) {
|
||||||
|
$color_id = $_REQUEST['color_id'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['hat_id'])) {
|
||||||
|
$hat_id = $_REQUEST['hat_id'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['rank'])) {
|
||||||
|
$rank = $_REQUEST['rank'];
|
||||||
|
}
|
||||||
|
if (isset($_REQUEST['equip_id'])) {
|
||||||
|
$equip_id = $_REQUEST['equip_id'];
|
||||||
|
}
|
||||||
|
|
||||||
array_push ($user_db['member_list'], array(
|
array_push ($user_db['member_list'], array(
|
||||||
'idx' => $member_num + 1,
|
'idx' => $member_num + 1,
|
||||||
'account_id' => $_REQUEST['account_id'],
|
'account_id' => $_REQUEST['account_id'],
|
||||||
'name' => $_REQUEST['name'],
|
'name' => $_REQUEST['name'],
|
||||||
'avatar_url' => $_REQUEST['avatar_url'],
|
'avatar_url' => $_REQUEST['avatar_url'],
|
||||||
|
'cloth_id' => $cloth_id,
|
||||||
|
'hair_id' => $hair_id,
|
||||||
|
'color_id' => $color_id,
|
||||||
|
'hat_id' => $hat_id,
|
||||||
|
'rank' => $rank,
|
||||||
|
'equip_id' => $member['equip_id'],
|
||||||
));
|
));
|
||||||
$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 * 600);
|
$r -> pexpire(TEAMID_KEY . $team_uuid, 1000 * 600);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user