$(function () { $('.select li a').each(function () { var url = window.location.pathname; var href = $(this).attr('href'); if (url.includes(href)) { $(this).parent().addClass('active').siblings().removeClass('active') } }) $('.header-top-container li a').each(function () { var url = window.location.pathname; var href = $(this).attr('href'); if (url.includes(href)) { $(this).parent().addClass('header-top-actived').siblings().removeClass('header-top-actived') } }) $('.zhusa-xwye li a').each(function () { var url = window.location.pathname; var href = $(this).attr('href'); if (url.includes(href)) { $(this).parent().addClass('erji-active').siblings().removeClass('erji-active') } }) }) function matchinfo(typeid,matchid) { $.ajax({ url: "https://api.sportsdatacdn.com/match_info", type: 'GET', data:{ "type_id":typeid, "matchid":matchid }, contentType: "application/x-www-form-urlencoded; charset=utf-8", success: function(res){ console.log(res); const list = res.data; //console.log(list); var htmlContent=""; var bask_qiuyuan=""; var text_zhibo=""; $("#matchinfo_zd_bf").text(res.data["match_info"]["matchinfo"]["score"].split("-")[0]); $("#matchinfo_kd_bf").text(res.data["match_info"]["matchinfo"]["score"].split("-")[1]); //console.log(res.data["match_info"]["matchinfo"]["status"]); if(res.data["match_info"]["matchinfo"]["type"] =="2" && res.data["match_info"]["matchinfo"]["status"]!="1"){ try{ htmlContent += "
"+ item["data"] +"
"; }) text_zhibo += ""+item.split("^")[2]+" "+item.split("^")[6]+"
"; }) text_zhibo += ""+item.split("^")[2]+" "+item.split("^")[6]+"
"; }) text_zhibo += ""+item.split("^")[2]+" "+item.split("^")[6]+"
"; }) text_zhibo += ""+item.split("^")[2]+" "+item.split("^")[6]+"
"; }) text_zhibo += "