* @description 获取视频数据
()
| 424 | * @description 获取视频数据 |
| 425 | */ |
| 426 | async function getVideoList() { |
| 427 | // 随机 |
| 428 | const randNum = ~~(Math.random() * API_CONFIG.todayVideos.length); |
| 429 | try { |
| 430 | // 获取重要新闻 |
| 431 | const res = await fetch(API_CONFIG.todayVideos[randNum], { |
| 432 | method: 'GET', |
| 433 | }); |
| 434 | // 请求成功 |
| 435 | if (res.ok) { |
| 436 | const data = await res.json(); |
| 437 | return data; |
| 438 | } |
| 439 | } |
| 440 | catch (err) { } |
| 441 | } |
| 442 | /** |
| 443 | * @description 专项练习数据 |
| 444 | */ |