From 8bb2fc25e9f852e8b5ee6b60537eb7fe0dc7fb7f Mon Sep 17 00:00:00 2001 From: wangxiaowei Date: Sat, 24 Aug 2024 15:07:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=AC=E5=9C=B0=E7=94=9F?= =?UTF-8?q?=E6=B4=BB=E5=95=86=E5=93=81=E6=97=A0=E6=B3=95=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/logic/LocalStoreGoodsLogic.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/api/logic/LocalStoreGoodsLogic.php b/app/api/logic/LocalStoreGoodsLogic.php index bf907fc4..3368c8fd 100644 --- a/app/api/logic/LocalStoreGoodsLogic.php +++ b/app/api/logic/LocalStoreGoodsLogic.php @@ -71,14 +71,15 @@ class LocalStoreGoodsLogic extends Logic 'create_time' => time(), ]); } else if ($form['type'] === 'edit') { - dump($form);die; - LocalStoreGoods::where(['id' => $form['id']])->update([ + $result = LocalStoreGoods::where(['id' => $form['id']])->update([ 'title' => $form['title'], 'price' => $form['price'], 'desc' => isset($form['desc']) ?? '', 'details' => isset($form['details']) ?? '', 'update_time' => time(), ]); + dump($form);die; + LocalStoreGoodsPic::where(['lsg_id' => $form['id']])->delete(); $id = $form['id']; }