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;