From a962d0d1bf83948c31ea46a389eb4ef6b520d491 Mon Sep 17 00:00:00 2001 From: src48597962 <48597962@qq.com> Date: Sat, 22 Apr 2023 20:42:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20'SrcJuMethod2.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SrcJuMethod2.js | 64 ------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 SrcJuMethod2.js diff --git a/SrcJuMethod2.js b/SrcJuMethod2.js deleted file mode 100644 index 2495fd59..00000000 --- a/SrcJuMethod2.js +++ /dev/null @@ -1,64 +0,0 @@ -//读接口数据临时缓存 -function readData(fileid,datatype){ - let cachefile = `hiker://files/_cache/${fileid}.json`; - let jkdata = {}; - try{ - eval("jkdata=" + fetch(cachefile)); - }catch(e){ - log("jkdata加载失败>"+fileid+">"+e.message); - } - - try{ - let parse; - let source; - if(datatype==1){ - eval("source = " + jkdata.parse); - if (source && source.ext && /^http/.test(source.ext)) { - requireCache(source.ext, 48); - parse = yidata; - } else { - parse = source; - } - }else if(datatype==2){ - eval("source = " + jkdata.erparse); - if (source && source.ext && /^http/.test(source.ext)) { - requireCache(source.ext, 48); - parse = erdata; - } else { - parse = source; - } - }else if(datatype==3){ - eval("source = " + jkdata.public); - if (source && source.ext && /^http/.test(source.ext)) { - requireCache(source.ext, 48); - parse = ggdata; - } else { - parse = source; - } - } - return parse; - }catch(e){ - log("读取接口本地缓存文件失败>"+e.message); - return ""; - } -} -let 一级 = function(fileid) { - let info = storage0.getMyVar('一级源接口信息') || {}; - let 标识 = info.type + "_" + info.name; - fileid = fileid || 标识; - return readData(fileid, 1) -} -let 二级 = function(fileid) { - let info = storage0.getMyVar('二级源接口信息') || {}; - let 标识 = info.type + "_" + info.name; - fileid = fileid || 标识; - return readData(fileid, 2) -} -let 公共 = function(fileid) { - return readData(fileid, 3) -} -let 属性 = function(fileid, parse, attribut) { - let 接口; - eval("接口 = " + parse); - return 接口(fileid)[attribut]; -}; \ No newline at end of file