|
|
|
@ -1104,6 +1104,22 @@ class UserModel extends Model{
|
|
|
|
|
$data['fgame_id']=$game_id;
|
|
|
|
|
$data['fgame_name']=$game_name;
|
|
|
|
|
$model->save($data);
|
|
|
|
|
$device_type = M('User','tab_')->where(['id' => $user['id']])->getField('device_type');
|
|
|
|
|
if(empty($device_type)){
|
|
|
|
|
$gameServer = substr($game_name, -10, 9);
|
|
|
|
|
if($gameServer == '安卓版'){
|
|
|
|
|
$arr['device_type'] = 'Android';
|
|
|
|
|
} elseif($gameServer == '苹果版') {
|
|
|
|
|
$arr['device_type'] = 'IOS';
|
|
|
|
|
}
|
|
|
|
|
$arr['time'] = time();
|
|
|
|
|
$arr['account'] = $account;
|
|
|
|
|
ksort($arr);
|
|
|
|
|
reset($arr);
|
|
|
|
|
$sign = md5(http_build_query($arr) . C('GET_INFO_KEY'));
|
|
|
|
|
$arr['sign'] = $sign;
|
|
|
|
|
$reData = curl_post('http://oa.76ba.com/api/wanmeng/deviceTypeUpdate',$arr);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $data["token"];
|
|
|
|
|
}
|
|
|
|
|