fix: 产品详情接口未找到产品时报错误问题
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 2s
All checks were successful
Gitea Actions Official-website / deploy-dev (push) Successful in 2s
This commit is contained in:
@@ -83,7 +83,7 @@ class Product
|
|||||||
])
|
])
|
||||||
->bypk(request()->param('id'))
|
->bypk(request()->param('id'))
|
||||||
->find()
|
->find()
|
||||||
->bindAttr('category', ['category_name'])
|
?->bindAttr('category', ['category_name'])
|
||||||
->hidden(['category']);
|
->hidden(['category']);
|
||||||
if (empty($product)) {
|
if (empty($product)) {
|
||||||
return error('产品不存在');
|
return error('产品不存在');
|
||||||
|
|||||||
Reference in New Issue
Block a user