标签curd
<p>[TOC]</p>
<h5>简要描述</h5>
<ul>
<li>标签curd</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>{{BASE_URL}}/api/contest.tag/index GET</code></li>
<li><code>filter{"belongs":"1(个人)2(公共)","subject":"竞赛主题搜索","type"::"contest或task"} page:1,limit:9</code></li>
<li><code>{{BASE_URL}}/api/contest.tag/add POST</code></li>
<li><code>{{BASE_URL}}/api/contest.tag/edit/id/id POST</code></li>
<li><code>{{BASE_URL}}/api/contest.tag/del/ids/id,id DELETE</code></li>
</ul>
<h5>参数</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">必选</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">pid</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">int</td>
<td>标签父id</td>
</tr>
<tr>
<td style="text-align: left;">tagName</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">string</td>
<td>标签名称</td>
</tr>
<tr>
<td style="text-align: left;">type</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>'contest'竞赛的标签 'task'任务的标签</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code> {
"code": 20000,
"msg": "success",
"time": "2022-04-02 15:26:53",
"data": {
"count": 5,
"list": [
{
"id": 2,
"label": "标签2",
"pid": 0,
"children": [
{
"id": 12,
"label": "标签2.1",
"pid": 2
}
]
},
{
"id": 1,
"label": "标签1",
"pid": 0,
"children": [
{
"id": 11,
"label": "标签1.1",
"pid": 1,
"children": [
{
"id": 13,
"label": "标签1.1.1",
"pid": 11
}
]
}
]
}
]
}
}</code></pre>
<h5>返回参数说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">groupid</td>
<td style="text-align: left;">int</td>
<td>用户组id,1:超级管理员;2:普通用户</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>