From 3f2e3b3f10b318fd29790e2b5d557dd140613c46 Mon Sep 17 00:00:00 2001 From: limu Date: Wed, 31 Jan 2024 11:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E9=A9=BB=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Store.php | 16 ++++++++++++++++ app/admin/model/Store.php | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/app/admin/controller/Store.php b/app/admin/controller/Store.php index 9e491023..f3a2568b 100644 --- a/app/admin/controller/Store.php +++ b/app/admin/controller/Store.php @@ -139,4 +139,20 @@ class Store extends Controller } return $this->renderSuccess('操作成功'); } + + /** + * 审核商城 + * @param int $storeId + * @return Json + */ + public function audit(int $storeId): Json + { + // 商城详情 + $model = StoreModel::detail($storeId); + if (!$model->auditStore($this->request->param())) { + return $this->renderError($model->getError() ?: '操作失败'); + } + return $this->renderSuccess('操作成功'); + } + } diff --git a/app/admin/model/Store.php b/app/admin/model/Store.php index 3292c9b9..10eb5b52 100644 --- a/app/admin/model/Store.php +++ b/app/admin/model/Store.php @@ -88,4 +88,10 @@ class Store extends StoreModel return $this->save(['is_delete' => 1]); }); } + + public function auditStore(array $data) + { + $storeInfo = $this->toArray(); + print_r($storeInfo);exit; + } }