From d329cfc28820ce8b87c3735da24c172bf131d72f Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Fri, 8 Sep 2023 17:09:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=89=88=E6=9C=AC=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/Auth.php | 10 ++++++++++ route/api.php | 1 + 2 files changed, 11 insertions(+) diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index fb5be474..a9b16438 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -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')); + } } diff --git a/route/api.php b/route/api.php index 1f405e58..0aac57be 100644 --- a/route/api.php +++ b/route/api.php @@ -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');