From a7173d9ec4bd36188abc4999ee3bbea8764c1311 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 14 Apr 2020 14:15:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=BD=E5=9C=B0=E9=A1=B5=E8=B6=85=E7=BA=A7?= =?UTF-8?q?=E7=AD=BE=E6=B3=A8=E5=86=8C=E6=B7=BB=E5=8A=A0=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E8=AF=86=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mobile/Controller/CommonController.class.php | 11 ++++++++++- Application/Mobile/Controller/SsgController.class.php | 9 ++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Application/Mobile/Controller/CommonController.class.php b/Application/Mobile/Controller/CommonController.class.php index 2a7b42f8d..a3a8596c2 100644 --- a/Application/Mobile/Controller/CommonController.class.php +++ b/Application/Mobile/Controller/CommonController.class.php @@ -6,6 +6,7 @@ use User\Api\SuserApi; use Think\Log; use Base\Service\ApplyService; use Base\Tool\TaskClient; +use Base\Facade\Request; class CommonController extends BaseController { const USER_NOT_ILLEGAL = -1; //用户名不合法 @@ -208,6 +209,8 @@ class CommonController extends BaseController { } } + + $data = [ 'account' => $account, 'password' => think_ucenter_md5($password, UC_AUTH_KEY), @@ -222,8 +225,14 @@ class CommonController extends BaseController { 'parent_name' => get_parent_name($promote_id), 'register_time' => time(), 'check_time' => time(), - ]; + + if (Request::isIOS()) { + $data['device_type'] = 2; + } elseif (Request::isAndroid()) { + $data['device_type'] = 1; + } + if ($game_id) {//关联游戏 $game = M('game', 'tab_')->where(['id' => $game_id])->find(); if ($game) { diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index af2ceb3eb..88667005e 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -7,6 +7,7 @@ use Base\Tool\TaskClient; use Think\Log; use Base\Service\GameService; use Base\Service\PackageDownloadLogService; +use Base\Facade\Request; class SsgController extends BaseController { const USER_NOT_ILLEGAL = -1; //用户名不合法 @@ -293,8 +294,14 @@ class SsgController extends BaseController { 'parent_name'=>get_parent_name($promote_id), 'register_time'=>time(), 'check_time' => time(), - ); + + if (Request::isIOS()) { + $data['device_type'] = 2; + } elseif (Request::isAndroid()) { + $data['device_type'] = 1; + } + if ($game_id) {//关联游戏 $game = M('game', 'tab_')->where(['id' => $game_id])->find(); if ($game) {