新Alpha前端页面


查询页面接口

<p>搜索接口文档</p> <h4>url</h4> <p>/api/v1/query_info/</p> <h4>请求方式:</h4> <p>post</p> <h5>请求数据</h5> <table> <thead> <tr> <th>字段名</th> <th>含义</th> <th>数据类型</th> <th>是否必要</th> </tr> </thead> <tbody> <tr> <td>type</td> <td>类型</td> <td>int</td> <td>否</td> </tr> <tr> <td>concept_name</td> <td>概念名</td> <td>str</td> <td>否</td> </tr> <tr> <td>mode</td> <td>模式</td> <td>int</td> <td>否</td> </tr> <tr> <td>text</td> <td>查询文本</td> <td>string</td> <td>否</td> </tr> <tr> <td>pn</td> <td>页数</td> <td>int</td> <td>否</td> </tr> <tr> <td>rn</td> <td>每页显示数量</td> <td>int</td> <td>否</td> </tr> </tbody> </table> <p>陆洋修改版本10.30</p> <h5>请求数据</h5> <table> <thead> <tr> <th>字段名</th> <th>含义</th> <th>数据类型</th> <th>是否必要</th> <th>是否必要</th> </tr> </thead> <tbody> <tr> <td>text</td> <td>查询文本</td> <td>string</td> <td>是</td> <td>搜索的文本</td> </tr> <tr> <td>mode</td> <td>查询模式</td> <td>int</td> <td>否</td> <td>查询的模式</td> </tr> <tr> <td>pagination_info</td> <td>页数</td> <td>string</td> <td>否</td> <td>分页信息,不是必须传入,对于需要分页的查询,添加这个参数</td> </tr> </tbody> </table> <h5>分页参数的说明</h5> <p>对于列表情况,传入pn rn两个参数,分别表示页数和每一个页面内的个数 对于映射情况,传入映射的键列表,pn,rn三个参数,</p> <p>例如,对于一个列表结构的数据,如果想取第二页,每页100个对象,则pagination_info填入下列数据 {&quot;pagination_info&quot;:{&quot;pn&quot;:100,&quot;rn&quot;:2}}</p> <p>对于一个字典,如果想提取 c123,c456,c789三个键的内容,则pagination_info填入下列数据 {&quot;pagination_info&quot;:{&quot;map_keys&quot;:[&quot;c123&quot;,&quot;c456&quot;,&quot;c789&quot;], &quot;pn&quot;:100,&quot;rn&quot;:2}} 那么返回数据将包括映射中 &quot;c123&quot;,&quot;c456&quot;,&quot;c789&quot;三个键下面的第二页数据</p> <p>参数使用范围</p> <ol> <li>type = 3 推荐接口 concept_name 概念名,概念名范围如下: 1.1当mode=1 只支持以下概念: [u&quot;电影&quot;, u&quot;演员&quot;,u&quot;导演&quot;, u&quot;动画&quot;, u&quot;企业&quot;, u&quot;电子游戏&quot;, u&quot;人物&quot;, u&quot;歌手&quot;, u&quot;艺术家&quot;] 1.2mode=2 只支持以下概念: [u&quot;电影&quot;, u&quot;演员&quot;,u&quot;导演&quot;, u&quot;动画&quot;, u&quot;企业&quot;, u&quot;电子游戏&quot;, u&quot;人物&quot;, u&quot;歌手&quot;, u&quot;艺术家&quot;,u&quot;漫画&quot;,u&quot;动物&quot;,u&quot;网络小说&quot;,u&quot;音乐&quot;]</li> </ol> <p>mode =1 是瀑布流式数据 =2 是9宫格数据,如果不指定,随机 max_number 返回的数量,默认返回9</p> <p>type = 1 查询接口 text 查询文本</p> <p>type = 2 查询接口 text 查询文本 pn 不能为空</p> <h5>请求数据格式</h5> <pre><code></code></pre> <h5>返回数据</h5> <p>一个字典</p> <table> <thead> <tr> <th>字段名</th> <th>含义</th> <th>数据类型</th> </tr> </thead> <tbody> <tr> <td>data</td> <td>数据</td> <td>字典</td> </tr> <tr> <td>allow_pagination</td> <td>是否可分页</td> <td>布尔值</td> </tr> <tr> <td>total_amount</td> <td>原始数据的总条数</td> <td>int</td> </tr> <tr> <td>num_pages</td> <td>总页数</td> <td>int</td> </tr> <tr> <td>page_index</td> <td>当前页数</td> <td>int</td> </tr> <tr> <td>page_amount</td> <td>每页显示数量</td> <td>int</td> </tr> </tbody> </table> <p>front type目前有这么几种,list, map, number_map, time_map,其中map是一般的文本映射,time_map和number_map是时间轴,number_function是柱状图</p> <h5>返回数据格式:</h5> <p>成功: type = 3</p> <p>返回结果 mode=1 瀑布流式推荐返回结果 fronttype对应的参数有 list, image,video,audio,其中image,video,audio的数据格式是一样</p> <pre><code>{ "msg": "", "code": 1, "resultObj": { 'mode':1//推荐的模式 'data':[ { "index": {},//保存对应于content的数据内容列表 "group_number": 1,//推荐的分组编号,同属于一个分组编号的单元属于一个大的单元 "fronttype": "list",//一般来说,所有在推荐单元内的子单元都是列表类型,除了一般的列表以外,还有图片列表,视频列表,音频列表image_list,audio_list,video_list "content": [ { "info": "阴谋与杀机虚空的对决!\r\n伊泽众人经过不懈的努力,终于到达恕瑞玛的中心地带也就是存在着强大的奥术魔法的——虚空冥界。众人通过玛尔扎哈的帮助,成功进入到虚空界并结识了虚空行者卡萨丁,但是他们不知道等待他们的将是,让整个虚空冥界为之颤抖的恐惧之力……\r\n一切尽在暴走漫画出品,史上最逗比的英雄联盟动画《暴走撸啊撸》第十二集!", "resource": null, "name": "c216_urmQk34n", "number": null, "_audio": [], "_img": [ "//lain.bgm.tv/pic/cover/l/df/b3/132218_NdF5x.jpg" ], "obj_name": "暴走撸啊撸", "coordinate": null, "aka": "暴走撸啊撸,暴走lol", "_video": [], "structure": null, "c_name": "动画" } ], "allow_pagination": false, "message": "主推荐对象", //出现在这个单元上面的文字信息 "predicator": null, "type": null, "feaction": null }, { "index": {}, "group_number": 2, "fronttype": "image",// image "content": [ "http://imgsrc.baidu.com/image/c0%3Dshijue1%2C0%2C0%2C294%2C40/sign=f1d6319bc3177f3e0439f44e18a651b2/6609c93d70cf3bc7bf236ec1db00baa1cd112aff.jpg", "http://i-7.vcimg.com/trim/d4c8da8b5cbc9e15713448b26a38f82014880/trim.jpg", "http://www.sytdgl.com/images/contentImg/bd39734179.jpg", "http://img1.gtimg.com/health/pics/hv1/180/221/2263/147208110.jpg", "https://img3.doubanio.com/lpic/s4107206.jpg", "http://imgsrc.baidu.com/imgad/pic/item/b8389b504fc2d5628e2d941bed1190ef76c66c1a.jpg", "http://imgsrc.baidu.com/imgad/pic/item/5882b2b7d0a20cf4b431292c7c094b36adaf99a4.jpg", "http://s14.sinaimg.cn/bmiddle/591a95e4h5f31031a83ad", "http://imgsrc.baidu.com/image/c0%3Dshijue1%2C0%2C0%2C294%2C40/sign=fbada5193ffae6cd18b9a32267da6551/7a899e510fb30f242e21a82dc295d143ad4b0360.jpg", "http://s3.sinaimg.cn/middle/65ea0356x7615f5e0e522&amp;690", "http://i0.cy.com/eos/news/2014/0408/news1_4.jpg" ], "allow_pagination": false, "message": "一棵树的刺激生活的图片", "predicator": null, "type": null, "feaction": null }, } }</code></pre> <p>9宫格布局 mode=2</p> <pre><code>{ "msg": "", "code": 1, "resultObj": { 'mode':2, 'data':[ { "index": {}, "group_number": 1, "fronttype": "list", "allow_pagination": false, "message": "推荐9个动画",//本次推荐的说明,简要说明推荐的内容 "predicator": "列表&lt;动画&gt;", "type": null, "feaction": null "content": [ { "info": "オリジナル企画・スピンオフ企画・プロモーション映像・MusicPV・VJFilmetc...\r\nジャンルを問わず愛と勢いで創りきる数々のオムニバスアニメーション\r\n期間、予算等を制限した中での企画開発、R&D、人材育成、自由な創作の場として\r\nこの先の映像制作の可能性を探るWEB配信アニメーションシリーズです。\r\n────────────────────────────\r\n“日本动画展会”,是一项短篇动画系列企划,将由动画制作公司Khara和NICONICO视频网站运营方DWANGO共同负责实施。在既定的预算和时间内,动画制作者可以自由制作各种不分类型的短篇动画,然后在每周的星期五公开一集。除了原创动画之外,还接受外传动画、宣传动画、音乐视频等作品类型的制作。DWANGO和Khara在谈及该企划的理念时表示:“我们将会提供一个不限制创作表现的‘自由的创作平台’,探索在日本动画制作过程中的企划开发、研究开发、人才培养等方面的可能性”。DWANGO的川上量生会长还说道:“我们没有考虑过要收支平衡”。", "resource": null, "c_name": "动画", "number": null, "_audio": [], "_img": [ "//lain.bgm.tv/pic/cover/l/38/f8/116370_mOhOD.jpg" ], "obj_name": "日本アニメ(ーター)見本市", "coordinate": null, "aka": "日本动画(人)博览会,日本动画人博览会,japan anima(tor)’s exhibition", "_video": [], "structure": null, "name": "c216_ODAD0FwU" }, ] } ] } } </code></pre> <p>type=1 或者 type=2 fronttype=list</p> <pre><code>{ "msg": "", "code": 1, "resultObj": { "page_index": 1, "num_pages": 0, "total_amount": 0, "allow_pagination": false, "page_amount": 0, "data": { "index": { "c71_lik3qyZM": { "concept": "歌手", "resource": null, "number": null, "key": "c71_lik3qyZM", "coordinate": null, "aka": "刘德华,andy lau,lau tak wah,华仔,华dee,华哥等", "structure": null, "name": "刘德华" }, "c39_I0bEvljh": { "concept": "演员", "resource": "", "name": "刘德华", "number": null, "key": "c39_I0bEvljh", "coordinate": null, "aka": "Andy Lau", "structure": "" } }, "fronttype": "list", "content": [ "c39_I0bEvljh", "c71_lik3qyZM" ], "allow_pagination": false, "message": null, "predicator": "列表&lt;事物&gt;", "type": null, "feaction": [ { "search_text": "刘德华#电影#集数", "suggestion": "按集数组织这些电影" }, { "search_text": "刘德华#电影#导演", "suggestion": "查看上述电影的导演" }, { "search_text": "刘德华#电影#国家", "suggestion": "按国家组织这些电影" }, ] } } }</code></pre> <p>fronttype=map</p> <pre><code>{ "msg": "", "code": 1, "resultObj": { "page_index": 1, "num_pages": 0, "total_amount": 0, "allow_pagination": false, "page_amount": 10, "data": { "index": { "c39_P730YMoJ": { "info": "", "concept": "演员", "resource": "", "number": null, "_audio": [], "_img": [], "key": "c39_P730YMoJ", "coordinate": null, "aka": "Si Yang", "_video": [], "structure": "", "name": "杨斯" }, } "fronttype": "map", "content": { "c90_cIYKxAm4": [ "c39_07Ql1SRa", "c39_0cMgXI6c", "c39_0cQfGlIL", ] } "allow_pagination": false, "message": null, "predicator": "映射&lt;电影,演员&gt;", "type": "object", "feaction": null } }</code></pre> <p>请求失败 2 用户id输入有误 3 输入信息有误,具体错误请参考下面</p> <pre><code>{ "msg": { "text": [ "该字段是必填项。" ], "user_id": [ "该字段是必填项。" ] }, "code": 2, "resultObj": {} } { "status": 998, "message": "匿名查询次数已超出限制,暂停查询,如需继续查询,请注册用户", "resultObj": {} } { "status": 999, "message": "登陆已失效,请重新登陆", "resultObj": {} }</code></pre>

页面列表

ITEM_HTML