ranks.min.js 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997
  1. //首页滑动
  2. window.onload = function() {
  3. var navSwiper = new Swiper('#list', {
  4. freeMode: true,
  5. slidesPerView: 'auto',
  6. freeModeSticky: true,
  7. });
  8. }
  9. $(function(){
  10. var dqwzsy=$(".on").index("#list .swiper-wrapper li a")
  11. if(dqwzsy >5){
  12. $("#list .swiper-wrapper").css({
  13. "transform": "translate3d(-124px, 0px, 0px)",
  14. "transition-duration": "0ms"
  15. })
  16. }
  17. })
  18. var url = "http://www.qqzb.tv/paihang";;
  19. var imgurl = $("body").attr("data-domainstatic");
  20. //###############
  21. var qharrmc = $(".pc_ss_nav").find("li").eq(0).attr("data-py");
  22. var huancundata = {};
  23. //###############
  24. var yg_conten;
  25. $(function(){
  26. $('.pm_shuming p').hide();
  27. $('.pm_shuming p').eq(0).show();
  28. var catid = $(".ss_fl_list li").eq(0).attr("data-catid");
  29. var comid = $(".ss_fl_list li").eq(0).attr("data-comid");
  30. var type = $(".jf_title_lb li").eq(0).attr("data-type");
  31. $(".jf_title_lb li").each(function(i, o) {
  32. if ($(o).attr("data-catid") != catid) {
  33. $(o).hide();
  34. };
  35. if ($(o).attr("data-catid") == catid) {
  36. $(o).show();
  37. };
  38. });
  39. $(".jf_title_lb li").eq(0).addClass("jf_hover");
  40. $("#dqlebiao_bt").addClass("jifeng");
  41. $("#dqlebiao_bt").html("<li>排名</li><li class='qiudui'>球队</li><li>场次</li><li>胜</li><li>平</li><li>负</li><li>进球</li><li>失球</li><li>净胜球</li><li>积分</li>");
  42. $("#dqlebiao").addClass("jifeng");
  43. $.ajax({
  44. url: url,
  45. cache: false,
  46. type: 'post',
  47. async: false,
  48. dataType: 'json',
  49. data: {
  50. comid: comid,
  51. type: type,
  52. catid: catid,
  53. },
  54. success: function(res) {
  55. var arr = res.arr;
  56. huancundata[qharrmc + "_" + type] = arr;
  57. if (res.arr == undefined) {
  58. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  59. $(".pm_shuming_wap").hide();
  60. } else {
  61. if (arr.length > 0) {
  62. $.each(arr, function(index, v) {
  63. var jfcc = parseInt(v.win)+parseInt(v.ping)+parseInt(v.loss);
  64. var listHtml = "<ul class='biaonr'><li><span class='rankimg'>" + v.rank + "</span></li><li class='qiudui'>" + v.team + "</li><li>" + jfcc + "</li><li>" + v.win + "</li><li>" + v.ping + "</li><li>" + v.loss + "</li><li>" + v.goal + "</li><li>" + v.loss_goal + "</li><li>" + v.win_goal + "</li><li class='redbj'>" + v.point + "</li></ul>";
  65. $('#dqlebiao').append(listHtml);
  66. });
  67. };
  68. };
  69. },
  70. error: function(e) {
  71. console.log(e);
  72. },
  73. });
  74. });
  75. $('.jf_title_lb li').click(function(){
  76. var towtype = $(this).attr("data-type");
  77. var towcomid = '';
  78. var towcatid = '';
  79. var qhhtml = '';
  80. $(".ss_fl_list li").each(function(i, o) {
  81. if ($(o).hasClass("navtow_hover")) {
  82. towcomid = $(o).attr("data-comid");
  83. towcatid = $(o).attr("data-catid");
  84. qhhtml = $(o).attr('data-py');
  85. };
  86. });
  87. $(this).addClass("jf_hover").siblings().removeClass("jf_hover");
  88. var pandang = $(this).attr('ht');
  89. if (pandang == "jifenbang") {
  90. if ($(this).attr("data-catid") == "1") {
  91. if(qhhtml == 'zhongchao'){
  92. $('.duo_quyu').hide();
  93. $('.duo_quyu_yg').hide();
  94. $('.duo_quyu_sf').hide();
  95. zcjfb(towcomid, towtype, towcatid);
  96. $('.duo_quyu_zc').show();
  97. }else if(qhhtml == 'yaguan'){
  98. $('.duo_quyu').hide();
  99. $('.duo_quyu_zc').hide();
  100. $('.duo_quyu_sf').hide();
  101. ygjfb(towcomid, towtype, towcatid);
  102. $('.duo_quyu_yg').show();
  103. }else if(qhhtml == 'ouguan'){
  104. $('.duo_quyu').hide();
  105. $('.duo_quyu_zc').hide();
  106. $('.duo_quyu_sf').hide();
  107. ygjfb(towcomid, towtype, towcatid);
  108. $('.duo_quyu_yg').show();
  109. }else{
  110. $('.duo_quyu_zc').hide();
  111. $('.duo_quyu_yg').hide();
  112. $('.duo_quyu_sf').hide();
  113. $('.duo_quyu').show();
  114. zqjfb(towcomid, towtype, towcatid);
  115. }
  116. };
  117. if ($(this).attr("data-catid") == "2") {
  118. $('.duo_quyu_zc').hide();
  119. $('.duo_quyu_yg').hide();
  120. $('.duo_quyu_sf').hide();
  121. $('.duo_quyu').show();
  122. nbajfb(towcomid, towtype, towcatid);
  123. };
  124. };
  125. if (pandang == "sheshoubang") {
  126. $('.duo_quyu_zc').hide();
  127. $('.duo_quyu_yg').hide();
  128. $('.duo_quyu_sf').hide();
  129. $('.duo_quyu').show();
  130. zqssb(towcomid, towtype, towcatid);
  131. };
  132. if (pandang == "gerenbang") {
  133. $('.duo_quyu_zc').hide();
  134. $('.duo_quyu_yg').hide();
  135. $('.duo_quyu_sf').hide();
  136. $('.duo_quyu').show();
  137. lqjfb(towcomid, towtype, towcatid);
  138. };
  139. if(pandang == "shengfubang"){
  140. $('.duo_quyu_zc').hide();
  141. $('.duo_quyu_yg').hide();
  142. $('.duo_quyu').hide();
  143. $('.duo_quyu_sf').show();
  144. nbasf(towcomid, towtype, towcatid);
  145. };
  146. });
  147. $('.ss_fl_list li').click(function(){
  148. var xscatid = $(this).attr("data-catid");
  149. var xscomid = $(this).attr("data-comid");
  150. var xstype = '';
  151. var qhhtml = $(this).attr('data-py');
  152. qharrmc = $(this).attr("data-py");
  153. // dqpmsm(qhhtml);
  154. if(qharrmc == 'cba'){
  155. $($('.jf_title_lb')).hide();
  156. }else{
  157. $($('.jf_title_lb')).show();
  158. }
  159. $(this).addClass("navtow_hover").siblings().removeClass("navtow_hover");
  160. $(".jf_title_lb li").each(function(i, o) {
  161. if ($(o).attr("data-catid") == xscatid) {
  162. $(o).show();
  163. } else {
  164. $(o).hide();
  165. };
  166. });
  167. $('.jf_title_lb li[data-catid^=' + xscatid + ']').eq(0).addClass("jf_hover").siblings().removeClass("jf_hover");
  168. if(xscatid == "1"){
  169. $("#dqlebiao_bt").addClass("peiming");
  170. $("#dqlebiao").attr("class", "list_xq jifeng");
  171. $("#dqlebiao_bt").attr("class", "biaotitle jifeng");
  172. $(".jf_title_lb li").each(function(i, o) {
  173. if ($(o).hasClass("jf_hover")) {
  174. xstype = $(o).attr("data-type");
  175. };
  176. });
  177. $('.pm_shuming p').hide();
  178. $('.pm_shuming p[data-comid="'+xscomid+'"]').show();
  179. if(qhhtml == 'zhongchao'){
  180. $('.duo_quyu').hide();
  181. $('.duo_quyu_yg').hide();
  182. $('.duo_quyu_sf').hide();
  183. zcjfb(xscomid, xstype, xscatid);
  184. $('.duo_quyu_zc').show();
  185. }else if(qhhtml == 'yaguan'){
  186. $('.duo_quyu').hide();
  187. $('.duo_quyu_zc').hide();
  188. $('.duo_quyu_sf').hide();
  189. ygjfb(xscomid, xstype, xscatid);
  190. $('.duo_quyu_yg').show();
  191. }else if(qhhtml == 'ouguan'){
  192. $('.duo_quyu').hide();
  193. $('.duo_quyu_zc').hide();
  194. $('.duo_quyu_sf').hide();
  195. ygjfb(xscomid, xstype, xscatid);
  196. $('.duo_quyu_yg').show();
  197. }else{
  198. $('.duo_quyu_zc').hide();
  199. $('.duo_quyu_yg').hide();
  200. $('.duo_quyu_sf').hide();
  201. $('.duo_quyu').show();
  202. zqjfb(xscomid, xstype, xscatid);
  203. }
  204. }else{
  205. $('.duo_quyu_zc').hide();
  206. $('.duo_quyu_yg').hide();
  207. $('.duo_quyu_sf').hide();
  208. $('.duo_quyu').show();
  209. $(".jf_title_lb li").each(function(i, o) {
  210. if ($(o).hasClass("jf_hover")) {
  211. xstype = $(o).attr("data-type");
  212. };
  213. });
  214. var datapy = $(this).attr("data-py");
  215. if (datapy == "nba") {
  216. nbajfb(xscomid, xstype, xscatid);
  217. };
  218. if (datapy == "cba") {
  219. cbajfb(xscomid, xstype, xscatid);
  220. };
  221. }
  222. });
  223. //足球积分榜
  224. function zqjfb(comid, type, catid) {
  225. $(".pm_shuming").show();
  226. $("#dqlebiao_bt").html("<li>排名</li><li class='qiudui'>球队</li><li>场次</li><li>胜</li><li>平</li><li>负</li><li>进球</li><li>失球</li><li>净胜球</li><li>积分</li>");
  227. $("#dqlebiao").attr("class", "list_xq jifeng");
  228. $("#dqlebiao_bt").attr("class", "biaotitle jifeng");
  229. if (huancundata[qharrmc + "_" + type] == undefined) {
  230. $.ajax({
  231. url: url,
  232. cache: false,
  233. type: 'post',
  234. async: false,
  235. dataType: 'json',
  236. data: {
  237. comid: comid,
  238. type: type,
  239. catid: catid,
  240. },
  241. success: function(res) {
  242. var arr = res.arr;
  243. if (res.arr == undefined) {
  244. huancundata[qharrmc + "_" + type] = [];
  245. } else {
  246. huancundata[qharrmc + "_" + type] = arr;
  247. }
  248. $('#dqlebiao').html('');
  249. if (res.arr == undefined) {
  250. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  251. $(".pm_shuming_wap").hide();
  252. } else {
  253. if (arr.length > 0) {
  254. $.each(arr, function(index, v) {
  255. if(v.type == 1){
  256. var jfcc = parseInt(v.win)+parseInt(v.ping)+parseInt(v.loss);
  257. var listHtml = "<ul class='biaonr'><li><span class='rankimg'>" + v.rank + "</span></li><li class='qiudui'>" + v.team + "</li><li>" + jfcc+ "</li><li>" + v.win + "</li><li>" + v.ping + "</li><li>" + v.loss + "</li><li>" + v.goal + "</li><li>" + v.loss_goal + "</li><li>" + v.win_goal + "</li><li class='redbj'>" + v.point + "</li></ul>";
  258. $('#dqlebiao').append(listHtml);
  259. }
  260. });
  261. };
  262. };
  263. },
  264. error: function(e) {
  265. console.log(e);
  266. },
  267. });
  268. } else {
  269. $('#dqlebiao').html('');
  270. if (huancundata[qharrmc + "_" + type].length > 0) {
  271. $.each(huancundata[qharrmc + "_" + type], function(index, v) {
  272. if(v.type == 1){
  273. var jfcc = parseInt(v.win)+parseInt(v.ping)+parseInt(v.loss);
  274. var listHtml = "<ul class='biaonr'><li><span class='rankimg'>" + v.rank + "</span></li><li class='qiudui'>" + v.team + "</li><li>" + jfcc + "</li><li>" + v.win + "</li><li>" + v.ping + "</li><li>" + v.loss + "</li><li>" + v.goal + "</li><li>" + v.loss_goal + "</li><li>" + v.win_goal + "</li><li class='redbj'>" + v.point + "</li></ul>";
  275. $('#dqlebiao').append(listHtml);
  276. }
  277. });
  278. } else {
  279. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  280. $(".pm_shuming_wap").hide();
  281. };
  282. };
  283. };
  284. // 射手榜
  285. function zqssb(comid, type, catid) {
  286. $(".pm_shuming").hide();
  287. $("#dqlebiao_bt").html("<li>排序</li>\
  288. <li class='quyuan'>球员</li>\
  289. <li class='quyuan'>球队</li>\
  290. <li>进球</li>\
  291. <li class='chuc_cs'>出场次数</li>\
  292. <li>出场时间</li>\
  293. <li>射门</li>\
  294. <li>射正</li>");
  295. $("#dqlebiao").attr("class", "list_xq shiesou");
  296. $("#dqlebiao_bt").attr("class", "biaotitle shiesou");
  297. if (huancundata[qharrmc + "_" + type] == undefined) {
  298. $.ajax({
  299. url: url,
  300. cache: false,
  301. type: 'post',
  302. async: false,
  303. dataType: 'json',
  304. data: {
  305. comid: comid,
  306. type: type,
  307. catid: catid,
  308. },
  309. success: function(res) {
  310. var arr = res.arr;
  311. if (res.arr == undefined) {
  312. huancundata[qharrmc + "_" + type] = [];
  313. } else {
  314. huancundata[qharrmc + "_" + type] = arr;
  315. };
  316. $('#dqlebiao').html('');
  317. if (res.arr == undefined) {
  318. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  319. $(".pm_shuming_wap").hide();
  320. } else {
  321. if (arr.length > 0) {
  322. $.each(arr, function(index, v) {
  323. if(v.type == 2){
  324. var listHtml = "<ul class='biaonr'><li><span>" + v.rank + "</span></li>\
  325. <li class='quyuan leftnr'>" + v.name + "</li>\
  326. <li class='quyuan'><span>" + v.team + "</span></li>\
  327. <li class='chuc_cs'>" + v.goal + "</li>\
  328. <li>" + v.times + "</li>\
  329. <li>" + v.duration + "</li>\
  330. <li>" + v.loss_goal + "</li>\
  331. <li>" + v.win_goal + "</li></ul>";
  332. $('#dqlebiao').append(listHtml);
  333. }
  334. });
  335. };
  336. };
  337. },
  338. error: function(e) {
  339. console.log(e);
  340. }
  341. });
  342. } else {
  343. $('#dqlebiao').html('');
  344. if (huancundata[qharrmc + "_" + type].length > 0) {
  345. $.each(huancundata[qharrmc + "_" + type], function(index, v) {
  346. if(v.type == 2){
  347. var listHtml = "<ul class='biaonr'><li><span>" + v.rank + "</span></li>\
  348. <li class='quyuan leftnr'>" + v.name + "</li>\
  349. <li class='quyuan'><span>" + v.team + "</span></li>\
  350. <li class='chuc_cs'>" + v.goal + "</li>\
  351. <li>" + v.times + "</li>\
  352. <li>" + v.duration + "</li>\
  353. <li>" + v.loss_goal + "</li>\
  354. <li>" + v.win_goal + "</li></ul>";
  355. $('#dqlebiao').append(listHtml);
  356. }
  357. });
  358. } else {
  359. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  360. $(".pm_shuming_wap").hide();
  361. };
  362. };
  363. };
  364. //篮球积分榜
  365. function nbajfb(comid, type, catid) {
  366. $(".pm_shuming").hide();
  367. $("#dqlebiao_bt").html("<li>排名</li>\
  368. <li class='qiudui'>球队</li>\
  369. <li>得分</li>\
  370. <li>出手数</li>\
  371. <li>3分出手</li>\
  372. <li>罚球次数</li>\
  373. <li>篮板</li>\
  374. <li>前场篮板</li>\
  375. <li>后场篮板</li>\
  376. <li>助攻</li>\
  377. <li>抢断</li>\
  378. <li>盖帽</li>\
  379. <li>犯规</li>\
  380. <li>场次</li>");
  381. $("#dqlebiao").attr("class", "list_xq nba_pm");
  382. $("#dqlebiao_bt").attr("class", "biaotitle nba_pm");
  383. if (huancundata[qharrmc + "_" + type] == undefined) {
  384. $.ajax({
  385. url:url,
  386. cache: false,
  387. type: 'post',
  388. async: false,
  389. dataType: 'json',
  390. data: {
  391. comid: comid,
  392. type: type,
  393. catid: catid,
  394. },
  395. success: function(res) {
  396. var arr = res.arr;
  397. if (res.arr == undefined) {
  398. huancundata[qharrmc + "_" + type] = [];
  399. } else {
  400. huancundata[qharrmc + "_" + type] = arr;
  401. }
  402. $('#dqlebiao').html('');
  403. if (res.arr == undefined) {
  404. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  405. } else {
  406. if (arr.length > 0) {
  407. $.each(arr, function(index, v) {
  408. if(v.type == 1){
  409. var listHtml = "<ul class='biaonr'><li><span>" + v.rank + "</span></li>\
  410. <li class='qiudui'>" + v.team + "</li>\
  411. <li>" + parseInt(v.point)/100 + "</li>\
  412. <li>" + parseInt(v.attempted)/100 + "</li>\
  413. <li>" + parseInt(v.threes_attempted)/100 + "</li>\
  414. <li>" + parseInt(v.ftAttempted)/100 + "</li>\
  415. <li>" + parseInt(v.rebounds)/100 + "</li>\
  416. <li>" + parseInt(v.offensiveRebounds)/100 + "</li>\
  417. <li>" + parseInt(v.defensiveRebounds)/100 + "</li>\
  418. <li>" + parseInt(v.assists)/100 + "</li>\
  419. <li>" + parseInt(v.steals)/100 + "</li>\
  420. <li>" + parseInt(v.blocks)/100 + "</li>\
  421. <li>" + parseInt(v.fouls)/100 + "</li>\
  422. <li>" + v.games + "</li></ul>";
  423. $('#dqlebiao').append(listHtml);
  424. }
  425. });
  426. };
  427. };
  428. },
  429. error: function(e) {
  430. console.log(e);
  431. },
  432. });
  433. } else {
  434. $('#dqlebiao').html('');
  435. if (huancundata[qharrmc + "_" + type].length > 0) {
  436. $.each(huancundata[qharrmc + "_" + type], function(index, v) {
  437. if(v.type == 1){
  438. var listHtml = "<ul class='biaonr'><li><span>" + v.rank + "</span></li>\
  439. <li class='qiudui'>" + v.team + "</li>\
  440. <li>" + parseInt(v.point)/100 + "</li>\
  441. <li>" + parseInt(v.attempted)/100 + "</li>\
  442. <li>" + parseInt(v.threes_attempted)/100 + "</li>\
  443. <li>" + parseInt(v.ftAttempted)/100 + "</li>\
  444. <li>" + parseInt(v.rebounds)/100 + "</li>\
  445. <li>" + parseInt(v.offensiveRebounds)/100 + "</li>\
  446. <li>" + parseInt(v.defensiveRebounds)/100 + "</li>\
  447. <li>" + parseInt(v.assists)/100 + "</li>\
  448. <li>" + parseInt(v.steals)/100 + "</li>\
  449. <li>" + parseInt(v.blocks)/100 + "</li>\
  450. <li>" + parseInt(v.fouls)/100 + "</li>\
  451. <li>" + v.games + "</li></ul>";
  452. $('#dqlebiao').append(listHtml);
  453. }
  454. });
  455. } else {
  456. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  457. $(".pm_shuming_wap").hide();
  458. };
  459. };
  460. };
  461. //篮球个人榜
  462. function lqjfb(comid, type, catid) {
  463. $(".pm_shuming").hide();
  464. $("#dqlebiao_bt").html("<li>排名</li>\
  465. <li style='flex:2;'>球员</li>\
  466. <li>球队</li>\
  467. <li>得分</li>\
  468. <li>出手数</li>\
  469. <li>3分出手</li>\
  470. <li>罚球次数</li>\
  471. <li>篮板</li>\
  472. <li>前场篮板</li>\
  473. <li>后场篮板</li>\
  474. <li>助攻</li>\
  475. <li>抢断</li>\
  476. <li>盖帽</li>\
  477. <li>犯规</li>\
  478. <li>场次</li>");
  479. $("#dqlebiao").attr("class", "list_xq nba_pm");
  480. $("#dqlebiao_bt").attr("class", "biaotitle nba_pm");
  481. if (huancundata[qharrmc + "_" + type] == undefined) {
  482. $.ajax({
  483. url: url,
  484. cache: false,
  485. type: 'post',
  486. async: false,
  487. dataType: 'json',
  488. data: {
  489. comid: comid,
  490. type: type,
  491. catid: catid,
  492. },
  493. success: function(res) {
  494. var arr = res.arr;
  495. if (res.arr == undefined) {
  496. huancundata[qharrmc + "_" + type] = [];
  497. } else {
  498. huancundata[qharrmc + "_" + type] = arr;
  499. }
  500. $('#dqlebiao').html('');
  501. if (res.arr == undefined) {
  502. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  503. } else {
  504. if (arr.length > 0) {
  505. $.each(arr, function(index, v) {
  506. if(v.type == 2){
  507. var listHtml = "<ul class='biaonr'>\
  508. <li><span>" + v.rank + "</span></li>\
  509. <li style='flex:2;'>" + v.name + "</li>\
  510. <li>" + v.team + "</li>\
  511. <li>" + parseInt(v.point)/100 + "</li>\
  512. <li>" + parseInt(v.attempted)/100 + "</li>\
  513. <li>" + parseInt(v.threes_attempted)/100 + "</li>\
  514. <li>" + parseInt(v.ftAttempted)/100 + "</li>\
  515. <li>" + parseInt(v.rebounds)/100 + "</li>\
  516. <li>" + parseInt(v.offensiveRebounds)/100 + "</li>\
  517. <li>" + parseInt(v.defensiveRebounds)/100 + "</li>\
  518. <li>" + parseInt(v.assists)/100 + "</li>\
  519. <li>" + parseInt(v.steals)/100 + "</li>\
  520. <li>" + parseInt(v.blocks)/100 + "</li>\
  521. <li>" + parseInt(v.fouls)/100 + "</li>\
  522. <li>" + v.games + "</li></ul>";
  523. $('#dqlebiao').append(listHtml);
  524. }
  525. });
  526. };
  527. };
  528. },
  529. error: function(e) {
  530. console.log(e);
  531. },
  532. });
  533. } else {
  534. $('#dqlebiao').html('');
  535. if (huancundata[qharrmc + "_" + type].length > 0) {
  536. $.each(huancundata[qharrmc + "_" + type], function(index, v) {
  537. if(v.type == 2){
  538. var listHtml = "<ul class='biaonr'>\
  539. <li><span>" + v.rank + "</span></li>\
  540. <li style='flex:2;'>" + v.name + "</li>\
  541. <li>" + v.team + "</li>\
  542. <li>" + parseInt(v.point)/100 + "</li>\
  543. <li>" + parseInt(v.attempted)/100 + "</li>\
  544. <li>" + parseInt(v.threes_attempted)/100 + "</li>\
  545. <li>" + parseInt(v.ftAttempted)/100 + "</li>\
  546. <li>" + parseInt(v.rebounds)/100 + "</li>\
  547. <li>" + parseInt(v.offensiveRebounds)/100 + "</li>\
  548. <li>" + parseInt(v.defensiveRebounds)/100 + "</li>\
  549. <li>" + parseInt(v.assists)/100 + "</li>\
  550. <li>" + parseInt(v.steals)/100 + "</li>\
  551. <li>" + parseInt(v.blocks)/100 + "</li>\
  552. <li>" + parseInt(v.fouls)/100 + "</li>\
  553. <li>" + v.games + "</li></ul>";
  554. $('#dqlebiao').append(listHtml);
  555. }
  556. });
  557. } else {
  558. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  559. };
  560. };
  561. };
  562. //cba积分榜
  563. function cbajfb(comid, type, catid) {
  564. $(".pm_shuming").hide();
  565. $("#dqlebiao_bt").html("<li>排名</li><li class='qiudui'>球队</li><li>场数</li><li>胜</li><li>负</li><li class='sfex_d'>胜率</li>");
  566. $("#dqlebiao").attr("class", "list_xq jifeng");
  567. $("#dqlebiao_bt").attr("class", "biaotitle jifeng");
  568. if (huancundata[qharrmc + "_" + type] == undefined) {
  569. $.ajax({
  570. url: url,
  571. cache: false,
  572. type: 'post',
  573. async: false,
  574. dataType: 'json',
  575. data: {
  576. comid: comid,
  577. type: type,
  578. catid: catid,
  579. },
  580. success: function(res) {
  581. var arr = res.arr;
  582. if (res.arr == undefined) {
  583. huancundata[qharrmc + "_" + type] = [];
  584. } else {
  585. huancundata[qharrmc + "_" + type] = arr;
  586. }
  587. $('#dqlebiao').html('');
  588. if (res.arr == undefined) {
  589. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  590. } else {
  591. if (arr.length > 0) {
  592. var changshu;
  593. var cba_sl;
  594. $.each(arr, function(index, v) {
  595. cba_sl = ((parseInt(v.attempted) / (parseInt(v.attempted) + parseInt(v.threes_attempted))) * 100).toFixed(2) + "%";
  596. changshu = parseInt(v.attempted)+parseInt(v.threes_attempted);
  597. var listHtml = "<ul class='biaonr'><li><span>" + v.rank + "</span></li><li class='qiudui'>" + v.name + "<li>" + changshu + "</li><li>" + v.attempted + "</li><li>" + v.threes_attempted + "</li><li class='sfex_d'>" + cba_sl+ "</li></ul>";
  598. $('#dqlebiao').append(listHtml);
  599. });
  600. };
  601. };
  602. },
  603. error: function(e) {
  604. console.log(e);
  605. },
  606. });
  607. } else {
  608. $('#dqlebiao').html('');
  609. if (huancundata[qharrmc + "_" + type].length > 0) {
  610. var changshu;
  611. var cba_sl;
  612. $.each(huancundata[qharrmc + "_" + type], function(index, v) {
  613. cba_sl = ((parseInt(v.attempted) / (parseInt(v.attempted) + parseInt(v.threes_attempted))) * 100).toFixed(2) + "%";
  614. changshu = parseInt(v.attempted)+parseInt(v.threes_attempted);
  615. var listHtml = "<ul class='biaonr'><li><span>" + v.rank + "</span></li><li class='qiudui'>" + v.name + "<li>" + changshu + "</li><li>" + v.attempted + "</li><li>" + v.threes_attempted + "</li><li class='sfex_d'>" + cba_sl+ "</li></ul>";
  616. $('#dqlebiao').append(listHtml);
  617. });
  618. } else {
  619. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  620. $(".pm_shuming_wap").hide();
  621. };
  622. };
  623. };
  624. //中超积分榜
  625. function zcjfb(comid, type, catid) {
  626. $(".pm_shuming").show();
  627. $("#zhongchaoa").attr("class", "list_xq jifeng");
  628. $("#zhongchaot").attr("class", "list_xq jifeng");
  629. $(".zhongchaoa").attr("class", "biaotitle jifeng");
  630. if (huancundata[qharrmc + "_" + type] == undefined) {
  631. $.ajax({
  632. url: url,
  633. cache: false,
  634. type: 'post',
  635. async: false,
  636. dataType: 'json',
  637. data: {
  638. comid: comid,
  639. type: type,
  640. catid: catid,
  641. },
  642. success: function(res) {
  643. var arr = res.arr;
  644. if (res.arr == undefined) {
  645. huancundata[qharrmc + "_" + type] = [];
  646. } else {
  647. huancundata[qharrmc + "_" + type] = arr;
  648. }
  649. $('#dqlebiao').html('');
  650. if (res.arr == undefined) {
  651. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  652. $(".pm_shuming_wap").hide();
  653. } else {
  654. if (arr.length > 0) {
  655. $.each(arr, function(index, v) {
  656. if(v.group == 'A'){
  657. var jfcc = parseInt(v.win)+parseInt(v.ping)+parseInt(v.loss);
  658. var listHtml = "<ul class='biaonr'><li><span class='rankimg'>" + v.rank + "</span></li><li class='qiudui'>" + v.team + "</li><li>" + jfcc+ "</li><li>" + v.win + "</li><li>" + v.ping + "</li><li>" + v.loss + "</li><li>" + v.goal + "</li><li>" + v.loss_goal + "</li><li>" + v.win_goal + "</li><li class='redbj'>" + v.point + "</li></ul>";
  659. $('#zhongchaoa').append(listHtml);
  660. }
  661. if(v.group == 'B'){
  662. var jfcc = parseInt(v.win)+parseInt(v.ping)+parseInt(v.loss);
  663. var listHtml = "<ul class='biaonr'><li><span class='rankimg'>" + v.rank + "</span></li><li class='qiudui'>" + v.team + "</li><li>" + jfcc+ "</li><li>" + v.win + "</li><li>" + v.ping + "</li><li>" + v.loss + "</li><li>" + v.goal + "</li><li>" + v.loss_goal + "</li><li>" + v.win_goal + "</li><li class='redbj'>" + v.point + "</li></ul>";
  664. $('#zhongchaot').append(listHtml);
  665. }
  666. });
  667. };
  668. };
  669. },
  670. error: function(e) {
  671. console.log(e);
  672. },
  673. });
  674. } else {
  675. $('#zhongchaoa').html('');
  676. $('#zhongchaot').html('');
  677. if (huancundata[qharrmc + "_" + type].length > 0) {
  678. $.each(huancundata[qharrmc + "_" + type], function(index, v) {
  679. if(v.group == 'A'){
  680. var jfcc = parseInt(v.win)+parseInt(v.ping)+parseInt(v.loss);
  681. var listHtml = "<ul class='biaonr'><li><span class='rankimg'>" + v.rank + "</span></li><li class='qiudui'>" + v.team + "</li><li>" + jfcc+ "</li><li>" + v.win + "</li><li>" + v.ping + "</li><li>" + v.loss + "</li><li>" + v.goal + "</li><li>" + v.loss_goal + "</li><li>" + v.win_goal + "</li><li class='redbj'>" + v.point + "</li></ul>";
  682. $('#zhongchaoa').append(listHtml);
  683. }
  684. if(v.group == 'B'){
  685. var jfcc = parseInt(v.win)+parseInt(v.ping)+parseInt(v.loss);
  686. var listHtml = "<ul class='biaonr'><li><span class='rankimg'>" + v.rank + "</span></li><li class='qiudui'>" + v.team + "</li><li>" + jfcc+ "</li><li>" + v.win + "</li><li>" + v.ping + "</li><li>" + v.loss + "</li><li>" + v.goal + "</li><li>" + v.loss_goal + "</li><li>" + v.win_goal + "</li><li class='redbj'>" + v.point + "</li></ul>";
  687. $('#zhongchaot').append(listHtml);
  688. }
  689. });
  690. } else {
  691. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  692. $(".pm_shuming_wap").hide();
  693. };
  694. };
  695. };
  696. //亚冠积分榜
  697. function ygjfb(comid, type, catid) {
  698. $('.ya_cont_wrap').hide();
  699. $(".pm_shuming").show();
  700. $("#zhongchaoa").attr("class", "list_xq jifeng");
  701. $("#zhongchaot").attr("class", "list_xq jifeng");
  702. $(".zhongchaoa").attr("class", "biaotitle jifeng");
  703. if (huancundata[qharrmc + "_" + type] == undefined) {
  704. $.ajax({
  705. url: url,
  706. cache: false,
  707. type: 'post',
  708. async: false,
  709. dataType: 'json',
  710. data: {
  711. comid: comid,
  712. type: type,
  713. catid: catid,
  714. },
  715. success: function(res) {
  716. var arr = res.arr;
  717. if (res.arr == undefined) {
  718. huancundata[qharrmc + "_" + type] = [];
  719. } else {
  720. huancundata[qharrmc + "_" + type] = arr;
  721. }
  722. $('.yaguan_content').html('');
  723. if (res.arr == undefined) {
  724. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  725. $(".pm_shuming_wap").hide();
  726. } else {
  727. if (arr.length > 0) {
  728. var goup_name;
  729. $.each(arr, function(index, v) {
  730. if(v.group == 'A'){
  731. yaguancon(v);
  732. $('.ya_cont_wrap').eq(0).show();
  733. $('.ya_cont_wrap').eq(0).find('.yaguan_content').append(yg_conten);
  734. }
  735. if(v.group == 'B'){
  736. yaguancon(v);
  737. $('.ya_cont_wrap').eq(1).show();
  738. $('.ya_cont_wrap').eq(1).find('.yaguan_content').append(yg_conten);
  739. }
  740. if(v.group == 'C'){
  741. yaguancon(v);
  742. $('.ya_cont_wrap').eq(2).show();
  743. $('.ya_cont_wrap').eq(2).find('.yaguan_content').append(yg_conten);
  744. }
  745. if(v.group == 'D'){
  746. yaguancon(v);
  747. $('.ya_cont_wrap').eq(3).show();
  748. $('.ya_cont_wrap').eq(3).find('.yaguan_content').append(yg_conten);
  749. }
  750. if(v.group == 'E'){
  751. yaguancon(v);
  752. $('.ya_cont_wrap').eq(4).show();
  753. $('.ya_cont_wrap').eq(4).find('.yaguan_content').append(yg_conten);
  754. }
  755. if(v.group == 'F'){
  756. yaguancon(v);
  757. $('.ya_cont_wrap').eq(5).show();
  758. $('.ya_cont_wrap').eq(5).find('.yaguan_content').append(yg_conten);
  759. }
  760. if(v.group == 'G'){
  761. yaguancon(v);
  762. $('.ya_cont_wrap').eq(6).show();
  763. $('.ya_cont_wrap').eq(6).find('.yaguan_content').append(yg_conten);
  764. }
  765. if(v.group == 'H'){
  766. yaguancon(v);
  767. $('.ya_cont_wrap').eq(7).show();
  768. $('.ya_cont_wrap').eq(7).find('.yaguan_content').append(yg_conten);
  769. }
  770. if(v.group == 'I'){
  771. }
  772. });
  773. };
  774. };
  775. },
  776. error: function(e) {
  777. console.log(e);
  778. },
  779. });
  780. } else {
  781. $('.yaguan_content').html('');
  782. if (huancundata[qharrmc + "_" + type].length > 0) {
  783. $.each(huancundata[qharrmc + "_" + type], function(index, v) {
  784. if(v.group == 'A'){
  785. yaguancon(v);
  786. $('.ya_cont_wrap').eq(0).show();
  787. $('.ya_cont_wrap').eq(0).find('.yaguan_content').append(yg_conten);
  788. }
  789. if(v.group == 'B'){
  790. yaguancon(v);
  791. $('.ya_cont_wrap').eq(1).show();
  792. $('.ya_cont_wrap').eq(1).find('.yaguan_content').append(yg_conten);
  793. }
  794. if(v.group == 'C'){
  795. yaguancon(v);
  796. $('.ya_cont_wrap').eq(2).show();
  797. $('.ya_cont_wrap').eq(2).find('.yaguan_content').append(yg_conten);
  798. }
  799. if(v.group == 'D'){
  800. yaguancon(v);
  801. $('.ya_cont_wrap').eq(3).show();
  802. $('.ya_cont_wrap').eq(3).find('.yaguan_content').append(yg_conten);
  803. }
  804. if(v.group == 'E'){
  805. yaguancon(v);
  806. $('.ya_cont_wrap').eq(4).show();
  807. $('.ya_cont_wrap').eq(4).find('.yaguan_content').append(yg_conten);
  808. }
  809. if(v.group == 'F'){
  810. yaguancon(v);
  811. $('.ya_cont_wrap').eq(5).show();
  812. $('.ya_cont_wrap').eq(5).find('.yaguan_content').append(yg_conten);
  813. }
  814. if(v.group == 'G'){
  815. yaguancon(v);
  816. $('.ya_cont_wrap').eq(6).show();
  817. $('.ya_cont_wrap').eq(6).find('.yaguan_content').append(yg_conten);
  818. }
  819. if(v.group == 'H'){
  820. yaguancon(v);
  821. $('.ya_cont_wrap').eq(7).show();
  822. $('.ya_cont_wrap').eq(7).find('.yaguan_content').append(yg_conten);
  823. }
  824. if(v.group == 'I'){
  825. }
  826. });
  827. } else {
  828. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  829. $(".pm_shuming_wap").hide();
  830. };
  831. };
  832. };
  833. function yaguancon(v){
  834. var jfcc = parseInt(v.win)+parseInt(v.ping)+parseInt(v.loss);
  835. yg_conten = "<ul class='biaonr'><li><span class='rankimg'>" + v.rank + "</span></li><li class='qiudui'>" + v.team + "</li><li>" + jfcc+ "</li><li>" + v.win + "</li><li>" + v.ping + "</li><li>" + v.loss + "</li><li>" + v.goal + "</li><li>" + v.loss_goal + "</li><li>" + v.win_goal + "</li><li class='redbj'>" + v.point + "</li></ul>";
  836. };
  837. //手机展开
  838. if($(".zhaikai_w").length >0 ){
  839. $(".zhaikai_w").click(function(){
  840. if($("#nav_tow_p[style]").height() != null){
  841. $(this).find("span").removeClass("jfdhzk")
  842. $(".nav_one_fl").removeAttr("style");
  843. $(".nav_tow").removeAttr("style");
  844. }else{
  845. $(this).find("span").addClass("jfdhzk")
  846. $(".nav_one_fl").css("height","auto")
  847. $(".nav_tow").css("height","auto")
  848. }
  849. })
  850. }
  851. //NBA胜负榜
  852. function nbasf(comid, type, catid) {
  853. $(".pm_shuming").hide();
  854. $("#shengfu").attr("class", "list_xq jifeng");
  855. $("#shengfu").attr("class", "list_xq jifeng");
  856. $(".shengfu").attr("class", "biaotitle jifeng");
  857. if (huancundata[qharrmc + "_" + type] == undefined) {
  858. $.ajax({
  859. url: url,
  860. cache: false,
  861. type: 'post',
  862. async: false,
  863. dataType: 'json',
  864. data: {
  865. comid: comid,
  866. type: type,
  867. catid: catid,
  868. },
  869. success: function(res) {
  870. var arr = res.arr;
  871. if (res.arr == undefined) {
  872. huancundata[qharrmc + "_" + type] = [];
  873. } else {
  874. huancundata[qharrmc + "_" + type] = arr;
  875. }
  876. $('#dqlebiao').html('');
  877. if (res.arr == undefined) {
  878. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  879. $(".pm_shuming_wap").hide();
  880. } else {
  881. if (arr.length > 0) {
  882. $.each(arr, function(index, v) {
  883. if(v.group == 1){
  884. var nsu = v.points_status.split("/");
  885. var spss= v.win_loss.split("/");
  886. var listHtml = "<ul class='biaonr'>\
  887. <li>" + v.rank + "</li>\
  888. <li class='qiudui'>" + v.team_name + "</li>\
  889. <li>" + spss[0] + "</li>\
  890. <li>" + spss[1] + "</li>\
  891. <li>" + spss[2] + "</li>\
  892. <li>" + spss[3] + "%</li>\
  893. <li>" + v.guest_win_loss + "</li>\
  894. <li>" + v.home_win_loss + "</li>\
  895. <li>"+nsu[0]+"</li>\
  896. <li>"+nsu[1]+"</li>\
  897. <li>"+nsu[2]+"</li>\
  898. </ul>";
  899. $('#shengfu').append(listHtml);
  900. }
  901. if(v.group == 2){
  902. var nsu = v.points_status.split("/");
  903. var spss= v.win_loss.split("/");
  904. var listHtml = "<ul class='biaonr'>\
  905. <li>" + v.rank + "</li>\
  906. <li class='qiudui'>" + v.team_name + "</li>\
  907. <li>" + spss[0] + "</li>\
  908. <li>" + spss[1] + "</li>\
  909. <li>" + spss[2] + "</li>\
  910. <li>" + spss[3] + "%</li>\
  911. <li>" + v.guest_win_loss + "</li>\
  912. <li>" + v.home_win_loss + "</li>\
  913. <li>"+nsu[0]+"</li>\
  914. <li>"+nsu[1]+"</li>\
  915. <li>"+nsu[2]+"</li>\
  916. </ul>";
  917. $('#shengfue').append(listHtml);
  918. }
  919. });
  920. };
  921. };
  922. },
  923. error: function(e) {
  924. console.log(e);
  925. },
  926. });
  927. } else {
  928. $('#shengfu').html('');
  929. $('#shengfue').html('');
  930. if (huancundata[qharrmc + "_" + type].length > 0) {
  931. $.each(huancundata[qharrmc + "_" + type], function(index, v) {
  932. if(v.group == 1){
  933. var nsu = v.points_status.split("/");
  934. var spss= v.win_loss.split("/");
  935. var listHtml = "<ul class='biaonr'>\
  936. <li>" + v.rank + "</li>\
  937. <li class='qiudui'>" + v.team_name + "</li>\
  938. <li>" + spss[0] + "</li>\
  939. <li>" + spss[1] + "</li>\
  940. <li>" + spss[2] + "</li>\
  941. <li>" + spss[3] + "%</li>\
  942. <li>" + v.guest_win_loss + "</li>\
  943. <li>" + v.home_win_loss + "</li>\
  944. <li>"+nsu[0]+"</li>\
  945. <li>"+nsu[1]+"</li>\
  946. <li>"+nsu[2]+"</li>\
  947. </ul>";
  948. $('#shengfu').append(listHtml);
  949. }
  950. if(v.group == 2){
  951. var nsu = v.points_status.split("/");
  952. var spss= v.win_loss.split("/");
  953. var listHtml = "<ul class='biaonr'>\
  954. <li>" + v.rank + "</li>\
  955. <li class='qiudui'>" + v.team_name + "</li>\
  956. <li>" + spss[0] + "</li>\
  957. <li>" + spss[1] + "</li>\
  958. <li>" + spss[2] + "</li>\
  959. <li>" + spss[3] + "%</li>\
  960. <li>" + v.guest_win_loss + "</li>\
  961. <li>" + v.home_win_loss + "</li>\
  962. <li>"+nsu[0]+"</li>\
  963. <li>"+nsu[1]+"</li>\
  964. <li>"+nsu[2]+"</li>\
  965. </ul>";
  966. $('#shengfue').append(listHtml);
  967. }
  968. });
  969. } else {
  970. $('#dqlebiao').append("<p class='wxgss_img'><img src='" + imgurl + "www/img/nodatalb.png'><span>暂无相关数据</span></p>");
  971. $(".pm_shuming_wap").hide();
  972. };
  973. };
  974. };