From 8c602e0931fccfa01e37e5c5ac06c4f44e332ee6 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Sat, 18 Feb 2023 17:53:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'SrcJyAlist.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJyAlist.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/SrcJyAlist.js b/SrcJyAlist.js index 3abdacc6..58c49329 100644 --- a/SrcJyAlist.js +++ b/SrcJyAlist.js @@ -219,9 +219,18 @@ function alistSearch(alistapi,key) { deleteItemByCls('alist'); let dirlist = getlist(json.data.content,1); addItemBefore('homeloading', arrayAdd(dirlist,1,alistapi)); - let filelist = getlist(json.data.content,0); addItemBefore('homeloading', arrayAdd(filelist,0,alistapi)); + if(dirlist.length==0&&filelist.length==0){ + addItemBefore('homeloading', { + title: "未搜索到“"+key+"”", + url: "hiker://empty", + col_type: "text_center_1", + extra: { + cls: "alist" + } + }); + } } }catch(e){ log(e.message);