From 47ce5c2cf093c4cb58ad3a1253d57b7322abe45e Mon Sep 17 00:00:00 2001 From: ShenQiLun <97694732@qq.com> Date: Thu, 2 Jul 2026 16:52:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:searchFacet=E4=BC=A0=E5=85=A5quality?= =?UTF-8?q?=E5=8F=82=E6=95=B0,=E5=88=87=E6=8D=A2=E5=93=81=E7=9B=B8?= =?UTF-8?q?=E6=97=B6=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/kongfz.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/utils/kongfz.js b/utils/kongfz.js index 23d8acf..b1bd627 100644 --- a/utils/kongfz.js +++ b/utils/kongfz.js @@ -84,17 +84,21 @@ export function login(username, password) { * @returns {Promise<{newCount: number, oldCount: number, totalFound: number}>} */ export function searchFacet(keyword, options = {}) { - const { phpsessid = '', userArea = '1006000000', dataType = 0 } = options + const { phpsessid = '', userArea = '1006000000', dataType = 0, quality = '' } = options return new Promise((resolve, reject) => { + var reqData = { + dataType: dataType, + keyword: keyword, + page: 1, + userArea: userArea + } + if (quality) { + reqData.quality = quality + } uni.request({ url: 'https://search.kongfz.com/pc-gw/search-web/client/pc/product/keyword/normal/facet', method: 'GET', - data: { - dataType: dataType, - keyword: keyword, - page: 1, - userArea: userArea - }, + data: reqData, header: { 'Cookie': phpsessid ? `PHPSESSID=${phpsessid}` : '' },