fix: 产品详情接口未找到产品时报错误问题
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 2s

This commit is contained in:
2026-03-28 11:46:23 +08:00
parent 90b4bccbcf
commit 8a9d66f5d3

View File

@@ -83,7 +83,7 @@ class Product
])
->bypk(request()->param('id'))
->find()
->bindAttr('category', ['category_name'])
?->bindAttr('category', ['category_name'])
->hidden(['category']);
if (empty($product)) {
return error('产品不存在');