diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 4003940b..01560b84 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -1552,7 +1552,7 @@ class Auth extends BaseController $ios = (Db::name('AppUpdate')->where('type', 2)->where('phone_brand', '')->order('id', 'desc')->find()) ?? (object)[]; return app('json')->success(compact('android', 'ios')); } else { - $agent = strtolower($_SERVER['HTTP_USER_AGENT']); + $agent = strtolower($this->request->server('HTTP_USER_AGENT')); // 检查是否为iOS设备,包括iPhone和iPad if (strpos($agent, 'iphone') !== false || strpos($agent, 'ipad') !== false) { $appInfo=[];