✨ (search): 书目搜索带上作者参数
/store/search 的 author 不再写死为空。不传时仍是空串。
This commit is contained in:
1 parent
f4f8386a61
commit
a890c230ac
4 files changed
+16
-9
No files matched your search
@@ -72,11 +72,12 @@ end
|
||||
--- 书城搜索(App ``GET /store/search``)。回包书在 ``data[]``,每条 ``bookInfo``;补成 ``books[]`` 交给 mapper。
|
||||
---@param keyword string
|
||||
---@param cb fun(data: table|nil, err: string|nil)
|
||||
---@param author string|nil 作者过滤;旧调用不传,查询里仍是空串
|
||||
---@return { cancel: fun() }|nil
|
||||
function Client:searchAsync(keyword, cb)
|
||||
function Client:searchAsync(keyword, cb, author)
|
||||
return Eink.callAsync("GET", "/store/search", {
|
||||
query = {
|
||||
keyword = keyword, author = "", authorVids = "", categoryId = "",
|
||||
keyword = keyword, author = type(author) == "string" and author or "", authorVids = "", categoryId = "",
|
||||
count = 20, maxIdx = 0, type = 0, v = 2, outer = 0, fromBookId = "",
|
||||
scope = 0, scene = 0, filterType = 0, filterField = "", queryUid = "", isQueryWord = 0,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user