From f83c62bb2a2eb0d32a85a929e0bd5c62c7206e2d Mon Sep 17 00:00:00 2001 From: shengchanzhe <179998674@qq.com> Date: Thu, 21 Dec 2023 16:43:58 +0800 Subject: [PATCH] =?UTF-8?q?app=E7=89=88=E6=9C=AC=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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=[];