standings.min.js 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. //################积分数据
  2. //右侧积分
  3. if($(".paiming_fl").length){
  4. var blw = 48;
  5. var liArr = $("#myscrollbox ul").children("li");
  6. var mysw = $("#myscroll").width();
  7. var mus = parseInt(mysw / blw);
  8. var length = liArr.length - mus;
  9. var jgbyd_i = 0
  10. $("#right").click(function () {
  11. $("#left").addClass("hot")
  12. jgbyd_i+=1
  13. if (jgbyd_i < Math.ceil(length/5)) {
  14. $("#myscrollbox").css("left", -((blw*5) * jgbyd_i));
  15. } else {
  16. jgbyd_i = Math.ceil(length/5)-1;
  17. $("#right").removeClass("hot")
  18. }
  19. });
  20. $("#left").click(function () {
  21. $("#right").addClass("hot")
  22. jgbyd_i-=1
  23. //点击i减1
  24. if (jgbyd_i >= 0) {
  25. $("#myscrollbox").css("left", -((blw*5) * jgbyd_i));
  26. } else {
  27. jgbyd_i = 0;
  28. $("#myscrollbox").css("left", 0);
  29. $("#left").removeClass("hot")
  30. }
  31. });
  32. }
  33. //################积分数据 http://www.310.tv/ranks.php
  34. var url=$("body").attr("data-domainwww")+"ranks.php"
  35. var imgurl=$("body").attr("data-domainstatic");
  36. //###############
  37. var qharrmc=$(".add_jifeng").find("li").eq(0).attr("data-py")
  38. var huancundata={}
  39. //###############
  40. //初始
  41. $(function() {
  42. var catid = $(".add_jifeng li").eq(0).attr("data-catid")
  43. var comid = $(".add_jifeng li").eq(0).attr("data-comid")
  44. var type = $(".jf_title_lb li").eq(0).attr("data-type")
  45. $(".jf_title_lb li").each(function(i,o){
  46. if($(o).attr("data-catid")!=catid ){
  47. $(o).hide()
  48. }
  49. });
  50. $(".add_jifeng li").eq(0).addClass("active")
  51. $(".jf_title_lb li").eq(0).addClass("active")
  52. $("#dqlebiao_bt").html("<li class='jf_num'></li><li class='qiudui'><span>球队</span></li><li class='s_p_f'><span>胜</span><span>平</span><span>负</span></li><li class='jf'>积分</li>")
  53. $.getScript('https://jf.botidata.com/jf/data/league/integral/'+comid+'.js?t=' + (new Date()).getTime().toString(), function () {
  54. var arr=Content
  55. huancundata[qharrmc+"_"+type]=arr
  56. if(arr == undefined){
  57. $('#dqlebiao').append("<p class='wxgss_img'><img src='"+imgurl+"www/img/no-content.png'><span>暂无相关数据</span></p>");
  58. }else{
  59. if(arr.length > 0){
  60. $.each(arr, function(index,v){
  61. var listHtml = "<ul class='biaonr'><li class='jf_num'><span>" + (index+1) + "</span></li><li class='qiudui'>" + v[1] + "</li><li class='s_p_f'><span>" + v[4] + "</span><span>" +v[5] + "</span><span>" + v[6] + "</span></li><li class='jf'>"+v[2]+"</li></ul>"
  62. $('#dqlebiao').append(listHtml);
  63. })
  64. }
  65. }
  66. });
  67. })
  68. //############ 榜单切换
  69. $(".jf_title_lb li").click(function(){
  70. //aaa初始化蓝球列表隐藏排名下的东部
  71. $("#dqlebiao_bt").show()
  72. $("#dqlebiao").show()
  73. $(".jqqh_lb").show()
  74. $(".peiming_dq ul li").eq(0).addClass("qh_active").siblings().removeClass("qh_active");
  75. var towtype=$(this).attr("data-type")
  76. var towcomid=''
  77. var towcatid=''
  78. $(".add_jifeng li").each(function(i,o){
  79. if($(o).hasClass("active")){
  80. towcomid=$(o).attr("data-comid")
  81. towcatid=$(o).attr("data-catid")
  82. };
  83. });
  84. $(this).addClass("active").siblings().removeClass("active")
  85. var pandang=$(this).html()
  86. var datatype=$(this).attr("data-type")
  87. var datacatid=$(this).attr("data-catid")
  88. //积分榜
  89. if(datacatid == 1 && datatype == 1 ){
  90. jifengbang(towcomid,towtype,towcatid)
  91. }
  92. })
  93. //积分榜
  94. function jifengbang(comid,type,catid){
  95. $("#dqlebiao_bt").html("<li class='jf_num'></li><li class='qiudui'><span>球队</span></li><li class='s_p_f'><span>胜</span><span>平</span><span>负</span></li><li class='jf'>积分</li>")
  96. if(huancundata[qharrmc+"_"+type] == undefined) {
  97. $.getScript('https://jf.botidata.com/jf/data/league/integral/'+comid+'.js?t=' + (new Date()).getTime().toString(), function () {
  98. var arr=Content
  99. huancundata[qharrmc+"_"+type]=arr
  100. if(arr == undefined){
  101. $('#dqlebiao').append("<p class='wxgss_img'><img src='"+imgurl+"www/img/no-content.png'><span>暂无相关数据</span></p>");
  102. }else{
  103. if(arr.length > 0){
  104. $.each(arr, function(index,v){
  105. var listHtml = "<ul class='biaonr'><li class='jf_num'><span>" + (index+1) + "</span></li><li class='qiudui'>" + v[1] + "</li><li class='s_p_f'><span>" + v[4] + "</span><span>" +v[5] + "</span><span>" + v[6] + "</span></li><li class='jf'>"+v[2]+"</li></ul>"
  106. $('#dqlebiao').append(listHtml);
  107. })
  108. }
  109. }
  110. });
  111. }else{
  112. $('#dqlebiao').html('')
  113. if(huancundata[qharrmc+"_"+type].length > 0) {
  114. $.each(huancundata[qharrmc+"_"+type], function (index, v) {
  115. var listHtml = "<ul class='biaonr'><li class='jf_num'><span>" + (index+1) + "</span></li><li class='qiudui'>" + v[1] + "</li><li class='s_p_f'><span>" + v[4] + "</span><span>" +v[5] + "</span><span>" + v[6] + "</span></li><li class='jf'>"+v[2]+"</li></ul>"
  116. $('#dqlebiao').append(listHtml);
  117. })
  118. }else{
  119. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/no-content.png'><span>暂无相关数据</span></p>");
  120. }
  121. }
  122. }
  123. //############赛事切换
  124. $(".add_jifeng li").mouseover(function(){
  125. //初始化蓝球列表隐藏排名下的东部
  126. $(".jqqh_lb").show()
  127. $("#dqlebiao_bt").show()
  128. $("#dqlebiao").show()
  129. $(".peiming_dq ul li").eq(0).addClass("qh_active").siblings().removeClass("qh_active");
  130. qharrmc=$(this).attr("data-py")
  131. $(this).addClass("active").siblings().removeClass("active")
  132. var xscatid=$(this).attr("data-catid")
  133. var xscomid=$(this).attr("data-comid")
  134. var xstype=''
  135. $(".jf_title_lb li").each(function(i,o){
  136. if($(o).attr("data-catid")==xscatid ){
  137. $(o).show()
  138. }else{
  139. $(o).hide()
  140. }
  141. });
  142. $('.jf_title_lb li[data-catid^='+xscatid+']').eq(0).addClass("active").siblings().removeClass("active")
  143. if(xscatid == "1"){
  144. $("#dqlebiao_bt").html("<li class='jf_num'></li><li class='qiudui'><span>球队</span></li><li class='s_p_f'><span>胜</span><span>平</span><span>负</span></li><li class='jf'>积分</li>")
  145. $(".jf_title_lb li").each(function(i,o){
  146. if($(o).hasClass("active")){
  147. xstype=$(o).attr("data-type")
  148. };
  149. });
  150. $(".peiming_dq").css("display","none")
  151. dyajax_zhu(xscomid,xstype,xscatid)
  152. }
  153. $(this).addClass("active").siblings().removeClass("active")
  154. })
  155. //选分类后切换的积分榜足
  156. function dyajax_zhu(comid,type,catid) {
  157. //初始化蓝球列表隐藏排名下的东部
  158. $(".jqqh_lb").show()
  159. $("#dqlebiao_bt").show()
  160. $("#dqlebiao").show()
  161. $(".peiming_dq ul li").eq(0).addClass("qh_active").siblings().removeClass("qh_active");
  162. if(huancundata[qharrmc+"_"+type] == undefined) {
  163. $.getScript('https://jf.botidata.com/jf/data/league/integral/'+comid+'.js?t=' + (new Date()).getTime().toString(), function () {
  164. var arr=Content
  165. if(arr == undefined){
  166. huancundata[qharrmc+"_"+type]=[]
  167. }else{
  168. huancundata[qharrmc+"_"+type]=arr
  169. }
  170. $('#dqlebiao').html('')
  171. if(arr == undefined){
  172. $('#dqlebiao').append("<p class='wxgss_img'><img src='"+imgurl+"www/img/no-content.png'><span>暂无相关数据</span></p>");
  173. }else{
  174. if(arr.length > 0){
  175. $.each(arr, function(index,v){
  176. var listHtml = "<ul class='biaonr'><li class='jf_num'><span>" + (index+1) + "</span></li><li class='qiudui'>" + v[1] + "</li><li class='s_p_f'><span>" + v[4] + "</span><span>" +v[5] + "</span><span>" + v[6] + "</span></li><li class='jf'>"+v[2]+"</li></ul>"
  177. $('#dqlebiao').append(listHtml);
  178. })
  179. }
  180. }
  181. });
  182. }else{
  183. $('#dqlebiao').html('')
  184. if(huancundata[qharrmc+"_"+type].length > 0) {
  185. $.each(huancundata[qharrmc+"_"+type], function (index, v) {
  186. var listHtml = "<ul class='biaonr'><li class='jf_num'><span>" + (index+1) + "</span></li><li class='qiudui'>" + v[1] + "</li><li class='s_p_f'><span>" + v[4] + "</span><span>" +v[5] + "</span><span>" + v[6] + "</span></li><li class='jf'>"+v[2]+"</li></ul>"
  187. $('#dqlebiao').append(listHtml);
  188. })
  189. }else{
  190. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/no-content.png'><span>暂无相关数据</span></p>");
  191. }
  192. }
  193. }