更新 app/controller/api/Auth.php

日志更新
This commit is contained in:
mkm 2023-09-25 20:20:46 +08:00
parent 4e2c5c41ba
commit 04f82c4c71

View File

@ -1536,9 +1536,9 @@ class Auth extends BaseController
$queryBuilder = $queryBuilder->where('phone_brand', '');
}
}
$appInfo = $queryBuilder->order('version', 'desc')->fetchSql(false)->find();
$appInfo = ($queryBuilder->order('version', 'desc')->fetchSql(false)->find()) ?? (object)[];
if (empty($appInfo)) {
$appInfo = (Db::name('AppUpdate')->where('type', $type)->where('version', '>', $version)->find()) ?? (object)[];
$appInfo = (Db::name('AppUpdate')->where('type', $type)->where('version', '>', $version)->find()) ?? (object)[];
}
}