zhibo.min.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. var domainwww = $("body").attr("data-domainwww");
  2. var domainstatic = $("body").attr("data-domainstatic");
  3. var puturl = domainwww + "put/";
  4. var geturl = domainwww + "get/";
  5. if ($(".zbtwonav").length > 0) {
  6. var navSwiper = new Swiper('.zbtwonav', {
  7. freeMode: true,
  8. slidesPerView: 'auto',
  9. freeModeSticky: true,
  10. });
  11. var dhsyz = '';
  12. var gdwz = 0;
  13. $(".swiper-wrapper a").each(function(i, o) {
  14. if ($(o).hasClass("zbtwohover")) {
  15. dhsyz = i;
  16. navSlideWidth = $(this).css('width')
  17. }
  18. });
  19. if (dhsyz < 6) {
  20. navSwiper.setTranslate(0)
  21. } else {
  22. gdwz = (parseInt(navSlideWidth) / 2) * (dhsyz + 1);
  23. navSwiper.setTranslate(-gdwz)
  24. }
  25. };
  26. if ($(".zhibolist").length) {
  27. chariqi()
  28. };
  29. zhuangtai();
  30. $(document).ready(function() {
  31. setInterval(zhuangtai, 60000)
  32. });
  33. var myScroll, pullDownEl, pullDownOffset, pullUpEl, pullUpOffset, generatedCount = 0;
  34. var pagezb = 1;
  35. var lscid = $(".loadhistory span").attr("data-cid");
  36. var lscompetid = $(".loadhistory span").attr("data-competid");
  37. function pullDownAction() {
  38. if ($(".loadhistory").attr("data-zbend") == 0) {
  39. $.ajax({
  40. url: geturl,
  41. cache: false,
  42. type: 'post',
  43. async: false,
  44. dataType: 'json',
  45. data: {
  46. cid: lscid,
  47. competid: lscompetid,
  48. page: pagezb,
  49. act: 100,
  50. },
  51. success: function(r) {
  52. var c = r.data.paperList;
  53. var d = r.competitionArr;
  54. var e = r.teamArr;
  55. if (c != undefined) {
  56. var f = $(".zhibolist").find(".zbnodata").length;
  57. if (f > 0) {
  58. $(".zhibolist").find(".zbnodata").remove()
  59. };
  60. $.each(c, function(i, v) {
  61. var a = "";
  62. a += "<li data-yesterday='" + v.matchtime + "'>";
  63. if (v.home_id == 0) {
  64. a += "<div class='zb_lbtitle'>";
  65. a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
  66. a += "<p class='zb_fenlei'>";
  67. a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
  68. if (d[v.competition_id] != undefined) {
  69. a += "<span>" + d[v.competition_id].name + "</span>"
  70. } else {
  71. a += "<span>-</span>"
  72. };
  73. a += "</p>";
  74. a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
  75. a += "<p class='zb_title'>" + v.title + "</p>";
  76. a += "<p class='zb_video nobegin'>";
  77. a += "<img src='" + domainstatic + "wap/img/player.png'>";
  78. a += "<span>赛事回顾</span>";
  79. a += "</p>";
  80. a += "</a>";
  81. a += "</div>"
  82. } else {
  83. if (e[v.home_id] == undefined || e[v.guest_id] == undefined) {
  84. if (v.title == '') {
  85. a += "<div class='zb_lbtitle'>";
  86. a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
  87. a += "<p class='zb_fenlei'>";
  88. a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
  89. if (d[v.competition_id] != undefined) {
  90. a += "<span>" + d[v.competition_id].name + "</span>"
  91. } else {
  92. a += "<span>-</span>"
  93. };
  94. a += "</p>";
  95. a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
  96. a += "<p class='zb_title'>-</p>";
  97. a += "<p class='zb_video nobegin'>";
  98. a += "<img src='" + domainstatic + "wap/img/player.png'>";
  99. a += "<span>赛事回顾</span>";
  100. a += "</p>";
  101. a += "</a>";
  102. a += "</div>"
  103. } else {
  104. a += "<div class='zb_lbtitle'>";
  105. a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
  106. a += "<p class='zb_fenlei'>";
  107. a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
  108. if (d[v.competition_id] != undefined) {
  109. a += "<span>" + d[v.competition_id].name + "</span>"
  110. } else {
  111. a += "<span>-</span>"
  112. };
  113. a += "</p>";
  114. a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
  115. a += "<p class='zb_title'>" + v.title + "</p>";
  116. a += "<p class='zb_video nobegin'>";
  117. a += "<img src='" + domainstatic + "wap/img/player.png'>";
  118. a += "<span>赛事回顾</span>";
  119. a += "</p>";
  120. a += "</a>";
  121. a += "</div>"
  122. }
  123. } else {
  124. a += "<div class='zb_duiwuzhu'>";
  125. var b = saishifl(v.tcid);
  126. a += "<a href='" + domainwww + "qiudui/" + b + "/" + e[v.home_id].name_py + "'>";
  127. a += "<span class='duibiao'>";
  128. a += "<img src='" + e[v.home_id].picurl + "'></span>";
  129. a += "<p>" + e[v.home_id].shot_name + "</p>";
  130. a += "</a>";
  131. a += "</div>";
  132. a += "<div class='zb_center'>";
  133. a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
  134. a += "<p class='zb_fenlei'>";
  135. a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
  136. if (d[v.competition_id] != undefined) {
  137. a += "<span>" + d[v.competition_id].name + "</span>"
  138. } else {
  139. a += "<span>-</span>"
  140. };
  141. a += "</p>";
  142. a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
  143. a += "<p class='zb_video nobegin'>";
  144. a += "<img src='" + domainstatic + "wap/img/player.png'>";
  145. a += "<span>赛事回顾</span>";
  146. a += "</p>";
  147. a += "</a>";
  148. a += "</div>";
  149. a += "<div class='zb_duiwuke'>";
  150. a += "<a href='" + domainwww + "qiudui/" + b + "/" + e[v.guest_id].name_py + "'>";
  151. a += "<span class='duibiao'>";
  152. a += "<img src='" + e[v.guest_id].picurl + "'></span>";
  153. a += "</span>";
  154. a += "<p>" + e[v.guest_id].shot_name + "</p>";
  155. a += "</a></div>"
  156. }
  157. };
  158. a += "</li>";
  159. $('#historylist').prepend(a)
  160. });
  161. $(".contest_list").find(".jintiancrq").remove();
  162. chariqi_yesd();
  163. $(".zhibolist").find(".nodata2").remove();
  164. myScroll.refresh()
  165. } else {
  166. $(".loadhistory").attr("data-zbend", "1")
  167. }
  168. },
  169. error: function(e) {},
  170. })
  171. } else {
  172. $(".tskuan_black p").html("没有更多数据");
  173. $(".tskuan_black").show();
  174. setTimeout(function() {
  175. $(".tskuan_black").hide()
  176. }, 1000)
  177. }
  178. };
  179. var page = 1;
  180. function pullUpAction() {
  181. if ($(".alldataxian").is(':hidden')) {
  182. $.ajax({
  183. url: "",
  184. dataType: "json",
  185. async: true,
  186. data: {
  187. page: page,
  188. },
  189. type: "POST",
  190. success: function(r) {
  191. var c = r.competitionArr;
  192. var d = r.data.paperList;
  193. var e = r.teamArr;
  194. if (d != undefined) {
  195. var f = $(".zhibolist").find(".zbnodata").length;
  196. if (f > 0) {
  197. $(".zhibolist").find(".zbnodata").remove()
  198. };
  199. off_on = true;
  200. $.each(d, function(i, v) {
  201. var a = "";
  202. a += "<li data-matchtime='" + v.matchtime + "'>";
  203. if (v.home_id == 0) {
  204. a += "<div class='zb_lbtitle'>";
  205. a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
  206. a += "<p class='zb_fenlei'>";
  207. a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
  208. if (c[v.competition_id] != undefined) {
  209. a += "<span>" + c[v.competition_id].name + "</span>"
  210. } else {
  211. a += "<span>-</span>"
  212. };
  213. a += "</p>";
  214. a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
  215. a += "<p class='zb_title'>" + v.title + "</p>";
  216. a += "<p class='zb_video nobegin'>";
  217. a += "<img src='" + domainstatic + "wap/img/player.png'>";
  218. a += "<span>视频直播</span>";
  219. a += "</p>";
  220. a += "</a>";
  221. a += "</div>"
  222. } else {
  223. if (e[v.home_id] == undefined || e[v.guest_id] == undefined) {
  224. if (v.title == '') {
  225. a += "<div class='zb_lbtitle'>";
  226. a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
  227. a += "<p class='zb_fenlei'>";
  228. a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
  229. if (c[v.competition_id] != undefined) {
  230. a += "<span>" + c[v.competition_id].name + "</span>"
  231. } else {
  232. a += "<span>-</span>"
  233. };
  234. a += "</p>";
  235. a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
  236. a += "<p class='zb_title'>-</p>";
  237. a += "<p class='zb_video nobegin'>";
  238. a += "<img src='" + domainstatic + "wap/img/player.png'>";
  239. a += "<span>视频直播</span>";
  240. a += "</p>";
  241. a += "</a>";
  242. a += "</div>"
  243. } else {
  244. a += "<div class='zb_lbtitle'>";
  245. a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
  246. a += "<p class='zb_fenlei'>";
  247. a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
  248. if (c[v.competition_id] != undefined) {
  249. a += "<span>" + c[v.competition_id].name + "</span>"
  250. } else {
  251. a += "<span>-</span>"
  252. };
  253. a += "</p>";
  254. a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
  255. a += "<p class='zb_title'>" + v.title + "</p>";
  256. a += "<p class='zb_video nobegin'>";
  257. a += "<img src='" + domainstatic + "wap/img/player.png'>";
  258. a += "<span>视频直播</span>";
  259. a += "</p>";
  260. a += "</a>";
  261. a += "</div>"
  262. }
  263. } else {
  264. a += "<div class='zb_duiwuzhu'>";
  265. var b = saishifl(v.tcid);
  266. a += "<a href='" + domainwww + "qiudui/" + b + "/" + e[v.home_id].name_py + "'>";
  267. a += "<span class='duibiao'>";
  268. a += "<img src='" + e[v.home_id].picurl + "'></span>";
  269. a += "<p>" + e[v.home_id].shot_name + "</p>";
  270. a += "</a>";
  271. a += "</div>";
  272. a += "<div class='zb_center'>";
  273. a += "<a href='" + domainwww + "zuqiuzhibo/" + v.id + "'>";
  274. a += "<p class='zb_fenlei'>";
  275. a += "<img src='" + domainstatic + "wap/img/fenlei_" + v.tcid + ".png'>";
  276. if (c[v.competition_id] != undefined) {
  277. a += "<span>" + c[v.competition_id].name + "</span>"
  278. } else {
  279. a += "<span>-</span>"
  280. };
  281. a += "</p>";
  282. a += "<p class='zb_time'>" + v.matchtime.substring(11, 16) + "</p>";
  283. a += "<p class='zb_video nobegin'>";
  284. a += "<img src='" + domainstatic + "wap/img/player.png'>";
  285. a += "<span>视频直播</span>";
  286. a += "</p>";
  287. a += "</a>";
  288. a += "</div>";
  289. a += "<div class='zb_duiwuke'>";
  290. a += "<a href='" + domainwww + "qiudui/" + b + "/" + e[v.guest_id].name_py + "'>";
  291. a += "<span class='duibiao'>";
  292. a += "<img src='" + e[v.guest_id].picurl + "'></span>";
  293. a += "</span>";
  294. a += "<p>" + e[v.guest_id].shot_name + "</p>";
  295. a += "</a></div>"
  296. }
  297. };
  298. a += "</li>";
  299. $(".zhibolist").append(a);
  300. myScroll.refresh()
  301. })
  302. } else {
  303. $(".alldataxian").show()
  304. };
  305. chariqi();
  306. chariqi_yesd()
  307. },
  308. complete: function() {
  309. setTimeout(function() {
  310. $(".jiazai_gif").hide()
  311. }, 500)
  312. },
  313. error: function(e) {},
  314. })
  315. } else {
  316. $(".jiazai_gif").hide();
  317. $(".tskuan_black p").html("没有更多数据");
  318. $(".tskuan_black").show();
  319. setTimeout(function() {
  320. $(".tskuan_black").hide()
  321. }, 1000)
  322. }
  323. };