app版本判断

This commit is contained in:
shengchanzhe 2023-12-21 16:43:58 +08:00
parent a63a444cb7
commit f83c62bb2a

View File

@ -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=[];