随机获取 10 篇推荐文章
<h5>简要描述</h5>
<ul>
<li>随机获取 10 篇推荐文章(点击右侧[换]按钮后,随机获取文章)</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>http://localhost:8500/getRecommendArticle</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>get</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>{
"data": {
"recommendArticleList": [
{
"category": 2,
"id": 154,
"materialChargeStatus": 0,
"materialContent": "<p>搜索<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211103\/41ab92b6-8c60-4e6a-9ba9-2fad977e23b1.jpg",
"materialTypeId": 3,
"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": 274,
"materialChargeStatus": 0,
"materialContent": "<p>关关难过关关过,夜夜难熬夜夜熬。万般皆苦,悲欢自渡,他人难悟。晚安。 🌙<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/870c870c-6fa9-46bd-890d-ee0f2db8ade9.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": 712,
"materialChargeStatus": 0,
"materialContent": "<p>|ᴹᴼᴿᴺᴵᴺᴳ<\/p><p>&nbsp;<\/p><p>#趣味早安#<\/p><p><br><\/p><p>生活就像秋高<\/p><p><br><\/p><p>把我给气爽了😆<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20220108\/1ae46dd5-8961-4053-a703-8bbe05d9027f.jpg",
"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": 2,
"id": 152,
"materialChargeStatus": 0,
"materialContent": "<p>222<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211103\/770e0b3c-910b-4e5d-a52a-4f50b3cd4060.jpg",
"materialTypeId": 1,
"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": 1151,
"materialChargeStatus": 0,
"materialContent": "<p>🐾<\/p><p>🐱像猫一样,<\/p><p>只取悦自己,不理会他人,<\/p><p>生命也许会更精彩吧。<\/p><p>早安啦!<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20220224\/941e1676-f0f2-4b2f-af6e-60cfad3f013c.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": 491,
"materialChargeStatus": 0,
"materialContent": "<p>每一个清晨,伴着阳光上路,清新的空气纯净着灵魂,满天的云霞变幻着色彩。给自己一个微笑,告诉自己今天会更美好。早安!<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211221\/03b42771-4498-45ea-aa85-aa90d13a04d1.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": 284,
"materialChargeStatus": 0,
"materialContent": "<p>每天都给自己一句鼓励\r<\/p><p>每天都制定一个必须达到的目标,\r<\/p><p>生活就会充实一些,\r<\/p><p>离自己的未来也会更近一些。<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211125\/6238017d-5f34-446c-b78c-55ce9d18cc95.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": 390,
"materialChargeStatus": 0,
"materialContent": "<p>对你冷淡的人,也会在别人那里如你一般委屈,风水轮流转,从来就没有人能一直赢到底。晚安!<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211213\/91f6d39e-191d-4c72-b5bb-5422b63d37c5.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": 429,
"materialChargeStatus": 0,
"materialContent": "<p>晚安\r<\/p><p>保持专注,保持热情\r<\/p><p>时间用在哪里,人生就在哪里\r<\/p><p>☟☟你今天的日积月累\r<\/p><p>早晚会成为别人眼中的望尘莫及<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211218\/81f4bad6-0452-4e9d-b016-656268a8a501.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": 565,
"materialChargeStatus": 0,
"materialContent": "<p>平庸与伟大并不在于你做了些什么,而是你是否无愧于心~<\/p><p>晚安♡♡<\/p>",
"materialImgUrl": "https:\/\/zktuistatic.oss-cn-shenzhen.aliyuncs.com\/miniProgram\/materialImage\/20211228\/cb63da72-3289-49b9-8969-a441eb9c2d8b.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
}
],
"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;">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>