From e5b5e25a221bb7b80ab176fa4857852dd3dbb556 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Sun, 29 Sep 2024 17:23:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E6=8F=90=E7=82=B9?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/LocalStore.php | 2 +- app/api/logic/LocalStoreLogic.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/api/controller/LocalStore.php b/app/api/controller/LocalStore.php index f0faf74b..c678735b 100755 --- a/app/api/controller/LocalStore.php +++ b/app/api/controller/LocalStore.php @@ -15,7 +15,7 @@ use think\facade\Db; class LocalStore extends Api { - public $like_not_need_login = ['makeMyPayImage', 'getLocalShopById', 'getLocalList', 'getLocation', 'addPostStation']; + public $like_not_need_login = ['makeMyPayImage', 'getLocalShopById', 'getLocalList', 'getLocation']; public function getLocalStore() { diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index 5f0fd15f..41219f22 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -365,10 +365,8 @@ class LocalStoreLogic extends Logic throw new \Exception('经纬度不能为空'); } - $lstore_id = $post['lstore_id']; - unset($post['lstore_id']); - - $result = LocalStorePostStation::where(['user_id' => $user_id, 'lstore_id' => $lstore_id])->insert($post); + $post['user_id'] = $user_id; + $result = LocalStorePostStation::insert($post); if ($result) { return true;