function getNextFixture(fixtureId, thn, tan) { getData('fixtures/' + fixtureId + '/analysis/fixture/next', null, (data) => { // console.log(data); if (!data?.fixtures?.length) { return; } const fixtures = data.fixtures; const teams = { 'home': [], 'away': [] }; const teamTypes = ['home', 'away']; for (const i in fixtures) { const f = fixtures[i]; teams[f.team].push(f); } html = ``; html += `
`; } else { html += ` | `; } html += ` | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ลีก/ถ้วย | `; html += `เวลา | `; html += `ประเภท | `; html += `เจอกับ | `; html += `เกมส์เริ่มใน | `; html += `|||||||||
${f.league} | `; html += `${moment(f.time).format('DD-MM-YYYY')} | `; html += `${f.type} | `; html += `${f.against} | `; html += `${f.day_left} | `; html += `