新增版本更新接口

This commit is contained in:
yaooo 2023-09-08 17:09:32 +08:00
parent efe8b7c6ce
commit d329cfc288
2 changed files with 11 additions and 0 deletions

View File

@ -1291,6 +1291,7 @@ class Auth extends BaseController
}
return app('json')->success([]);
}
//根据street_id获取商户信息
public function regionMerchant($street_id)
{
@ -1300,4 +1301,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

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