|
|
@ -142,43 +142,7 @@ function checkBoxUrl(input) { |
|
|
|
hideLoading(); |
|
|
|
hideLoading(); |
|
|
|
return {html: html} |
|
|
|
return {html: html} |
|
|
|
} |
|
|
|
} |
|
|
|
// urlfile缓存获取逻辑
|
|
|
|
|
|
|
|
function getUrlFile(arr) { |
|
|
|
|
|
|
|
let urlfile; |
|
|
|
|
|
|
|
let extfile = arr.ext; |
|
|
|
|
|
|
|
let filepath = cachepath + 'libs_jk/' + arr.type; |
|
|
|
|
|
|
|
if($.type(extfile)=='object'){ |
|
|
|
|
|
|
|
urlfile = filepath + '_' + arr.name + '.json'; |
|
|
|
|
|
|
|
writeFile(urlfile, JSON.stringify(extfile)); |
|
|
|
|
|
|
|
}else if(/^file/.test(extfile)){ |
|
|
|
|
|
|
|
if(mode==1){ |
|
|
|
|
|
|
|
urlfile = filepath + '_' + (extfile.includes('?')?obj.key:"")+extfile.split('?')[0].substr(extfile.split('?')[0].lastIndexOf('/')+1); |
|
|
|
|
|
|
|
writeFile(urlfile, fetch(extfile)); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
urlfile = extfile.split('?')[0]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else if(/^http/.test(extfile)){ |
|
|
|
|
|
|
|
urlfile = filepath + '_' + (extfile.includes('?')?obj.key:"")+extfile.split('?')[0].substr(extfile.split('?')[0].lastIndexOf('/')+1); |
|
|
|
|
|
|
|
if(mode==1){ |
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
let content = getContnet(extfile); |
|
|
|
|
|
|
|
if (!content) { |
|
|
|
|
|
|
|
urlfile = ''; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
if(arr.type=="XYQ" && !/分类片单标题/.test(content)){ |
|
|
|
|
|
|
|
arr['onlysearch'] = 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(arr.type=="XBPQ" && !/搜索url/.test(content)){ |
|
|
|
|
|
|
|
obj.searchable = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
writeFile(urlfile, content); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}catch(e){ |
|
|
|
|
|
|
|
log(obj.name + 'ext文件缓存失败>' + e.message); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// 从box配置文件获取
|
|
|
|
// 从box配置文件获取
|
|
|
|
function getBoxSource(input, mode, imports){ |
|
|
|
function getBoxSource(input, mode, imports){ |
|
|
|
//input配置文件地址,mode模式1为导入,2为订阅,3为较验
|
|
|
|
//input配置文件地址,mode模式1为导入,2为订阅,3为较验
|
|
|
|