2.6 文件上传接口
<h4>请求地址</h4>
<ul>
<li>正式环境: <a href="https://www.lampmind.com/api/common/update_file">https://www.lampmind.com/api/common/update_file</a></li>
<li>测试环境: <a href="https://sd.solar-iot.com/api/common/update_file">https://sd.solar-iot.com/api/common/update_file</a></li>
</ul>
<h4>请求方法</h4>
<p><strong>POST</strong></p>
<h4>请求参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
<th>是否必须</th>
</tr>
</thead>
<tbody>
<tr>
<td>type</td>
<td>int</td>
<td>文件类型(0 图片,1 MP3文件)</td>
<td>Y</td>
</tr>
<tr>
<td>file</td>
<td>int</td>
<td>上传图片</td>
<td>Y</td>
</tr>
</tbody>
</table>
<h4>返回参数</h4>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>说明</th>
<th>必须存在</th>
</tr>
</thead>
<tbody>
<tr>
<td>status</td>
<td>string</td>
<td>返回码</td>
<td>Y</td>
</tr>
<tr>
<td>msg</td>
<td>string</td>
<td>返回信息</td>
<td>Y</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>返回数据</td>
<td>Y</td>
</tr>
<tr>
<td>path</td>
<td>string</td>
<td>图片路径</td>
<td>Y</td>
</tr>
</tbody>
</table>
<h4>返回内容实例</h4>
<pre><code>{
"status":"0000",
"msg":"操作成功",
"data":{
'path':'http://www.shidian.com/upload/image/12342515423451.jpg'
}
}</code></pre>