|
|
|
@ -110,88 +110,92 @@ function getYiData(datatype,od) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}catch(e){ |
|
|
|
|
xlog("√一级源接口加载异常>"+e.message); |
|
|
|
|
xlog("√一级源代码加载异常>"+e.message); |
|
|
|
|
} |
|
|
|
|
if(parse){ |
|
|
|
|
eval("let gonggong = " + sourcedata[0].public); |
|
|
|
|
if (gonggong && gonggong.ext && /^http/.test(gonggong.ext)) { |
|
|
|
|
requireCache(gonggong.ext, 48); |
|
|
|
|
gonggong = ggdata; |
|
|
|
|
} |
|
|
|
|
公共 = gonggong || parse['公共'] || {}; |
|
|
|
|
let info = storage0.getMyVar('一级源接口信息'); |
|
|
|
|
//let info = {type: sourcedata[0].type, name: sourcedata[0].name};
|
|
|
|
|
let 标识 = info.type + "_" + info.name; |
|
|
|
|
let itemid = 标识 + "_" + datatype; |
|
|
|
|
/* |
|
|
|
|
d.push({ |
|
|
|
|
title: "加载中", |
|
|
|
|
url: "hiker://empty", |
|
|
|
|
col_type: "text_center_1", |
|
|
|
|
extra: { |
|
|
|
|
id: itemid |
|
|
|
|
try{ |
|
|
|
|
eval("let gonggong = " + sourcedata[0].public); |
|
|
|
|
if (gonggong && gonggong.ext && /^http/.test(gonggong.ext)) { |
|
|
|
|
requireCache(gonggong.ext, 48); |
|
|
|
|
gonggong = ggdata; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
setResult(d); |
|
|
|
|
*/ |
|
|
|
|
let page = MY_PAGE || 1; |
|
|
|
|
let loading; |
|
|
|
|
if (page==1 && typeof(setPreResult)!="undefined" && getMyVar('动态加载loading')!=itemid) {
|
|
|
|
|
loading = 1; |
|
|
|
|
d.push({ |
|
|
|
|
title: "", |
|
|
|
|
col_type: "text_1", |
|
|
|
|
extra: { |
|
|
|
|
lineVisible: false, |
|
|
|
|
cls: "loading_gif" |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
d.push({ |
|
|
|
|
title: "", |
|
|
|
|
col_type: "text_1", |
|
|
|
|
extra: { |
|
|
|
|
lineVisible: false, |
|
|
|
|
cls: "loading_gif" |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
公共 = gonggong || parse['公共'] || {}; |
|
|
|
|
let info = storage0.getMyVar('一级源接口信息'); |
|
|
|
|
//let info = {type: sourcedata[0].type, name: sourcedata[0].name};
|
|
|
|
|
let 标识 = info.type + "_" + info.name; |
|
|
|
|
let itemid = 标识 + "_" + datatype; |
|
|
|
|
/* |
|
|
|
|
d.push({ |
|
|
|
|
pic_url: "https://hikerfans.com/weisyr/img/Loading1.gif", |
|
|
|
|
col_type: "pic_1_center", |
|
|
|
|
title: "加载中", |
|
|
|
|
url: "hiker://empty", |
|
|
|
|
col_type: "text_center_1", |
|
|
|
|
extra: { |
|
|
|
|
cls: "loading_gif" |
|
|
|
|
id: itemid |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
setPreResult(d); |
|
|
|
|
d = []; |
|
|
|
|
putMyVar('动态加载loading', itemid); |
|
|
|
|
} |
|
|
|
|
let data = []; |
|
|
|
|
try{ |
|
|
|
|
eval("let 数据 = " + parse[datatype]) |
|
|
|
|
data = 数据(); |
|
|
|
|
setResult(d); |
|
|
|
|
*/ |
|
|
|
|
let page = MY_PAGE || 1; |
|
|
|
|
let loading; |
|
|
|
|
if (page==1 && typeof(setPreResult)!="undefined" && getMyVar('动态加载loading')!=itemid) {
|
|
|
|
|
loading = 1; |
|
|
|
|
d.push({ |
|
|
|
|
title: "", |
|
|
|
|
col_type: "text_1", |
|
|
|
|
extra: { |
|
|
|
|
lineVisible: false, |
|
|
|
|
cls: "loading_gif" |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
d.push({ |
|
|
|
|
title: "", |
|
|
|
|
col_type: "text_1", |
|
|
|
|
extra: { |
|
|
|
|
lineVisible: false, |
|
|
|
|
cls: "loading_gif" |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
d.push({ |
|
|
|
|
pic_url: "https://hikerfans.com/weisyr/img/Loading1.gif", |
|
|
|
|
col_type: "pic_1_center", |
|
|
|
|
extra: { |
|
|
|
|
cls: "loading_gif" |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
setPreResult(d); |
|
|
|
|
d = []; |
|
|
|
|
putMyVar('动态加载loading', itemid); |
|
|
|
|
} |
|
|
|
|
let data = []; |
|
|
|
|
try{ |
|
|
|
|
eval("let 数据 = " + parse[datatype]) |
|
|
|
|
data = 数据(); |
|
|
|
|
}catch(e){ |
|
|
|
|
xlog(e.message); |
|
|
|
|
} |
|
|
|
|
if(loading){ |
|
|
|
|
deleteItemByCls("loading_gif"); |
|
|
|
|
} |
|
|
|
|
if(data.length==0 && page==1){ |
|
|
|
|
data.push({ |
|
|
|
|
title: "未获取到数据", |
|
|
|
|
url: "hiker://empty", |
|
|
|
|
col_type: "text_center_1", |
|
|
|
|
}) |
|
|
|
|
}else if(data.length>0){ |
|
|
|
|
require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJuMethod.js'); |
|
|
|
|
data.forEach(item => { |
|
|
|
|
item = toerji(item,info); |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
d = d.concat(data); |
|
|
|
|
/* |
|
|
|
|
addItemBefore(itemid, data); |
|
|
|
|
*/ |
|
|
|
|
}catch(e){ |
|
|
|
|
xlog(e.message); |
|
|
|
|
} |
|
|
|
|
if(loading){ |
|
|
|
|
deleteItemByCls("loading_gif"); |
|
|
|
|
} |
|
|
|
|
if(data.length==0 && page==1){ |
|
|
|
|
data.push({ |
|
|
|
|
title: "未获取到数据", |
|
|
|
|
url: "hiker://empty", |
|
|
|
|
col_type: "text_center_1", |
|
|
|
|
}) |
|
|
|
|
}else if(data.length>0){ |
|
|
|
|
require(config.依赖.match(/http(s)?:\/\/.*\//)[0] + 'SrcJuMethod.js'); |
|
|
|
|
data.forEach(item => { |
|
|
|
|
item = toerji(item,info); |
|
|
|
|
}) |
|
|
|
|
toast(datatype+"代码报错,更换主页源或联系接口作者"); |
|
|
|
|
xlog("√报错信息>"+e.message); |
|
|
|
|
} |
|
|
|
|
d = d.concat(data); |
|
|
|
|
/* |
|
|
|
|
addItemBefore(itemid, data); |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
setResult(d); |
|
|
|
|
}else{ |
|
|
|
|
d.push({ |
|
|
|
|