更新静态资源

This commit is contained in:
yaooo 2023-09-25 21:04:51 +08:00
parent 172b8a581e
commit b9b8d4b3e9

View File

@ -1387,6 +1387,7 @@ class Auth extends BaseController
'meizu', 'meizu',
'moto' 'moto'
]; ];
Log::info("请求版本参数:" . json_encode(request()->param()));
$type = $this->request->param('type', '-1'); $type = $this->request->param('type', '-1');
$version = $this->request->param('version', ''); $version = $this->request->param('version', '');
$phoneBrand = $this->request->param('phone_brand', ''); $phoneBrand = $this->request->param('phone_brand', '');
@ -1412,7 +1413,10 @@ class Auth extends BaseController
$queryBuilder = $queryBuilder->where('phone_brand', ''); $queryBuilder = $queryBuilder->where('phone_brand', '');
} }
} }
$appInfo = ($queryBuilder->order('version', 'desc')->fetchSql(false)->find()) ?? (object)[]; $appInfo = $queryBuilder->order('version', 'desc')->fetchSql(false)->find();
if (empty($appInfo)) {
$appInfo = (Db::name('AppUpdate')->where('type', $type)->where('version', '>', $version)->find()) ?? (object)[];
}
} }
return app('json')->success(compact('appInfo')); return app('json')->success(compact('appInfo'));