更新版本更新
This commit is contained in:
parent
5fe997f320
commit
fba8e28ca9
@ -1312,16 +1312,18 @@ class Auth extends BaseController
|
||||
public function appVersion()
|
||||
{
|
||||
$brandArray = [
|
||||
'HUAWEI',
|
||||
'HUAWEI',
|
||||
'HUAWEI',
|
||||
'HUAWEI',
|
||||
'HUAWEI',
|
||||
'HUAWEI',
|
||||
'HUAWEI',
|
||||
'HUAWEI',
|
||||
'HUAWEI',
|
||||
'HUAWEI'
|
||||
'huawei',
|
||||
'honor',
|
||||
'iphone',
|
||||
'samsung',
|
||||
'xiaomi',
|
||||
'redmi',
|
||||
'mi',
|
||||
'oppo',
|
||||
'vivo',
|
||||
'nokia',
|
||||
'meizu',
|
||||
'moto'
|
||||
];
|
||||
$type = $this->request->param('type', '-1');
|
||||
$version = $this->request->param('version', '');
|
||||
@ -1336,7 +1338,12 @@ class Auth extends BaseController
|
||||
$queryBuilder = $queryBuilder->where('version', '>', $version);
|
||||
}
|
||||
if ($phoneBrand) {
|
||||
$queryBuilder = $queryBuilder->where('phone_brand', $phoneBrand);
|
||||
foreach($brandArray as $b) {
|
||||
$pos = stripos($phoneBrand, $b);
|
||||
if ($pos !== false) {
|
||||
$queryBuilder = $queryBuilder->where('phone_brand', $phoneBrand);
|
||||
}
|
||||
}
|
||||
}
|
||||
$appInfo = ($queryBuilder->order('id', 'desc')->find()) ?? (object)[];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user