|
|
@@ -1501,8 +1501,25 @@ class LoginController extends Controller
|
|
|
}
|
|
|
$guser['recommendGame'] = $recommendGame;
|
|
|
}
|
|
|
-
|
|
|
- AccountsInfo::where('UserID', $UserID)->update(['UserMedal' => $defaultGameId ]);
|
|
|
+ $mobileBand = '';
|
|
|
+ $ua = $request->userAgent();
|
|
|
+ if (stripos($ua, 'iPhone') !== false) {
|
|
|
+ $mobileBand = 'iPhone';
|
|
|
+ } else if (stripos($ua, 'iPad') !== false) {
|
|
|
+ $mobileBand = 'iPad';
|
|
|
+ } else if (stripos($ua, 'Android') !== false) {
|
|
|
+ $mobileBand = 'Android';
|
|
|
+ } else if (stripos($ua, 'Windows') !== false) {
|
|
|
+ $mobileBand = 'PC';
|
|
|
+ } else if (stripos($ua, 'Mac') !== false) {
|
|
|
+ $mobileBand = 'Mac';
|
|
|
+ }
|
|
|
+ $accUpdate = ['UserMedal' => $defaultGameId];
|
|
|
+ if ($mobileBand){
|
|
|
+ $accUpdate['LastLogonMobile'] = $mobileBand;
|
|
|
+ }
|
|
|
+
|
|
|
+ AccountsInfo::where('UserID', $UserID)->update($accUpdate);
|
|
|
|
|
|
Util::WriteLog('register_params',[$request,$guser]);
|
|
|
|