更新app版本查询
This commit is contained in:
parent
fa1a2a9634
commit
c30238a989
@ -1339,14 +1339,18 @@ class Auth extends BaseController
|
|||||||
$queryBuilder = $queryBuilder->where('version', '>', $version);
|
$queryBuilder = $queryBuilder->where('version', '>', $version);
|
||||||
}
|
}
|
||||||
if ($phoneBrand) {
|
if ($phoneBrand) {
|
||||||
|
$pos = false;
|
||||||
foreach($brandArray as $b) {
|
foreach($brandArray as $b) {
|
||||||
$pos = stripos($phoneBrand, $b);
|
$pos = stripos($phoneBrand, $b);
|
||||||
if ($pos !== false) {
|
if ($pos !== false) {
|
||||||
$queryBuilder = $queryBuilder->where('phone_brand', $b);
|
$queryBuilder = $queryBuilder->where('phone_brand', $b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($pos === false) {
|
||||||
|
$queryBuilder = $queryBuilder->where('phone_brand', '');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$appInfo = ($queryBuilder->order('id', 'desc')->fetchSql(false)->find()) ?? (object)[];
|
$appInfo = ($queryBuilder->order('version', 'desc')->fetchSql(false)->find()) ?? (object)[];
|
||||||
}
|
}
|
||||||
|
|
||||||
return app('json')->success(compact('appInfo'));
|
return app('json')->success(compact('appInfo'));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user