|
@@ -339,6 +339,10 @@ class StoreProduct extends AuthController
|
|
|
}
|
|
}
|
|
|
if ($id) {
|
|
if ($id) {
|
|
|
unset($data['sales']);
|
|
unset($data['sales']);
|
|
|
|
|
+ // 編輯商品修改 add_time 爲當前時間
|
|
|
|
|
+ if ($data['is_show'] ?? 0) {
|
|
|
|
|
+ $data['add_time'] = time();
|
|
|
|
|
+ }
|
|
|
ProductModel::edit($data, $id);
|
|
ProductModel::edit($data, $id);
|
|
|
$description = $data['description'];
|
|
$description = $data['description'];
|
|
|
unset($data['description']);
|
|
unset($data['description']);
|