| 93 | |
| 94 | // 获取分类集合 |
| 95 | async function cateList() { |
| 96 | const resp = await fetchUrl("https://program-sc.miguvideo.com/live/v2/tv-data/1ff892f2b5ab4a79be6e25b69d2f5d05") |
| 97 | if (!resp || !resp.body) return [] |
| 98 | let liveList = resp.body.liveList |
| 99 | // 热门内容重复 |
| 100 | liveList = liveList.filter(item => { |
| 101 | return item.name != "热门" |
| 102 | }) |
| 103 | |
| 104 | // 央视作为首个分类 |
| 105 | liveList.sort((a, b) => { |
| 106 | if (a.name === "央视") return -1; |
| 107 | if (b.name === "央视") return 1 |
| 108 | return 0 |
| 109 | }) |
| 110 | |
| 111 | return liveList |
| 112 | } |
| 113 | |
| 114 | // 所有数据 |
| 115 | async function dataList() { |