//聚漫,接口型空壳小程序,接口分为主页源和搜索源 let cfgfile = "hiker://files/rules/Src/Juman/config.json"; let Jumancfg=fetch(cfgfile); if(Jumancfg != ""){ eval("var JMconfig=" + Jumancfg+ ";"); }else{ var JMconfig= {}; } let sourcefile = "hiker://files/rules/Src/Juman/jiekou.json"; let sourcedata = fetch(sourcefile); if(sourcedata != ""){ eval("var datalist=" + sourcedata+ ";"); }else{ var datalist = []; } //一级 function yiji() { Version(); downloadicon(); let sourcename = JMconfig['source'] || "神漫画"; let sourcedata = datalist.length>0?datalist.filter(it=>{ return it.name==sourcename&&it.parse; }):[]; let d = []; d.push({ title: "管理", url: $("hiker://empty#noRecordHistory##noHistory#").rule(() => { require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJmSet.js'); SRCSet(); }), pic_url: "hiker://files/cache/src/管理.png", col_type: 'icon_5' }) d.push({ title: "更新", url: "", pic_url: "hiker://files/cache/src/更新.webp", col_type: 'icon_5' }) d.push({ title: "分类", url: "", pic_url: "hiker://files/cache/src/分类.webp", col_type: 'icon_5' }) d.push({ title: "排行", url: "", pic_url: "hiker://files/cache/src/排行.webp", col_type: 'icon_5' }) d.push({ title: "书架", url: "", pic_url: "hiker://files/cache/src/书架.png", col_type: 'icon_5' }) d.push({ col_type: 'line' }) if(sourcedata.length==0){ d.push({ title: "请先配置一个主页源", url: "hiker://empty", col_type: "text_center_1", }) }else{ let source = sourcedata[0].parse; if(source.ext && /^http/.test(source.ext)){ requireCache(source.ext, 48); MY_URL = parse['链接']; let 主页数据 = []; try{ eval("let 主页 = " + parse['主页']) 主页数据 = 主页(); }catch(e){ log(e.message); } if(主页数据.length==0){ 主页数据.push({ title: "主页源的主页数据获取失败", url: "hiker://empty", col_type: "text_center_1", }) } d = d.concat(主页数据); } } setResult(d); } //二级+搜索源 function erji(name,data) { name = name || MY_PARAMS.name; let d = []; setResult(d); } //图标下载 function downloadicon() { try{ if(!fileExist('hiker://files/cache/src/管理.png')){ downloadFile(config.依赖.match(/http(s)?:\/\/.*\//)[0] + "img/管理.png", 'hiker://files/cache/src/管理.png'); } if(!fileExist('hiker://files/cache/src/更新.webp')){ downloadFile(config.依赖.match(/http(s)?:\/\/.*\//)[0] + "img/更新.webp", 'hiker://files/cache/src/更新.webp'); } if(!fileExist('hiker://files/cache/src/分类.webp')){ downloadFile(config.依赖.match(/http(s)?:\/\/.*\//)[0] + "img/分类.webp", 'hiker://files/cache/src/分类.webp'); } if(!fileExist('hiker://files/cache/src/排行.webp')){ downloadFile(config.依赖.match(/http(s)?:\/\/.*\//)[0] + "img/排行.webp", 'hiker://files/cache/src/排行.webp'); } if(!fileExist('hiker://files/cache/src/书架.jpg')){ downloadFile(config.依赖.match(/http(s)?:\/\/.*\//)[0] + "img/书架.png", 'hiker://files/cache/src/书架.png'); } }catch(e){} } //版本检测 function Version() { var nowVersion = "0.1";//现在版本 var nowtime = Date.now(); var oldtime = parseInt(getItem('VersionChecktime','0').replace('time','')); if (getMyVar('SrcJuman-VersionCheck', '0') == '0' && nowtime > (oldtime+12*60*60*1000)) { try { eval(request(config.依赖.match(/http(s)?:\/\/.*\//)[0].replace('Comics','master') + 'SrcTmplVersion.js')) if (parseFloat(newVersion.SrcJuman) > parseFloat(nowVersion)) { confirm({ title:'发现新版本,是否更新?', content:nowVersion+'=>'+newVersion.SrcJuman+'\n'+newVersion.SrcJumandesc[newVersion.SrcJuman], confirm: $.toString((nowtime) => { setItem('VersionChecktime', nowtime+'time'); deleteCache(); delete config.依赖; refreshPage(); },nowtime), cancel:'' }) log('检测到新版本!\nV'+newVersion.SrcJuman+'版本》'+newVersion.SrcJumandesc[newVersion.SrcJuman]); } putMyVar('SrcJuman-Version', '-V'+newVersion.SrcJuying); } catch (e) { } putMyVar('SrcJuman-VersionCheck', '1'); }else{ putMyVar('SrcJuman-Version', '-V'+nowVersion); } }