Authored by runner

Merge branch 'feature/filter-age' into release/4.8

  1 +## 一、最新上架--首页底部
  2 +
  3 +###### 最新上架 :
  4 +
  5 +* 请求URL:
  6 +
  7 +>http://192.168.102.216:8080/yohosearch/new-shelve.json?order=shelve_time:desc&shelve_time=1462096371,1467280371&gender=2,3&status=1&sales=Y&attribute_not=2&stocknumber=3&misort=11&viewNum=4
  8 +
  9 +
  10 +### 字段说明
  11 +-------------------------------------------------------
  12 +|参数名 |值 |描述 |
  13 +|------ |---- |--- |
  14 +|order |shelve_time:desc| 排序类型格式:排序字段名:排序方式,如按热门正序排“hot_number:asc”多重排序以逗号分隔,如“order= hot_number:asc, shelve_time:desc” |
  15 +|shelve_time |1462096371,1467280371 | 时间区间起始时间以逗号分隔,如查询20150101-20150106 “shelve_time =1420041600,1420473600” |
  16 +|gender |2,3 | 性别1-男2-女3-通用查多个性别以逗号分隔 |
  17 +|status |1 | 是否上架 1 或 2 |
  18 +|sales |Y | 是否销售 “N”或”Y” |
  19 +|attribute_not |2 | 过滤商品属性,attribute_not=2过滤掉赠品 |
  20 +|stocknumber |3 | 库存量如“stocknumber=2”,则过滤出库存量>=2的商品 |
  21 +|misort |11 | 产品中分类ID查多个中类以逗号分隔|
  22 +|viewNum |4 | 每页记录数默认为10 |
  23 +
  24 +
  25 +
  26 +### 参数返回
  27 + {
  28 + "code": 200,
  29 + "data": [
  30 + {
  31 + "brand_domain": "runningman",
  32 + "brand_id": 751,
  33 + "brand_name": "奔跑吧兄弟",
  34 + "cn_alphabet": "RUNNINGMANRMA502TE01",
  35 + "default_images": "/2015/06/15/02/01c24052905ced0d590ac76fc7554cf42b.jpg",
  36 + "edit_time": 1455616377,
  37 + "gender": "3",
  38 + "goods_list": [
  39 + {
  40 + "color_code": "47ba17",
  41 + "color_id": "6",
  42 + "color_name": "绿色",
  43 + "color_value": "",
  44 + "cover_1": "",
  45 + "cover_2": "",
  46 + "goods_id": "273221",
  47 + "images_url": "/2015/06/15/05/02bd6524c28a305148f3f9ff8fad585162.jpg",
  48 + "is_default": "N",
  49 + "product_skc": "237939",
  50 + "status": "1"
  51 + },
  52 + {
  53 + "color_code": "ffeb00",
  54 + "color_id": "9",
  55 + "color_name": "黄色",
  56 + "color_value": "",
  57 + "cover_1": "",
  58 + "cover_2": "",
  59 + "goods_id": "273233",
  60 + "images_url": "/2015/06/15/05/0161e49e8f5298385a73911ddfe6b6bf35.jpg",
  61 + "is_default": "N",
  62 + "product_skc": "237945",
  63 + "status": "1"
  64 + }
  65 + ],
  66 + "is_advance": "N",
  67 + "is_discount": "N",
  68 + "is_global": "N",
  69 + "is_limited": "N",
  70 + "is_new": "N",
  71 + "is_outlets": 2,
  72 + "is_promotion": 0,
  73 + "is_soon_sold_out": "N",
  74 + "is_special": "N",
  75 + "market_price": 139,
  76 + "max_sort_id": 1,
  77 + "middle_sort_id": 11,
  78 + "product_id": 204497,
  79 + "product_name": "奔跑吧兄弟 “撕名牌”魔术贴徽章T恤",
  80 + "product_skn": 51117072,
  81 + "sales_num": 1649,
  82 + "sales_phrase": null,
  83 + "sales_price": 139,
  84 + "shelve_time": 1455616377,
  85 + "small_sort_id": 114,
  86 + "status": 1,
  87 + "stock_number": 312,
  88 + "storage_num": 312,
  89 + "vip1_price": 0,
  90 + "vip2_price": 0,
  91 + "vip3_price": 0,
  92 + "vip_discount_type": 3,
  93 + "vip_price": 0,
  94 + "yohood_id": null
  95 + },
  96 + {
  97 + "brand_domain": "5min",
  98 + "brand_id": 910,
  99 + "brand_name": "5min",
  100 + "cn_alphabet": "5MINQiXingBuKaoTXuMJ1511",
  101 + "default_images": "/2015/10/12/02/0159d605c789a822824370fc93c40ae635.jpg",
  102 + "edit_time": 1455615066,
  103 + "gender": "3",
  104 + "goods_list": [
  105 + {
  106 + "color_code": "333333",
  107 + "color_id": "2",
  108 + "color_name": "黑色",
  109 + "color_value": "",
  110 + "cover_1": "",
  111 + "cover_2": "",
  112 + "goods_id": "357315",
  113 + "images_url": "/2015/10/12/02/0159d605c789a822824370fc93c40ae635.jpg",
  114 + "is_default": "N",
  115 + "product_skc": "280700",
  116 + "status": "1"
  117 + }
  118 + ],
  119 + "is_advance": "N",
  120 + "is_discount": "N",
  121 + "is_global": "N",
  122 + "is_limited": "N",
  123 + "is_new": "N",
  124 + "is_outlets": 2,
  125 + "is_promotion": 0,
  126 + "is_soon_sold_out": "N",
  127 + "is_special": "N",
  128 + "market_price": 488,
  129 + "max_sort_id": 1,
  130 + "middle_sort_id": 11,
  131 + "product_id": 276511,
  132 + "product_name": "5min 七星不靠胶印圆领长袖T恤",
  133 + "product_skn": 51153670,
  134 + "sales_num": 0,
  135 + "sales_phrase": null,
  136 + "sales_price": 488,
  137 + "shelve_time": 1455615066,
  138 + "small_sort_id": 114,
  139 + "status": 1,
  140 + "stock_number": 19,
  141 + "storage_num": 19,
  142 + "vip1_price": 0,
  143 + "vip2_price": 0,
  144 + "vip3_price": 0,
  145 + "vip_discount_type": 3,
  146 + "vip_price": 0,
  147 + "yohood_id": null
  148 + },
  149 + {
  150 + "brand_domain": "5cm",
  151 + "brand_id": 4,
  152 + "brand_name": "5CM",
  153 + "cn_alphabet": "5CMTXu5CXLTG2110W55",
  154 + "default_images": "/2015/11/10/08/0169de4b9f3c79bcd666d6528d27c3797a.jpg",
  155 + "edit_time": 1454314545,
  156 + "gender": "2",
  157 + "goods_list": [
  158 + {
  159 + "color_code": "0000fe",
  160 + "color_id": "7",
  161 + "color_name": "蓝色",
  162 + "color_value": "",
  163 + "cover_1": "",
  164 + "cover_2": "",
  165 + "goods_id": "375825",
  166 + "images_url": "/2015/11/10/08/0169de4b9f3c79bcd666d6528d27c3797a.jpg",
  167 + "is_default": "N",
  168 + "product_skc": "292370",
  169 + "status": "1"
  170 + },
  171 + {
  172 + "color_code": "FFFFFF",
  173 + "color_id": "1",
  174 + "color_name": "白色",
  175 + "color_value": "",
  176 + "cover_1": "",
  177 + "cover_2": "",
  178 + "goods_id": "375827",
  179 + "images_url": "/2015/11/11/09/01c0715d2900d85d0f761a611cb3a58a3d.jpg",
  180 + "is_default": "Y",
  181 + "product_skc": "292371",
  182 + "status": "1"
  183 + }
  184 + ],
  185 + "is_advance": "N",
  186 + "is_discount": "Y",
  187 + "is_global": "N",
  188 + "is_limited": "N",
  189 + "is_new": "N",
  190 + "is_outlets": 2,
  191 + "is_promotion": 0,
  192 + "is_soon_sold_out": "N",
  193 + "is_special": "N",
  194 + "market_price": 479,
  195 + "max_sort_id": 1,
  196 + "middle_sort_id": 11,
  197 + "product_id": 293229,
  198 + "product_name": "5CM 堆堆领印花T恤",
  199 + "product_skn": 51164399,
  200 + "sales_num": 0,
  201 + "sales_phrase": "",
  202 + "sales_price": 239,
  203 + "shelve_time": 1454314545,
  204 + "small_sort_id": 114,
  205 + "status": 1,
  206 + "stock_number": 14,
  207 + "storage_num": 14,
  208 + "vip1_price": 0,
  209 + "vip2_price": 0,
  210 + "vip3_price": 0,
  211 + "vip_discount_type": 3,
  212 + "vip_price": 0,
  213 + "yohood_id": null
  214 + }
  215 + ],
  216 + "message": "new product List."
  217 + }
  218 +>
  219 +PS: 男生、女生、潮童、创意生活底部都包含《最新上架》,只不过是传的参数不同。
  220 +
  221 +-------------------------------------------------------
  222 +
  223 +## 二、搜索数据列表(http://list.yohobuy.com)
  224 +
  225 +###### 商品列表
  226 +
  227 +* 请求URL:
  228 +
  229 +>http://192.168.102.216:8080/yohosearch/search.json?status=1&sales=Y&outlets=2&stocknumber=1&attribute_not=2&order=sales_num:desc&page=1&viewNum=59&gender=&rowNum=5&needFilter=1&p_d=0.01,0.399
  230 +
  231 +
  232 +### 字段说明
  233 +-------------------------------------------------------
  234 +|参数名 |值 |描述 |
  235 +|------ |---- |--- |
  236 +|status |1| 是否上架 1 或 2 |
  237 +|sales |Y | 是否销售 “N”或”Y” |
  238 +|outlets |2 | 1是奥莱,2是非奥莱|
  239 +|stocknumber |1 | 库存量如“stocknumber=2”,则过滤出库存量>=2的商品 |
  240 +|attribute_not |2 | 过滤商品属性,attribute_not=2过滤掉赠品 |
  241 +|order |sales_num:desc | 序类型格式:排序字段名:排序方式,如按热门正序排“hot_number:asc”多重排序以逗号分隔,如“order= hot_number:asc, shelve_time:desc” |
  242 +|page |1 | 当前页 |
  243 +|viewNum |59 | 每页记录数默认为10|
  244 +|gender | | 性别1-男2-女3-通用查多个性别以逗号分隔 |
  245 +|needFilter |1 | 需要返回过滤集合needFilter=1 |
  246 +|p_d |0.01,0.399 | 折扣区间 ,1~3折 |
  247 +
  248 +
  249 +### 参数返回
  250 + {
  251 + "code": 200,
  252 + "data": {
  253 + "filter": {
  254 + "ageLevel": [
  255 + {
  256 + "id": "1",
  257 + "name": "成人",
  258 + "product_count": 3652
  259 + },
  260 + {
  261 + "id": "5",
  262 + "name": "幼童",
  263 + "product_count": 40
  264 + }
  265 + ],
  266 + "brand": [
  267 + {
  268 + "brand_alif": "P",
  269 + "brand_domain": "pass",
  270 + "brand_ico": "/2015/05/14/12/0255c1a5355cd41a884ede2217e0e08d55.jpg",
  271 + "brand_keyword": "",
  272 + "brand_name": "PASS",
  273 + "brand_name_cn": "",
  274 + "brand_name_en": "PASS",
  275 + "hot_keyword": "女装",
  276 + "id": 715,
  277 + "is_hot": "Y"
  278 + },
  279 + {
  280 + "brand_alif": null,
  281 + "brand_domain": null,
  282 + "brand_ico": "/2016/01/18/03/01f7e2adcbe8701d1b3f367157820ea59f.jpg",
  283 + "brand_keyword": null,
  284 + "brand_name": "心飞扬",
  285 + "brand_name_cn": "",
  286 + "brand_name_en": "xinfeiyang",
  287 + "hot_keyword": null,
  288 + "id": 1422,
  289 + "is_hot": "N"
  290 + }
  291 + ],
  292 + "color": [
  293 + {
  294 + "color_code": "333333",
  295 + "color_id": 2,
  296 + "color_name": "黑色",
  297 + "color_value": ""
  298 + },
  299 + {
  300 + "color_code": "",
  301 + "color_id": 13,
  302 + "color_name": "银色",
  303 + "color_value": "http://static.yohobuy.com/images/color_p2.png"
  304 + }
  305 + ],
  306 + "gender": {
  307 + "2,3": "GIRLS",
  308 + "1,3": "BOYS"
  309 + },
  310 + "limited": "Y",
  311 + "new": "Y",
  312 + "parameter_787": {
  313 + "standard_id": "787",
  314 + "standard_name": "领型",
  315 + "sub": [
  316 + {
  317 + "standard_id": "4438",
  318 + "standard_name": "圆领"
  319 + },
  320 + {
  321 + "standard_id": "4439",
  322 + "standard_name": "v领"
  323 + },
  324 + {
  325 + "standard_id": "5361",
  326 + "standard_name": "异形领"
  327 + }
  328 + ]
  329 + },
  330 + "parameter_788": {
  331 + "standard_id": "788",
  332 + "standard_name": "衣长",
  333 + "sub": [
  334 + {
  335 + "standard_id": "4445",
  336 + "standard_name": "适中"
  337 + },
  338 + {
  339 + "standard_id": "4444",
  340 + "standard_name": "短款"
  341 + },
  342 + {
  343 + "standard_id": "4446",
  344 + "standard_name": "长款"
  345 + }
  346 + ]
  347 + },
  348 + "parameter_825": {
  349 + "standard_id": "825",
  350 + "standard_name": "袖长",
  351 + "sub": [
  352 + {
  353 + "standard_id": "4626",
  354 + "standard_name": "长袖"
  355 + },
  356 + {
  357 + "standard_id": "4624",
  358 + "standard_name": "短袖"
  359 + },
  360 + {
  361 + "standard_id": "4625",
  362 + "standard_name": "7分袖"
  363 + },
  364 + {
  365 + "standard_id": "5439",
  366 + "standard_name": "5分袖"
  367 + }
  368 + ]
  369 + },
  370 + "parameter_826": {
  371 + "standard_id": "826",
  372 + "standard_name": "版型",
  373 + "sub": [
  374 + {
  375 + "standard_id": "4628",
  376 + "standard_name": "正常"
  377 + },
  378 + {
  379 + "standard_id": "4629",
  380 + "standard_name": "宽松"
  381 + },
  382 + {
  383 + "standard_id": "4627",
  384 + "standard_name": "修身"
  385 + }
  386 + ]
  387 + },
  388 + "parameter_827": {
  389 + "standard_id": "827",
  390 + "standard_name": "厚度",
  391 + "sub": [
  392 + {
  393 + "standard_id": "4631",
  394 + "standard_name": "中"
  395 + },
  396 + {
  397 + "standard_id": "4632",
  398 + "standard_name": "厚"
  399 + },
  400 + {
  401 + "standard_id": "4630",
  402 + "standard_name": "薄"
  403 + },
  404 + {
  405 + "standard_id": "4633",
  406 + "standard_name": "加厚"
  407 + }
  408 + ]
  409 + },
  410 + "price": {
  411 + "0,159": "¥0-159",
  412 + "160,279": "¥160-279",
  413 + "280,569": "¥280-569",
  414 + "570,99999": "¥569以上"
  415 + },
  416 + "size": [
  417 + {
  418 + "size_id": 203,
  419 + "size_name": "M"
  420 + },
  421 + {
  422 + "size_id": 201,
  423 + "size_name": "L"
  424 + },
  425 + {
  426 + "size_id": 207,
  427 + "size_name": "S"
  428 + },
  429 + {
  430 + "size_id": 211,
  431 + "size_name": "XL"
  432 + },
  433 + {
  434 + "size_id": 177,
  435 + "size_name": "85"
  436 + },
  437 + {
  438 + "size_id": 188,
  439 + "size_name": "9月21日"
  440 + }
  441 + ],
  442 + "specialoffer": "Y",
  443 + "style": [
  444 + {
  445 + "style_id": 991,
  446 + "style_name": "街头"
  447 + },
  448 + {
  449 + "style_id": 1000,
  450 + "style_name": "简约"
  451 + },
  452 + {
  453 + "style_id": 1101,
  454 + "style_name": "简洁"
  455 + },
  456 + {
  457 + "style_id": 994,
  458 + "style_name": "机车"
  459 + },
  460 + {
  461 + "style_id": 1096,
  462 + "style_name": "韩版"
  463 + }
  464 + ]
  465 + },
  466 + "page": 1,
  467 + "page_total": 4865,
  468 + "product_list": [
  469 + {
  470 + "brand_domain": "mwowl",
  471 + "brand_id": 824,
  472 + "brand_name": "M.WOWL",
  473 + "cn_alphabet": "MWOWLLianYiQunWOWA503DS37BKX",
  474 + "default_images": "/2015/08/18/08/029301961e6b44194b3ae964d7578bb041.jpg",
  475 + "edit_time": 1441535857,
  476 + "gender": "2",
  477 + "goods_list": [
  478 + {
  479 + "color_code": "333333",
  480 + "color_id": "2",
  481 + "color_name": "黑色",
  482 + "color_value": "",
  483 + "cover_1": "",
  484 + "cover_2": "/2015/08/20/11/02de6b5d532c01a6f4e7c966ba1acb57df.jpg",
  485 + "goods_id": "301031",
  486 + "images_url": "/2015/08/18/08/029301961e6b44194b3ae964d7578bb041.jpg",
  487 + "is_default": "Y",
  488 + "product_skc": "251837",
  489 + "status": "1"
  490 + }
  491 + ],
  492 + "is_advance": "N",
  493 + "is_discount": "Y",
  494 + "is_global": "N",
  495 + "is_limited": "N",
  496 + "is_new": "N",
  497 + "is_outlets": 2,
  498 + "is_promotion": 101,
  499 + "is_soon_sold_out": "N",
  500 + "is_special": "N",
  501 + "market_price": 299,
  502 + "max_sort_id": 4,
  503 + "middle_sort_id": 31,
  504 + "product_id": 228281,
  505 + "product_name": "M.WOWL字母印花欧根纱拼接连衣裙",
  506 + "product_skn": 51128961,
  507 + "sales_num": 3,
  508 + "sales_phrase": "",
  509 + "sales_price": 99,
  510 + "shelve_time": 1441535857,
  511 + "small_sort_id": 134,
  512 + "status": 1,
  513 + "stock_number": 81,
  514 + "storage_num": 81,
  515 + "vip1_price": 0,
  516 + "vip2_price": 0,
  517 + "vip3_price": 0,
  518 + "vip_discount_type": 3,
  519 + "vip_price": 0,
  520 + "yohood_id": null
  521 + },
  522 + {
  523 + "brand_domain": "lilbetter",
  524 + "brand_id": 385,
  525 + "brand_name": "Lilbetter",
  526 + "cn_alphabet": "LILBETTERShuiXiPoMoMoPoNiuZai91439926",
  527 + "default_images": "/2015/12/31/06/027a47aeabf37b6f6437d7e8eb77a59ec7.jpg",
  528 + "edit_time": 1451893132,
  529 + "gender": "1",
  530 + "goods_list": [
  531 + {
  532 + "color_code": "0000fe",
  533 + "color_id": "7",
  534 + "color_name": "蓝色",
  535 + "color_value": "",
  536 + "cover_1": "/2016/01/04/06/02790e3ea8fb8acf3de7e24114dad345e2.jpg",
  537 + "cover_2": "",
  538 + "goods_id": "432919",
  539 + "images_url": "/2016/01/04/06/02790e3ea8fb8acf3de7e24114dad345e2.jpg",
  540 + "is_default": "N",
  541 + "product_skc": "324421",
  542 + "status": "1"
  543 + }
  544 + ],
  545 + "is_advance": "N",
  546 + "is_discount": "Y",
  547 + "is_global": "N",
  548 + "is_limited": "N",
  549 + "is_new": "N",
  550 + "is_outlets": 2,
  551 + "is_promotion": 101,
  552 + "is_soon_sold_out": "N",
  553 + "is_special": "N",
  554 + "market_price": 688,
  555 + "max_sort_id": 3,
  556 + "middle_sort_id": 27,
  557 + "product_id": 337015,
  558 + "product_name": "lilbetter 水洗泼墨磨破牛仔裤",
  559 + "product_skn": 51188049,
  560 + "sales_num": 0,
  561 + "sales_phrase": "",
  562 + "sales_price": 168,
  563 + "shelve_time": 1451893132,
  564 + "small_sort_id": 130,
  565 + "status": 1,
  566 + "stock_number": 340,
  567 + "storage_num": 340,
  568 + "vip1_price": 0,
  569 + "vip2_price": 0,
  570 + "vip3_price": 0,
  571 + "vip_discount_type": 1,
  572 + "vip_price": 0,
  573 + "yohood_id": null
  574 + }
  575 + ],
  576 + "total": 9729
  577 + },
  578 + "message": "Search List."
  579 + }
  580 +
  581 +-------------------------------------------------------
  582 +
  583 +
  584 +## 三、品类列表
  585 +
  586 +###### 全部品类(http://list.yohobuy.com/)
  587 +
  588 +* 请求URL:
  589 +
  590 +>http://192.168.102.216:8080/yohosearch/sortgroup.json?sales=Y&status=1&stocknumber=1
  591 +
  592 +
  593 +### 字段说明
  594 +-------------------------------------------------------
  595 +|参数名 |值 |描述 |
  596 +|------ |---- |--- |
  597 +|status |1| 是否上架 1 或 2 |
  598 +|sales |Y | 是否销售 “N”或”Y” |
  599 +|stocknumber |2 | 库存量如“stocknumber=2”,则过滤出库存量>=2的商品 |
  600 +
  601 +
  602 +### 参数返回
  603 + {
  604 + "code": 200,
  605 + "data": {
  606 + "sort": [
  607 + {
  608 + "sort_id": "1",
  609 + "sort_name": "上衣",
  610 + "order_by": "100",
  611 + "count": 22712,
  612 + "sub": [
  613 + {
  614 + "sort_id": "11",
  615 + "sort_name": "T恤",
  616 + "order_by": "50",
  617 + "count": 5316
  618 + },
  619 + {
  620 + "sort_id": "412",
  621 + "sort_name": "套装",
  622 + "order_by": "0",
  623 + "count": 26
  624 + }
  625 + ]
  626 + },
  627 + {
  628 + "sort_id": "3",
  629 + "sort_name": "裤装",
  630 + "order_by": "90",
  631 + "count": 5950,
  632 + "sub": [
  633 + {
  634 + "sort_id": "26",
  635 + "sort_name": "休闲裤",
  636 + "order_by": "30",
  637 + "count": 3415
  638 + },
  639 + {
  640 + "sort_id": "347",
  641 + "sort_name": "西裤",
  642 + "order_by": "0",
  643 + "count": 28
  644 + }
  645 + ]
  646 + },
  647 + {
  648 + "sort_id": "6",
  649 + "sort_name": "鞋靴",
  650 + "order_by": "70",
  651 + "count": 3251,
  652 + "sub": [
  653 + {
  654 + "sort_id": "44",
  655 + "sort_name": "休闲/运动鞋",
  656 + "order_by": "22",
  657 + "count": 2002
  658 + },
  659 + {
  660 + "sort_id": "298",
  661 + "sort_name": "厚底鞋",
  662 + "order_by": "0",
  663 + "count": 2
  664 + }
  665 + ]
  666 + },
  667 + {
  668 + "sort_id": "7",
  669 + "sort_name": "包类/装备",
  670 + "order_by": "60",
  671 + "count": 5907,
  672 + "sub": [
  673 + {
  674 + "sort_id": "49",
  675 + "sort_name": "双肩包",
  676 + "order_by": "20",
  677 + "count": 2001
  678 + },
  679 + {
  680 + "sort_id": "350",
  681 + "sort_name": "mini包",
  682 + "order_by": "0",
  683 + "count": 7
  684 + }
  685 + ]
  686 + },
  687 + {
  688 + "sort_id": "8",
  689 + "sort_name": "服配",
  690 + "order_by": "50",
  691 + "count": 7121,
  692 + "sub": [
  693 + {
  694 + "sort_id": "61",
  695 + "sort_name": "太阳镜/眼镜",
  696 + "order_by": "20",
  697 + "count": 1117
  698 + },
  699 + {
  700 + "sort_id": "294",
  701 + "sort_name": "口罩",
  702 + "order_by": "0",
  703 + "count": 2
  704 + }
  705 + ]
  706 + },
  707 + {
  708 + "sort_id": "308",
  709 + "sort_name": "内衣/家居服",
  710 + "order_by": "40",
  711 + "count": 1086,
  712 + "sub": [
  713 + {
  714 + "sort_id": "309",
  715 + "sort_name": "内裤",
  716 + "order_by": "10",
  717 + "count": 683
  718 + },
  719 + {
  720 + "sort_id": "363",
  721 + "sort_name": "文胸",
  722 + "order_by": "8",
  723 + "count": 82
  724 + },
  725 + {
  726 + "sort_id": "356",
  727 + "sort_name": "家居服",
  728 + "order_by": "6",
  729 + "count": 309
  730 + },
  731 + {
  732 + "sort_id": "358",
  733 + "sort_name": "家居鞋",
  734 + "order_by": "2",
  735 + "count": 8
  736 + }
  737 + ]
  738 + },
  739 + {
  740 + "sort_id": "241",
  741 + "sort_name": "pinleimingcheng",
  742 + "order_by": "22",
  743 + "count": 3,
  744 + "sub": []
  745 + },
  746 + {
  747 + "sort_id": "10",
  748 + "sort_name": "创意生活",
  749 + "order_by": "20",
  750 + "count": 4432,
  751 + "sub": [
  752 + {
  753 + "sort_id": "103",
  754 + "sort_name": "数码3C",
  755 + "order_by": "28",
  756 + "count": 1831
  757 + },
  758 + {
  759 + "sort_id": "259",
  760 + "sort_name": "美妆",
  761 + "order_by": "20",
  762 + "count": 433
  763 + }
  764 + ]
  765 + },
  766 + {
  767 + "sort_id": "360",
  768 + "sort_name": "泳衣",
  769 + "order_by": "10",
  770 + "count": 2,
  771 + "sub": [
  772 + {
  773 + "sort_id": "361",
  774 + "sort_name": "泳衣",
  775 + "order_by": "0",
  776 + "count": 2
  777 + }
  778 + ]
  779 + },
  780 + {
  781 + "sort_id": "365",
  782 + "sort_name": "潮童",
  783 + "order_by": "0",
  784 + "count": 1425,
  785 + "sub": [
  786 + {
  787 + "sort_id": "396",
  788 + "sort_name": "卫衣",
  789 + "order_by": "0",
  790 + "count": 175
  791 + },
  792 + {
  793 + "sort_id": "427",
  794 + "sort_name": "手帕",
  795 + "order_by": "0",
  796 + "count": 1
  797 + }
  798 + ]
  799 + }
  800 + ]
  801 + },
  802 + "message": "sort List."
  803 + }
  804 +-------------------------------------------------------
  805 +
  806 +## 四、最近上架
  807 +
  808 +###### 一周新品上架(http://list.yohobuy.com/new?gender=1,3&order=s_t_desc)
  809 +
  810 +* 请求URL:
  811 +
  812 +>http://192.168.102.216:8080/yohosearch/recent.json?
  813 +
  814 +### 参数返回
  815 + {
  816 + "code": 200,
  817 + "data": {
  818 + "recent": {
  819 + "2016-06-29": 3,
  820 + "2016-06-28": 3,
  821 + "2016-06-27": 1,
  822 + "2016-06-18": 6,
  823 + "2016-06-06": 1,
  824 + "2016-06-02": 3,
  825 + "2016-05-27": 8
  826 + }
  827 + },
  828 + "message": "recentShelveDay List."
  829 + }
  830 +-------------------------------------------------------
  831 +
  832 +## 五、折扣区间
  833 +
  834 +###### 全部折扣(http://list.yohobuy.com/sale?msort=365)
  835 +
  836 +* 请求URL:
  837 +
  838 +>http://192.168.102.216:8080/yohosearch/discount.json?
  839 +
  840 +### 参数返回
  841 + {
  842 + "code": 200,
  843 + "data": {
  844 + "discount": {
  845 + "0.01,0.399": {
  846 + "count": 33225,
  847 + "name": "1~3"
  848 + },
  849 + "0.4,0.699": {
  850 + "count": 63367,
  851 + "name": "4~6"
  852 + },
  853 + "0.7,0.999": {
  854 + "count": 28892,
  855 + "name": "7~9"
  856 + }
  857 + }
  858 + },
  859 + "message": "discount List."
  860 + }
  861 +
  862 +-------------------------------------------------------
  863 +
  864 +
  865 +## 六、搜索词提示 :
  866 +
  867 +###### 搜索输入框(http://search.yohobuy.com/?query=nike)
  868 +
  869 +* 请求URL:
  870 +
  871 +>http://192.168.102.216:8080/yohosearch/suggest.json?query=nike
  872 +
  873 +### 字段说明
  874 +-------------------------------------------------------
  875 +|参数名 |值 |描述 |
  876 +|------ |---- |--- |
  877 +|query |nike | 关键字 |
  878 +
  879 +
  880 +### 参数返回
  881 + {
  882 + "code": 200,
  883 + "message": "suggest List.",
  884 + "suggest": {
  885 + "items": [
  886 + {
  887 + "frequency": 1939,
  888 + "item": "nike"
  889 + },
  890 + {
  891 + "frequency": 1928,
  892 + "item": "nike air"
  893 + },
  894 + {
  895 + "frequency": 218,
  896 + "item": "nike air max"
  897 + }
  898 + ]
  899 + }
  900 + }
  901 +
  902 +-------------------------------------------------------
  903 +
  904 +## 七、获取品牌店铺 :
  905 +
  906 +###### 品牌页(5min.yohobuy.com)
  907 +
  908 +* 请求URL:
  909 +
  910 +>http://192.168.102.216:8080/yohosearch/shops.json?keyword=nike
  911 +
  912 +### 字段说明
  913 +-------------------------------------------------------
  914 +|参数名 |值 |描述 |
  915 +|------ |---- |--- |
  916 +|keyword |nike | 关键字 |
  917 +
  918 +
  919 +### 参数返回
  920 + {
  921 + "code": 200,
  922 + "data": {
  923 + "brand_domain": "nike",
  924 + "brand_ico": "/2015/04/10/16/02963cdc1aeab10959bfeccc400aaa8de8.jpg",
  925 + "brand_name": "Nike",
  926 + "id": 248
  927 + },
  928 + "message": "shops info"
  929 + }
  930 +-------------------------------------------------------
  931 +
  932 +
  933 +## 八、获取品牌列表 :
  934 +###### 你可能喜欢的品牌(http://www.yohobuy.com/home)
  935 +* 请求URL:
  936 +
  937 +>http://192.168.102.216:8080/yohosearch/brand/list.json
  938 +
  939 +### 参数返回
  940 + {
  941 + "code": 200,
  942 + "data": [
  943 + {
  944 + "brand_alif": "0",
  945 + "brand_domain": "004",
  946 + "brand_ico": "/2011/06/26/19/016f21d6a39d5071e1864943253dcdefde.jpg",
  947 + "brand_keyword": "004,服装,包类",
  948 + "brand_name": "004",
  949 + "brand_name_cn": "零零肆12121",
  950 + "brand_name_en": "jipeng",
  951 + "hot_keyword": "004",
  952 + "id": 1,
  953 + "is_hot": ""
  954 + },
  955 + {
  956 + "brand_alif": "D",
  957 + "brand_domain": "DOUCAN",
  958 + "brand_ico": "/2016/06/30/17/011ed7ff4510bcbd4a9e4242cc99b7ff99.jpg",
  959 + "brand_keyword": "",
  960 + "brand_name": "DOUCAN",
  961 + "brand_name_cn": "DOUCAN",
  962 + "brand_name_en": "DOUCAN",
  963 + "hot_keyword": "",
  964 + "id": 1726,
  965 + "is_hot": "N"
  966 + }
  967 + ],
  968 + "message": "brands info"
  969 + }
  970 +-------------------------------------------------------
  971 +
  972 +
  973 +>
  974 +PS: 菜单导航
  975 +1、男生(新品到着、 服饰、 鞋履、 包袋、 配饰 · 其他)
  976 +2、女生(新品到着、 服饰、 鞋履、 包袋、配饰 · 其他)
  977 +3、潮童(新品到着、 上装、 下装、 鞋包配饰)
  978 +4、创意生活(新品到着、 数码3C、 居家、 玩具娱乐、 美妆)
  979 +只是获取商品列表gender,msort参数不同而已,参数均是参考搜索文档上面的参数入参。
  980 +
  981 +-------------------------------------------------------
  982 +
  983 +>
  984 +>1、sort:品类
  985 +http://192.168.102.216:8080/yohosearch/sortgroup.json
  986 +>
  987 +2、discount:折扣区间
  988 +http://192.168.102.216:8080/yohosearch/discount.json
  989 +>
  990 +3、recent:最新上架
  991 +http://192.168.102.216:8080/yohosearch/recent.json
  992 +>
  993 +4、 suggest:搜索词提示
  994 +http://192.168.102.216:8080/yohosearch/suggest.json?query=nike
  995 +>
  996 +5、 new-shelve:获取推荐新品
  997 +http://192.168.102.216:8080/yohosearch/new-shelve.json
  998 +>
  999 +6、shop:获取品牌店铺
  1000 +http://192.168.102.216:8080/yohosearch/shops.json?keyword=nike
  1001 +>
  1002 +7、search:搜索数据列表
  1003 +http://192.168.102.216:8080/yohosearch/search.json
  1004 +>
  1005 +8、brand:获取品牌列表
  1006 +http://192.168.102.216:8080/yohosearch/brand/list.json
  1007 +
  1008 +>
  1009 +* 上面搜索数据均是这八大连接支持。
  1010 +* 入参出参均是参考搜索文档。
  1 +## 1、逛 (通过SKN获取商品信息)
  2 +### A.相关推荐商品列表接口
  3 +>访问地址:http://guang.m.yohobuy.com/info/index?id=50851
  4 +
  5 +>接口示例:
  6 +http://192.168.102.216:8080/yohosearch/search.json?status=1&sales=Y&stocknumber=1&attribute_not=2&order=shelve_time%3Adesc&page=1&viewNum=5&query=51159630+51159661+51180447+51180452+51159636
  7 +
  8 +
  9 +##### 字段说明
  10 +-------------------------------------------------------
  11 +|参数名 |值 |描述 |
  12 +|------ |---- |--- |
  13 +|Status |1| 是否上架 1 或 2 |
  14 +|sales |Y | 是否销售 |
  15 +|stocknumber|1 | 库存量如“stocknumber=1”,则过滤出库存量>=1的商品 |
  16 +|attribute_not|2 | 过滤商品属性,attribute_not=2过滤掉赠品 |
  17 +|order |shelve_time:desc | 排序类型 按时间降序 |
  18 +|Page|1 | 当前页码 |
  19 +|viewNum |5 | 每页记录数默认为5 |
  20 +|brand |700 | 品牌 |
  21 +|query |51159630+51159661+51180447+51180452+51159636 | 关键字 |
  22 +
  23 +
  24 +##### 响应:code 200即为成功,否则为失败,响应json数据格式为下:
  25 + {
  26 + "code": 200,
  27 + "data": {
  28 + "page": 1,
  29 + "page_total": 1,
  30 + "product_list": [
  31 + {
  32 + "brand_domain": "calvinklein",
  33 + "brand_id": 1016,
  34 + "brand_name": "Calvin Klein",
  35 + "cn_alphabet": "CALVINKLEINLADIESXiLieJingZuanJingGangCaiZhiNvXingWanBiaoK4323104",
  36 + "default_images": "/2016/01/05/02/0254660b4cb2f246795983acd8aa285898.jpg",
  37 + "edit_time": 1451963868,
  38 + "gender": "2",
  39 + "goods_list": [
  40 + {
  41 + "color_code": "333333",
  42 + "color_id": "2",
  43 + "color_name": "黑色",
  44 + "color_value": "",
  45 + "cover_1": "",
  46 + "cover_2": "",
  47 + "goods_id": "417385",
  48 + "images_url": "/2016/01/05/02/0254660b4cb2f246795983acd8aa285898.jpg",
  49 + "is_default": "Y",
  50 + "product_skc": "314586",
  51 + "status": "1"
  52 + }
  53 + ],
  54 + "is_advance": "N",
  55 + "is_discount": "Y",
  56 + "is_global": "N",
  57 + "is_limited": "N",
  58 + "is_new": "N",
  59 + "is_outlets": 2,
  60 + "is_promotion": 0,
  61 + "is_soon_sold_out": "N",
  62 + "is_special": "N",
  63 + "market_price": 2400,
  64 + "max_sort_id": 8,
  65 + "middle_sort_id": 59,
  66 + "product_id": 324255,
  67 + "product_name": "Calvin Klein Ladies系列晶钻女性腕表(黑色)K4323104",
  68 + "product_skn": 51180452,
  69 + "sales_num": 0,
  70 + "sales_phrase": "",
  71 + "sales_price": 1399,
  72 + "shelve_time": 1452562800,
  73 + "small_sort_id": 162,
  74 + "status": 1,
  75 + "stock_number": 3,
  76 + "storage_num": 3,
  77 + "vip1_price": 0,
  78 + "vip2_price": 0,
  79 + "vip3_price": 0,
  80 + "vip_discount_type": 1,
  81 + "vip_price": 0,
  82 + "yohood_id": null
  83 + }
  84 + ],
  85 + "total": 5
  86 + },
  87 + "message": "Search List."
  88 + }
  89 +
  90 +
  91 +
  92 +
  93 +### B.悬停浮动商品列表接口
  94 +>访问地址:http://guang.m.yohobuy.com/info/index?id=50853
  95 +
  96 +>接口示例:
  97 +http://192.168.102.216:8080/yohosearch/search.json?status=1&sales=Y&stocknumber=1&attribute_not=2&order=shelve_time%3Adesc&page=1&viewNum=6&query=51177918+51168159+51189915+50031796+51032391+51184439
  98 +
  99 +##### 字段说明
  100 +-------------------------------------------------------
  101 +|参数名 |值 |描述 |
  102 +|------ |---- |--- |
  103 +|Status |1| 是否上架 1 或 2 |
  104 +|sales |Y | 是否销售 |
  105 +|stocknumber|1 | 库存量如“stocknumber=1”,则过滤出库存量>=1的商品 |
  106 +|attribute_not|2 | 过滤商品属性,attribute_not=2过滤掉赠品 |
  107 +|order |shelve_time:desc | 排序类型 按时间降序 |
  108 +|Page|1 | 当前页码 |
  109 +|viewNum |6 | 每页记录数默认为6 |
  110 +|query |51177918+51168159+51189915+50031796+51032391+51184439 | 关键字 |
  111 +
  112 +##### 响应:code 200即为成功,否则为失败,响应json数据格式为下:
  113 + {
  114 + "code": 200,
  115 + "data": {
  116 + "page": 1,
  117 + "page_total": 1,
  118 + "product_list": [
  119 + {
  120 + "brand_domain": "itstong",
  121 + "brand_id": 841,
  122 + "brand_name": "it's tong",
  123 + "cn_alphabet": "ITSTONGHeiSeYuRongFuY00201",
  124 + "default_images": "/2016/01/05/02/01ae0fef27ad2efae9ce2a010b825ef199.jpg",
  125 + "edit_time": 1451985491,
  126 + "gender": "2",
  127 + "goods_list": [
  128 + {
  129 + "color_code": "333333",
  130 + "color_id": "2",
  131 + "color_name": "黑色",
  132 + "color_value": "",
  133 + "cover_1": "",
  134 + "cover_2": "",
  135 + "goods_id": "437503",
  136 + "images_url": "/2016/01/05/02/01ae0fef27ad2efae9ce2a010b825ef199.jpg",
  137 + "is_default": "N",
  138 + "product_skc": "326743",
  139 + "status": "1"
  140 + }
  141 + ],
  142 + "is_advance": "N",
  143 + "is_discount": "Y",
  144 + "is_global": "N",
  145 + "is_limited": "N",
  146 + "is_new": "N",
  147 + "is_outlets": 2,
  148 + "is_promotion": 0,
  149 + "is_soon_sold_out": "N",
  150 + "is_special": "N",
  151 + "market_price": 1998,
  152 + "max_sort_id": 1,
  153 + "middle_sort_id": 18,
  154 + "product_id": 340725,
  155 + "product_name": "it's tong 欧美oversize立领羽绒服",
  156 + "product_skn": 51189915,
  157 + "sales_num": 0,
  158 + "sales_phrase": "",
  159 + "sales_price": 999,
  160 + "shelve_time": 1451985491,
  161 + "small_sort_id": 121,
  162 + "status": 1,
  163 + "stock_number": 5,
  164 + "storage_num": 5,
  165 + "vip1_price": 0,
  166 + "vip2_price": 0,
  167 + "vip3_price": 0,
  168 + "vip_discount_type": 3,
  169 + "vip_price": 0,
  170 + "yohood_id": null
  171 + }
  172 + ],
  173 + "total": 3
  174 + },
  175 + "message": "Search List."
  176 + }
  177 +
  178 +
  179 +
  180 +
  181 +
  182 +
  183 +### C.品牌介绍页面 NEW ARRIVAL 商品列表接口
  184 +>访问地址: http://guang.m.yohobuy.com/plustar/brandinfo?id=342&gender=1%2C3
  185 +
  186 +
  187 +>接口示例:
  188 +http://192.168.102.216:8080/yohosearch/search.json?status=1&sales=Y&stocknumber=1&attribute_not=2&order=shelve_time%3Adesc&page=1&viewNum=6&brand=700&gender=1%2C3
  189 +
  190 +##### 字段说明
  191 +-------------------------------------------------------
  192 +|参数名 |值 |描述 |
  193 +|------ |---- |--- |
  194 +|Status |1| 是否上架 1 或 2 |
  195 +|sales |Y | 是否销售 |
  196 +|stocknumber|1 | 库存量如“stocknumber=1”,则过滤出库存量>=1的商品 |
  197 +|attribute_not|2 | 过滤商品属性,attribute_not=2过滤掉赠品 |
  198 +|order |shelve_time:desc | 排序类型 按时间降序 |
  199 +|viewNum |60 | 每页记录数默认为60 |
  200 +|brand |700 | 品牌 |
  201 +|gender|1,2,3 | 性别1-男2-女3-通用查多个性别以逗号分隔 |
  202 +
  203 +
  204 +##### 响应:code 200即为成功,否则为失败,响应json数据格式为下:
  205 + {
  206 + "code": 200,
  207 + "data": {
  208 + "page": 1,
  209 + "page_total": 6,
  210 + "product_list": [
  211 + {
  212 + "brand_domain": "misbhv",
  213 + "brand_id": 700,
  214 + "brand_name": "MISBHV",
  215 + "cn_alphabet": "MISBHVAFTERDARKFLEECETURTLENECKBLACKNO139HeiSe",
  216 + "default_images": "/2015/09/14/02/026cfec8af9928bb187806526746dc1afa.jpg",
  217 + "edit_time": 1442417903,
  218 + "gender": "3",
  219 + "goods_list": [
  220 + {
  221 + "color_code": "333333",
  222 + "color_id": "2",
  223 + "color_name": "黑色",
  224 + "color_value": "",
  225 + "cover_1": "/2015/09/30/05/01c44a368224daffcc4619506dd18d6e44.jpg",
  226 + "cover_2": "",
  227 + "goods_id": "311487",
  228 + "images_url": "/2015/09/14/02/026cfec8af9928bb187806526746dc1afa.jpg",
  229 + "is_default": "N",
  230 + "product_skc": "257101",
  231 + "status": "1"
  232 + }
  233 + ],
  234 + "is_advance": "N",
  235 + "is_discount": "Y",
  236 + "is_global": "N",
  237 + "is_limited": "N",
  238 + "is_new": "N",
  239 + "is_outlets": 2,
  240 + "is_promotion": 104,
  241 + "is_soon_sold_out": "N",
  242 + "is_special": "N",
  243 + "market_price": 729,
  244 + "max_sort_id": 1,
  245 + "middle_sort_id": 16,
  246 + "product_id": 237093,
  247 + "product_name": "MISBHV After Dark fleece turtleneck",
  248 + "product_skn": 51133401,
  249 + "sales_num": 0,
  250 + "sales_phrase": "",
  251 + "sales_price": 649,
  252 + "shelve_time": 1450491360,
  253 + "small_sort_id": 119,
  254 + "status": 1,
  255 + "stock_number": 9,
  256 + "storage_num": 9,
  257 + "vip1_price": 0,
  258 + "vip2_price": 0,
  259 + "vip3_price": 0,
  260 + "vip_discount_type": 3,
  261 + "vip_price": 0,
  262 + "yohood_id": null
  263 + }
  264 + ],
  265 + "total": 36
  266 + },
  267 + "message": "Search List."
  268 + }
  269 +
  270 +
  271 +
  272 +-----------------------------------------------------------------------
  273 +## 2.获取搜索的数据(Ajax 异步筛选请求)
  274 +### A.品类商品列表页接口
  275 +>访问地址:https://list.m.yohobuy.com/?msort=365&misort=388&title=%E7%89%9B%E4%BB%94%E8%A3%A4
  276 +
  277 +
  278 +>接口示例:
  279 +http://192.168.102.216:8080/yohosearch/search.json?status=1&sales=Y&stocknumber=1&attribute_not=2&order=shelve_time%3Adesc&viewNum=60&msort=1&misort=11&gender=1%2C3&page=1
  280 +
  281 +##### 字段说明
  282 +-------------------------------------------------------
  283 +|参数名 |值 |描述 |
  284 +|------ |---- |--- |
  285 +|Status |1| 是否上架 1 或 2 |
  286 +|sales |Y | 是否销售 |
  287 +|stocknumber|1 | 库存量如“stocknumber=1”,则过滤出库存量>=1的商品 |
  288 +|attribute_not|2 | 过滤商品属性,attribute_not=2过滤掉赠品 |
  289 +|order |shelve_time:desc | 排序类型 按时间降序 |
  290 +|Page|1 | 当前页码 |
  291 +|viewNum |60 | 每页记录数默认为60 |
  292 +|msort |1|产品大分类ID 查多个大类以逗号分隔 |
  293 +|misort |11|产品中分类ID查多个中类以逗号分隔 |
  294 +|gender |1,2,3 | 性别 |
  295 +
  296 +##### 响应:code 200即为成功,否则为失败,响应json数据格式为下:
  297 + {
  298 + "code": 200,
  299 + "data": {
  300 + "page": 1,
  301 + "page_total": 61,
  302 + "product_list": [
  303 + {
  304 + "brand_domain": "gaws",
  305 + "brand_id": 560,
  306 + "brand_name": "GAWS",
  307 + "cn_alphabet": "GAWSGAWSA502TE20DuanXiuTXu",
  308 + "default_images": "/2015/05/04/03/0258f6bcbe124e9b22a77b370345504fb6.jpg",
  309 + "edit_time": 1467168462,
  310 + "gender": "1",
  311 + "goods_list": [
  312 + {
  313 + "color_code": "333333",
  314 + "color_id": "2",
  315 + "color_name": "黑色",
  316 + "color_value": "",
  317 + "cover_1": "",
  318 + "cover_2": "",
  319 + "goods_id": "221599",
  320 + "images_url": "/2015/05/04/03/0258f6bcbe124e9b22a77b370345504fb6.jpg",
  321 + "is_default": "N",
  322 + "product_skc": "212595",
  323 + "status": "1"
  324 + }
  325 + ],
  326 + "is_advance": "N",
  327 + "is_discount": "Y",
  328 + "is_global": "N",
  329 + "is_limited": "N",
  330 + "is_new": "Y",
  331 + "is_outlets": 2,
  332 + "is_promotion": 107,
  333 + "is_soon_sold_out": "N",
  334 + "is_special": "N",
  335 + "market_price": 139,
  336 + "max_sort_id": 1,
  337 + "middle_sort_id": 11,
  338 + "product_id": 162519,
  339 + "product_name": "GAWS 宗教印花T恤",
  340 + "product_skn": 51096220,
  341 + "sales_num": 170,
  342 + "sales_phrase": "",
  343 + "sales_price": 42,
  344 + "shelve_time": 1467168462,
  345 + "small_sort_id": 114,
  346 + "status": 1,
  347 + "stock_number": 12,
  348 + "storage_num": 12,
  349 + "vip1_price": 0,
  350 + "vip2_price": 0,
  351 + "vip3_price": 0,
  352 + "vip_discount_type": 3,
  353 + "vip_price": 0,
  354 + "yohood_id": null
  355 + }
  356 + ],
  357 + "total": 3654
  358 + },
  359 + "message": "Search List."
  360 + }
  361 +
  362 +
  363 +
  364 +
  365 +### B.品牌商品列表页接口
  366 +
  367 +>访问地址:https://disitu.m.yohobuy.com/
  368 +
  369 +
  370 +>接口示例:
  371 +http://192.168.102.216:8080/yohosearch/search.json?status=1&sales=Y&stocknumber=1&attribute_not=2&order=shelve_time%3Adesc&viewNum=60&brand=208&page=1
  372 +
  373 +
  374 +
  375 +##### 字段说明
  376 +
  377 +-------------------------------------------------------
  378 +
  379 +|参数名 |值 |描述 |
  380 +|------ |---- |--- |
  381 +|Status |1| 是否上架 1 或 2 |
  382 +|sales |Y | 是否销售 |
  383 +|stocknumber|1 | 库存量如“stocknumber=1”,则过滤出库存量>=1的商品 |
  384 +|attribute_not|2 | 过滤商品属性,attribute_not=2过滤掉赠品 |
  385 +|order |shelve_time:desc | 排序类型 按时间降序 |
  386 +|viewNum |60 | 每页记录数默认为60 |
  387 +|brand |208 | 品牌 |
  388 +|Page|1 | 当前页码 |
  389 +
  390 +
  391 +
  392 +##### 响应:code 200即为成功,否则为失败,响应json数据格式为下:
  393 +
  394 + {
  395 +
  396 + "code": 200,
  397 +
  398 + "data": {
  399 +
  400 + "page": 1,
  401 +
  402 + "page_total": 8,
  403 +
  404 + "product_list": [
  405 +
  406 + {
  407 +
  408 + "brand_domain": "lal",
  409 +
  410 + "brand_id": 208,
  411 +
  412 + "brand_name": "Life·After Life",
  413 +
  414 + "cn_alphabet": "LALA503SW137BKX2LIFEAFTERLIFEHaShiQiKaTongTuAnYuanLingMaoYi",
  415 +
  416 + "default_images": "/2015/10/21/03/02c9147bee49f1793f1d086d3b41d2b7a7.jpg",
  417 +
  418 + "edit_time": 1452741155,
  419 +
  420 + "gender": "3",
  421 +
  422 + "goods_list": [
  423 +
  424 + {
  425 +
  426 + "color_code": "333333",
  427 +
  428 + "color_id": "2",
  429 +
  430 + "color_name": "黑色",
  431 +
  432 + "color_value": "",
  433 +
  434 + "cover_1": "",
  435 +
  436 + "cover_2": "/2015/10/26/01/02bef6b0cd3675a2e3572b68053da3fd60.jpg",
  437 +
  438 + "goods_id": "371821",
  439 +
  440 + "images_url": "/2015/10/21/03/02c9147bee49f1793f1d086d3b41d2b7a7.jpg",
  441 +
  442 + "is_default": "Y",
  443 +
  444 + "product_skc": "290265",
  445 +
  446 + "status": "1"
  447 +
  448 + },
  449 +
  450 + {
  451 +
  452 + "color_code": "333333",
  453 +
  454 + "color_id": "2",
  455 +
  456 + "color_name": "黑色",
  457 +
  458 + "color_value": "",
  459 +
  460 + "cover_1": "/2015/11/02/08/01fef6dd7c123082f705613db836e6ed10.jpg",
  461 +
  462 + "cover_2": "",
  463 +
  464 + "goods_id": "371821",
  465 +
  466 + "images_url": "/2015/10/21/03/02c9147bee49f1793f1d086d3b41d2b7a7.jpg",
  467 +
  468 + "is_default": "Y",
  469 +
  470 + "product_skc": "290265",
  471 +
  472 + "status": "1"
  473 +
  474 + }
  475 +
  476 + ],
  477 +
  478 + "is_advance": "N",
  479 +
  480 + "is_discount": "Y",
  481 +
  482 + "is_global": "N",
  483 +
  484 + "is_limited": "N",
  485 +
  486 + "is_new": "N",
  487 +
  488 + "is_outlets": 2,
  489 +
  490 + "is_promotion": 101,
  491 +
  492 + "is_soon_sold_out": "N",
  493 +
  494 + "is_special": "N",
  495 +
  496 + "market_price": 319,
  497 +
  498 + "max_sort_id": 1,
  499 +
  500 + "middle_sort_id": 257,
  501 +
  502 + "product_id": 289723,
  503 +
  504 + "product_name": "Life·After Life 哈士奇卡通图案圆领毛衣【吴亦凡亲身试着】测试加价购商品名称过长显示",
  505 +
  506 + "product_skn": 51162543,
  507 +
  508 + "sales_num": 0,
  509 +
  510 + "sales_phrase": "跳楼大甩卖!",
  511 +
  512 + "sales_price": 129,
  513 +
  514 + "shelve_time": 1452741155,
  515 +
  516 + "small_sort_id": 258,
  517 +
  518 + "status": 1,
  519 +
  520 + "stock_number": 4742,
  521 +
  522 + "storage_num": 4742,
  523 +
  524 + "vip1_price": 0,
  525 +
  526 + "vip2_price": 0,
  527 +
  528 + "vip3_price": 0,
  529 +
  530 + "vip_discount_type": 1,
  531 +
  532 + "vip_price": 0,
  533 +
  534 + "yohood_id": null
  535 +
  536 + }
  537 +
  538 + ],
  539 +
  540 + "total": 445
  541 +
  542 + },
  543 +
  544 + "message": "Search List."
  545 +
  546 + }
  547 +
  548 +
  549 +> PS:有筛选功能的商品列表页,可以根据选择的筛选条件进行筛选,只是传入的参数不同。目前涉及到的接口最终只有一个http://192.168.102.216:8080/yohosearch/search.json
