物料列表
<h5>简要描述</h5>
<ul>
<li>物料列表接口</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://xx.com/api/material</code></li>
</ul>
<h5>请求方式</h5>
<ul>
<li>GET</li>
</ul>
<h5>Authorization header</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">参数名</th>
<th style="text-align: left;">参数值</th>
<th style="text-align: left;">类型</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Authorization</td>
<td style="text-align: left;">Bearer access_token</td>
<td style="text-align: left;">string</td>
</tr>
</tbody>
</table>
<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;">page</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">number</td>
<td>页码 默认第一页</td>
</tr>
<tr>
<td style="text-align: left;">name</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;">array</td>
<td>物料类型</td>
</tr>
<tr>
<td style="text-align: left;">brand_id</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">array</td>
<td>品牌ID</td>
</tr>
<tr>
<td style="text-align: left;">level_id</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">array</td>
<td>城市级别ID</td>
</tr>
<tr>
<td style="text-align: left;">region_id</td>
<td style="text-align: left;">否</td>
<td style="text-align: left;">array</td>
<td>区域ID</td>
</tr>
</tbody>
</table>
<h5>返回示例</h5>
<pre><code>{
&quot;code&quot;: 200,
&quot;message&quot;: &quot;成功&quot;,
&quot;data&quot;: {
&quot;current_page&quot;: 1,
&quot;data&quot;: [
{
&quot;id&quot;: 15,
&quot;category&quot;: &quot;物料制作及搭建&quot;,
&quot;sub_category&quot;: &quot;背板&quot;,
&quot;name&quot;: &quot;喷绘宝丽布&quot;,
&quot;type&quot;: 0,
&quot;get_price&quot;: [
{
&quot;id&quot;: 8415,
&quot;material_id&quot;: 15,
&quot;brand_id&quot;: 2,
&quot;level_id&quot;: 1,
&quot;region_id&quot;: 1,
&quot;price&quot;: &quot;140.00&quot;,
&quot;discount&quot;: null,
&quot;discount_price&quot;: null,
&quot;brand&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;豪华品牌&quot;
},
&quot;region&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;总部/区域&quot;
},
&quot;level&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;二级城市&quot;
}
},
{
&quot;id&quot;: 9815,
&quot;material_id&quot;: 15,
&quot;brand_id&quot;: 2,
&quot;level_id&quot;: 2,
&quot;region_id&quot;: 1,
&quot;price&quot;: &quot;120.00&quot;,
&quot;discount&quot;: null,
&quot;discount_price&quot;: null,
&quot;brand&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;豪华品牌&quot;
},
&quot;region&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;总部/区域&quot;
},
&quot;level&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;二级城市&quot;
}
},
{
&quot;id&quot;: 11215,
&quot;material_id&quot;: 15,
&quot;brand_id&quot;: 2,
&quot;level_id&quot;: 3,
&quot;region_id&quot;: 1,
&quot;price&quot;: &quot;100.00&quot;,
&quot;discount&quot;: null,
&quot;discount_price&quot;: null,
&quot;brand&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;豪华品牌&quot;
},
&quot;region&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;总部/区域&quot;
},
&quot;level&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;二级城市&quot;
}
},
{
&quot;id&quot;: 12615,
&quot;material_id&quot;: 15,
&quot;brand_id&quot;: 2,
&quot;level_id&quot;: 1,
&quot;region_id&quot;: 2,
&quot;price&quot;: &quot;170.00&quot;,
&quot;discount&quot;: null,
&quot;discount_price&quot;: null,
&quot;brand&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;豪华品牌&quot;
},
&quot;region&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;总部/区域&quot;
},
&quot;level&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;二级城市&quot;
}
},
{
&quot;id&quot;: 14015,
&quot;material_id&quot;: 15,
&quot;brand_id&quot;: 2,
&quot;level_id&quot;: 2,
&quot;region_id&quot;: 2,
&quot;price&quot;: &quot;140.00&quot;,
&quot;discount&quot;: null,
&quot;discount_price&quot;: null,
&quot;brand&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;豪华品牌&quot;
},
&quot;region&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;总部/区域&quot;
},
&quot;level&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;二级城市&quot;
}
},
{
&quot;id&quot;: 15415,
&quot;material_id&quot;: 15,
&quot;brand_id&quot;: 2,
&quot;level_id&quot;: 3,
&quot;region_id&quot;: 2,
&quot;price&quot;: &quot;110.00&quot;,
&quot;discount&quot;: null,
&quot;discount_price&quot;: null,
&quot;brand&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;豪华品牌&quot;
},
&quot;region&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;总部/区域&quot;
},
&quot;level&quot;: {
&quot;id&quot;: 2,
&quot;name&quot;: &quot;二级城市&quot;
}
}
],
&quot;get_off_line&quot;: {
&quot;id&quot;: 15,
&quot;nature&quot;: &quot;制作&quot;,
&quot;material&quot;: &quot;普通宝丽布&quot;,
&quot;specification&quot;: &quot;美国威特720dpi高精度喷绘&quot;,
&quot;brand&quot;: &quot;无&quot;,
&quot;unit&quot;: &quot;平方米&quot;,
&quot;control_standard&quot;: &quot;上限&quot;,
&quot;price_factors&quot;: &quot;供应商级别、材质品质等&quot;
},
&quot;get_on_line&quot;: null
}
],
&quot;first_page_url&quot;: &quot;http://192.168.0.30/api/admin/material?page=1&quot;,
&quot;from&quot;: 1,
&quot;last_page&quot;: 94,
&quot;last_page_url&quot;: &quot;http://192.168.0.30/api/admin/material?page=94&quot;,
&quot;links&quot;: [
{
&quot;url&quot;: null,
&quot;label&quot;: &quot;&amp;laquo; 上一页&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=1&quot;,
&quot;label&quot;: &quot;1&quot;,
&quot;active&quot;: true
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=2&quot;,
&quot;label&quot;: &quot;2&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=3&quot;,
&quot;label&quot;: &quot;3&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=4&quot;,
&quot;label&quot;: &quot;4&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=5&quot;,
&quot;label&quot;: &quot;5&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=6&quot;,
&quot;label&quot;: &quot;6&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=7&quot;,
&quot;label&quot;: &quot;7&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=8&quot;,
&quot;label&quot;: &quot;8&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=9&quot;,
&quot;label&quot;: &quot;9&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=10&quot;,
&quot;label&quot;: &quot;10&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: null,
&quot;label&quot;: &quot;...&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=93&quot;,
&quot;label&quot;: &quot;93&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=94&quot;,
&quot;label&quot;: &quot;94&quot;,
&quot;active&quot;: false
},
{
&quot;url&quot;: &quot;http://192.168.0.30/api/admin/material?page=2&quot;,
&quot;label&quot;: &quot;下一页 &amp;raquo;&quot;,
&quot;active&quot;: false
}
],
&quot;next_page_url&quot;: &quot;http://192.168.0.30/api/admin/material?page=2&quot;,
&quot;path&quot;: &quot;http://192.168.0.30/api/admin/material&quot;,
&quot;per_page&quot;: 15,
&quot;prev_page_url&quot;: null,
&quot;to&quot;: 15,
&quot;total&quot;: 1400
}
}
</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;">code</td>
<td style="text-align: left;">int</td>
<td>状态码</td>
</tr>
<tr>
<td style="text-align: left;">message</td>
<td style="text-align: left;">string</td>
<td>消息提示</td>
</tr>
<tr>
<td style="text-align: left;">current_page</td>
<td style="text-align: left;">number</td>
<td>当前页码</td>
</tr>
<tr>
<td style="text-align: left;">data</td>
<td style="text-align: left;">array</td>
<td>展示数据</td>
</tr>
<tr>
<td style="text-align: left;">id</td>
<td style="text-align: left;">number</td>
<td>物料ID</td>
</tr>
<tr>
<td style="text-align: left;">name</td>
<td style="text-align: left;">string</td>
<td>项目名称</td>
</tr>
<tr>
<td style="text-align: left;">category</td>
<td style="text-align: left;">string</td>
<td>物料大类</td>
</tr>
<tr>
<td style="text-align: left;">sub_category</td>
<td style="text-align: left;">string</td>
<td>分类</td>
</tr>
<tr>
<td style="text-align: left;">type</td>
<td style="text-align: left;">number</td>
<td>物料类型【0:线下物料 1:线上物料】</td>
</tr>
<tr>
<td style="text-align: left;">get_off_line或get_on_line</td>
<td style="text-align: left;">array</td>
<td>线下或线上物料详情</td>
</tr>
<tr>
<td style="text-align: left;">nature</td>
<td style="text-align: left;">string</td>
<td>性质</td>
</tr>
<tr>
<td style="text-align: left;">material</td>
<td style="text-align: left;">string</td>
<td>材质</td>
</tr>
<tr>
<td style="text-align: left;">specification</td>
<td style="text-align: left;">string</td>
<td>规格</td>
</tr>
<tr>
<td style="text-align: left;">brand</td>
<td style="text-align: left;">string</td>
<td>品牌</td>
</tr>
<tr>
<td style="text-align: left;">unit</td>
<td style="text-align: left;">string</td>
<td>单位</td>
</tr>
<tr>
<td style="text-align: left;">control_standard</td>
<td style="text-align: left;">string</td>
<td>控价标准</td>
</tr>
<tr>
<td style="text-align: left;">price_factors</td>
<td style="text-align: left;">string</td>
<td>价格影响因素</td>
</tr>
<tr>
<td style="text-align: left;">get_price</td>
<td style="text-align: left;">array</td>
<td>物料价格</td>
</tr>
<tr>
<td style="text-align: left;">material_id</td>
<td style="text-align: left;">number</td>
<td>物料ID</td>
</tr>
<tr>
<td style="text-align: left;">brand_id</td>
<td style="text-align: left;">number</td>
<td>品牌ID</td>
</tr>
<tr>
<td style="text-align: left;">level_id</td>
<td style="text-align: left;">number</td>
<td>城市级别ID</td>
</tr>
<tr>
<td style="text-align: left;">region_id</td>
<td style="text-align: left;">number</td>
<td>城市级别ID</td>
</tr>
<tr>
<td style="text-align: left;">price</td>
<td style="text-align: left;">string</td>
<td>价格</td>
</tr>
<tr>
<td style="text-align: left;">discount</td>
<td style="text-align: left;">string</td>
<td>折扣值</td>
</tr>
<tr>
<td style="text-align: left;">discount_price</td>
<td style="text-align: left;">string</td>
<td>折扣价</td>
</tr>
<tr>
<td style="text-align: left;">brand</td>
<td style="text-align: left;">object</td>
<td>品牌ID对应的 品牌名称</td>
</tr>
<tr>
<td style="text-align: left;">region</td>
<td style="text-align: left;">object</td>
<td>区域ID对应的 区域名称</td>
</tr>
<tr>
<td style="text-align: left;">level</td>
<td style="text-align: left;">object</td>
<td>城市级别ID对应的 城市级别名称</td>
</tr>
<tr>
<td style="text-align: left;">first_page_url</td>
<td style="text-align: left;">string</td>
<td>首页数据链接</td>
</tr>
<tr>
<td style="text-align: left;">last_page_url</td>
<td style="text-align: left;">string</td>
<td>最后数据链接</td>
</tr>
<tr>
<td style="text-align: left;">next_page_url</td>
<td style="text-align: left;">string</td>
<td>下一页数据链接</td>
</tr>
<tr>
<td style="text-align: left;">links</td>
<td style="text-align: left;">array</td>
<td>分页数据链接</td>
</tr>
<tr>
<td style="text-align: left;">per_page</td>
<td style="text-align: left;">number</td>
<td>每页数据条数</td>
</tr>
<tr>
<td style="text-align: left;">total</td>
<td style="text-align: left;">number</td>
<td>数据总数</td>
</tr>
</tbody>
</table>
<h5>备注</h5>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>