== 产品库项目接口 == === 目录 === 1. [#point100 开发时间,负责人及进度汇报 ] 2. [#point200 mrobot的接口 ] 2.1 [#point201 产品终端页报价 ] 2.2 [#point202 产品终端页网上比价 ] 2.3 [#point203 产品终端页概述 ] 2.4 [#point204 产品终端页报参数] 2.5 [#point205 产品对比页 ] 2.6 [#point206 请求产品资讯 ] 2.7 [#point207 某产品类型的品牌列表 ] 2.8 [#point208 产品列表 ] 2.9 [#point209 产品点评界面 ] 2.10 [#point210 产品发送评论 ] 2.11 [#point211 搜索产品(品牌分类统计) ] 2.12 [#point212 搜索产品(产品结果列表)] 2.13 [#point213 产品搜索热点推荐 ] 2.14 [#point214 产品首页 ] 3. [#point300 配合的接口(产品库接口及编辑出的接口) ] 3.1 [#point301 产品终端页网上比价 ] 3.2 [#point302 产品资讯接口 ] 3.3 [#point303 某产品类型的品牌列表 ] 3.4 [#point304 产品发送评论 ] 3.5 [#point305 显示分类排名前三的品牌 ] 3.6 [#point306 产品搜索热点推荐(编辑出) ] 3.7 [#point307 推荐品牌(编辑出) ] 4. [#point400 测试环境接口配置 ] 5. [#point500 修改历史 ] == 1. [=#point100 开发时间,负责人及进度汇报 ]== ||批次||= 页面 =||= 涉及MROBOT接口 =||=是否需要[[BR]]HTML切图 =||= 需配合的接口负责人[[BR]]及进度 =||= 接口开发[[BR]]预计时间 =||=接口进度(百分比)=||=接口实际[[BR]]完成时间=||=接口确认=|| ||第一批|| 产品库首页 || 2.14 [#point214 产品首页 ] ||- || 3.5 [#point305 显示分类排名前三的品牌名字] [[BR]]郑华聪 袁火青 [[BR]]13号才完成接口给过来 || 8/2 || 80% || 接口实际完成时间[[BR]](缺配合的接口,目前数据为假数据) || 接口确认 ||第一批|| 品牌列表 || 2.7 [#point207 某产品类型的品牌列表 ] ||- || 3.3 [#point303 某产品类型的品牌列表] [[BR]]郑华聪 袁火青 [[BR]] 3.7 [#point307 推荐品牌(编辑出)] [[BR]]13号才完成接口给过来 || 8/2 || 80%[[BR]](缺配合的接口,目前数据为假数据) || 接口实际完成时间 || 接口确认 ||=第二批=|| 产品列表 || 2.8 [#point208 产品列表 ][[BR]]2.12 [#point212 搜索产品(产品结果列表)] ||- || - || 8/6 || 0% || 接口实际完成时间 || 接口确认 ||=第二批=|| 概述(对比浮层) || 2.3 [#point203 产品终端页概述 ] ||是 || - || 8/6 || 80% || 接口实际完成时间(缺HTML,目前数据为假数据) || 接口确认 ||=第二批=|| 参数 || 2.4 [#point204 产品终端页参数 ] ||是 || - || 8/8 || 60% [[BR]](缺HTML,目前页面为以前页面) || 接口实际完成时间 || 接口确认 ||=第二批=|| 报价 || 2.1 [#point201 产品终端页报价 ] ||是 || - || 8/8 || 60% [[BR]](缺HTML,目前页面为以前页面)|| 接口实际完成时间 || 接口确认 ||=第二批=|| 图片(图片列表/展示) || 以前的接口 || - || - || - || -|| - || - ||=第二批=|| 资讯(文章页) || 2.6 [#point206 请求产品资讯 ] ||是 || 3.2 [#point302 产品资讯接口] [[BR]]郑华聪 袁火青 [[BR]]13号才完成接口给过来 || 8/10 || 0% || 接口实际完成时间 || 接口确认 ||=第二批=|| 点评(我要点评) || 2.9 [#point209 产品点评界面 ] ||是|| - || 8/10 || 0% || 接口实际完成时间 || 接口确认 ||=第二批=|| 网上比价 || 2.2 [#point202 产品终端页网上比价 ] ||是 || 3.1 [#point301 产品终端页网上比价][[BR]] 黄忠 [[BR]]13号才完成接口给过来 || 8/10 || 60%[[BR]](缺配合的接口及HTML,目前数据为假数据) || 接口实际完成时间 || 接口确认 ||=第二批=|| 选择城市 || 以前的接口 || - || - || - || -|| - || - ||第三批|| 对比结果 || 2.5 [#point205 产品对比页 ] ||是 || - || 8/14 || 0% || 接口实际完成时间 || 接口确认 ||第三批|| 选机2页面 || 以前的接口 || - || - || - || -|| - || - ||第三批|| 搜索页2页面 || 2.11[#point211 搜索产品(品牌分类统计) ] ||- || - || 8/14 || 0% || 接口实际完成时间 || 接口确认 ||=第四批=|| 发送评论[[BR]](戴裕文补充) ||2.10[#point210 产品发送评论 ] || - || 3.4 [#point304 产品发送评论][[BR]]郑华聪 袁火青 [[BR]]13号才完成接口给过来 || 8/16 || 0% || 接口实际完成时间 || 接口确认 ||=第四批=|| 产品搜索热点推荐[[BR]](戴裕文补充) ||2.13[#point213 产品搜索热点推荐 ] || - || 3.6 [#point306 产品搜索热点推荐(编辑出)] [[BR]]13号才完成接口给过来 || 8/16 || 0% || 接口实际完成时间 || 接口确认 == 2. [=#point200 mrobot的接口 ] == mrobot自身的接口,由客户端调用 === 2.1 [=#point201 产品终端页报价 ] === {{{   HTTP请求方式:get 是否需要登录:否 请求参数:productId: 类型id areaId:地区Id 非必须,若不填默认则为全国 Url: http://mrobot.pconline.com.cn/v3/product/price/{productId}?areaId={areaId} 范例 http://mrobot.pconline.com.cn/v3/product/price/480434?areaId=2   返回HTML页面 }}} === 2.2 [=#point202 产品终端页网上比价 ] === {{{ HTTP请求方式:get 是否需要登录:否 请求参数: productId: 类型id url: http://mrobot.pconline.com.cn/v3/product/comparePrice/{productId} 范例 http://mrobot.pconline.com.cn/v3/product/comparePrice/242 返回 网上比价html   类似于    产品终端-查看所有经销商报价: http://mrobot.pconline.com.cn/v2/product/dealers/{产品id}   例子: http://mrobot.pconline.com.cn/v2/product/dealers/485270 }}} === 2.3 [=#point203 产品终端页概述 ] === {{{ HTTP请求方式:get 是否需要登录:否 请求参数:productID: 类型id Url: http://mrobot.pconline.com.cn/v3/product/abstact/${productID} 范例: http://mrobot.pconline.com.cn/v3/product/abstact/473123 返回参数:产品概述的html页面 备注: 跳转到BBS的action为pcaction://webview_bbs/{bbsId} 例如pcaction://webview_bbs/769143 }}} === 2.4 [=#point204 产品终端页报参数] === {{{   是否需要登录:否   请求参数: productId: 类型id Url: http://mrobot.pconline.com.cn/v3/product/detail/{productId} 范例: http://mrobot.pconline.com.cn/v3/product/detail/473123      返回终端页参数HTML }}} === 2.5 [=#point205 产品对比页 ] === {{{ 请求方式:get 是否需要登录:否 请求参数:   Id1和id2:是需要对比的两个产品   hideSameParams:真为true,假为false;真则隐藏相同的参数,否则显示所有参数。 }}} === 2.6 [=#point206 请求产品资讯 ] === {{{ getArticleListBySerialId http://mrobot.pconline.com.cn/v2/product/information/priductid&ordreId=1&fmt=json 请求方式:get 是否需要登录:否 请求参数: productId:产品id orderId:排序方式,1为按热度倒序,2为按热度正序,3为按价格倒序,4为按价格正序,5为按日期倒序,6为按日期正序 返回参数{ "productId":1021, "total":20, "orderId":1, "fmt":json, "articleList":[ { "id ":1234, "title":"苦逼0", "channel":"评测", }, { "id ":1234, "title":"苦逼0", "channel":"评测", } ] } id 文章id title 标题 channel 文章栏目 commentNum 评论数 }}} === 2.7 [=#point207 某产品类型的品牌列表 ] === {{{ HTTP请求方式:get 是否需要登录:否 请求参数: typeID: 产品类型id Url: http://mrobot.pconline.com.cn/v3/product/brand/ 范例 http://mrobot.pconline.com.cn/v3/product/brand/20937 返回参数: { "partition": { "recommondBrands": { "total": 2, "brands": [{ "id": 22586, "logo": "http:\/\/img0.pcauto.com.cn\/pcauto\/1112\/07\/1743776_ACS5050.png", "name": "三星", "index": "荐" }, { "id": 46291, "logo": "http:\/\/img0.pcauto.com.cn\/pcauto\/1112\/07\/1743776_ACS5050.png", "name": "HTC", "index": "荐" }] }, "totalBrands": { "total": 3, "sections": [{ "brands": [{ "id": 22586, "letter": "A", "name": "A三星" }, { "id": 46291, "letter": "A", "name": "AHTC" }], "index": "A", "rowNum": 2 }, { "brands": [{ "id": 46291, "letter": "B", "name": "AHTC" }], "index": "B", "rowNum": 1 }] } }, "type": 20937 } type :请求的类型 partition:分块集 recommondBrands:推荐版块集合, totalBrands;品牌的总集合 total:版块集合内部元素的总数 brands:版块内品牌集合 id:品牌id logo:品牌logo图片url letter;品牌名称首字母 name:品牌名称 sections:品牌的总集合的分块,按字母顺序分 index:分块所属的字母 rowNum:分块内品牌数量 }}} === 2.8 [=#point208 产品列表 ] === {{{ 类似于老版本分类产品列表: http://mrobot.pconline.com.cn/v2/product/types/{产品分类id}?pageNo=1&orderId=1&fmt=json 例子: http://mrobot.pconline.com.cn/v2/product/types/20937?pageNo=1&orderId=1&fmt=json   请求方式:get   是否需要登录:否   请求参数:      typeID:产品分类id   pageNo:页码   orderId:排序方式,1为按热度倒序,2为按热度正序,3为按价格倒序,4为按价格正序,5为按日期倒序,6为按日期正序   fmt:返回格式   需要添加请求参数 brandID:品牌id }}} === 2.9 [=#point209 产品点评界面 ] === {{{ HTTP请求方式:get 是否需要登录:否   请求参数:productID: 类型id    http://mrobot.pconline.com.cn/v2/product/comment/productId { 添加“我要点评”按钮:pcaction://postComment/{$productId} } }}} === 2.10 [=#point210 产品发送评论 ] === {{{ 发送参数类似于文章,论坛发送评论。 HTTP请求方式:post 是否需要登录:都可以 请求参数: productid:产品id producturl;产品url score:评分数值 content:评论内容 isanonymous 是否匿名 common_session_Id:用户的author_token }}} === 2.11 [=#point211 搜索产品(品牌分类统计) ] === {{{ HTTP请求方式:get 是否需要登录:否   请求参数:kw:查询关键字 Uri :http://mrobot.pcauto.com.cn/v2/price/models/search-type?kw=%E5%AE%9D%E9%A9%AC 返回参数: { "kw":"sony", "totle":1000, "types":[ { "sid":42123, "name":"手机", "num":100 },{ "sid":42123,   "name":"笔记本", "num":10 0 },{ "sid":42123, "name":"平板电脑", "num":100 },{ "sid":42123, "name":"数码相机", "num":100, },{ "sid":42123, "name":"超级本", "num":10 } ] } kw:搜索关键字(采用UTF-8方式编码), totle:结果集的总数, types:类型的集合, (可以为 产品类型id) }}} === 2.12 [=#point212 搜索产品(产品结果列表)] === {{{ HTTP请求方式:get 是否需要登录:否 请求参数:kw:查询关键字 type:查询的类型id pageNo:显示的页码,默认为1; orderId:排序方式,1为按热度倒序,2为按热度正序,3为按价格倒序,4为按价格正序,5为按日期倒序,6为按日期正序 http://ks.pconline.com.cn/search.jsp?appName=product&returnType=json&return=smalltype_id,category,shortName,hot_new,id,title,pub_url,pic,summary,price&sort=score:desc,access:desc&perPage=25&pageNo=1&highlight=false&q=55&clusterQuery=cluster_smalltype%3A%B1%CA%BC%C7%B1%BE Uri:http://mrobot.pconline.com.cn/v2/product/models/search?kw=fa&type=4234&pageNo=1&order=1 返回参数: { "kw":"sony", "type":4 "pageNo": "1", "orderId":1, "total": 113, "pageCount": 5, "pageSize": 25, "data": [ { "is-ultrabook": 0, "id": "503012", "hotNew": "2", "price": "4599", "items": [ "相机类型", "卡片数码相机", "有效像素", "1210万像素", "变焦倍数", "无光学变焦", "传感器尺寸", "1\/2.3英寸", "等效焦距", "21mm", "液晶屏尺寸", "3英寸", "高清视频", "1080p 1920×1080逐行", "存储介质", "SD卡,SDHC卡", "重量", "157g(包含存储卡),155g(不包含存储卡)" ], "idxPic": "http:\/\/img.pconline.com.cn\/images\/product\/5030\/503012\/dc_casio_tr150_1_sn.jpg", "shortName": "卡西欧 EXILIM EX-TR150", "url": "http:\/\/mrobot.pconline.com.cn\/v2\/product\/models\/503012" } .. ,{ "is-ultrabook": 0, "id": "471231", "hotNew": "0", "price": "288", "items": [ "适用类型", "台式机", "电源标准", "ATX,2.31", "额定功率", "350W", "CPU供电接口", "4+4pin", "大4Pin接口", "4个", "SATA接口", "3个", "PFC类型", "被动式PFC", "风扇描述", "一个12CM风扇,散热片" ], "idxPic": "http:\/\/img.pconline.com.cn\/images\/product\/4712\/471231\/pow_tt_450-1_sn.jpg", "shortName": "TT TR2-450", "url": "http:\/\/mrobot.pconline.com.cn\/v2\/product\/models\/471231" } ] } 类似于搜索超极本:http://mrobot.pconline.com.cn/v2/product/models/search_ultrabook?keyword=%E8%81%94%E6%83%B3&pageNo=1&order=1 请求方式:get是否需要登录:否请求参数: keyword:搜索关键字,需要url编码pageNo:请求页码order:同产品分类列表 }}} === 2.13 [=#point213 产品搜索热点推荐 ] === {{{ HTTP请求方式:get   是否需要登录:否   请求参数: fmt:返回格式 Uri:http://mrobot.pconline.com.cn/v2/product/hotspot 返回参数: { "total":3, "fmt":"json", "words":[ { "name": "三星", }, ...... ] } 说明: total:热点推荐总数 fmt:返回的格式 words:热点集合 name:热点名字 image:热点名字 }}} === 2.14 [=#point214 产品首页 ] === {{{ HTTP请求方式:get 是否需要登录:否 请求参数: type : 请求的类型 若为index 则为 首页的品牌推荐,若为diys则为diy部分的品牌推荐 Url: http://mrobot.pconline.com.cn/v3/product/brandNameTop 范例: http://mrobot.pconline.com.cn/v3/product/brandNameTop?type=index 返回参数: { "20937":["三星","APPLE","HTC"], "20928":["三星","APPLE","HTC"], "20912":["三星","APPLE","HTC"], "25850":["三星","APPLE","HTC"], "95585":["三星","APPLE","HTC"], "20806":["三星","APPLE","HTC"], "79849":["三星","APPLE","HTC"], "11111":["三星","APPLE","HTC"], "20807":["三星","APPLE","HTC"], "39957":["三星","APPLE","HTC"], "20961":["三星","APPLE","HTC"], "42377":["三星","APPLE","HTC"] } 备注: 根节点下的数字为产品类型的ID,数组的顺序按照产品的顺序排 分类下方外显该分类排名前三的品牌的名称(例如http://product.pconline.com.cn/mobile/ 页面中,品牌分类的前三个品牌“三星 HTC 诺基亚”); }}} === 3 [=#point300 配合的接口(产品库接口及编辑出的接口) ] === 此部分的接口由产品和编辑的同事配合 === 3.1 [=#point301 产品终端页网上比价 ] === {{{ HTTP请求方式:get 请求参数: productID: 产品id 返回参数:    [{    "storeName":"卓越",    "price":"2499.0",    "shippingRate":"购物满29元免运费",    "buyLink":"http://XXXX", "logo":"http://"    },{    "storeName":"卓越",    "price":"2499.0",    "shippingRate":"购物满29元免运费",    "buyLink":"http://XXXX", "logo":"http://"    }] 备注: logo 商城图标 storeName: 商城名称 price: 报价 shippingRate: 运费 buyLink:  购买 }}} 网页版类似页面:[http://product.pconline.com.cn/pdlib/pk/price410030.html] 原型页面: [http://rdtrac.pc.com.cn/mobile/pototype/ideas/pconline_product/v1.0.2/product_baojia_internet_1.html] === 3.2 [=#point302 产品资讯接口 ] === {{{ HTTP请求方式:get 请求参数: productId:产品id   pageNo:第几页   pageSize:分页数 返回参数 { "productId":1021, "total":20, "pageNo":1, "pageSize":10, "articleList":[ { "id ":1234, "title":"苦逼0", "channel":"评测", "image":"http://xxdxx.jpg" }, { "id ":1234, "title":"苦逼0", "channel":"导购", "image":"http://xxdxx.jpg" } ] } 备注: id 文章id title 标题 channel 文章栏目,"评测"还是“行情” image 导读图 }}} 网页版类似页面:[http://product.pconline.com.cn/mobile/nokia/410030_review.html] 原型页:[http://rdtrac.pc.com.cn/mobile/pototype/ideas/pconline_product/v1.0.2/product_news_list_1.html] === 3.3 [=#point303 某产品类型的品牌列表 ] === {{{ HTTP请求方式:get 请求参数: typeID: 产品类型id,例如手机20937 返回参数:   {    "typeId": 20937,    "totalBrands": {    "total": 20,    "sections": [    {    "brands": [    {    "id": 693,    "letter": "A",    "name": "APPLE"    },    {    "id": 693,    "letter": "A",    "name": "A"    }    ],    "index": "A",    "rowNum": 3    },    {    "brands": [    {    "id": 723,    "letter": "B",    "name": "B品牌1"    },    {    "id": 723,    "letter": "B",    "name": "B品牌2"    }    ],    "index": "B",    "rowNum": 15    }    ]    }   }   typeId :产品类型id,例如手机20937 total:版块集合内部元素的总数 brands:版块内品牌集合 id:品牌id letter;品牌名称首字母 name:品牌名称 sections:品牌的总集合的分块,按字母A-Z顺序分 index:分块所属的字母 rowNum:分块内品牌数量 }}} 备注: 网页版类似页面[http://product.pconline.com.cn/notebook/] 原型页面:[http://rdtrac.pc.com.cn/mobile/pototype/ideas/pconline_product/v1.0.2/pinpai_list_1.html] === 3.4 [=#point304 产品发送评论 ] === {{{ HTTP请求方式:post 请求参数:   productId: 产品ID   score : 分数 从1到5的整数   title : 标题   advantage :优点   deficiency :缺点   summary :总结   common_session_Id :太平洋网络通行证的sessionId 若为空则匿名发评论    返回参数:   {   "stats":"ok",   "msg":"发送成功"   }      Stats发送状态,成功为ok,失败为error,   msg中显示提示的信息 ,例如必填字段未填,或者其他必要的提示等    }}} 备注: 网页版类似页面[http://product.pconline.com.cn/mobile/samsung/485270_comment.html#dianping] 原型页面:[http://rdtrac.pc.com.cn/mobile/pototype/ideas/pconline_product/v1.0.2/product_writedianping_1.html] === 3.5 [=#point305 显示分类排名前三的品牌 ] === {{{ HTTP请求方式:get 请求参数: typeId :产品类型ID,逗号分割,例如手机20937,台式机20806 返回参数: { "20937":["三星","APPLE","HTC"], "256567":["三星","APPLE","HTC"], "256568":["三星","APPLE","HTC"] } }}} 备注:返回的顺序按照排名顺序来排 排名顺序根据类似此报价页面的[http://product.pconline.com.cn/notebook/] 原型页:[http://rdtrac.pc.com.cn/mobile/pototype/ideas/pconline_product/v1.0.2/index.html] === 3.6 [=#point306 产品搜索热点推荐(编辑出) ] === {{{ HTTP请求方式:get   是否需要登录:否   请求参数:无 返回参数: { "words":[ "三星","htc","苹果","华为" ] }   备注:返回最多5个关键词   由编辑设置 }}} 原型页面:[http://rdtrac.pc.com.cn/mobile/pototype/ideas/pconline_product/v1.0.2/search_1.html] === 3.7 [=#point307 推荐品牌(编辑出) ] === {{{ HTTP请求方式:get   是否需要登录:否   请求参数:无 返回参数: { "20806":{ "comment":"台式机", "data":[ ] }, "20807":{ "comment":"笔记本", "data":[ ] }, "20811":{ "comment":"主版", "data":[ ] }, "20812":{ "comment":"CPU", "data":[ ] }, "20813":{ "comment":"内存", "data":[ ] }, "20814":{ "comment":"硬盘", "data":[ ] }, "20817":{ "comment":"显卡", "data":[ ] }, "20872":{ "comment":"机箱电源", "data":[ ] }, "20873":{ "comment":"键鼠", "data":[ ] }, "20874":{ "comment":"光存储", "data":[ ] }, "20912":{ "comment":"摄像机", "data":[ ] }, "20928":{ "comment":"数码相机", "data":[ { "id":22681, "name":"尼康", "logo":"http://img0.pcauto.com.cn/pcauto/1112/07/1743776_ACS5050.png" } ] }, "20937":{ "comment":"手机", "data":[ { "id":22586, "name":"三星", "logo":"http://img0.pcauto.com.cn/pcauto/1112/07/1743776_ACS5050.png" }, { "id":46291, "name":"HTC", "logo":"http://img0.pcauto.com.cn/pcauto/1112/07/1743776_ACS5050.png" } ] }, "20950":{ "comment":"显示器", "data":[ ] }, "20961":{ "comment":"电子书", "data":[ ] }, "25850":{ "comment":"MP4", "data":[ ] }, "39957":{ "comment":"液晶电视", "data":[ ] }, "42377":{ "comment":"GPS", "data":[ ] }, "79849":{ "comment":"平板电脑", "data":[ ] }, "95585":{ "comment":"超级本", "data":[ ] } }   备注:返回编辑推荐的品牌   此关键词为编辑设置    total:版块集合内部元素的总数 25289,25293类似的数字,产品类型 id:品牌id logo:品牌logo图片url name:品牌名称 data 推荐产品的数据块 }}} 原型页面:[http://rdtrac.pc.com.cn/mobile/pototype/ideas/pconline_product/v1.0.2/pinpai_list_1.html] == 4. [=#point400 测试环境接口配置 ] == 改HOST的指向戴裕文的机器 192.168.23.101 mrobot.pconline.com.cn == 5. [=#point500 修改历史 ] == 2012-08-02: -接口第一版