diff --git a/SrcJuman.js b/SrcJuman.js index ccb12cab..7291e0a6 100644 --- a/SrcJuman.js +++ b/SrcJuman.js @@ -116,7 +116,7 @@ function sousuo() { title: "搜索中...", url: "hiker://empty", extra: { - id: "listloading" + id: "sousuoloading" } }); setResult(d); @@ -285,10 +285,11 @@ function erji() { //搜索接口 function search(name) { let searchMark = storage0.getMyVar('searchMark') || {}; + let addid = getMyVar('SrcJmSousuo')=="1"?'sousuoloading':'listloading'; if(searchMark[name]){ //log("重复搜索>"+name+",调用搜索缓存"); - addItemBefore('listloading', searchMark[name]); - updateItem("listloading",{title: getMyVar('SrcJmSousuo')=="1"?"当前搜索为缓存":"‘‘’’当前搜索为缓存"}) + addItemBefore(addid, searchMark[name]); + updateItem(addid,{title: getMyVar('SrcJmSousuo')=="1"?"当前搜索为缓存":"‘‘’’当前搜索为缓存"}) }else{ showLoading('搜源中,请稍后.'); let searchMark = storage0.getMyVar('searchMark') || {}; @@ -336,7 +337,7 @@ function search(name) { }) searchMark[name] = searchMark[name] || []; searchMark[name] = searchMark[name].concat(data); - addItemBefore('listloading', data); + addItemBefore(addid, data); success++; } }catch(e){ @@ -362,7 +363,7 @@ function search(name) { }); storage0.putMyVar('searchMark',searchMark); let sousuosm = getMyVar('SrcJmSousuo')=="1"?success+"/"+list.length+",搜索完成":"‘‘’’"+success+"/"+list.length+",搜索完成"; - updateItem("listloading",{title: sousuosm}) + updateItem(addid,{title: sousuosm}) toast('搜源完成'); }else{ toast('无接口,未找到源');