fix:searchFacet加入author和publisher参数,统计按筛选条件更新
This commit is contained in:
parent
47ce5c2cf0
commit
ea29f72e78
@ -84,7 +84,7 @@ export function login(username, password) {
|
|||||||
* @returns {Promise<{newCount: number, oldCount: number, totalFound: number}>}
|
* @returns {Promise<{newCount: number, oldCount: number, totalFound: number}>}
|
||||||
*/
|
*/
|
||||||
export function searchFacet(keyword, options = {}) {
|
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) => {
|
return new Promise((resolve, reject) => {
|
||||||
var reqData = {
|
var reqData = {
|
||||||
dataType: dataType,
|
dataType: dataType,
|
||||||
@ -92,8 +92,21 @@ export function searchFacet(keyword, options = {}) {
|
|||||||
page: 1,
|
page: 1,
|
||||||
userArea: userArea
|
userArea: userArea
|
||||||
}
|
}
|
||||||
|
var actionPathParts = []
|
||||||
if (quality) {
|
if (quality) {
|
||||||
reqData.quality = 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({
|
uni.request({
|
||||||
url: 'https://search.kongfz.com/pc-gw/search-web/client/pc/product/keyword/normal/facet',
|
url: 'https://search.kongfz.com/pc-gw/search-web/client/pc/product/keyword/normal/facet',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user