fix:searchFacet传入quality参数,切换品相时统计数据同步更新

This commit is contained in:
ShenQiLun 2026-07-02 16:52:12 +08:00
parent 5941e78d71
commit 47ce5c2cf0

View File

@ -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) => {
uni.request({
url: 'https://search.kongfz.com/pc-gw/search-web/client/pc/product/keyword/normal/facet',
method: 'GET',
data: {
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: reqData,
header: {
'Cookie': phpsessid ? `PHPSESSID=${phpsessid}` : ''
},