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 += "
";
bask_qiuyuan += "
";
const list = res.data["tongji"]["players"][0];
//console.log(list);
$.each(list,function(i, item) {
//console.log(item.teamName);
bask_qiuyuan += "
"+ item[1] +" "+item[6].split("^")[0]+""+item[6].split("^")[1]+""+item[6].split("^")[2]+""+item[6].split("^")[3]+""+item[6].split("^")[5]+"+"+item[6].split("^")[4]+""+item[6].split("^")[6]+""+item[6].split("^")[7]+""+item[6].split("^")[8]+""+item[6].split("^")[9]+""+item[6].split("^")[10]+""+item[6].split("^")[11]+"
"
})
bask_qiuyuan += "
";
bask_qiuyuan += "
";
const list2 = res.data["tongji"]["players"][1];
//console.log(list);
$.each(list2,function(i, item) {
//console.log(item.teamName);
bask_qiuyuan += "
"+ item[1] +" "+item[6].split("^")[0]+""+item[6].split("^")[1]+""+item[6].split("^")[2]+""+item[6].split("^")[3]+""+item[6].split("^")[5]+"+"+item[6].split("^")[4]+""+item[6].split("^")[6]+""+item[6].split("^")[7]+""+item[6].split("^")[8]+""+item[6].split("^")[9]+""+item[6].split("^")[10]+""+item[6].split("^")[11]+"
"
})
bask_qiuyuan += "
";
}
$("#bask_qiuyuan").append(bask_qiuyuan);
/**文字直播**/
//console.log(res.data["zhibo"]["tlive"]);
//console.log(res.data["match_info"]["matchinfo"]["type"]);
if(res.data["match_info"]["matchinfo"]["type"] =="1" && res.data["zhibo"].hasOwnProperty("tlive")){
//console.log("足球");
text_zhibo += "第一节第二节第三节第四节
";
text_zhibo += "
";
$arr1 = res.data["zhibo"]["tlive"][0];
$.each($arr1,function(i, item) {
text_zhibo += "
"+item.split("^")[2]+" "+item.split("^")[6]+"
";
})
text_zhibo += "
";
text_zhibo += "
";
$arr2 = res.data["zhibo"]["tlive"][1];
$.each($arr2,function(i, item) {
text_zhibo += "
"+item.split("^")[2]+" "+item.split("^")[6]+"
";
})
text_zhibo += "
";
text_zhibo += "
";
$arr3 = res.data["zhibo"]["tlive"][2];
$.each($arr3,function(i, item) {
text_zhibo += "
"+item.split("^")[2]+" "+item.split("^")[6]+"
";
})
text_zhibo += "
";
text_zhibo += "
";
$arr4 = res.data["zhibo"]["tlive"][3];
$.each($arr4,function(i, item) {
text_zhibo += "
"+item.split("^")[2]+" "+item.split("^")[6]+"
";
})
text_zhibo += "
";
text_zhibo += "