123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- var domainwww = $("body").attr("data-domainwww");
- var domainstatic = $("body").attr("data-domainstatic");
- var puturl = domainwww + "put/";
- var geturl = domainwww + "get/";
- if ($(".zbtwonav").length > 0) {
- var navSwiper = new Swiper('.zbtwonav', {
- freeMode: true,
- slidesPerView: 'auto',
- freeModeSticky: true,
- });
- var dhsyz = '';
- var gdwz = 0;
- $(".swiper-wrapper a").each(function(i, o) {
- if ($(o).hasClass("zbtwohover")) {
- dhsyz = i;
- navSlideWidth = $(this).css('width')
- }
- });
- if (dhsyz < 6) {
- navSwiper.setTranslate(0)
- } else {
- gdwz = (parseInt(navSlideWidth) / 2) * (dhsyz + 1);
- navSwiper.setTranslate(-gdwz)
- }
- };
- if ($(".zhibolist").length) {
- chariqi()
- };
- zhuangtai();
- $(document).ready(function() {
- setInterval(zhuangtai, 60000)
- });
- var myScroll, pullDownEl, pullDownOffset, pullUpEl, pullUpOffset, generatedCount = 0;
- var pagezb = 1;
- var lscid = $(".loadhistory span").attr("data-cid");
- var lscompetid = $(".loadhistory span").attr("data-competid");
- function pullDownAction() {
- if ($(".loadhistory").attr("data-zbend") == 0) {
- $.ajax({
- url: geturl,
- cache: false,
- type: 'post',
- async: false,
- dataType: 'json',
- data: {
- cid: lscid,
- competid: lscompetid,
- page: pagezb,
- act: 100,
- },
- success: function(r) {
- var c = r.data.paperList;
- var d = r.competitionArr;
- var e = r.teamArr;
- if (c != undefined) {
- var f = $(".zhibolist").find(".zbnodata").length;
- if (f > 0) {
- $(".zhibolist").find(".zbnodata").remove()
- };
- $.each(c, function(i, v) {
- var a = "";
- a += "<li data-yesterday='" + v.matchtime + "'>";
- if (v.home_id == 0) {
- a += "<div class='zb_lbtitle'>";
- a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
- a += "<p class='zb_fenlei'>";
- a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
- if (d[v.competition_id] != undefined) {
- a += "<span>" + d[v.competition_id].name + "</span>"
- } else {
- a += "<span>-</span>"
- };
- a += "</p>";
- a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
- a += "<p class='zb_title'>" + v.title + "</p>";
- a += "<p class='zb_video nobegin'>";
- a += "<img src='" + domainstatic + "wap/img/player.png'>";
- a += "<span>赛事回顾</span>";
- a += "</p>";
- a += "</a>";
- a += "</div>"
- } else {
- if (e[v.home_id] == undefined || e[v.guest_id] == undefined) {
- if (v.title == '') {
- a += "<div class='zb_lbtitle'>";
- a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
- a += "<p class='zb_fenlei'>";
- a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
- if (d[v.competition_id] != undefined) {
- a += "<span>" + d[v.competition_id].name + "</span>"
- } else {
- a += "<span>-</span>"
- };
- a += "</p>";
- a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
- a += "<p class='zb_title'>-</p>";
- a += "<p class='zb_video nobegin'>";
- a += "<img src='" + domainstatic + "wap/img/player.png'>";
- a += "<span>赛事回顾</span>";
- a += "</p>";
- a += "</a>";
- a += "</div>"
- } else {
- a += "<div class='zb_lbtitle'>";
- a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
- a += "<p class='zb_fenlei'>";
- a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
- if (d[v.competition_id] != undefined) {
- a += "<span>" + d[v.competition_id].name + "</span>"
- } else {
- a += "<span>-</span>"
- };
- a += "</p>";
- a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
- a += "<p class='zb_title'>" + v.title + "</p>";
- a += "<p class='zb_video nobegin'>";
- a += "<img src='" + domainstatic + "wap/img/player.png'>";
- a += "<span>赛事回顾</span>";
- a += "</p>";
- a += "</a>";
- a += "</div>"
- }
- } else {
- a += "<div class='zb_duiwuzhu'>";
- var b = saishifl(v.tcid);
- a += "<a href='" + domainwww + "qiudui/" + b + "/" + e[v.home_id].name_py + "'>";
- a += "<span class='duibiao'>";
- a += "<img src='" + e[v.home_id].picurl + "'></span>";
- a += "<p>" + e[v.home_id].shot_name + "</p>";
- a += "</a>";
- a += "</div>";
- a += "<div class='zb_center'>";
- a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
- a += "<p class='zb_fenlei'>";
- a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
- if (d[v.competition_id] != undefined) {
- a += "<span>" + d[v.competition_id].name + "</span>"
- } else {
- a += "<span>-</span>"
- };
- a += "</p>";
- a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
- a += "<p class='zb_video nobegin'>";
- a += "<img src='" + domainstatic + "wap/img/player.png'>";
- a += "<span>赛事回顾</span>";
- a += "</p>";
- a += "</a>";
- a += "</div>";
- a += "<div class='zb_duiwuke'>";
- a += "<a href='" + domainwww + "qiudui/" + b + "/" + e[v.guest_id].name_py + "'>";
- a += "<span class='duibiao'>";
- a += "<img src='" + e[v.guest_id].picurl + "'></span>";
- a += "</span>";
- a += "<p>" + e[v.guest_id].shot_name + "</p>";
- a += "</a></div>"
- }
- };
- a += "</li>";
- $('#historylist').prepend(a)
- });
- $(".contest_list").find(".jintiancrq").remove();
- chariqi_yesd();
- $(".zhibolist").find(".nodata2").remove();
- myScroll.refresh()
- } else {
- $(".loadhistory").attr("data-zbend", "1")
- }
- },
- error: function(e) {},
- })
- } else {
- $(".tskuan_black p").html("没有更多数据");
- $(".tskuan_black").show();
- setTimeout(function() {
- $(".tskuan_black").hide()
- }, 1000)
- }
- };
- var page = 1;
- function pullUpAction() {
- if ($(".alldataxian").is(':hidden')) {
- $.ajax({
- url: "",
- dataType: "json",
- async: true,
- data: {
- page: page,
- },
- type: "POST",
- success: function(r) {
- var c = r.competitionArr;
- var d = r.data.paperList;
- var e = r.teamArr;
- if (d != undefined) {
- var f = $(".zhibolist").find(".zbnodata").length;
- if (f > 0) {
- $(".zhibolist").find(".zbnodata").remove()
- };
- off_on = true;
- $.each(d, function(i, v) {
- var a = "";
- a += "<li data-matchtime='" + v.matchtime + "'>";
- if (v.home_id == 0) {
- a += "<div class='zb_lbtitle'>";
- a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
- a += "<p class='zb_fenlei'>";
- a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
- if (c[v.competition_id] != undefined) {
- a += "<span>" + c[v.competition_id].name + "</span>"
- } else {
- a += "<span>-</span>"
- };
- a += "</p>";
- a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
- a += "<p class='zb_title'>" + v.title + "</p>";
- a += "<p class='zb_video nobegin'>";
- a += "<img src='" + domainstatic + "wap/img/player.png'>";
- a += "<span>视频直播</span>";
- a += "</p>";
- a += "</a>";
- a += "</div>"
- } else {
- if (e[v.home_id] == undefined || e[v.guest_id] == undefined) {
- if (v.title == '') {
- a += "<div class='zb_lbtitle'>";
- a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
- a += "<p class='zb_fenlei'>";
- a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
- if (c[v.competition_id] != undefined) {
- a += "<span>" + c[v.competition_id].name + "</span>"
- } else {
- a += "<span>-</span>"
- };
- a += "</p>";
- a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
- a += "<p class='zb_title'>-</p>";
- a += "<p class='zb_video nobegin'>";
- a += "<img src='" + domainstatic + "wap/img/player.png'>";
- a += "<span>视频直播</span>";
- a += "</p>";
- a += "</a>";
- a += "</div>"
- } else {
- a += "<div class='zb_lbtitle'>";
- a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
- a += "<p class='zb_fenlei'>";
- a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
- if (c[v.competition_id] != undefined) {
- a += "<span>" + c[v.competition_id].name + "</span>"
- } else {
- a += "<span>-</span>"
- };
- a += "</p>";
- a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
- a += "<p class='zb_title'>" + v.title + "</p>";
- a += "<p class='zb_video nobegin'>";
- a += "<img src='" + domainstatic + "wap/img/player.png'>";
- a += "<span>视频直播</span>";
- a += "</p>";
- a += "</a>";
- a += "</div>"
- }
- } else {
- a += "<div class='zb_duiwuzhu'>";
- var b = saishifl(v.tcid);
- a += "<a href='" + domainwww + "qiudui/" + b + "/" + e[v.home_id].name_py + "'>";
- a += "<span class='duibiao'>";
- a += "<img src='" + e[v.home_id].picurl + "'></span>";
- a += "<p>" + e[v.home_id].shot_name + "</p>";
- a += "</a>";
- a += "</div>";
- a += "<div class='zb_center'>";
- a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
- a += "<p class='zb_fenlei'>";
- a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
- if (c[v.competition_id] != undefined) {
- a += "<span>" + c[v.competition_id].name + "</span>"
- } else {
- a += "<span>-</span>"
- };
- a += "</p>";
- a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
- a += "<p class='zb_video nobegin'>";
- a += "<img src='" + domainstatic + "wap/img/player.png'>";
- a += "<span>视频直播</span>";
- a += "</p>";
- a += "</a>";
- a += "</div>";
- a += "<div class='zb_duiwuke'>";
- a += "<a href='" + domainwww + "qiudui/" + b + "/" + e[v.guest_id].name_py + "'>";
- a += "<span class='duibiao'>";
- a += "<img src='" + e[v.guest_id].picurl + "'></span>";
- a += "</span>";
- a += "<p>" + e[v.guest_id].shot_name + "</p>";
- a += "</a></div>"
- }
- };
- a += "</li>";
- $(".zhibolist").append(a);
- myScroll.refresh()
- })
- } else {
- $(".alldataxian").show()
- };
- chariqi();
- chariqi_yesd()
- },
- complete: function() {
- setTimeout(function() {
- $(".jiazai_gif").hide()
- }, 500)
- },
- error: function(e) {},
- })
- } else {
- $(".jiazai_gif").hide();
- $(".tskuan_black p").html("没有更多数据");
- $(".tskuan_black").show();
- setTimeout(function() {
- $(".tskuan_black").hide()
- }, 1000)
- }
- };
|