From aa326246414e4cb1ea0a00c3d9df1a5d65495cc5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 7 Nov 2019 17:07:04 +0800 Subject: [PATCH] =?UTF-8?q?OA=E8=8E=B7=E5=8F=96=E4=BF=A1=E6=81=AF-?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E7=B3=BB=E7=BB=9F=E5=8F=98=E6=9B=B4=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Model/UserModel.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Application/Admin/Model/UserModel.class.php b/Application/Admin/Model/UserModel.class.php index 91360660..e297b75c 100644 --- a/Application/Admin/Model/UserModel.class.php +++ b/Application/Admin/Model/UserModel.class.php @@ -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"]; }