|
|
@ -1,81 +1,27 @@ |
|
|
|
|
|
|
|
function SRCSet() { |
|
|
|
addListener("onClose", $.toString(() => { |
|
|
|
addListener("onClose", $.toString(() => { |
|
|
|
clearMyVar('guanlicz'); |
|
|
|
clearMyVar('guanlicz'); |
|
|
|
//refreshPage(false);
|
|
|
|
//refreshPage(false);
|
|
|
|
})); |
|
|
|
})); |
|
|
|
setPageTitle("♥管理"+getVar('SrcJuying-Version', '')); |
|
|
|
setPageTitle("♥管理"+getVar('SrcJuying-Version', '')); |
|
|
|
function jiekouchuli(lx,urls) { |
|
|
|
|
|
|
|
function apitype(apiurl) { |
|
|
|
|
|
|
|
if(apiurl){ |
|
|
|
|
|
|
|
if(apiurl.includes('.vod')){ |
|
|
|
|
|
|
|
return "v1"; |
|
|
|
|
|
|
|
}else if(apiurl.includes('/app/')){ |
|
|
|
|
|
|
|
return "app"; |
|
|
|
|
|
|
|
}else if(apiurl.includes('app.php')){ |
|
|
|
|
|
|
|
return "v2"; |
|
|
|
|
|
|
|
}else if(/iptv|Chengcheng/.test(apiurl)){ |
|
|
|
|
|
|
|
return "iptv"; |
|
|
|
|
|
|
|
}else if(apiurl.includes('provide/vod/')){ |
|
|
|
|
|
|
|
return "cms"; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
return ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
return ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(lx=="type"){ |
|
|
|
|
|
|
|
return apitype(urls); |
|
|
|
|
|
|
|
}else if(lx=="save"){ |
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
var filepath = "hiker://files/rules/Src/Juying/jiekou.json"; |
|
|
|
|
|
|
|
var datafile = fetch(filepath); |
|
|
|
|
|
|
|
if(datafile != ""){ |
|
|
|
|
|
|
|
eval("var datalist=" + datafile+ ";"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
var datalist = []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var num = 0; |
|
|
|
function getTitle(title, Color) { |
|
|
|
for (var i in urls) { |
|
|
|
|
|
|
|
let urlname = urls[i].name; |
|
|
|
|
|
|
|
let urlurl = urls[i].url; |
|
|
|
|
|
|
|
let urlua = urls[i].ua||"Dalvik/2.1.0"; |
|
|
|
|
|
|
|
let urltype = urls[i].type||apitype(urlurl); |
|
|
|
|
|
|
|
let urlgroup = urls[i].group||""; |
|
|
|
|
|
|
|
if(!datalist.some(item => item.url ==urlurl)&&urlname&&/^http/.test(urlurl)&&urltype){ |
|
|
|
|
|
|
|
let arr = { "name": urlname, "url": urlurl, "ua": urlua, "type": urltype, "group": urlgroup }; |
|
|
|
|
|
|
|
datalist.push(arr); |
|
|
|
|
|
|
|
num = num + 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(num>0){writeFile(filepath, JSON.stringify(datalist));} |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
log('导入失败:'+e.message);
|
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return num; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
return "toast://接口处理类型不正确"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function getTitle(title, Color) { |
|
|
|
|
|
|
|
return '<font color="' + Color + '">' + title + '</font>'; |
|
|
|
return '<font color="' + Color + '">' + title + '</font>'; |
|
|
|
} |
|
|
|
} |
|
|
|
var d = []; |
|
|
|
var d = []; |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: getMyVar('guanli', 'jk')=="jk"?getTitle('接口管理', '#f13b66a'):'接口管理', |
|
|
|
title: getMyVar('guanli', 'jk')=="jk"?getTitle('接口管理', '#f13b66a'):'接口管理', |
|
|
|
url: `#noLoading#@lazyRule=.js:putMyVar('guanli','jk');refreshPage(false);'toast://已切换到接口管理';`, |
|
|
|
url: `#noLoading#@lazyRule=.js:putMyVar('guanli','jk');refreshPage(false);'toast://已切换到接口管理';`, |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/movie/98.svg", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/movie/98.svg", |
|
|
|
col_type: "icon_small_3" |
|
|
|
col_type: "icon_small_3" |
|
|
|
}); |
|
|
|
}); |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: getMyVar('guanli', 'jk')=="jk"?'解析管理':getTitle('解析管理', '#f13b66a'), |
|
|
|
title: getMyVar('guanli', 'jk')=="jk"?'解析管理':getTitle('解析管理', '#f13b66a'), |
|
|
|
url: `#noLoading#@lazyRule=.js:putMyVar('guanli','jx');refreshPage(false);'toast://已切换到解析管理';`, |
|
|
|
url: `#noLoading#@lazyRule=.js:putMyVar('guanli','jx');refreshPage(false);'toast://已切换到解析管理';`, |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/movie/105.svg", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/movie/105.svg", |
|
|
|
col_type: "icon_small_3" |
|
|
|
col_type: "icon_small_3" |
|
|
|
}); |
|
|
|
}); |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: '扩展中心', |
|
|
|
title: '扩展中心', |
|
|
|
url: $('hiker://empty#noRecordHistory##noHistory#').rule((jiekouchuli) => { |
|
|
|
url: $('hiker://empty#noRecordHistory##noHistory#').rule((jiekouchuli) => { |
|
|
|
addListener("onClose", $.toString(() => { |
|
|
|
addListener("onClose", $.toString(() => { |
|
|
@ -605,24 +551,24 @@ d.push({ |
|
|
|
}, jiekouchuli), |
|
|
|
}, jiekouchuli), |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/ke/156.png", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/ke/156.png", |
|
|
|
col_type: "icon_small_3" |
|
|
|
col_type: "icon_small_3" |
|
|
|
}); |
|
|
|
}); |
|
|
|
if(getMyVar('guanli', 'jk')=="jk"){ |
|
|
|
if(getMyVar('guanli', 'jk')=="jk"){ |
|
|
|
var filepath = "hiker://files/rules/Src/Juying/jiekou.json"; |
|
|
|
var filepath = "hiker://files/rules/Src/Juying/jiekou.json"; |
|
|
|
}else if(getMyVar('guanli', 'jk')=="jx"){ |
|
|
|
}else if(getMyVar('guanli', 'jk')=="jx"){ |
|
|
|
var filepath = "hiker://files/rules/Src/Juying/myjiexi.json"; |
|
|
|
var filepath = "hiker://files/rules/Src/Juying/myjiexi.json"; |
|
|
|
} |
|
|
|
} |
|
|
|
var datafile = fetch(filepath); |
|
|
|
var datafile = fetch(filepath); |
|
|
|
if(datafile != ""){ |
|
|
|
if(datafile != ""){ |
|
|
|
eval("var datalist=" + datafile+ ";"); |
|
|
|
eval("var datalist=" + datafile+ ";"); |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
var datalist = []; |
|
|
|
var datalist = []; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
col_type: "line_blank" |
|
|
|
col_type: "line_blank" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
function jiekou(lx,data,jiekouchuli) { |
|
|
|
function jiekou(lx,data,jiekouchuli) { |
|
|
|
addListener("onClose", $.toString(() => { |
|
|
|
addListener("onClose", $.toString(() => { |
|
|
|
clearMyVar('apiname'); |
|
|
|
clearMyVar('apiname'); |
|
|
|
clearMyVar('apiurl'); |
|
|
|
clearMyVar('apiurl'); |
|
|
@ -875,8 +821,8 @@ function jiekou(lx,data,jiekouchuli) { |
|
|
|
}, lx, data, jiekouchuli) |
|
|
|
}, lx, data, jiekouchuli) |
|
|
|
}); |
|
|
|
}); |
|
|
|
setHomeResult(d); |
|
|
|
setHomeResult(d); |
|
|
|
} |
|
|
|
} |
|
|
|
function jiexi(lx,data) { |
|
|
|
function jiexi(lx,data) { |
|
|
|
addListener("onClose", $.toString(() => { |
|
|
|
addListener("onClose", $.toString(() => { |
|
|
|
clearMyVar('parsename'); |
|
|
|
clearMyVar('parsename'); |
|
|
|
clearMyVar('parseurl'); |
|
|
|
clearMyVar('parseurl'); |
|
|
@ -1285,8 +1231,8 @@ function jiexi(lx,data) { |
|
|
|
extra:{id:'jxline'} |
|
|
|
extra:{id:'jxline'} |
|
|
|
}) |
|
|
|
}) |
|
|
|
setHomeResult(d); |
|
|
|
setHomeResult(d); |
|
|
|
} |
|
|
|
} |
|
|
|
function guanlidata(data,jiekou,jiexi,jiekouchuli) { |
|
|
|
function guanlidata(data,jiekou,jiexi,jiekouchuli) { |
|
|
|
try{ |
|
|
|
try{ |
|
|
|
if(getMyVar('guanli', 'jk')=="jk"){ |
|
|
|
if(getMyVar('guanli', 'jk')=="jk"){ |
|
|
|
var czdatalist = data.map((datalist)=>{ |
|
|
|
var czdatalist = data.map((datalist)=>{ |
|
|
@ -1401,8 +1347,8 @@ function guanlidata(data,jiekou,jiexi,jiekouchuli) { |
|
|
|
log(e.message); |
|
|
|
log(e.message); |
|
|
|
return []; |
|
|
|
return []; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: '增加', |
|
|
|
title: '增加', |
|
|
|
url: getMyVar('guanli', 'jk')=="jk"?$('hiker://empty#noRecordHistory##noHistory#').rule((jiekou,jiekouchuli) => { |
|
|
|
url: getMyVar('guanli', 'jk')=="jk"?$('hiker://empty#noRecordHistory##noHistory#').rule((jiekou,jiekouchuli) => { |
|
|
|
jiekou('add','',jiekouchuli) |
|
|
|
jiekou('add','',jiekouchuli) |
|
|
@ -1411,8 +1357,8 @@ d.push({ |
|
|
|
}, jiexi), |
|
|
|
}, jiexi), |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/more/25.png", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/more/25.png", |
|
|
|
col_type: "icon_small_4" |
|
|
|
col_type: "icon_small_4" |
|
|
|
}); |
|
|
|
}); |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: getMyVar('guanlicz','0')=="1"?'复制':getMyVar('guanlicz','0')=="2"?'变更':getMyVar('guanlicz','0')=="3"?'删除':'操作', |
|
|
|
title: getMyVar('guanlicz','0')=="1"?'复制':getMyVar('guanlicz','0')=="2"?'变更':getMyVar('guanlicz','0')=="3"?'删除':'操作', |
|
|
|
url: $(["复制","变更","删除","清空"],2,"选择操作功能项").select(()=>{ |
|
|
|
url: $(["复制","变更","删除","清空"],2,"选择操作功能项").select(()=>{ |
|
|
|
if(input=="复制"){ |
|
|
|
if(input=="复制"){ |
|
|
@ -1448,8 +1394,8 @@ d.push({ |
|
|
|
}), |
|
|
|
}), |
|
|
|
img: getMyVar('guanlicz','0')=="1"?"https://lanmeiguojiang.com/tubiao/more/292.png":getMyVar('guanlicz','0')=="2"?"https://lanmeiguojiang.com/tubiao/more/275.png":getMyVar('guanlicz','0')=="3"?"https://lanmeiguojiang.com/tubiao/more/216.png":"https://lanmeiguojiang.com/tubiao/more/290.png", |
|
|
|
img: getMyVar('guanlicz','0')=="1"?"https://lanmeiguojiang.com/tubiao/more/292.png":getMyVar('guanlicz','0')=="2"?"https://lanmeiguojiang.com/tubiao/more/275.png":getMyVar('guanlicz','0')=="3"?"https://lanmeiguojiang.com/tubiao/more/216.png":"https://lanmeiguojiang.com/tubiao/more/290.png", |
|
|
|
col_type: "icon_small_4" |
|
|
|
col_type: "icon_small_4" |
|
|
|
}); |
|
|
|
}); |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: '导入', |
|
|
|
title: '导入', |
|
|
|
url: $("","聚影口令").input(()=>{ |
|
|
|
url: $("","聚影口令").input(()=>{ |
|
|
|
try{ |
|
|
|
try{ |
|
|
@ -1520,8 +1466,8 @@ d.push({ |
|
|
|
}), |
|
|
|
}), |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/more/43.png", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/more/43.png", |
|
|
|
col_type: "icon_small_4" |
|
|
|
col_type: "icon_small_4" |
|
|
|
}); |
|
|
|
}); |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: '分享', |
|
|
|
title: '分享', |
|
|
|
url: datalist.length==0?'toast://数据为空,无法分享':$().lazyRule(()=>{ |
|
|
|
url: datalist.length==0?'toast://数据为空,无法分享':$().lazyRule(()=>{ |
|
|
|
if(getMyVar('guanli', 'jk')=="jk"){ |
|
|
|
if(getMyVar('guanli', 'jk')=="jk"){ |
|
|
@ -1554,12 +1500,12 @@ d.push({ |
|
|
|
}), |
|
|
|
}), |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/more/3.png", |
|
|
|
img: "https://lanmeiguojiang.com/tubiao/more/3.png", |
|
|
|
col_type: "icon_small_4" |
|
|
|
col_type: "icon_small_4" |
|
|
|
}); |
|
|
|
}); |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
col_type: "line" |
|
|
|
col_type: "line" |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if(getMyVar('guanlicz','0')!="0"){ |
|
|
|
if(getMyVar('guanlicz','0')!="0"){ |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: "🔍", |
|
|
|
title: "🔍", |
|
|
|
url: $.toString((guanlidata,datalist,jiekou,jiexi,jiekouchuli) => { |
|
|
|
url: $.toString((guanlidata,datalist,jiekou,jiexi,jiekouchuli) => { |
|
|
@ -1586,13 +1532,71 @@ if(getMyVar('guanlicz','0')!="0"){ |
|
|
|
|
|
|
|
|
|
|
|
let gldatalist = guanlidata(datalist,jiekou,jiexi,jiekouchuli); |
|
|
|
let gldatalist = guanlidata(datalist,jiekou,jiexi,jiekouchuli); |
|
|
|
d = d.concat(gldatalist); |
|
|
|
d = d.concat(gldatalist); |
|
|
|
} |
|
|
|
} |
|
|
|
d.push({ |
|
|
|
d.push({ |
|
|
|
title: '当前共有'+datalist.length+'个'+(getMyVar('guanli', 'jk')=="jk"?"接口":"私有解析"), |
|
|
|
title: '当前共有'+datalist.length+'个'+(getMyVar('guanli', 'jk')=="jk"?"接口":"私有解析"), |
|
|
|
url: "hiker://empty", |
|
|
|
url: "hiker://empty", |
|
|
|
col_type: "text_center_1", |
|
|
|
col_type: "text_center_1", |
|
|
|
extra: { |
|
|
|
extra: { |
|
|
|
id: "guanliloading" |
|
|
|
id: "guanliloading" |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
setResult(d); |
|
|
|
setResult(d); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function jiekouchuli(lx,urls) { |
|
|
|
|
|
|
|
function apitype(apiurl) { |
|
|
|
|
|
|
|
if(apiurl){ |
|
|
|
|
|
|
|
if(apiurl.includes('.vod')){ |
|
|
|
|
|
|
|
return "v1"; |
|
|
|
|
|
|
|
}else if(apiurl.includes('/app/')){ |
|
|
|
|
|
|
|
return "app"; |
|
|
|
|
|
|
|
}else if(apiurl.includes('app.php')){ |
|
|
|
|
|
|
|
return "v2"; |
|
|
|
|
|
|
|
}else if(/iptv|Chengcheng/.test(apiurl)){ |
|
|
|
|
|
|
|
return "iptv"; |
|
|
|
|
|
|
|
}else if(apiurl.includes('provide/vod/')){ |
|
|
|
|
|
|
|
return "cms"; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
return ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
return ""; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(lx=="type"){ |
|
|
|
|
|
|
|
return apitype(urls); |
|
|
|
|
|
|
|
}else if(lx=="save"){ |
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
|
|
var filepath = "hiker://files/rules/Src/Juying/jiekou.json"; |
|
|
|
|
|
|
|
var datafile = fetch(filepath); |
|
|
|
|
|
|
|
if(datafile != ""){ |
|
|
|
|
|
|
|
eval("var datalist=" + datafile+ ";"); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
var datalist = []; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var num = 0; |
|
|
|
|
|
|
|
for (var i in urls) { |
|
|
|
|
|
|
|
let urlname = urls[i].name; |
|
|
|
|
|
|
|
let urlurl = urls[i].url; |
|
|
|
|
|
|
|
let urlua = urls[i].ua||"Dalvik/2.1.0"; |
|
|
|
|
|
|
|
let urltype = urls[i].type||apitype(urlurl); |
|
|
|
|
|
|
|
let urlgroup = urls[i].group||""; |
|
|
|
|
|
|
|
if(!datalist.some(item => item.url ==urlurl)&&urlname&&/^http/.test(urlurl)&&urltype){ |
|
|
|
|
|
|
|
let arr = { "name": urlname, "url": urlurl, "ua": urlua, "type": urltype, "group": urlgroup }; |
|
|
|
|
|
|
|
datalist.push(arr); |
|
|
|
|
|
|
|
num = num + 1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(num>0){writeFile(filepath, JSON.stringify(datalist));} |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
log('导入失败:'+e.message);
|
|
|
|
|
|
|
|
return -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return num; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
return "toast://接口处理类型不正确"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |