修改本地生活商品无法编辑的问题

This commit is contained in:
wangxiaowei 2024-08-24 15:07:34 +08:00
parent b6efddfc06
commit 8bb2fc25e9

@ -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'];
}