Changes between Version 6 and Version 7 of pcauto_4.5.0/interface


Ignore:
Timestamp:
08/26/2014 05:14:46 PM (12 years ago)
Author:
hejingdong
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pcauto_4.5.0/interface

    v6 v7  
    3131    请求参数:channelId:栏目id 
    3232    说明: 
    33     返回结果: 
     33       0其他 
     34       1文章 
     35       2帖子 
     36       3图集 
     37       4直播 
     38       5专题 
     39       6活动 
     40       7新专题-上面一个专题名,下面是展示3篇文章 
     41       8新图集-展示图集名和三张小图 
     42    返回结果: 
     43{ 
     44  "data": [ 
     45    { 
     46      "channelId": 2, 
     47      "channelName": "新车", 
     48      "count": 10, 
     49      "downs": 0, 
     50      "ups": 13, 
     51      "id": "5023924", 
     52      "image": "http://img0.pcauto.com.cn/pcauto/1408/26/g_5023924_1409017503587_240x160.jpg", 
     53      "pubDate": "2014-08-26", 
     54      "title": "2014广州车展专题", 
     55      "articles": [ 
     56        { 
     57          "channelId": 2, 
     58          "channelName": "新车", 
     59          "count": 10, 
     60          "downs": 0, 
     61          "id": "5023924", 
     62          "image": "http://img0.pcauto.com.cn/pcauto/1408/26/g_5023924_1409017503587_240x160.jpg", 
     63          "pubDate": "2014-08-26", 
     64          "title": "野马F16将成都车展上市 并发布全新LOGO", 
     65          "type": 1, 
     66          "ups": 13, 
     67          "url": "http://www.pcauto.com.cn/nation/502/5023924.html" 
     68        } 
     69      ], 
     70      "type": 7, 
     71      "url": "http://www.pcauto.com.cn/nation/502/5023924.html" 
     72    }, 
     73    { 
     74      "count": 22, 
     75      "downs": 0, 
     76      "id": "10003", 
     77      "pubDate": "2014-08-26", 
     78      "seq": 8, 
     79      "title": "奔跑的哲学家 2014年奥迪R8 V8图赏", 
     80      "photos": [ 
     81        { 
     82          "desc": "据《每日邮报》报道,玻利维亚的北杨格思公路(North Yungus Road)被称为“死亡之路”,它位于海拔15400英尺(约4693米)的高山上,每年能夺走约300人的生命。", 
     83          "id": 144959, 
     84          "name": "最危险的公路之一 玻利维亚“死亡之路”", 
     85          "thumb": "http://i4.3conline.com/images/piclib/201408/22/batch/1/240546/1408680049464joxx56dlfl_small.jpg" 
     86        } 
     87      ], 
     88      "to-uri": "pcautobrowser://album-photo/10003", 
     89      "type": 3, 
     90      "updateAt": 1408982400000, 
     91      "ups": 0 
     92    } 
     93  ], 
     94  "topFocus": [ 
     95    { 
     96      "cc-uri": "", 
     97      "image": "http://imgad0.pcauto.com.cn/ivy/image/20148/25/14089529815230.jpg", 
     98      "seq": 4, 
     99      "title": "广告", 
     100      "to-uri": "http://ivy.pcauto.com.cn/adpuba/click?adid=331803&id=auto.khd.zx.jdt4.", 
     101      "updateAt": 1409021941845, 
     102      "vc-uri": "http://ivy.pcauto.com.cn/adpuba/show?adid=331803&id=auto.khd.zx.jdt4.&media=js" 
     103    } 
     104  ], 
     105  "total": 150 
     106} 
    34107}}} 
    35108 
     
    43116    缓存时间: 
    44117    请求参数: 
    45     说明: 
    46     返回结果: 
     118    说明:点击整块热门评论部分,都是触发评论跳转 
     119    返回结果: 
     120增加文章标签协议:pcautobrowser://article-tag/id 
     121增加评论跳转协议: pcautobrowser://comment/topicId 
     122 
     123增加一段JS,addComments(jsonArray),调用效果: 
     124当有数据时以jsonArray中前两条(有可能是一条)评论显示为热门评论部分 
     125当数据为空时,不显示热门评论部分 
     126 
    47127}}} 
    48128 
     
    57137    说明: 
    58138    请求参数: 
    59  
    60     返回结果: 
     139tagId:标签id 
     140 
     141    返回结果: 
     142返回数据格式和http://mrobot.pcauto.com.cn/v2/cms/channels/2?v=4.0.0&serialIds=&pageSize=250保持一致 
    61143 
    62144}}} 
     
    73155    说明: 
    74156    返回结果: 
    75 }}} 
    76  
    77 === 2.2.0 [=#point2.2.0 论坛首页] === 
     157{ 
     158  "hot": [ 
     159    { 
     160      "id": 1, 
     161      "name": "广东", 
     162      "cities": [ 
     163        ["1","广州","5401","广东","广州市"], 
     164        ["4","深圳","5401","广东","深圳市"] 
     165      ] 
     166    } 
     167  ] 
     168} 
     169}}} 
     170 
     171=== 2.2.0 [=#point2.2.0 论坛首页-热门版块] === 
     172{{{ 
     173    请求url: 
     174    HTTP请求方式:GET 
     175    是否需要登录:false 
     176    返回格式:json 
     177    返缓存方式: 
     178    缓存时间: 
     179    请求参数:: 
     180    说明: 
     181    返回结果: 
     182{ 
     183  "hot": [ 
     184    { 
     185      "id": 1, 
     186      "name": "奥迪A4L", 
     187      "image": "" 
     188    } 
     189  ] 
     190} 
     191}}} 
     192 
     193 
     194=== 2.2.0.1 [=#point2.2.0 论坛首页-猜你喜欢] === 
    78195{{{ 
    79196    请求url: 
     
    86203    说明: 
    87204    返回结果: 
     205{ 
     206  "topics": [ 
     207    { 
     208      "authorId": 22393072, 
     209      "authorName": "hkitty", 
     210      "authorPhoto": "http://i1.3conline.com/images/upload/upc/face/22/39/30/72/22393072_50x50", 
     211      "contribution": 0, 
     212      "forumId": 19017, 
     213      "forumName": "内部测试", 
     214      "images": [ 
     215        { 
     216          "url": "http://imgrt.pconline.com.cn/images/upload/upc/tx/bbs6/1407/23/c0/spcgroup/bbs/center/36611290_1406089561207.jpg", 
     217          "width": 100, 
     218          "height": 200 
     219        }, 
     220        { 
     221          "url": "http://imgrt.pconline.com.cn/images/upload/upc/tx/bbs6/1407/23/c0/spcgroup/bbs/center/36611294_1406089563340.jpg", 
     222          "width": 100, 
     223          "height": 200 
     224        }, 
     225        { 
     226          "url": "http://imgrt.pconline.com.cn/images/upload/upc/tx/bbs6/1407/23/c0/spcgroup/bbs/center/36611296_1406089565044.jpg", 
     227          "width": 100, 
     228          "height": 200 
     229        } 
     230      ], 
     231      "nickname": "Rachel", 
     232      "postCount": 1, 
     233      "pubTime": 1406166953000, 
     234      "topicId": 5098712, 
     235      "topicTitle": "又来啦早晨" 
     236    } 
     237  ] 
     238} 
    88239}}} 
    89240 
     
    96247    返缓存方式: 
    97248    缓存时间: 
    98     说明:4.5版本增加一个提问帖,最多显示三张图 
     249    说明:4.5版本增加一个提问帖,最多显示三张图,默认显示2条置顶帖,多出的列表隐藏起来,通过点击可以展开和收起,展开后最多只能5条。置顶帖的显示上,要和普通的帖子在样式和结构上有所不同 
     250    出精华帖和提问帖时,不需要出指定帖 
    99251    请求参数: 
    100252id:论坛ID或者车系id 
     
    102254pageNo:页码 
    103255pageSize:一页条数 
    104 orderby=postat:最新帖,orderby=replyat:最热帖,filter=pick:精华帖 
    105     返回结果: 
    106  
     256orderby=postat:最新帖,orderby=replyat:最热帖 
     257type:   1全部帖子,2精华帖,3提问帖 
     258    返回结果: 
     259{ 
     260  "tops": { 
     261    "title": "置顶消息", 
     262    "topics": [ 
     263      { 
     264        "authorId": 22393072, 
     265        "authorName": "hkitty", 
     266        "authorPhoto": "http://i1.3conline.com/images/upload/upc/face/22/39/30/72/22393072_50x50", 
     267        "contribution": 0, 
     268        "forumId": 19017, 
     269        "forumName": "内部测试", 
     270        "images": [ 
     271          { 
     272            "url": "http://imgrt.pconline.com.cn/images/upload/upc/tx/bbs6/1407/23/c0/spcgroup/bbs/center/36611290_1406089561207.jpg", 
     273            "width": 100, 
     274            "height": 200 
     275          }, 
     276          { 
     277            "url": "http://imgrt.pconline.com.cn/images/upload/upc/tx/bbs6/1407/23/c0/spcgroup/bbs/center/36611294_1406089563340.jpg", 
     278            "width": 100, 
     279            "height": 200 
     280          }, 
     281          { 
     282            "url": "http://imgrt.pconline.com.cn/images/upload/upc/tx/bbs6/1407/23/c0/spcgroup/bbs/center/36611296_1406089565044.jpg", 
     283            "width": 100, 
     284            "height": 200 
     285          } 
     286        ], 
     287        "nickname": "Rachel", 
     288        "postCount": 1, 
     289        "pubTime": 1406166953000, 
     290        "topicId": 5098712, 
     291        "topicTitle": "又来啦早晨" 
     292      } 
     293    ] 
     294  }, 
     295  "topics": [ 
     296    { 
     297      "authorId": 22393072, 
     298      "authorName": "hkitty", 
     299      "authorPhoto": "http://i1.3conline.com/images/upload/upc/face/22/39/30/72/22393072_50x50", 
     300      "contribution": 0, 
     301      "forumId": 19017, 
     302      "forumName": "内部测试", 
     303      "images": [ 
     304        { 
     305          "url": "http://imgrt.pconline.com.cn/images/upload/upc/tx/bbs6/1407/23/c0/spcgroup/bbs/center/36611290_1406089561207.jpg", 
     306          "width": 100, 
     307          "height": 200 
     308        } 
     309      ], 
     310      "nickname": "Rachel", 
     311      "postCount": 1, 
     312      "pubTime": 1406166953000, 
     313      "topicId": 5098712, 
     314      "topicTitle": "普通帖子", 
     315      "answerCount":12提问帖中回答的人数,非提问帖可以不用这个 
     316    } 
     317  ], 
     318  "pageNo": 1, 
     319  "pageSize": 20, 
     320  "total": 10 
     321} 
    107322}}} 
    108323 
     
    127342        mode:阅读模式:无参数 白天;night 晚间 
    128343    返回结果: 
     344删帖点击协议: pcaction://delete-post/id 
     345加精点击协议: pcaction://add-to-digest/id 
     346 
     347 
    129348 
    130349}}} 
     
    140359    说明: 
    141360    请求参数: 
    142  
     361topicid:帖子id 
    143362    返回结果: 
    144363 
     
    155374    说明: 
    156375    请求参数: 
     376topicid:帖子id 
    157377 
    158378    返回结果: 
     
    188408keyword:输入的关键词 
    189409    返回结果: 
    190  
     410{ 
     411  "branch": [ 
     412    { 
     413      "id": 123, 
     414      "name": "品牌or厂商名称" 
     415    } 
     416  ], 
     417  "serial": [ 
     418    { 
     419      "id": 12, 
     420      "name": "车系名" 
     421    } 
     422  ] 
     423} 
    191424}}} 
    192425 
     
    200433    缓存时间: 
    201434    说明: 
     4351、出相关车系的车系页中的“文章”版块的内容,优先出必看文章,再按时间出最新相关文章,最多外显3篇。 
     4362、如果车系页中没有相关文章,则通过快搜按关键字搜索相关的文章进行填充 
    202437    请求参数: 
    203438keyword:搜索的关键词 
    204439types: 输出的内容:zh为综合,wz为文章,tz为帖子,可同时传入 
    205440    返回结果: 
    206  
     441{ 
     442  "keyword": "如果是模糊搜索出来的,这个keyword会和请求参数的keyword不一样", 
     443  "serial": { 
     444    "id": 573618, 
     445    "serialId": 3404, 
     446    "serialName": "福克斯", 
     447    "price": "9.98-16.99万", 
     448    "image": "http:\/\/img.pconline.com.cn\/images\/upload\/upc\/tx\/auto5\/1307\/24\/c16\/23702964_1374654889218_270x202.jpg", 
     449    "cars": [ 
     450      { 
     451        "id": "33318", 
     452        "minPrice": "23.10", 
     453        "photo": "http://img.pconline.com.cn/images/upload/upc/tx/auto5/1210/01/c0/14229062_14229062_1349107127921_120x90.jpg", 
     454        "price": "27.28", 
     455        "status": "在售", 
     456        "title": "2015款 1.8 30TFSI 手动舒适型", 
     457        "vendorPrice": "23.10~27.28" 
     458      } 
     459    ] 
     460  }, 
     461  "manufacturers": [ 
     462    { 
     463      "id": 7889, 
     464      "name": "起亚K3", 
     465      "priceRange": "10.28~14.98万", 
     466      "kind": "最新上市", 
     467      "photo": "http://img0.pcauto.com.cn/pcauto/1407/10/4691799_k3.jpg" 
     468    } 
     469  ], 
     470  "topics": [ 
     471    { 
     472      "authorId": 22393072, 
     473      "authorName": "hkitty", 
     474      "authorPhoto": "http://i1.3conline.com/images/upload/upc/face/22/39/30/72/22393072_50x50", 
     475      "contribution": 0, 
     476      "forumId": 19017, 
     477      "forumName": "内部测试", 
     478      "images": [ 
     479        { 
     480          "url": "http://imgrt.pconline.com.cn/images/upload/upc/tx/bbs6/1407/23/c0/spcgroup/bbs/center/36611290_1406089561207.jpg", 
     481          "width": 100, 
     482          "height": 200 
     483        } 
     484      ], 
     485      "nickname": "Rachel", 
     486      "postCount": 1, 
     487      "pubTime": 1406166953000, 
     488      "topicId": 5098712, 
     489      "topicTitle": "普通帖子", 
     490      "answerCount": 12提问帖中回答的人数,非提问帖可以不用这个 
     491    } 
     492  ], 
     493  "articles": [ 
     494    { 
     495      "channelId": 2, 
     496      "channelName": "新车", 
     497      "count": 10, 
     498      "id": "5023924", 
     499      "image": "http://img0.pcauto.com.cn/pcauto/1408/26/g_5023924_1409017503587_240x160.jpg", 
     500      "pubDate": "2014-08-26", 
     501      "title": "野马F16将成都车展上市 并发布全新LOGO", 
     502      "url": "http://www.pcauto.com.cn/nation/502/5023924.html" 
     503    } 
     504  ], 
     505  "hotPKCars": [ 
     506    { 
     507      "id": "33318", 
     508      "minPrice": "23.10", 
     509      "photo": "http://img.pconline.com.cn/images/upload/upc/tx/auto5/1210/01/c0/14229062_14229062_1349107127921_120x90.jpg", 
     510      "price": "27.28", 
     511      "status": "在售", 
     512      "title": "2015款 1.8 30TFSI 手动舒适型", 
     513      "vendorPrice": "23.10~27.28" 
     514    } 
     515  ] 
     516} 
    207517}}} 
    208518 
     
    215525    返缓存方式: 
    216526    缓存时间: 
    217     说明:增加在售分类 
     527    说明:增加status,用于区分在售分类 
    218528    请求参数: 
    219529 
     
    234544          "photo": "http://www1.pcauto.com.cn/piclib/20000/nEO_IMG_3524.jpg", 
    235545          "priceRange": "27.28~57.81 万", 
    236           "sellType":1 
     546          "sellType":1, 
     547          "status": "在售" 
    237548        } 
    238549      ] 
     
    250561    返缓存方式: 
    251562    缓存时间: 
    252     说明:新增图片、点评、团购、经销商、竞争车型对比等入口 
    253     请求参数: 
    254  
    255     返回结果: 
     563    说明:新增图片、点评、团购、经销商、购车计算等入口 
     564    请求参数: 
     565 
     566    返回结果: 
     567点击图片协议:  pcaction://goto-pic/id?index=第几张图 
     568点击点评协议:  pcaction://goto-comment/ 
     569点击团购协议:  pcautobrowser://goto-group-buying/ 
     570点击经销商协议:  pcaction://goto-dealer 
     571点击询底价:  pcautobrowser://serial-ask-price/?serialId=33318&serialName=2015%E6%AC%BE+1.8+30TFSI+%E6%89%8B%E5%8A%A8%E8%88%92%E9%80%82%E5%9E%8B&dealerId=&url=http%3A%2F%2Fimg.pconline.com.cn%2Fimages%2Fupload%2Fupc%2Ftx%2Fauto5%2F1210%2F01%2Fc0%2F14229062_14229062_1349107127921_120x90.jpg 
     572点击购车计算:  pcautobrowser://calculate-cost/modelid 
    256573 
    257574}}} 
     
    269586 
    270587    返回结果: 
    271  
     588滚动到对应section时,触发协议:  pcaction://show-section/@{类型名} 
    272589}}} 
    273590