登录接口
<p><strong>简要描述:</strong> </p>
<ul>
<li>该接口用于iot平台登录页,用户输入手机号跟密码</li>
</ul>
<p><strong>请求URL:</strong> </p>
<ul>
<li><code>https://iot.xunmingiot.com/config/login/</code></li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST </li>
<li>GET </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;">phone</td>
<td style="text-align: left;">是</td>
<td style="text-align: left;">string</td>
<td>手机号</td>
</tr>
<tr>
<td style="text-align: left;">password</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> 没有密码返回:
HttpResponse('&lt;script&gt;alert(&quot;此用户暂无密码,请选择\'微信登录\'或者\'短信登录\'&quot;);location.assign(&quot;&quot;)&lt;/script&gt;')
密码不正确时返回:
HttpResponse('&lt;script&gt;alert(&quot;用户名或者密码错误&quot;);location.assign(&quot;&quot;)&lt;/script&gt;')</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;">password</td>
<td style="text-align: left;">int</td>
<td>用户小程序注册时是没有密码的</td>
</tr>
</tbody>
</table>
<p><strong>备注</strong> </p>
<ul>
<li>需考虑用户密码为None的情况,推荐微信扫码登录或者短信登录</li>
</ul>