$(function() { $(".dnl_right").bind("selectstart", function() { return false }); $(".dnl_left").bind("selectstart", function() { return false }) }); $(document).ready(function() { var a = 0; var b; b = $(".temaizq .pic").length; $(".dnl_left").click(function() { if (b > 4) { a++; b = $(".temaizq .pic").length; if (a > b - 4) { $(".ScrCont").stop(); a = b - 4; $(".ScrCont").css("left", -a * 199) } else { if (a == 1) { $(".ScrCont").animate({ left: -a * 199, }, 700) } else { $(".ScrCont").animate({ left: -a * 199, }, 700) } } } }); $(".dnl_right").click(function() { if (b > 4) { if (a == 0) { $(".ScrCont").stop(); $(".ScrCont").css("left", "0px") } else { a--; if (a == 0) { $(".ScrCont").animate({ left: 0, }, 700) } else { $(".ScrCont").animate({ left: -a * 199, }, 700) } } } }) }); if ($(".zhixinlb").length) { if ($(".zclb_qh").length) { $(this).find(".zhixun_zhong").eq(0).show() }; $(".zx_title li").click(function() { $(this).addClass("zchove").siblings().removeClass("zchove"); $(".zclb_qh").find(".zhixun_zhong").eq($(this).index()).show().siblings().hide() }) }; if ($(".contest_list").length) { chariqi() }; zhuangtai(); wuxingbs(); function wuxingbs() { var b = GetDateStr(0)[0]; var c = Math.floor((new Date()).getTime() / 1000); var d = $('.temaizq .pic[data-matchtime^=' + b + ']'); $.each(d, function(i, n) { var a = DateToUnix($(n).attr("data-matchtime")); if (a < c) { $(n).find(".bs_ztai span").removeClass("nobing").html("比赛中") } }); var e = GetDateStr(-1)[0]; var f = $('.temaizq .pic[data-matchtime^=' + e + ']'); $.each(f, function(i, n) { $(n).find(".bs_ztai span").html("高清直播") }) }; $(document).ready(function() { setInterval(function() { zhuangtai(); wuxingbs() }, 60000) }); var domainwww = $("body").attr("data-domainwww"); var domainstatic = $("body").attr("data-domainstatic"); var zburl = domainwww + "get/"; var pagezb = 1; var morcan = {}; if ($(".contest_list").length) { $(".ckmorezb").click(function() { if ($(".ckmorezb").html() != "没有更多数据了") { morcan = {}; if ($(".ckmorezb").attr("data-sort") == "all") { morcan.page = pagezb; morcan.act = 101 }; if ($(".ckmorezb").attr("data-sort") == "re") { morcan.page = pagezb; morcan.act = 101; morcan.competid = 0 }; if ($(".ckmorezb").attr("data-sort") == 1) { morcan.page = pagezb; morcan.act = 101; morcan.competid = 0; morcan.cid = 1 }; if ($(".ckmorezb").attr("data-sort") == 2) { morcan.page = pagezb; morcan.act = 101; morcan.competid = 0; morcan.cid = 2 }; if ($(".ckmorezb").attr("data-sort") == 3) { morcan.page = pagezb; morcan.act = 101; morcan.competid = 0; morcan.cid = 3 }; if ($(".ckmorezb").attr("data-sort") == 4) { morcan.page = pagezb; morcan.act = 101; morcan.competid = 0; morcan.cid = 4 }; zbqhajax(morcan); pagezb += 1 } }) }; $(".zjzb_fl li").click(function() { pagezb = 1; $(this).addClass("flhover").siblings().removeClass("flhover"); $(".contest_list").html(''); var a = $(this).attr("data-sort"); $(".ckmorezb").attr("data-sort", a); $(".ckmorezb").html("查看更多直播"); zbqhdata(); zbqhajax(qhcan) }); var qhcan = {}; function zbqhdata() { qhcan = {}; if ($(".ckmorezb").attr("data-sort") == "all") { qhcan.act = 101 }; if ($(".ckmorezb").attr("data-sort") == "re") { qhcan.act = 101; qhcan.competid = 1 }; if ($(".ckmorezb").attr("data-sort") == 1) { qhcan.act = 101; qhcan.competid = 0; qhcan.cid = 1 }; if ($(".ckmorezb").attr("data-sort") == 2) { qhcan.act = 101; qhcan.competid = 0; qhcan.cid = 2 }; if ($(".ckmorezb").attr("data-sort") == 3) { qhcan.act = 101; qhcan.competid = 0; qhcan.cid = 3 }; if ($(".ckmorezb").attr("data-sort") == 4) { qhcan.act = 101; qhcan.competid = 0; qhcan.cid = 4 } }; function zbqhajax(f) { $.ajax({ url: zburl, cache: false, type: 'post', async: false, dataType: 'json', data: f, success: function(r) { var b = r.data.paperList; var c = r.competitionArr; var d = r.teamArr; if (b != undefined && b.length) { $.each(b, function(i, v) { var a = ''; a += "
  • "; if (c[v.competition_id] != undefined) { a += "

    " + v.matchtime.substring(11, 16) + "777

    " } else { a += "

    " + v.matchtime.substring(11, 16) + "" + v.name + "

    " }; if (v.home_id == 0) { a += "

    " + v.title + "

    高清直播
  • " } else { if (d[v.home_id] == undefined || d[v.guest_id] == undefined) { if (v.title == '') { a += "

    -

    高清直播
    " } else { a += "

    " + v.title + "

    高清直播
    " } } else { a += "

    " + d[v.home_id].shot_name + "" + d[v.home_id].shot_name + "

    vs

    " + d[v.guest_id].shot_name + "" + d[v.guest_id].shot_name + "

    高清直播
    " } } a += ""; $('.contest_list').append(a) }); chariqi(); zhuangtai(); if ($(".contest_list").find("li").length >= 30) { $(".ckmorezb").show() } else { $(".ckmorezb").hide() } }; if (b == undefined) { $(".ckmorezb").html("没有更多数据了"); if ($('.contest_list li').length == 0) { $(".contest_list").html("

    '暂无数据'

    "); $(".ckmorezb").hide() } } }, error: function(e) {}, }) }; $(".zhankaigjc").click(function() { if ($(this).find("span").html() == "展开") { $(this).siblings(".gjc_rlist").css("height", "auto"); $(this).find("span").html("收起"); $(this).find("cite").addClass("upjiantou") } else { $(this).siblings(".gjc_rlist").css("height", "187px"); $(this).find("span").html("展开"); $(this).find("cite").removeClass("upjiantou") } }); if ($(".contest_list").find("li").length > 0) { moreshow() }; function moreshow() { var a = $(".contest_list").find("li").length; if (a >= 30) { $(".ckmorezb").show() } }; if ($(".keywordr").length > 0) { keywordrnav() }; function keywordrnav() { var a = Math.floor(($(window).width() - 1220) / 2) - (120); if (a < 0) { $(".keywordr").css("right", "0px") } else { $(".keywordr").css("right", a / 2 + "px") } };