From 8ef4188d55eeee03353a7ff7bf785ed6504a3507 Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Thu, 5 Sep 2024 22:10:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E5=95=86=E5=AE=B6=E4=BF=A1=E6=81=AF=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/LocalStore.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/api/controller/LocalStore.php b/app/api/controller/LocalStore.php index cfd40737..f759c2b1 100755 --- a/app/api/controller/LocalStore.php +++ b/app/api/controller/LocalStore.php @@ -19,11 +19,14 @@ class LocalStore extends Api public function getLocalStore() { - $id = $this->request->post('id'); + $lstore_id = $this->request->post('lstore_id'); $user_id = $this->user_id; - $result = Db::name("local_store")->where("user_id",$user_id)->find(); + if ($lstore_id) { + $result = Db::name("local_store")->where(['lstore_id' => $lstore_id, "user_id" => $user_id])->find(); + } else { + $result = Db::name("local_store")->where("user_id", $user_id)->select()->toArray(); + } $data['local'] = $result; - // $data['local'] = []; $data['set_state'] = 1; return JsonServer::success('查询成功',$data); }