配置修改

This commit is contained in:
2026-04-18 11:13:26 +08:00
parent e0b45888ed
commit b18d1595a4
2 changed files with 41 additions and 1 deletions

View File

@ -26,7 +26,7 @@ use app\api\logic\ShopGoodsCategoryLogic;
class ShopGoodsCategory extends Api
{
public $like_not_need_login = ['getShopGoodsCategory'];
public $like_not_need_login = ['getShopGoodsCategory','getCityGoodsCategory'];
public function getShopGoodsCategory()
{
@ -42,4 +42,15 @@ class ShopGoodsCategory extends Api
return JsonServer::error('请求类型错误');
}
}
public function getCityGoodsCategory()
{
if($this->request->isGet()) {
$city_id = $this->request->get('city_id', 0);
$data = ShopGoodsCategoryLogic::getCityGoodsCategory($city_id);
return JsonServer::success('获取店铺分类成功', $data);
}else{
return JsonServer::error('请求类型错误');
}
}
}