创建标签 /v2/i18n/tags/create POST JSON

参数名 参数类型 参数描述 必选
tagName string 标签名称

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": {
    "_id": "6267a6e01d4b2814183a3b62",
    "tagName": "happy",
    "num": 0,
    "createTime": "2022-04-26T08:01:36.145Z",
    "__v": 0
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13

创建标签(批量) /v2/i18n/tags/createMulti POST JSON

参数名 参数类型 参数描述 必选
tagName string[] 标签名称数组

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": [
    {
      "_id": "626a614354b21742c0e4e2bf",
      "tagName": "nice",
      "num": 0,
      "createTime": "2022-04-28T09:41:23.298Z",
      "__v": 0
    },
    {
      "_id": "626a614354b21742c0e4e2c2",
      "tagName": "good",
      "num": 0,
      "createTime": "2022-04-28T09:41:23.320Z",
      "__v": 0
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

删除标签 /v2/i18n/tags/deleteMulti PUT JSON

参数名 参数类型 参数描述 必选
_ids string[] _id数组

修改标签 /v2/i18n/tags/update PUT JSON

参数名 参数类型 参数描述 必选
_id string _id
tagName string 新的标签名称

列出标签 /v2/i18n/tags/list GET QUERY

参数名 参数类型 参数描述 必选
skipSize number 略过的数目
pageSize number 页面大小
tagName number 标签名称,若不使用该条件,将其置为空字符串""

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": {
    "num": 4,
    "i18nTags": [
      {
        "_id": "62626805b9698f4654ff6a17",
        "tagName": "th000",
        "num": 0,
        "__v": 0
      },
      {
        "_id": "62626800b9698f4654ff6a14",
        "tagName": "grubby",
        "num": 0,
        "__v": 0
      },
      {
        "_id": "626267fbb9698f4654ff6a11",
        "tagName": "sky",
        "num": 0,
        "__v": 0
      },
      {
        "_id": "626267f7b9698f4654ff6a0e",
        "tagName": "moon",
        "num": 0,
        "__v": 0
      }
    ]
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

结构参数:

参数名 参数类型 参数描述
_id string _id
tagName string 标签名称
num number 包含的key数量

列出标签(所有) /v2/i18n/tags/listSimple GET QUERY

参数名 参数类型 参数描述 必选

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": [
    {
      "_id": "62626800b9698f4654ff6a14",
      "tagName": "grubby",
      "__v": 0
    },
    {
      "_id": "626267f7b9698f4654ff6a0e",
      "tagName": "moon",
      "__v": 0
    },
    {
      "_id": "626267fbb9698f4654ff6a11",
      "tagName": "sky",
      "__v": 0
    },
    {
      "_id": "62626805b9698f4654ff6a17",
      "tagName": "th000",
      "__v": 0
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

结构参数:

参数名 参数类型 参数描述
_id string _id
tagName string 标签名称

创建翻译 /v2/i18n/configs/create POST JSON

参数名 参数类型 参数描述 必选
key string key
value {
zh?:{isDefault?:boolean,content:string};
en?:{isDefault?boolean,content:string};
}
翻译内容
comment string 备注
tagIds string[] 标签id数组

示例

{
	"key":"title",
	"value":{
		"zh":{"content":"标题","isDefault":true}
	},
	"tagIds":[],
	"comment":"这个需要初始状态为1"
}
1
2
3
4
5
6
7
8

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": {
    "tagIds": [],
    "_id": "6267a5411d4b2814183a3b5b",
    "key": "title",
    "value": {
      "zh": {
        "content": "标题",
        "isDefault": true
      }
    },
    "comment": "这个需要初始状态为1",
    "status": 1,
    "createTime": "2022-04-26T07:54:41.957Z",
    "updateTime": "2022-04-26T07:54:41.957Z",
    "__v": 0
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

创建翻译(批量) /v2/i18n/configs/createMulti POST JSON

参数名 参数类型 参数描述 必选
flag number 当已经存在同key数据时,此参数生效;第0位为1时,表示更新value;第1位为1时,表示更新comment,第2位为1时,表示更新tagIds;第n位,表示flag的二进制数据,以0为起始坐标;例如要同时更新value和tagIds,则二进制数据为101,此时该参数为5
i18nConfigs [] 翻译数组

示例

{
	"flag": 2,
	"i18nConfigs": [{
			"key": "ok",
			"value": {
				"zh": {
					"content": "好德",
					"isDefault": true
				}
			},
			"tagIds": [],
			"comment": "好的"
		},
		{
			"key": "title",
			"value": {
				"zh": {
					"content": "标题",
					"isDefault": true
				}
			},
			"tagIds": [],
			"comment": "宝体"
		}
	]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": []
}
1
2
3
4
5
6
7

修改翻译 /v2/i18n/configs/update PUT JSON

参数名 参数类型 参数描述 必选
_id string _id
value {
zh?:{isDefault?:boolean,content:string};
en?:{isDefault?boolean,content:string};
}
翻译内容
comment string 备注
tagIds string[] 标签id数组
needPublish boolean 是否发布

示例

{
	"_id":"626265d2b9698f4654ff6a08",
	"value":{
		"zh":{"content":"密码","isDefault":true},
		"en":{"content":"pwd","isDefault":false}
	},
	"tagIds":["626267fbb9698f4654ff6a11","626267f7b9698f4654ff6a0e"],
	"comment":"添加2个标签",
	"needPublish":false
}
1
2
3
4
5
6
7
8
9
10

批量绑定标签 /v2/i18n/configs/batchBindI18nTags PUT JSON

参数名 参数类型 参数描述 必选
_ids string[] 配置id数组
tagIds string[] 待绑定的标签id数组

示例

{
	"_ids":["626265d2b9698f4654ff6a08","626268f9c7d55a44c4487f84"],
	"tagIds":["626641358c9383002e853a62"]
}
1
2
3
4

列出翻译 /v2/i18n/configs/list POST JSON

参数名 参数类型 参数描述 必选
key string key,若不使用该条件,将其置为空字符串""
content string 翻译内容,若不使用该条件,将其置为空字符串""
tagIds string[] 标签id数组,若不使用该条件,将其置为空数组[]
status number 状态,0:全部 1:待翻译 2:待发布 3:已发布

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": [
    {
      "_id": "6267afff1d4b2814183a3b70",
      "key": "banana",
      "value": {
        "zh": {
          "content": "不呐呐",
          "isDefault": true
        }
      },
      "comment": "巴拉啦",
      "status": 1,
      "i18nTags": []
    },
    {
      "_id": "6267afff1d4b2814183a3b68",
      "key": "apple",
      "value": {
        "zh": {
          "content": "苹果",
          "isDefault": true
        }
      },
      "comment": "这个需要初始状态为1",
      "status": 1,
      "i18nTags": []
    },
    {
      "_id": "6267a5411d4b2814183a3b5b",
      "key": "title",
      "value": {
        "zh": {
          "content": "标题",
          "isDefault": true
        }
      },
      "comment": "这个需要初始状态为1",
      "status": 1,
      "i18nTags": []
    },
    {
      "_id": "62664fe28c9383002e853ae1",
      "key": "import",
      "value": {
        "zh": {
          "isDefault": true,
          "content": "导入"
        },
        "en": {
          "isDefault": false,
          "content": ""
        }
      },
      "comment": "阿斯顿发电费",
      "status": 2,
      "i18nTags": [
        {
          "_id": "626641af8c9383002e853a67",
          "tagName": "adsf",
          "__v": 0
        },
        {
          "_id": "626641358c9383002e853a62",
          "tagName": "asdf2f2f2f",
          "__v": 0
        }
      ]
    },
    {
      "_id": "62664f82699552002e62d56a",
      "key": "sdf",
      "value": {
        "zh": {
          "isDefault": true,
          "content": "asadf"
        },
        "en": {
          "isDefault": false,
          "content": "cscs"
        }
      },
      "comment": "cssc",
      "status": 2,
      "i18nTags": [
        {
          "_id": "626641358c9383002e853a62",
          "tagName": "asdf2f2f2f",
          "__v": 0
        },
        {
          "_id": "62626800b9698f4654ff6a14",
          "tagName": "grubby",
          "__v": 0
        },
        {
          "_id": "62626805b9698f4654ff6a17",
          "tagName": "th000",
          "__v": 0
        }
      ]
    },
    {
      "_id": "626265d2b9698f4654ff6a08",
      "key": "password",
      "value": {
        "zh": {
          "content": "密码",
          "isDefault": true
        },
        "en": {
          "content": "pwd",
          "isDefault": false
        }
      },
      "comment": "添加2个标签",
      "status": 2,
      "i18nTags": [
        {
          "_id": "626641358c9383002e853a62",
          "tagName": "asdf2f2f2f",
          "__v": 0
        },
        {
          "_id": "626641af8c9383002e853a67",
          "tagName": "adsf",
          "__v": 0
        },
        {
          "_id": "62626800b9698f4654ff6a14",
          "tagName": "grubby",
          "__v": 0
        },
        {
          "_id": "62626805b9698f4654ff6a17",
          "tagName": "th000",
          "__v": 0
        }
      ]
    },
    {
      "_id": "626268f9c7d55a44c4487f84",
      "key": "username",
      "value": {
        "zh": {
          "content": "账号",
          "isDefault": true
        },
        "en": {
          "isDefault": false,
          "content": "username"
        }
      },
      "comment": "这个需要初始状态为1",
      "status": 3,
      "i18nTags": [
        {
          "_id": "626641358c9383002e853a62",
          "tagName": "asdf2f2f2f",
          "__v": 0
        }
      ]
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169

结构参数:

参数名 参数类型 参数描述
_id string _id
i18nTags any[] 标签数组
key string key
value {
zh?:{isDefault?:boolean,content:string};
en?:{isDefault?boolean,content:string};
}
翻译内容
comment string 备注
status number 状态,1:待翻译 2:待发布 3:已发布

查询翻译 /v2/i18n/configs/find GET QUERY

参数名 参数类型 参数描述 必选
_id string _id
content string 翻译内容,若不使用该条件,将其置为空字符串""
tagIds string[] 标签id数组,若不使用该条件,将其置为空数组[]

返回结构:

{
  "ret": 0,
  "errCode": 0,
  "errcode": 0,
  "msg": "success",
  "data": {
    "_id": "626265d2b9698f4654ff6a08",
    "key": "password",
    "value": {
      "zh": {
        "content": "密码",
        "isDefault": true
      },
      "en": {
        "content": "pwd",
        "isDefault": false
      }
    },
    "comment": "添加2个标签",
    "status": 2,
    "i18nTags": [
      {
        "_id": "626267f7b9698f4654ff6a0e",
        "tagName": "moon",
        "__v": 0
      },
      {
        "_id": "626267fbb9698f4654ff6a11",
        "tagName": "sky",
        "__v": 0
      }
    ]
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

结构参数:

参数名 参数类型 参数描述
_id string _id
key string key
value {
zh?:{isDefault?:boolean,content:string};
en?:{isDefault?boolean,content:string};
}
翻译内容
comment string 备注
status number 状态,1:待翻译 2:待发布 3:已发布
i18nTags {_id:string, tagName:string}[] 标签数组

发布所有待发布 /v2/i18n/configs/publishPreparative GET QUERY

参数名 参数类型 参数描述 必选