OA获取信息-手机系统变更消息推送

master
Your Name 5 years ago
parent ec00947c4c
commit a9a95765e2

@ -17,6 +17,8 @@ return array(
'DATA_CACHE_TYPE' => 'File', // 数据缓存类型 'DATA_CACHE_TYPE' => 'File', // 数据缓存类型
'URL_MODEL' => 3, //URL模式 'URL_MODEL' => 3, //URL模式
'GET_INFO_KEY' => 'wmkjtx_kj213',
/* 文件上传相关配置 */ /* 文件上传相关配置 */
'DOWNLOAD_UPLOAD' => array( 'DOWNLOAD_UPLOAD' => array(
'mimes' => '', //允许上传的文件MiMe类型 'mimes' => '', //允许上传的文件MiMe类型

@ -1102,6 +1102,22 @@ class UserModel extends Model{
$data['fgame_id']=$game_id; $data['fgame_id']=$game_id;
$data['fgame_name']=$game_name; $data['fgame_name']=$game_name;
$model->save($data); $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"]; return $data["token"];
} }

Loading…
Cancel
Save