更新app版本

This commit is contained in:
yaooo 2023-09-09 14:45:06 +08:00
parent 34bd77c2c5
commit d5b63c5149
2 changed files with 10 additions and 0 deletions

View File

@ -1300,4 +1300,13 @@ class Auth extends BaseController
$list = $queryBuilder->setOption('field', [])->field(['mer_id', 'category_id', 'type_id', 'mer_name', 'area_id', 'street_id', 'village_id', 'mer_address', 'long', 'lat', 'create_time'])->order('mer_id', 'desc')->page($page, $limit)->fetchSql(false)->select();
return app('json')->success(compact('count', 'list'));
}
//获取app版本更新信息
public function appVersion()
{
$version = $this->request->param('version', '');
$type = $this->request->param('type', '1');
$appInfo = (Db::name('AppUpdate')->where('type', $type)->where('version', '>', $version)->order('id', 'desc')->find()) ?? (object)[];
return app('json')->success(compact('appInfo'));
}
}

View File

@ -22,6 +22,7 @@ use think\facade\Route;
Route::group('api/', function () {
Route::any('test', 'api.Auth/test');
Route::any('dotest', 'api.Auth/dotest');
Route::any('app/version', 'api.Auth/appVersion');
Route::post('goods/take/:id', 'api.Auth/deliveryGoods');
Route::get('merchant/cate', 'api.Auth/merchantCate');
Route::get('order/statistics', 'api.Auth/orderStatistics');