|
|
|
@ -34,30 +34,54 @@ function jiekouyiji() { |
|
|
|
|
let mm = date.getMonth()+1; |
|
|
|
|
let dd = date.getDate(); |
|
|
|
|
let key = (mm<10?"0"+mm:mm)+""+(dd<10?"0"+dd:dd); |
|
|
|
|
|
|
|
|
|
var url = api_url + '/detail?&key='+key+'&vod_id='; |
|
|
|
|
var typeurl = api_url + "/types"; |
|
|
|
|
var listurl = api_url + '?type=' + getMyVar('SrcJuying$type_id','1') + '&page='; |
|
|
|
|
} else if (api_type=="app") { |
|
|
|
|
var url = api_url + 'video_detail?id='; |
|
|
|
|
|
|
|
|
|
var typeurl = api_url + "/nav"; |
|
|
|
|
var listurl = api_url + '/video?tid=' + getMyVar('SrcJuying$type_id','1') + '&pg='; |
|
|
|
|
} else if (api_type=="v2") { |
|
|
|
|
var url = api_url + 'video_detail?id='; |
|
|
|
|
|
|
|
|
|
var typeurl = api_url + "?ac=list"; |
|
|
|
|
var listurl = api_url + '?ac=videolist&t=' + getMyVar('SrcJuying$type_id','1') + '&pg='; |
|
|
|
|
} else if (api_type=="iptv") { |
|
|
|
|
var url = api_url + '?ac=detail&ids='; |
|
|
|
|
|
|
|
|
|
var typeurl = api_url + "/?ac=flitter"; |
|
|
|
|
var listurl = api_url + '?ac=list&class=' + getMyVar('SrcJuying$type_id','1') + '&page='; |
|
|
|
|
} else if (api_type=="cms") { |
|
|
|
|
var url = api_url + '?ac=detail&ids='; |
|
|
|
|
var classurl = api_url + "?ac=list"; |
|
|
|
|
var listurl = api_url + '?ac=videolist&pg='; |
|
|
|
|
var typeurl = api_url + "?ac=list"; |
|
|
|
|
var listurl = api_url + '?ac=videolist&t=' + getMyVar('SrcJuying$type_id','1') + '&pg='; |
|
|
|
|
} else { |
|
|
|
|
log('api类型错误') |
|
|
|
|
} |
|
|
|
|
if(MY_PAGE==1){ |
|
|
|
|
const Color = "#3399cc"; |
|
|
|
|
var api_class = JSON.parse(request(classurl, { headers: { 'User-Agent': api_ua }, timeout:xunmitimeout*1000 })).class; |
|
|
|
|
if(!getMyVar('SrcJuying$api_type_id')){putMyVar('SrcJuying$api_type_id',''+api_class[0].type_id)} |
|
|
|
|
try{ |
|
|
|
|
var typehtml = JSON.parse(request(typeurl, { headers: { 'User-Agent': api_ua }, timeout:xunmitimeout*1000 })); |
|
|
|
|
if (api_type=="v1") { |
|
|
|
|
|
|
|
|
|
} else if (api_type=="app") { |
|
|
|
|
|
|
|
|
|
} else if (api_type=="v2") { |
|
|
|
|
|
|
|
|
|
} else if (api_type=="iptv") { |
|
|
|
|
|
|
|
|
|
} else if (api_type=="cms") { |
|
|
|
|
var typeclass = typehtml.class; |
|
|
|
|
} else { |
|
|
|
|
log('api类型错误') |
|
|
|
|
} |
|
|
|
|
}catch(e){ |
|
|
|
|
log(e.message); |
|
|
|
|
return "toast://访问异常,请更换接口"; |
|
|
|
|
} |
|
|
|
|
if(typeclass.length>0){ |
|
|
|
|
if(!getMyVar('SrcJuying$type_id')){putMyVar('SrcJuying$type_id',''+typeclass[0].type_id)} |
|
|
|
|
let type_pids = []; |
|
|
|
|
for(let i in api_class){ |
|
|
|
|
if(type_pids.indexOf(api_class[i].type_pid)==-1){type_pids.push(api_class[i].type_pid)} |
|
|
|
|
for(let i in typeclass){ |
|
|
|
|
if(type_pids.indexOf(typeclass[i].type_pid)==-1){type_pids.push(typeclass[i].type_pid)} |
|
|
|
|
} |
|
|
|
|
if(type_pids.length > 0){ |
|
|
|
|
type_pids.sort((a, b) => { |
|
|
|
@ -65,15 +89,15 @@ function jiekouyiji() { |
|
|
|
|
}) |
|
|
|
|
}; |
|
|
|
|
for (var j in type_pids) { |
|
|
|
|
for (var i in api_class) { |
|
|
|
|
if(api_class[i].type_pid==type_pids[j]){ |
|
|
|
|
for (var i in typeclass) { |
|
|
|
|
if(typeclass[i].type_pid==type_pids[j]){ |
|
|
|
|
d.push({ |
|
|
|
|
title: getMyVar('SrcJuying$api_type_id')==api_class[i].type_id?'““””<b><span style="color:' + Color + '">' + api_class[i].type_name + '</span></b>':api_class[i].type_name, |
|
|
|
|
title: getMyVar('SrcJuying$type_id')==typeclass[i].type_id?'““””<b><span style="color:' + Color + '">' + typeclass[i].type_name + '</span></b>':typeclass[i].type_name, |
|
|
|
|
url: $('#noLoading#').lazyRule((type_id) => { |
|
|
|
|
putMyVar('SrcJuying$api_type_id', type_id); |
|
|
|
|
putMyVar('SrcJuying$type_id', type_id); |
|
|
|
|
refreshPage(false); |
|
|
|
|
return "hiker://empty"; |
|
|
|
|
}, api_class[i].type_id), |
|
|
|
|
}, typeclass[i].type_id), |
|
|
|
|
col_type: 'scroll_button' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -83,7 +107,8 @@ function jiekouyiji() { |
|
|
|
|
}); |
|
|
|
|
}
|
|
|
|
|
} |
|
|
|
|
MY_URL = listurl + MY_PAGE + '&t=' + getMyVar('SrcJuying$api_type_id','1'); |
|
|
|
|
} |
|
|
|
|
MY_URL = listurl + MY_PAGE; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var html = request(MY_URL, { headers: { 'User-Agent': api_ua }, timeout:xunmitimeout*1000 }); |
|
|
|
|