1
0
zrcadlo https://github.com/ialley-workshop-open/uni-halo.git synchronizováno 2026-06-10 20:29:28 +08:00

update: 首页分类查询过滤

Tento commit je obsažen v:
小莫唐尼
2025-06-11 15:57:35 +08:00
rodič 9aa0e310f2
revize 256bc0e00f
2 změnil soubory, kde provedl 12 přidání a 2 odebrání
+9 -1
Zobrazit soubor
@@ -3,6 +3,7 @@
*/
import HaloTokenConfig from '@/config/token.config.js'
import HttpHandler from '@/common/http/request.js'
import qs from 'qs'
import {
getAppConfigs
@@ -42,7 +43,14 @@ export default {
* @param {Object} params 查询参数
*/
getCategoryList: (params) => {
return HttpHandler.Get('/apis/api.content.halo.run/v1alpha1/categories', params)
const param = qs.stringify(params, {
allowDots: true,
encodeValuesOnly: true,
skipNulls: true,
encode: false,
arrayFormat: 'repeat'
})
return HttpHandler.Get(`/apis/api.content.halo.run/v1alpha1/categories?${param}`,{})
},
/**
* 查询分类下的文章
+3 -1
Zobrazit soubor
@@ -214,7 +214,9 @@ export default {
}
this.$httpApi.v2
.getCategoryList({})
.getCategoryList({
fieldSelector:['spec.hideFromList==false']
})
.then(res => {
this.categoryList = res.items.sort((a, b) => {
return b.postCount - a.postCount;