商城-获取商品列表

request

method :get

URLindex.php?g=Shop&m=GoodsApi&a=add_cart

字段 类型 是否必须 描述
page int 当前页数
limit int 每页显示数量
is_recommend bool 是否推荐
is_new bool 是否新品
is_hot bool 是否热销
catid int 商品所属栏目,默认是全部
order string 列表的排序方式 eg : id desc

response

  1. {
  2. "info": {
  3. "goods_list": [
  4. {
  5. "goods_id": "1",
  6. "cat_id": "12",
  7. "extend_cat_id": "0",
  8. "goods_sn": "TP000000",
  9. "goods_name": "Apple iPhone 6s Plus 16G 玫瑰金 移动联通电信4G手机",
  10. "click_count": "510",
  11. "brand_id": "11",
  12. "store_count": "299",
  13. "comment_count": "5",
  14. "weight": "150",
  15. "market_price": "6107.00",
  16. "shop_price": "6007.00",
  17. "cost_price": "0.00",
  18. "keywords": "LG 3g 876 支持 双模 2008年04月 灰色 GSM,850,900,1800,1900",
  19. "goods_remark": "选择【联通合约机0元购机】,购机款仅需4066\r\n选择【移动合约机】,锯惠5588,不换号,购机入网返高额话费~\r\n选【电信合约机】,买手机送话费!激活到账100元,实付低至29元/月,月享4GB大流量",
  20. "goods_content": "<p style="text-align: center;"><img src="/Public/upload/goods/2016/03-09/56e01a6586cd0.jpg" title="4.jpg"/></p>",
  21. "original_img": "/Public/upload/goods/2016/03-09/56e01a4088d3b.jpg",
  22. "is_real": "1",
  23. "is_on_sale": "1",
  24. "is_free_shipping": "0",
  25. "on_time": "1477121173",
  26. "sort": "54",
  27. "is_recommend": "1",
  28. "is_new": "1",
  29. "is_hot": "1",
  30. "last_update": "1269589545",
  31. "goods_type": "4",
  32. "spec_type": "4",
  33. "give_integral": "0",
  34. "exchange_integral": "100",
  35. "suppliers_id": "0",
  36. "sales_sum": "0",
  37. "prom_type": "0",
  38. "prom_id": "0",
  39. "commission": "0.00",
  40. "spu": "",
  41. "sku": "",
  42. "shipping_area_ids": ""
  43. },
  44. {
  45. "goods_id": "39",
  46. "cat_id": "191",
  47. "extend_cat_id": "0",
  48. "goods_sn": "TP0000039",
  49. "goods_name": "华为(HUAWEI) M2 10.0 平板电脑 WiFi 月光银",
  50. "click_count": "39",
  51. "brand_id": "15",
  52. "store_count": "1000",
  53. "comment_count": "3",
  54. "weight": "1000",
  55. "market_price": "2388.00",
  56. "shop_price": "2288.00",
  57. "cost_price": "0.00",
  58. "keywords": "",
  59. "goods_remark": "今日起商城搞活动,注册立马送30元代金券,全场满69全国包邮,全场满299送20元优惠券,全场满399送电影票,满999送美国旅游景点门票1张",
  60. "goods_content": "<p><img src="/Public/upload/goods/2016/01-13/5695b35c538bb.jpg" style="float:none;" title="428_428_1452218607027.jpg"/></p><p><img src="/Public/upload/goods/2016/01-13/5695b35c65802.jpg" style="float:none;" title="428_428_1452218609169.jpg"/></p><p><img src="/Public/upload/goods/2016/01-13/5695b35c7b577.jpg" style="float:none;" title="428_428_1452218613383.jpg"/></p><p><br/></p>",
  61. "original_img": "/Public/upload/goods/2016/01-13/5695b2f14616a.jpg",
  62. "is_real": "1",
  63. "is_on_sale": "1",
  64. "is_free_shipping": "0",
  65. "on_time": "0",
  66. "sort": "50",
  67. "is_recommend": "1",
  68. "is_new": "0",
  69. "is_hot": "1",
  70. "last_update": "0",
  71. "goods_type": "15",
  72. "spec_type": "15",
  73. "give_integral": "0",
  74. "exchange_integral": "100",
  75. "suppliers_id": "0",
  76. "sales_sum": "0",
  77. "prom_type": "0",
  78. "prom_id": "0",
  79. "commission": "0.00",
  80. "spu": "",
  81. "sku": "",
  82. "shipping_area_ids": ""
  83. }
  84. ……
  85. ],
  86. "page": 1,
  87. "limit": 20,
  88. "total_count": "109"
  89. },
  90. "status": 1,
  91. "url": "",
  92. "state": "success"
  93. }

ps: 失败返回 status != 1,具体看msg信息

收货地址这里关系到省市联动效果