index.min.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. $('.index_z_caid_shaixuan').click(function(){
  2. $('.mark_wrap').show();
  3. $('body').css('overflow','hidden');
  4. $('body').css('position','fixed');
  5. });
  6. $('.sx_con_wrap_cos').click(function(){
  7. $('.mark_wrap').hide();
  8. $('body').css('overflow','auto');
  9. $('body').css('position','static');
  10. });
  11. $(".za_n_ua_wrap_top li").click(function() {
  12. $(".za_n_ua_wrap_top li").eq($(this).index()).addClass("za_n_ua_wrap_top_cor").siblings().removeClass('za_n_ua_wrap_top_cor');
  13. $(".za_n_ua_wrap_con li").hide().eq($(this).index()).show();
  14. });
  15. $(function() {
  16. var a = new Swiper('.banner', {
  17. spaceBetween: 30,
  18. centeredSlides: true,
  19. autoplay: {
  20. delay: 2500,
  21. disableOnInteraction: false,
  22. },
  23. pagination: {
  24. el: '.swiper-pagination',
  25. clickable: true,
  26. },
  27. navigation: {
  28. nextEl: '.swiper-button-next',
  29. prevEl: '.swiper-button-prev',
  30. },
  31. });
  32. var b = new Swiper('.wuxingss', {
  33. freeMode: true,
  34. slidesPerView: 'auto',
  35. freeModeSticky: true,
  36. })
  37. });
  38. zhuangtai_sy();
  39. $(document).ready(function() {
  40. setInterval(zhuangtai_sy, 60000)
  41. });
  42. if ($(".zhibolist").length) {
  43. chariqi()
  44. };
  45. $(".navtow").click(function() {
  46. $(".fastnav").show();
  47. $(".bodybox").hide();
  48. $("header").hide();
  49. $("footer").hide()
  50. });
  51. if ($(".fastnav").length > 0) {
  52. $('.left ul li').eq(0).addClass('leftactive');
  53. $(".fastnav").on("click", "#left li", function() {
  54. var i = $(this).index('.left ul li');
  55. $(this).addClass('active').siblings().removeClass('active');
  56. $('body, html').animate({
  57. scrollTop: $('.right ul li').eq(i).offset().top - 40
  58. }, 500)
  59. });
  60. $(".fanhuiindex").click(function() {
  61. $(".fastnav").hide();
  62. $(".bodybox").show();
  63. $("header").show();
  64. $("footer").show()
  65. })
  66. };
  67. var domainwww = $("body").attr("data-domainwww");
  68. var domainstatic = $("body").attr("data-domainstatic");
  69. var zburl = domainwww + "get/";
  70. var pagezb = 1;
  71. var morcan = {};
  72. if ($(".zhibolist").length) {
  73. $(".ckmorezb").click(function() {
  74. if ($(".ckmorezb").html() != "没有更多数据了") {
  75. morcan = {};
  76. if ($(".ckmorezb").attr("data-sort") == "all") {
  77. morcan.page = pagezb;
  78. morcan.act = 101
  79. };
  80. if ($(".ckmorezb").attr("data-sort") == "re") {
  81. morcan.page = pagezb;
  82. morcan.act = 101;
  83. morcan.competid = 0
  84. };
  85. if ($(".ckmorezb").attr("data-sort") == 1) {
  86. morcan.page = pagezb;
  87. morcan.act = 101;
  88. morcan.competid = 0;
  89. morcan.cid = 1
  90. };
  91. if ($(".ckmorezb").attr("data-sort") == 2) {
  92. morcan.page = pagezb;
  93. morcan.act = 101;
  94. morcan.competid = 0;
  95. morcan.cid = 2
  96. };
  97. if ($(".ckmorezb").attr("data-sort") == 3) {
  98. morcan.page = pagezb;
  99. morcan.act = 101;
  100. morcan.competid = 0;
  101. morcan.cid = 3
  102. };
  103. if ($(".ckmorezb").attr("data-sort") == 4) {
  104. morcan.page = pagezb;
  105. morcan.act = 101;
  106. morcan.competid = 0;
  107. morcan.cid = 4
  108. };
  109. zbqhajax(morcan);
  110. pagezb += 1
  111. }
  112. })
  113. };
  114. $(".index_z_caid li").click(function() {
  115. pagezb = 1;
  116. $(this).addClass("flhover").siblings().removeClass("flhover");
  117. $(".zhibolist").html('');
  118. var a = $(this).attr("data-sort");
  119. $(".ckmorezb").attr("data-sort", a);
  120. $(".ckmorezb").html("查看更多直播");
  121. zbqhdata();
  122. zbqhajax(qhcan)
  123. });
  124. var qhcan = {};
  125. function zbqhdata() {
  126. qhcan = {};
  127. if ($(".ckmorezb").attr("data-sort") == "all") {
  128. qhcan.act = 101
  129. };
  130. if ($(".ckmorezb").attr("data-sort") == "re") {
  131. qhcan.act = 101;
  132. qhcan.competid = 1
  133. };
  134. if ($(".ckmorezb").attr("data-sort") == 1) {
  135. qhcan.act = 101;
  136. qhcan.competid = 0;
  137. qhcan.cid = 1
  138. };
  139. if ($(".ckmorezb").attr("data-sort") == 2) {
  140. qhcan.act = 101;
  141. qhcan.competid = 0;
  142. qhcan.cid = 2
  143. };
  144. if ($(".ckmorezb").attr("data-sort") == 3) {
  145. qhcan.act = 101;
  146. qhcan.competid = 0;
  147. qhcan.cid = 3
  148. };
  149. if ($(".ckmorezb").attr("data-sort") == 4) {
  150. qhcan.act = 101;
  151. qhcan.competid = 0;
  152. qhcan.cid = 4
  153. }
  154. };
  155. function zbqhajax(f) {
  156. $.ajax({
  157. url: zburl,
  158. cache: false,
  159. type: 'post',
  160. async: false,
  161. dataType: 'json',
  162. data: f,
  163. success: function(r) {
  164. var b = r.data.paperList;
  165. var c = r.competitionArr;
  166. var d = r.teamArr;
  167. if (b != undefined && b.length) {
  168. $.each(b, function(i, v) {
  169. var a = '';
  170. a += " <li data-matchtime='" + v.matchtime + "' class='zb_time_new_span_wrap' data_timen='" + v.matchtime.substring(0, 10) + "' tcid='" + v.tcid + "' data-ls=''><div class='zhibo_con_zuo'><p>" + v.matchtime.substring(11, 16) + "</p><span>" + v.name + "</span></div>" + v.title + "";
  171. a += "<div class='zhibo_con_right'><a href='" + v.id + "'><img src='/staticm/img/gxz.png'><span>高清直播</span></a><p class='z_cc'></p></div></li>";
  172. $('.zhibolist').append(a)
  173. });
  174. chariqi();
  175. zhuangtai();
  176. if ($(".zhibolist").find("li").length >= 30) {
  177. $(".ckmorezb").show()
  178. } else {
  179. $(".ckmorezb").hide()
  180. }
  181. };
  182. if (b == undefined) {
  183. $(".ckmorezb").html("没有更多数据了");
  184. if ($('.zhibolist li').length == 0) {
  185. $(".zhibolist").html('<p class="nodata2" style="border-bottom: 1px solid #eee;padding-bottom:.4rem;"><span><img src="/staticm/img/nodata2.png"></span><cite>暂无相关直播</cite></p>');
  186. $(".ckmorezb").hide()
  187. }
  188. }
  189. },
  190. error: function(e) {},
  191. })
  192. };