仅选取游戏截图
This commit is contained in:
		
							
								
								
									
										3
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								Makefile
									
									
									
									
									
								
							@@ -21,8 +21,9 @@ build:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# 更新部署到服务器
 | 
					# 更新部署到服务器
 | 
				
			||||||
update: build
 | 
					update: build
 | 
				
			||||||
 | 
						scp dist/main $(HOST):~/webp/main_new
 | 
				
			||||||
	ssh ${HOST} "mv ~/webp/main ~/webp/main_old"
 | 
						ssh ${HOST} "mv ~/webp/main ~/webp/main_old"
 | 
				
			||||||
	scp dist/main $(HOST):~/webp/main
 | 
						ssh ${HOST} "mv ~/webp/main_new ~/webp/main"
 | 
				
			||||||
	ssh ${HOST} "rm ~/webp/main_old"
 | 
						ssh ${HOST} "rm ~/webp/main_old"
 | 
				
			||||||
	rm -rf dist
 | 
						rm -rf dist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										28
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								README.md
									
									
									
									
									
								
							@@ -12,34 +12,6 @@
 | 
				
			|||||||
- [x] 解析 cdn.gameui.net 到 cdn 服务, 并将 cdn 回源指向 def.gameui.net 其解析到新服务器
 | 
					- [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认证观众身份
 | 
					对视频地址添加有效期, 过期需由服务器重新提供token认证观众身份
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -567,7 +567,7 @@ func NewSchema(config Config) (graphql.Schema, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
				// 存在外部筛选条件
 | 
									// 存在外部筛选条件
 | 
				
			||||||
				if len(id_list) > 0 && len(list) > 0 {
 | 
									if len(id_list) > 0 && len(list) > 0 {
 | 
				
			||||||
					query = query.Where("id IN ?", list).Where("article_id IS NOT NULL")
 | 
										query = query.Where("id IN ?", list).Where("article_category_top_id = 22")
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				for index, item := range LoadItem(p.Info.FieldASTs[0].SelectionSet.Selections) {
 | 
									for index, item := range LoadItem(p.Info.FieldASTs[0].SelectionSet.Selections) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user