@@ -109,7 +109,7 @@ class HelperSearch @@ -109,7 +109,7 @@ class HelperSearch
109 109
110 /** 110 /**
111 * 将接口返回的数据($data)组合成模板需要的格式 111 * 将接口返回的数据($data)组合成模板需要的格式
112 - * 112 + *
113 * @param array $data array( 113 * @param array $data array(
114 * 'product' => array (接口得到的商品数据) 114 * 'product' => array (接口得到的商品数据)
115 * 'sort' => array (接口返回的分类数据) 115 * 'sort' => array (接口返回的分类数据)
@@ -131,11 +131,11 @@ class HelperSearch @@ -131,11 +131,11 @@ class HelperSearch
131 self::$options = $options; 131 self::$options = $options;
132 $result = array(); 132 $result = array();
133 self::$filter = isset($data['product']['filter']) ? $data['product']['filter'] : array(); 133 self::$filter = isset($data['product']['filter']) ? $data['product']['filter'] : array();
134 - 134 +
135 //当前页 135 //当前页
136 $result['page'] = isset($data['product']['page']) ? $data['product']['page'] : ''; 136 $result['page'] = isset($data['product']['page']) ? $data['product']['page'] : '';
137 self::$page = $result['page']; 137 self::$page = $result['page'];
138 - 138 +
139 //产品列表 139 //产品列表
140 $result['goods'] = isset($data['product']['product_list']) ? self::getProductList($data['product']['product_list'], $options) : array(); 140 $result['goods'] = isset($data['product']['product_list']) ? self::getProductList($data['product']['product_list'], $options) : array();
141 //总页数 141 //总页数
@@ -184,7 +184,7 @@ class HelperSearch @@ -184,7 +184,7 @@ class HelperSearch
184 if (empty($shopSort)) { 184 if (empty($shopSort)) {
185 continue; 185 continue;
186 } 186 }
187 - $result['shopEntry'][] = $shopSort; 187 + $result['shopEntry'][] = $shopSort;
188 } 188 }
189 } 189 }
190 //分页 190 //分页
@@ -319,7 +319,7 @@ class HelperSearch @@ -319,7 +319,7 @@ class HelperSearch
319 $isNew = false; 319 $isNew = false;
320 $isSale = false; 320 $isSale = false;
321 } 321 }
322 - 322 +
323 if (isset($options['isNew']) && $options['isNew']) { 323 if (isset($options['isNew']) && $options['isNew']) {
324 $isNew = true; 324 $isNew = true;
325 } 325 }
@@ -453,6 +453,47 @@ class HelperSearch @@ -453,6 +453,47 @@ class HelperSearch
453 } 453 }
454 return $result; 454 return $result;
455 } 455 }
  456 +
  457 + /**
  458 + * 年龄
  459 + * $filter 搜索接口返回的商品筛选条件数据 $data['product']['filter']
  460 + * @return array
  461 + */
  462 + public static function ageLevel($filter)
  463 + {
  464 + $result = array();
  465 + if (empty($filter) || !isset($filter['ageLevel']) || empty($filter['ageLevel'])) {
  466 + return $result;
  467 + }
  468 + $params = self::$params;
  469 + $ageLevel = isset($params['ageLevel']) ? $params['ageLevel'] : '';
  470 + if (isset($params['ageLevel'])) {
  471 + unset($params['ageLevel']);
  472 + }
  473 + if (self::$total == 0) {
  474 + return $result;
  475 + }
  476 +
  477 + sort($filter['ageLevel']);
  478 + foreach ($filter['ageLevel'] as $key => $val) {
  479 + if ($val['id'] == $params['ageLevel']) {
  480 + self::$selected['ageLevel'] = array(
  481 + 'name' => $val['name'],
  482 + 'href' => self::buildUrl($params)
  483 + );
  484 + }
  485 + $href = $val[id];
  486 + $result[] = array(
  487 + 'name' => $val[name],
  488 + 'href' => self::buildUrl(array_merge($params, array(
  489 + 'ageLevel' => $href
  490 + ))),
  491 + 'checked' => isset(self::$params['ageLevel']) && self::$params['ageLevel'] == $href ? true : false
  492 + );
  493 + }
  494 + return $result;
  495 + }
  496 +
