function getOddsHdc(fixtureId, thn, tan) { getData('fixtures/' + fixtureId + '/analysis/odds/hdc', null, (data) => { // console.log(data); if (!data?.odds?.length) { return; } const oteams = { 'home': { 'hc': [], 'odds': [] }, 'away': { 'hc': [], 'odds': [] }, }; const teamTypes = ['home', 'away']; const odds = data?.odds; for (const k in odds) { const o = odds[k]; oteams[o.team][o.type].push(o); } html = ``; html += `
${thn} | `; } else { html += `${tan} | `; } html += `||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
แข่ง | `; html += `เวลา | `; html += `ทีมเหย้า | `; html += `แฮนดิแคป | `; html += `ทีมเยือน | `; html += `สกอร์ | `; html += `AH | `; html += `|||||||
แข่ง | `; html += `เวลา | `; html += `ทีมเหย้า | `; html += `ออดช | `; html += `ทีมเยือน | `; html += `สกอร์ | `; html += `O/U | `; html += `|||||||
`; html += ` | |||||||||||||
${o.country_code} | `; html += `${moment(o.time).format('DD-MM-YYYY')} | `; html += `${o.team_home} | `; html += `${o.odds} | `; html += `${o.team_away} | `; html += `${o.score} | `; html += `${o.result} | `; html += `