This commit is contained in:
2024-07-31 15:03:10 +08:00
parent 1befa9ff3a
commit 6bc7acba47
2 changed files with 98 additions and 2 deletions

View File

@@ -316,6 +316,13 @@ func main() {
// 文字搜索支持翻页
// 文字搜索支持与按颜色筛选混合
// TODO 查找含有指定文字的图像
// TODO 查找含有指定标签的图像
// TODO 查找含有指定特征的图像
// TODO 查找含有指定颜色的图像(倒排索引)
// TODO 查找含有指定分类的图像
// 1,000,000
// 获取查询条件(忽略空值)
QueryConditions := func(key string) (list []string) {
for _, item := range strings.Split(r.URL.Query().Get(key), ",") {
@@ -350,8 +357,6 @@ func main() {
images.Total = 0
images.Next = false
images.List = make([]interface{}, 0)
// 将对象转换为有缩进的JSON输出
data, _ := json.MarshalIndent(images, "", " ")
w.Header().Set("Content-Type", "application/json; charset=UTF-8")
w.Write(data)