注册-获取随机验证码
<p><strong>简要描述:</strong></p>
<ul>
<li>从后端获取一个验证码</li>
</ul>
<p><strong>请求URL:</strong></p>
<ul>
<li><code>http://xxx.xxx.com/user/getVcodeRegStatus</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST Content-Type: application/json;charset=utf-8</li>
</ul>
<p><strong>参数:</strong> </p>
<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;">username</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>用户名</td>
</tr>
</tbody>
</table>
<p><strong>返回示例</strong></p>
<pre><code>//失败
{
"code": 1,
"msg": 7001,
"data": [],
"info": "用户名不能为空"
}
//成功
返回示例1
{
"code": 0,
"msg": 2006,
"status": 0,
"data": []
}
返回示例2 - 数字验证
{
"code": 0,
"msg": 2006,
"status": 1,
"data": {
"codeImg": "iVBORw0KGuMC6CnW1......AAASUVORK5CYII=", //图片验证将imgInfo与codeImg组合在一起就是一张图片的路径
"imgInfo": "data:image/png;base64,", //<img id="imgpng" src="" > src = imgInfo + codeImg
"check_key": "aa859784ea82021db42cdf0de0692cd7", //注册时,需要传入的check_key,没有的情况下传空
"info": "请在3分钟内输入验证码"
}
}
返回示例3 - 滑动拼图
{
"code": 0,
"msg": 2006,
"status": 2,
"data": {
"captcha_id": "4a37f885d0ec442085353923c233fbf0"//请求滑动拼图第三方调用时需要用到的captcha_id
}
}</code></pre>
<p><strong>返回参数说明</strong> </p>
<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;">status</td>
<td style="text-align: left;">int</td>
<td>0-不验证,1-数字验证,2-拼图验证</td>
</tr>
</tbody>
</table>