更新 'SrcJyAlist.js'

master
src48597962 2 years ago
parent ad20f5a4d0
commit a434d5d0d2
  1. 7
      SrcJyAlist.js

@ -169,10 +169,10 @@ function alistList(alistapi){
} }
function arrayAdd(list,isdir,alistapi){ function arrayAdd(list,isdir,alistapi){
let folderpath = (list.parent||MY_PARAMS.path||"") + "/" + item.name;
let d = []; let d = [];
if(isdir){ if(isdir){
list.forEach(item => { list.forEach(item => {
let folderpath = (item.parent||MY_PARAMS.path||"") + "/" + item.name;
d.push({ d.push({
title: item.name, title: item.name,
img: item.thumb || config.依赖.match(/http(s)?:\/\/.*\//)[0] + "img/文件夹.svg", img: item.thumb || config.依赖.match(/http(s)?:\/\/.*\//)[0] + "img/文件夹.svg",
@ -189,13 +189,14 @@ function arrayAdd(list,isdir,alistapi){
}) })
}else{ }else{
list.forEach(item => { list.forEach(item => {
let filepath = (item.parent||MY_PARAMS.path||"") + "/" + item.name;
d.push({ d.push({
title: item.name, title: item.name,
img: item.thumb || "https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg@Referer=", img: item.thumb || "https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg@Referer=",
url: $(alistapi.server+path).lazyRule((api,path,pwd,sign) => { url: $(alistapi.server+filepath).lazyRule((api,path,pwd,sign) => {
require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJyAlist.js'); require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJyAlist.js');
return alistUrl(api,path,pwd,sign); return alistUrl(api,path,pwd,sign);
}, alistapi.server, path, alistapi.password, item.sign), }, alistapi.server, filepath, alistapi.password, item.sign),
col_type: 'avatar', col_type: 'avatar',
extra: { extra: {
cls: "alist" cls: "alist"

Loading…
Cancel
Save