|
|
|
@ -212,10 +212,11 @@ function alistUrl(api,path,pwd,sign) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function alistSearch(alistapi,key) { |
|
|
|
|
deleteItemByCls('alist'); |
|
|
|
|
showLoading('搜索中,请稍后...'); |
|
|
|
|
try{ |
|
|
|
|
let json = JSON.parse(fetch(alistapi.server + "/api/fs/search", {headers:{'content-type':'application/json;charset=UTF-8' },body:{"per_page":100,"page":1,"parent":"/","keywords":key},method:'POST',timeout:10000})); |
|
|
|
|
if(json.code==200){ |
|
|
|
|
deleteItemByCls('alist'); |
|
|
|
|
let dirlist = getlist(json.data.content,1); |
|
|
|
|
addItemBefore('homeloading', arrayAdd(dirlist,1,alistapi)); |
|
|
|
|
|
|
|
|
@ -225,6 +226,7 @@ function alistSearch(alistapi,key) { |
|
|
|
|
}catch(e){ |
|
|
|
|
log(e.message); |
|
|
|
|
} |
|
|
|
|
hideLoading(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function SortList(v1, v2) { |
|
|
|
|