From ea29f72e788a27aaaac3c80e92da58879a9d3224 Mon Sep 17 00:00:00 2001 From: ShenQiLun <97694732@qq.com> Date: Thu, 2 Jul 2026 16:55:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:searchFacet=E5=8A=A0=E5=85=A5author?= =?UTF-8?q?=E5=92=8Cpublisher=E5=8F=82=E6=95=B0,=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=8C=89=E7=AD=9B=E9=80=89=E6=9D=A1=E4=BB=B6=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/kongfz.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/utils/kongfz.js b/utils/kongfz.js index b1bd627..f2d6042 100644 --- a/utils/kongfz.js +++ b/utils/kongfz.js @@ -84,7 +84,7 @@ export function login(username, password) { * @returns {Promise<{newCount: number, oldCount: number, totalFound: number}>} */ export function searchFacet(keyword, options = {}) { - const { phpsessid = '', userArea = '1006000000', dataType = 0, quality = '' } = options + const { phpsessid = '', userArea = '1006000000', dataType = 0, quality = '', author = '', publisher = '' } = options return new Promise((resolve, reject) => { var reqData = { dataType: dataType, @@ -92,8 +92,21 @@ export function searchFacet(keyword, options = {}) { page: 1, userArea: userArea } + var actionPathParts = [] if (quality) { reqData.quality = quality + actionPathParts.push('quality') + } + if (author) { + reqData.author = author + actionPathParts.push('author') + } + if (publisher) { + reqData.press = publisher + actionPathParts.push('press') + } + if (actionPathParts.length > 0) { + reqData.actionPath = actionPathParts.join(',') } uni.request({ url: 'https://search.kongfz.com/pc-gw/search-web/client/pc/product/keyword/normal/facet',