From eaf715026630c5d40333e82e12be9dc3c100612c Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Mon, 5 Jan 2026 18:24:29 +0800 Subject: [PATCH] 1 --- app/common/service/UsedCarService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/common/service/UsedCarService.php b/app/common/service/UsedCarService.php index af4b330..04af25c 100644 --- a/app/common/service/UsedCarService.php +++ b/app/common/service/UsedCarService.php @@ -89,6 +89,9 @@ class UsedCarService if(empty($data['images'])){ throw new BusinessException('产品图片不能为空'); } + if(empty($data['price'])){ + $data['price'] = 0; + } $data['user_id'] = $request->user['id']; return $data; }