仅选取游戏截图

This commit is contained in:
2024-11-08 17:06:46 +08:00
parent 00abb0e504
commit a196ada6e3
3 changed files with 3 additions and 30 deletions

View File

@@ -12,34 +12,6 @@
- [x] 解析 cdn.gameui.net 到 cdn 服务, 并将 cdn 回源指向 def.gameui.net 其解析到新服务器
```javascript
// GET 查询id为1的用户列表, 要求列表中每项只返回 id, 用户名, 头像, 以及符合筛选条件的总数 total
const query = `/api?query={users(id:1){total,list{id,user_name,avatar}}}`
fetch(query).then(res => res.json()).then(data => {
console.log(data)
})
// GET 查询 user_id 为 2 的图像列表, 并且包含 user 的部分信息, 以及符合筛选条件的总数 total
const query = `/api?query={images(user_id:2){total,list{id,content,user{id,user_name,avatar}}}}`
fetch(query).then(res => res.json()).then(data => {
console.log(data)
})
// GET 查询所有图像的前2个(第一页)
const query = `/api?query={images(first:2){total,list{id,content,user:{id,user_name,avatar}}}}`
fetch(query).then(res => res.json()).then(data => {
console.log(data)
})
// GET 查询所有图像的指定id之后的前2个(翻页)
const query = `/api?query={images(after:2,first:2){total,list{id,content,user{id,user_name,avatar}}}}`
fetch(query).then(res => res.json()).then(data => {
console.log(data)
})
```
### 流媒体
通过流媒体服务降低视频文件加载消耗及防止恶意刷流量
对视频地址添加有效期, 过期需由服务器重新提供token认证观众身份