素材库小程序接口1

素材库小程序接口1


根据素材类型获取文章(按时间倒序)

<h5>简要描述</h5> <ul> <li>根据素材类型获取文章(按时间倒序)</li> </ul> <h5>请求URL</h5> <ul> <li><code>http://localhost:8500/getArticleByMaterialTypeId</code> </li> </ul> <h5>请求方式</h5> <ul> <li>post</li> </ul> <h5>Header</h5> <table> <thead> <tr> <th style="text-align: left;">header</th> <th style="text-align: left;">必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">userId</td> <td style="text-align: left;">否</td> <td>string</td> <td>用户ID(用户没登录时,不用传改参数。用户登录后,需要传该参数)</td> </tr> <tr> <td style="text-align: left;">userSessionId</td> <td style="text-align: left;">否</td> <td>string</td> <td>用户会话ID(用户没登录时,不用传改参数。用户登录后,需要传该参数)</td> </tr> <tr> <td style="text-align: left;">miniCode</td> <td style="text-align: left;">是</td> <td>string</td> <td>小程序标识</td> </tr> </tbody> </table> <h5>请求参数示例</h5> <pre><code>{ "materialTypeId": 25, "pageNum": 1, "pageSize": 10 } </code></pre> <h5>json字段说明</h5> <table> <thead> <tr> <th style="text-align: left;">字段名</th> <th style="text-align: left;">必选</th> <th>类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">materialTypeId</td> <td style="text-align: left;">否</td> <td>int</td> <td>素材类型ID(如果为行业或分类,传入这个字段)</td> </tr> <tr> <td style="text-align: left;">pageNum</td> <td style="text-align: left;">是</td> <td>int</td> <td>当前页数</td> </tr> <tr> <td style="text-align: left;">pageSize</td> <td style="text-align: left;">是</td> <td>int</td> <td>每页大小</td> </tr> <tr> <td style="text-align: left;">materialBrandId</td> <td style="text-align: left;">否</td> <td>int</td> <td>素材品牌ID(如果为品牌,传入这个字段)</td> </tr> </tbody> </table> <h5>成功返回示例</h5> <pre><code>{ "data": { "commonArticleList": [ { "id": 328, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;瘦下去会越来越自信,重回颜值巅峰!\r&lt;\/p&gt;&lt;p&gt;没有那么多复杂的缘由,胖就是你不安不自信的源头!\r&lt;\/p&gt;&lt;p&gt;既然所有的问题都有答案,那还有什么理由不去做?&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/dcfb7dcd-a9e5-4f11-8b6b-20b63b7fb279.png", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 327, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;6个让你减肥的理由:&lt;\/p&gt;&lt;p&gt;胖——显老😂&lt;\/p&gt;&lt;p&gt;胖——不自信😔&lt;\/p&gt;&lt;p&gt;胖——衣服难买😭&lt;\/p&gt;&lt;p&gt;胖——容易患四高😤&lt;\/p&gt;&lt;p&gt;胖——影响身体健康😝&lt;\/p&gt;&lt;p&gt;胖——好吃懒动脾气大😅&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/8019239a-a32e-4108-b1dd-917403af8432", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 326, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;瘦子并不会因为偶尔吃顿烧烤炸鸡就胖到不可收拾,\r&lt;\/p&gt;&lt;p&gt;胖纸也不会因为吃顿轻食鸡胸肉就瘦十斤。\r&lt;\/p&gt;&lt;p&gt;生活饮食方式才是决定你胖瘦的关键。&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/abff2f2b-fceb-4a25-9e03-647c2cb265aa.jpg", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 325, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;减肥这种事,不用劝。\r&lt;\/p&gt;&lt;p&gt;有的人今天问,明天问…肥胖时间拖得越久,脂肪定型,会越来越顽固,更不好减。\r&lt;\/p&gt;&lt;p&gt;从没看过胖了还能靠意念瘦下去的,体重从两位数变三位数不仅仅是对外貌的伤害,更多是健康。&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/2a172555-116c-41fb-9861-5b1fa105c2df.png", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 324, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;减肥小常识-出汗越多消耗越多吗?\r&lt;\/p&gt;&lt;p&gt;不是!出汗多并不能代表消耗大,汗液的多少和个体的汗腺数量有关,\r&lt;\/p&gt;&lt;p&gt;并不是消耗了脂肪变成汗液排出的,就像大热天坐着不动就出汗,\r&lt;\/p&gt;&lt;p&gt;这并不能说消耗很大。\r&lt;\/p&gt;&lt;p&gt;&lt;br&gt;&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/c836bf49-7d3f-4079-83ae-dc26a3592f5f.jpeg", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 323, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;减肥:减一天,叫体验😩&lt;\/p&gt;&lt;p&gt;减一个月,叫改善&lt;\/p&gt;&lt;p&gt;减三个月,才叫💪蜕变&lt;\/p&gt;&lt;p&gt;如果减减停停,等于白花钱&lt;\/p&gt;&lt;p&gt;给自己一些时间&lt;\/p&gt;&lt;p&gt;💯变瘦、变美、变健康&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/e15e572e-0895-47d1-a31e-44c859296a33", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 322, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;人生赢家大概就是,又瘦又好看,用自己努力赚来的钱过上精致的生活,脚踏实地让自己闪闪发光,不用理会别人的嫉妒、误会和不谅解。&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/744493bb-0a9e-450f-8ec0-1a65a8c2375f.png", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 321, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;你比别人胖的原因,不在于别人瘦的快,而在于别人减的时候,你一直在看!&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/911b3ed8-e753-455b-bdd0-ece58c649705.jpeg", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 320, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;到了晚上就特别想吃东西又不想胖,该吃什么?\r&lt;\/p&gt;&lt;p&gt;建议:吃高蛋白质,少碳水化合物 、少油 、少糖 、少油脂的食物,\r&lt;\/p&gt;&lt;p&gt;碳水化合物和油脂是最容易发胖,\r&lt;\/p&gt;&lt;p&gt;而高蛋白质,一般女生都会处于比较低状态,可以适当吃也没关系!&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/5390f953-9b3a-4e98-8cf4-8de81839c641.jpeg", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "id": 319, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;减肥会上瘾的🍓&lt;\/p&gt;&lt;p&gt;一天比一天瘦⚡的时候会上瘾&lt;\/p&gt;&lt;p&gt;别人夸你好看🌸的时候会上瘾&lt;\/p&gt;&lt;p&gt;👧你也想天天有人夸你又瘦又好看&lt;\/p&gt;&lt;p&gt;那为什么不尝试一下呢?💜&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/8b9c0abb-d87c-416a-aff8-f70f4034e4bc", "materialTypeId": 25, "materialTypeLogo": "https:\/\/thirdwx.qlogo.cn\/mmopen\/vi_32\/nvYhcgUcvxgZbNT9o76EwCUR91WqibZHM4icFVxtvYy5AtCbIX45Via3qCInKEkcsqNcWFc22nbqqicbf4Fb3lQib3A\/132", "materialTypeName": "纯免费--福利官:若薇", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 } ], "pageResult": { "currentPage": 1, "pageSize": 10, "totalPage": 3, "totalRecord": 29 }, "vipStatus": 0 }, "head": { "code": 200, "msg": "成功" } } </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;">data</td> <td style="text-align: left;">object</td> <td>数据</td> </tr> <tr> <td style="text-align: left;">commonArticleList</td> <td style="text-align: left;">array</td> <td>数据列表</td> </tr> <tr> <td style="text-align: left;">commonArticleList.id</td> <td style="text-align: left;">string</td> <td>素材ID</td> </tr> <tr> <td style="text-align: left;">vipStatus</td> <td style="text-align: left;">string</td> <td>用户会员状态:0-非会员 1-会员</td> </tr> <tr> <td style="text-align: left;">commonArticleList.materialChargeStatus</td> <td style="text-align: left;">string</td> <td>素材收费状态 0-免费 1-收费</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;">commonArticleList.materialContent</td> <td style="text-align: left;">string</td> <td>素材内容</td> </tr> <tr> <td style="text-align: left;">commonArticleList.materialImgUrl</td> <td style="text-align: left;">string</td> <td>素材图片</td> </tr> <tr> <td style="text-align: left;">commonArticleList.materialTypeId</td> <td style="text-align: left;">string</td> <td>素材类型ID</td> </tr> <tr> <td style="text-align: left;">commonArticleList.materialTypeLogo</td> <td style="text-align: left;">string</td> <td>分类Logo地址/用户头像Url</td> </tr> <tr> <td style="text-align: left;">commonArticleList.materialTypeName</td> <td style="text-align: left;">string</td> <td>素材类型名称/用户昵称</td> </tr> <tr> <td style="text-align: left;">commonArticleList.resourceType</td> <td style="text-align: left;">string</td> <td>资源类型 (1:文章,2:视频,3:素材)</td> </tr> <tr> <td style="text-align: left;">commonArticleList.userPayStatus</td> <td style="text-align: left;">string</td> <td>用户付费状态 0-未支付 1-已支付</td> </tr> <tr> <td style="text-align: left;">commonArticleList.videoFormat</td> <td style="text-align: left;">string</td> <td>视频存储格式</td> </tr> <tr> <td style="text-align: left;">commonArticleList.videoHeight</td> <td style="text-align: left;">string</td> <td>视频高度</td> </tr> <tr> <td style="text-align: left;">commonArticleList.videoSize</td> <td style="text-align: left;">string</td> <td>视频存储大小</td> </tr> <tr> <td style="text-align: left;">commonArticleList.videoUrl</td> <td style="text-align: left;">string</td> <td>视频URL</td> </tr> <tr> <td style="text-align: left;">commonArticleList.videoWidth</td> <td style="text-align: left;">string</td> <td>视频宽度</td> </tr> <tr> <td style="text-align: left;">pageResult</td> <td style="text-align: left;">object</td> <td>页面信息</td> </tr> <tr> <td style="text-align: left;">pageResult.currentPage</td> <td style="text-align: left;">string</td> <td>当前页数</td> </tr> <tr> <td style="text-align: left;">pageResult.pageSize</td> <td style="text-align: left;">string</td> <td>每页大小</td> </tr> <tr> <td style="text-align: left;">pageResult.totalPage</td> <td style="text-align: left;">string</td> <td>总页数</td> </tr> <tr> <td style="text-align: left;">pageResult.totalRecord</td> <td style="text-align: left;">string</td> <td>总记录数</td> </tr> <tr> <td style="text-align: left;">head</td> <td style="text-align: left;">object</td> <td>消息头</td> </tr> <tr> <td style="text-align: left;">code</td> <td style="text-align: left;">string</td> <td>返回码</td> </tr> <tr> <td style="text-align: left;">msg</td> <td style="text-align: left;">string</td> <td>消息文本</td> </tr> </tbody> </table> <h5>备注</h5> <p>返回码 code 说明: 107:用户不存在 110:用户未登录 200:正常 400:客户端异常 500:服务端异常</p>

页面列表

ITEM_HTML