素材库小程序接口1

素材库小程序接口1


获取推荐文章(按时间倒序)

<h5>简要描述</h5> <ul> <li>获取推荐文章(按时间倒序)</li> </ul> <h5>请求URL</h5> <ul> <li><code>http://localhost:8500/getRecommendArticleByTime</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用户会话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>{ "pageNum": 3, "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;">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> </tbody> </table> <h5>成功返回示例</h5> <pre><code>{ "data": { "recommendArticleList": [ { "category": 2, "id": 268, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;剪刀有点钝,磨刀石也不好使\r&lt;\/p&gt;&lt;p&gt;莫慌!将2~3张铝箔纸叠在一起\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\/888f8f98-8c66-49fd-86ac-44c94c6eb9a6.jpg", "materialTypeId": 14, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "生活百科", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 2, "id": 259, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;【从“手”看健康】\r&lt;\/p&gt;&lt;p&gt;1.手感热:主心肾阴虚。症状:上火、失眠、多梦\r&lt;\/p&gt;&lt;p&gt;2.手感凉:主脾肾阳虚。症状:体弱怕冷,消化吸收能力差\r&lt;\/p&gt;&lt;p&gt;3.手感粘:主内分泌失调,糖尿病人多见\r&lt;\/p&gt;&lt;p&gt;4.手感湿:主心脾两虚。症状:心火盛、心理压力,精神紧张,易疲倦乏力\r&lt;\/p&gt;&lt;p&gt;5.手感温润:五脏调和,身体健康&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/82e44d26-ac2c-4601-8499-9cf8719745f6.jpeg", "materialTypeId": 14, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "生活百科", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 3, "id": 959, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;每个人都有过去,过去一文不值,只有现在和未来,才是真实的。&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20220126\/df583b30-9530-493a-a867-8d325e44dc48.jpeg", "materialTypeId": 53, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "早安", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 3, "id": 866, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;所有看起来的幸运,都源自坚持不懈的努力。&lt;\/p&gt;&lt;p&gt;早安 ♥︎&lt;\/p&gt;", "materialImgUrl": "", "materialTypeId": 53, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "早安", "price": 0, "resourceType": 3, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 3, "id": 832, "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\/20220117\/6a5268dd-4445-47a8-8598-ecc40a438809.png", "materialTypeId": 53, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "早安", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 3, "id": 276, "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;&lt;p&gt;才是永恒的美!&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/857df6ea-d9d2-4f41-9552-02ae18476d9f.jpeg", "materialTypeId": 51, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "晚安", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 3, "id": 414, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;坚持的人都让别人从藐视你刷屏变成了看到你成功后的羡慕!路是自己的,走着走着就变得好宽敞!&lt;\/p&gt;&lt;p&gt;💙给自己加油!早安!&lt;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211218\/0ad45bc5-e264-49d7-aa78-2897c68c7a27.jpeg", "materialTypeId": 53, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "早安", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 3, "id": 1569, "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\/20220402\/14378f4c-4532-40fd-b893-82ad47c64593.jpg", "materialTypeId": 51, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "晚安", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 3, "id": 1368, "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;\/p&gt;", "materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20220317\/704a2f14-1569-413a-a020-e92fbbbee792.jpeg", "materialTypeId": 53, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "早安", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 }, { "category": 3, "id": 899, "materialChargeStatus": 0, "materialContent": "&lt;p&gt;❥⇢Good morning&lt;\/p&gt;&lt;p&gt;人生哪来那么多幸运😒&amp;nbsp;&lt;\/p&gt;&lt;p&gt;只不过别人努力时你假装看不见😠&amp;nbsp;&lt;\/p&gt;&lt;p&gt;幸运和不幸都是由我们自己来决定🤔&amp;nbsp;&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\/20220121\/4c674215-a7e0-4bc0-a7c5-3e1a98027bd7.jpeg", "materialTypeId": 53, "materialTypeLogo": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/userAvatarImg\/2021-11-25\/2\/7424456f-a53c-4cbe-bc60-f7d955cec2fc.png", "materialTypeName": "早安", "price": 0, "resourceType": 1, "userPayStatus": 0, "videoFormat": "", "videoHeight": 0, "videoSize": "0", "videoUrl": "", "videoWidth": 0 } ], "pageResult": { "currentPage": 1, "pageSize": 10, "totalPage": 54, "totalRecord": 540 }, "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;">recommendArticleList</td> <td style="text-align: left;">array</td> <td>数据列表</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.category</td> <td style="text-align: left;">string</td> <td>类型:1-品牌 2-行业 3-分类</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.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;">recommendArticleList.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;">recommendArticleList.materialContent</td> <td style="text-align: left;">string</td> <td>素材内容</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.materialImgUrl</td> <td style="text-align: left;">string</td> <td>素材图片</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.materialTypeId</td> <td style="text-align: left;">string</td> <td>素材类型ID</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.materialTypeLogo</td> <td style="text-align: left;">string</td> <td>分类Logo地址/用户头像Url</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.materialTypeName</td> <td style="text-align: left;">string</td> <td>素材类型名称</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.resourceType</td> <td style="text-align: left;">string</td> <td>资源类型 (1:文章,2:视频,3:素材)</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.userPayStatus</td> <td style="text-align: left;">string</td> <td>用户付费状态 0-未支付 1-已支付</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.videoFormat</td> <td style="text-align: left;">string</td> <td>视频存储格式</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.videoHeight</td> <td style="text-align: left;">string</td> <td>视频高度</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.videoSize</td> <td style="text-align: left;">string</td> <td>视频存储大小</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.videoUrl</td> <td style="text-align: left;">string</td> <td>视频URL</td> </tr> <tr> <td style="text-align: left;">recommendArticleList.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