增加企业产品分类

This commit is contained in:
2026-03-21 14:12:21 +08:00
parent 9281c1dc35
commit 2a6b14f698
13 changed files with 1139 additions and 277 deletions
@@ -103,11 +103,18 @@ class ArticleController extends BaseController
}
/**
* 获取文章分类列表
* 获取文章分类列表mete_articles_category:当前租户 tid、启用状态)
* 支持 baseUrl=租户前台域名,与 getCenterNews 一致,便于 api 域名跨域调用时解析 tid
*
* @return Json
*/
public function getArticleCategories(): Json
{
$baseUrl = $this->request->get('baseUrl', '');
if (!empty($baseUrl)) {
$this->tenantId = BaseController::getTenantIdByDomain($baseUrl);
}
$tid = $this->getTenantId();
if (empty($tid)) {
@@ -120,6 +127,9 @@ class ArticleController extends BaseController
$articleCategories = ArticlesCategory::where('delete_time', null)
->where('tid', $tid)
->where('status', 1)
->order('sort', 'asc')
->order('id', 'asc')
->select()
->toArray();