456 /** 497 /**
457 * 组织搜索列表页面的左侧分类 498 * 组织搜索列表页面的左侧分类
458 * @param array $sort 499 * @param array $sort
@@ -1454,7 +1495,7 @@ class HelperSearch @@ -1454,7 +1495,7 @@ class HelperSearch
1454 if (self::$total == 0) { 1495 if (self::$total == 0) {
1455 return $shopEntry; 1496 return $shopEntry;
1456 } 1497 }
1457 - 1498 +
1458 if (empty($shopSort)) { 1499 if (empty($shopSort)) {
1459 $shopSort = array(); 1500 $shopSort = array();
1460 } 1501 }
@@ -1542,6 +1583,8 @@ class HelperSearch @@ -1542,6 +1583,8 @@ class HelperSearch
1542 $result = array(); 1583 $result = array();
1543 //性别 1584 //性别
1544 $result['gender'] = self::gender(self::$filter); 1585 $result['gender'] = self::gender(self::$filter);
  1586 + //年龄
  1587 + $result['ageLevel'] = self::ageLevel(self::$filter);
1545 //品牌 1588 //品牌
1546 $result['brand'] = self::brand(self::$filter); 1589 $result['brand'] = self::brand(self::$filter);
1547 //价格 1590 //价格
@@ -48,6 +48,20 @@ @@ -48,6 +48,20 @@
48 </div> 48 </div>
49 {{/if}} 49 {{/if}}
50 50
  51 + {{#if ageLevel}}
  52 + <div class="channel section">
  53 + <span class="title">年龄:</span>
  54 +
  55 + <div class="attr-content clearfix">
  56 + {{#each ageLevel}}
  57 + <a class="attr {{#if checked}}checked{{/if}}" href="{{href}}">
  58 + {{name}}
  59 + </a>
  60 + {{/each}}
  61 + </div>
  62 + </div>
  63 + {{/if}}
  64 +
51 {{#if sort}} 65 {{#if sort}}
52 <div class="sort section"> 66 <div class="sort section">
53 <span class="title">分类:</span> 67 <span class="title">分类:</span>
@@ -72,7 +72,8 @@ class SearchModel @@ -72,7 +72,8 @@ class SearchModel
72 'series_id' => FILTER_VALIDATE_INT, 72 'series_id' => FILTER_VALIDATE_INT,
73 'series' => FILTER_VALIDATE_INT, 73 'series' => FILTER_VALIDATE_INT,
74 'folder_id' => FILTER_VALIDATE_INT, 74 'folder_id' => FILTER_VALIDATE_INT,
75 - 'page' => FILTER_VALIDATE_INT), false); 75 + 'page' => FILTER_VALIDATE_INT,
  76 + 'ageLevel' => FILTER_VALIDATE_INT), false);
76 //接收高级选项 77 //接收高级选项
77 foreach ($_GET as $key =>$val) { 78 foreach ($_GET as $key =>$val) {
78 if (strpos($key, 'parameter_') !== false) { 79 if (strpos($key, 'parameter_') !== false) {