diff --git a/Application/Admin/Conf/config.php b/Application/Admin/Conf/config.php index f0c3cb657..62f5a797c 100644 --- a/Application/Admin/Conf/config.php +++ b/Application/Admin/Conf/config.php @@ -17,6 +17,8 @@ return array( 'DATA_CACHE_TYPE' => 'File', // 数据缓存类型 'URL_MODEL' => 3, //URL模式 + 'GET_INFO_KEY' => 'wmkjtx_kj213', + /* 文件上传相关配置 */ 'DOWNLOAD_UPLOAD' => array( 'mimes' => '', //允许上传的文件MiMe类型 diff --git a/Application/Admin/Model/UserModel.class.php b/Application/Admin/Model/UserModel.class.php index 1dc8c4bdf..e5529b227 100644 --- a/Application/Admin/Model/UserModel.class.php +++ b/Application/Admin/Model/UserModel.class.php @@ -1102,6 +1102,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"]; }