fix:searchFacet加入author和publisher参数,统计按筛选条件更新

This commit is contained in:
ShenQiLun 2026-07-02 16:55:53 +08:00
parent 47ce5c2cf0
commit ea29f72e78

View File

@ -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',