//################积分数据
//右侧积分
if($(".paiming_fl").length){
var blw = 48;
var liarr = $("#myscrollbox ul").children("li");
var mysw = $("#myscroll").width();
var mus = parseint(mysw / blw);
var length = liarr.length - mus;
var jgbyd_i = 0
$("#right").click(function () {
$("#left").addclass("hot")
jgbyd_i+=1
if (jgbyd_i < math.ceil(length/5)) {
$("#myscrollbox").css("left", -((blw*5) * jgbyd_i));
} else {
jgbyd_i = math.ceil(length/5)-1;
$("#right").removeclass("hot")
}
});
$("#left").click(function () {
$("#right").addclass("hot")
jgbyd_i-=1
//点击i减1
if (jgbyd_i >= 0) {
$("#myscrollbox").css("left", -((blw*5) * jgbyd_i));
} else {
jgbyd_i = 0;
$("#myscrollbox").css("left", 0);
$("#left").removeclass("hot")
}
});
}
//################积分数据 http://www.310.tv/ranks.php
var url=$("body").attr("data-domainwww")+"ranks.php"
var imgurl=$("body").attr("data-domainstatic");
//###############
var qharrmc=$(".add_jifeng").find("li").eq(0).attr("data-py")
var huancundata={}
//###############
//初始
$(function() {
var catid = $(".add_jifeng li").eq(0).attr("data-catid")
var comid = $(".add_jifeng li").eq(0).attr("data-comid")
var type = $(".jf_title_lb li").eq(0).attr("data-type")
$(".jf_title_lb li").each(function(i,o){
if($(o).attr("data-catid")!=catid ){
$(o).hide()
}
});
$(".add_jifeng li").eq(0).addclass("active")
$(".jf_title_lb li").eq(0).addclass("active")
$("#dqlebiao_bt").html("
球队胜平负积分")
// $.getscript('https://jf.botidata.com/jf/data/league/integral/'+comid+'.js?t=' + (new date()).gettime().tostring(), function () {
// var arr=content
// huancundata[qharrmc+"_"+type]=arr
// if(arr == undefined){
// $('#dqlebiao').append("暂无相关数据
");
//}else{
// if(arr.length > 0){
// $.each(arr, function(index,v){
// var listhtml = "- " + (index+1) + "
- " + v[1] + "
- " + v[4] + "" +v[5] + "" + v[6] + "
- "+v[2]+"
"
// $('#dqlebiao').append(listhtml);
// })
// }
// }
// });
})
//############ 榜单切换
$(".jf_title_lb li").click(function(){
//aaa初始化蓝球列表隐藏排名下的东部
$("#dqlebiao_bt").show()
$("#dqlebiao").show()
$(".jqqh_lb").show()
$(".peiming_dq ul li").eq(0).addclass("qh_active").siblings().removeclass("qh_active");
var towtype=$(this).attr("data-type")
var towcomid=''
var towcatid=''
$(".add_jifeng li").each(function(i,o){
if($(o).hasclass("active")){
towcomid=$(o).attr("data-comid")
towcatid=$(o).attr("data-catid")
};
});
$(this).addclass("active").siblings().removeclass("active")
var pandang=$(this).html()
var datatype=$(this).attr("data-type")
var datacatid=$(this).attr("data-catid")
//积分榜
if(datacatid == 1 && datatype == 1 ){
jifengbang(towcomid,towtype,towcatid)
}
})
//积分榜
function jifengbang(comid,type,catid){
$("#dqlebiao_bt").html("球队胜平负积分")
if(huancundata[qharrmc+"_"+type] == undefined) {
$.getscript('https://jf.botidata.com/jf/data/league/integral/'+comid+'.js?t=' + (new date()).gettime().tostring(), function () {
var arr=content
huancundata[qharrmc+"_"+type]=arr
if(arr == undefined){
$('#dqlebiao').append("暂无相关数据
");
}else{
if(arr.length > 0){
$.each(arr, function(index,v){
var listhtml = "- " + (index+1) + "
- " + v[1] + "
- " + v[4] + "" +v[5] + "" + v[6] + "
- "+v[2]+"
"
$('#dqlebiao').append(listhtml);
})
}
}
});
}else{
$('#dqlebiao').html('')
if(huancundata[qharrmc+"_"+type].length > 0) {
$.each(huancundata[qharrmc+"_"+type], function (index, v) {
var listhtml = "- " + (index+1) + "
- " + v[1] + "
- " + v[4] + "" +v[5] + "" + v[6] + "
- "+v[2]+"
"
$('#dqlebiao').append(listhtml);
})
}else{
$('#dqlebiao').append("暂无相关数据
");
}
}
}
//############赛事切换
$(".add_jifeng li").mouseover(function(){
//初始化蓝球列表隐藏排名下的东部
$(".jqqh_lb").show()
$("#dqlebiao_bt").show()
$("#dqlebiao").show()
$(".peiming_dq ul li").eq(0).addclass("qh_active").siblings().removeclass("qh_active");
qharrmc=$(this).attr("data-py")
$(this).addclass("active").siblings().removeclass("active")
var xscatid=$(this).attr("data-catid")
var xscomid=$(this).attr("data-comid")
var xstype=''
$(".jf_title_lb li").each(function(i,o){
if($(o).attr("data-catid")==xscatid ){
$(o).show()
}else{
$(o).hide()
}
});
$('.jf_title_lb li[data-catid^='+xscatid+']').eq(0).addclass("active").siblings().removeclass("active")
if(xscatid == "1"){
$("#dqlebiao_bt").html("球队胜平负积分")
$(".jf_title_lb li").each(function(i,o){
if($(o).hasclass("active")){
xstype=$(o).attr("data-type")
};
});
$(".peiming_dq").css("display","none")
dyajax_zhu(xscomid,xstype,xscatid)
}
$(this).addclass("active").siblings().removeclass("active")
})
//选分类后切换的积分榜足
function dyajax_zhu(comid,type,catid) {
//初始化蓝球列表隐藏排名下的东部
$(".jqqh_lb").show()
$("#dqlebiao_bt").show()
$("#dqlebiao").show()
$(".peiming_dq ul li").eq(0).addclass("qh_active").siblings().removeclass("qh_active");
if(huancundata[qharrmc+"_"+type] == undefined) {
$.getscript('https://jf.botidata.com/jf/data/league/integral/'+comid+'.js?t=' + (new date()).gettime().tostring(), function () {
var arr=content
if(arr == undefined){
huancundata[qharrmc+"_"+type]=[]
}else{
huancundata[qharrmc+"_"+type]=arr
}
$('#dqlebiao').html('')
if(arr == undefined){
$('#dqlebiao').append("暂无相关数据
");
}else{
if(arr.length > 0){
$.each(arr, function(index,v){
var listhtml = "- " + (index+1) + "
- " + v[1] + "
- " + v[4] + "" +v[5] + "" + v[6] + "
- "+v[2]+"
"
$('#dqlebiao').append(listhtml);
})
}
}
});
}else{
$('#dqlebiao').html('')
if(huancundata[qharrmc+"_"+type].length > 0) {
$.each(huancundata[qharrmc+"_"+type], function (index, v) {
var listhtml = "- " + (index+1) + "
- " + v[1] + "
- " + v[4] + "" +v[5] + "" + v[6] + "
- "+v[2]+"
"
$('#dqlebiao').append(listhtml);
})
}else{
$('#dqlebiao').append("暂无相关数据
");
}
}
}