[WeChat applet] E-commerce mobile front-end API documentation

insert image description here


request domain name: The applet only supports the https protocol, and requires a registered domain name.

https://www.zhengzhicheng.cn
备用:
https://autumnfish.cn/wx
https://www.uinav.com

1. Document update instructions

Update date 2019-04-01

1. Return value adjustment

新版接口调整:  res.data.message

旧版接口废弃:  res.data.data

2. Category page pictures

新版接口调整:  cat_icon 属性直接返回完整图片 url 地址

旧版接口废弃:  cat_icon 返回相对路径,需要手动拼接路径

3. Order payment interface

新版接口调整:  支付对象数据为 res.data.message.pay

旧版接口废弃:  支付对象数据为 res.data.data.wxorder

2. Path description

  • root path description
	https://请求域名/api/public/v1
  • Path permission description
    • All permissions on the path can be accessed
    	https://请求域名/api/public/v1
    
    • Only logged in users can access the path
    	https://请求域名/api/public/v1/my
    

3. Implementation method of e-commerce login

  • Use jwt method
  • Implementation process
    1. request login
    2. get token
    3. To access the authorized path, the token must be placed in the http header
    	"Authorization" : token
    
    1. The token does not expire and is valid for a long time.

4. API details

1. Global permission access

  • access root path
	https://请求域名/api/public/v1

(1) Homepage API

Get homepage carousel data
  • Request path: https://request domain name/api/public/v1/home/swiperdata
  • Request method: GET
  • request parameter
parameter name Parameter Description Remark
none
  • response parameter
parameter name Parameter Description Remark
image_src image path
open_type Navigation link type
navigator_url Navigation link path
  • response data reference
{
    "message": [
        {
            "image_src": "https://www.zhengzhicheng.cn/pyg/banner1.png",
            "open_type": "navigate",
            "goods_id": 129,
            "navigator_url": "/pages/goods_detail/main?goods_id=129"
        },
        {
            "image_src": "https://www.zhengzhicheng.cn/pyg/banner2.png",
            "open_type": "navigate",
            "goods_id": 395,
            "navigator_url": "/pages/goods_detail/main?goods_id=395"
        },
        {
            "image_src": "https://www.zhengzhicheng.cn/pyg/banner3.png",
            "open_type": "navigate",
            "goods_id": 38,
            "navigator_url": "/pages/goods_detail/main?goods_id=38"
        }
    ],
    "meta": { "msg": "获取成功", "status": 200 }
}
Get home page category option data
  • Request path: https://request domain name/api/public/v1/home/catitems
  • Request method: GET
  • request parameter
parameter name Parameter Description Remark
none
  • response parameter
parameter name Parameter Description Remark
name name
image_src image path
open_type Navigation link type
navigator_url Navigation link path
  • response data
{
    
    
    "message": [
        {
    
    
            "name": "分类",
            "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
            "open_type": "switchTab",
            "navigator_url": "/pages/category/main"
        },
        {
    
    
            "name": "秒杀拍",
            "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]"
        },
        {
    
    
            "name": "超市购",
            "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]"
        },
        {
    
    
            "name": "母婴品",
            "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]"
        }
    ],
    "meta": {
    
     "msg": "获取成功", "status": 200 }
}
Get home floor data
  • Request path: https://request domain name/api/public/v1/home/floordata
  • Request method: GET
  • request parameter
parameter name Parameter Description Remark
none
  • response parameter
parameter name Parameter Description Remark
floor_title floor title
product_list Floor content list
name name
image_src image path
image_width Product image width
open_type Navigation link type
navigator_url Navigation link path
  • response data
{
    
    
    "message": [
        {
    
    
            "floor_title": {
    
    
                "name": "时尚女装",
                "image_src": "https://www.zhengzhicheng.cn/pyg/pic_floor01_title.png"
            },
            "product_list": [
                {
    
    
                    "name": "优质服饰",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "232",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=服饰"
                },
                {
    
    
                    "name": "春季热门",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "233",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=热"
                },
                {
    
    
                    "name": "爆款清仓",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "233",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=爆款"
                },
                {
    
    
                    "name": "倒春寒",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "233",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=春季"
                },
                {
    
    
                    "name": "怦然心动",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "233",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=心动"
                }
            ]
        },
        {
    
    
            "floor_title": {
    
    
                "name": "户外活动",
                "image_src": "https://www.zhengzhicheng.cn/pyg/pic_floor02_title.png"
            },
            "product_list": [
                {
    
    
                    "name": "勇往直前",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "232",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=户外"
                },
                {
    
    
                    "name": "户外登山包",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "273",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=登山包"
                },
                {
    
    
                    "name": "超强手套",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "193",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=手套"
                },
                {
    
    
                    "name": "户外运动鞋",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "193",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=运动鞋"
                },
                {
    
    
                    "name": "冲锋衣系列",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "273",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=冲锋衣"
                }
            ]
        },
        {
    
    
            "floor_title": {
    
    
                "name": "箱包配饰",
                "image_src": "https://www.zhengzhicheng.cn/pyg/pic_floor03_title.png"
            },
            "product_list": [
                {
    
    
                    "name": "清新气质",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "232",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=饰品"
                },
                {
    
    
                    "name": "复古胸针",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "263",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=胸针"
                },
                {
    
    
                    "name": "韩版手链",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "203",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=手链"
                },
                {
    
    
                    "name": "水晶项链",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "193",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=水晶项链"
                },
                {
    
    
                    "name": "情侣表",
                    "image_src": "https://www.zhengzhicheng.cn/pyg/[email protected]",
                    "image_width": "273",
                    "open_type": "navigate",
                    "navigator_url": "/pages/goods_list?query=情侣表"
                }
            ]
        }
    ],
    "meta": {
    
     "msg": "获取成功", "status": 200 }
}

(2) Commodity API

Product list search
  • Request path: https://request domain name/api/public/v1/goods/search

  • Request method: GET

  • request parameter

parameter name Parameter Description Remark
query query keywords
cid Category ID optional
more exiled page index optional default first page
pagesize length per page Optional default 20
  • response parameter
parameter name Parameter Description Remark
total total records
more exiled current page number
goods_id Product ID
cat_id Category ID
goods_name product name
goods_price commodity price
goods_number Number of Products
goods_weight commodity weight
goods_big_logo 商品大图标
goods_small_logo 商品小图标
add_time 商品添加时间
upd_time 商品更新时间
hot_mumber 热门商品数
cat_one_id 所属一级分类
cat_two_id 所属二级分类
cat_three_id 所属三级分类
  • 响应数据
{
    "message": {
        "total": 2058,
        "pagenum": "1",
        "goods": [
            {
                "goods_id": 57332,
                "cat_id": 998,
                "goods_name": "400毫升 海鲜食品冷藏冰包 注水冰袋医用冰袋户外冷藏保鲜熟食冷藏反复使用(10个装)",
                "goods_price": 14,
                "goods_number": 100,
                "goods_weight": 100,
                "goods_big_logo": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_800x800.jpg",
                "goods_small_logo": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_400x400.jpg",
                "add_time": 1516662792,
                "upd_time": 1516662792,
                "hot_mumber": 0,
                "is_promote": false,
                "cat_one_id": 962,
                "cat_two_id": 981,
                "cat_three_id": 998
            },
            {
                "goods_id": 57194,
                "cat_id": 992,
                "goods_name": "亿力洗车工具汽车美容用品海绵刷不伤车漆擦车海棉清洁海绵",
                "goods_price": 29,
                "goods_number": 100,
                "goods_weight": 100,
                "goods_big_logo": "",
                "goods_small_logo": "",
                "add_time": 1516662312,
                "upd_time": 1516662312,
                "hot_mumber": 0,
                "is_promote": false,
                "cat_one_id": 962,
                "cat_two_id": 980,
                "cat_three_id": 992
            }
        ]
    },
    "meta": {
        "msg": "获取成功",
        "status": 200
    }
}
搜索建议查询
  • 请求路径:https://请求域名/api/public/v1/goods/qsearch
  • 请求方法:GET
  • 请求参数
参数名 参数说明 备注
query 查询内容 如: goods/qsearch?query=小米
  • 响应参数
参数名 参数说明 备注
goods_id 商品ID
goods_name 商品名称
  • 响应数据
{
    "message": [
        {
            "goods_id": 57332,
            "goods_name": "400毫升 海鲜食品冷藏冰包 注水冰袋医用冰袋户外冷藏保鲜熟食冷藏反复使用(10个装)"
        },
        {
            "goods_id": 57194,
            "goods_name": "亿力洗车工具汽车美容用品海绵刷不伤车漆擦车海棉清洁海绵"
        }
    ],
    "meta": {
        "msg": "获取成功",
        "status": 200
    }
}
商品详情
  • 请求路径:https://请求域名/api/public/v1/goods/detail

  • 请求方法:GET

  • 请求参数

参数名 参数说明 备注
goods_id 商品ID 必要
  • 响应参数
参数名 参数说明 备注
goods_id 商品ID
cat_id 分类ID
goods_name 商品名称
goods_price 商品价格
goods_number 商品数量
goods_weight 商品重量
goods_big_logo 商品大图标
goods_small_logo 商品小图标
add_time 商品添加时间
upd_time 商品更新时间
hot_mumber 热门商品数
cat_one_id 所属一级分类
cat_two_id 所属二级分类
cat_three_id 所属三级分类
goods_introduce 商品介绍HTML富文本
pics 商品图片列表
attrs 商品属性列表
  • 响应数据
{
    
    
    "message": {
    
    
        "goods_id": 57332,
        "cat_id": 998,
        "goods_name": "400毫升 海鲜食品冷藏冰包 注水冰袋医用冰袋户外冷藏保鲜熟食冷藏反复使用(10个装)",
        "goods_price": 14,
        "goods_number": 100,
        "goods_weight": 100,
        "goods_introduce": "<div class=\"lazyimg\"><!-- Save for Web Slices (20170730关联模板.psd) -->\n<p><img data-src=\"//image.suning.cn/uimg/sop/commodity/167890268714163515505319_x.jpg?from=mobile&amp;format=80q.webp\" alt=\"\" usemap=\"#Map\" border=\"0\" src=\"//image.suning.cn/uimg/sop/commodity/167890268714163515505319_x.jpg?from=mobile&format=80q.webp\" width=\"100%\" height=\"auto\"> </p>\n<!-- End Save for Web Slices --><p></p><p><img picsize=\"706KB\" data-src=\"//image.suning.cn/uimg/sop/phonecomm/157271695856956094412300_640x.jpg?from=mobile&amp;format=80q.webp\" alt=\"\" src=\"//image.suning.cn/uimg/sop/phonecomm/157271695856956094412300_640x.jpg?from=mobile&format=80q.webp\" width=\"100%\" height=\"auto\"></p><p><img picsize=\"610KB\" data-src=\"//image.suning.cn/uimg/sop/phonecomm/192892939814201549766135_640x.jpg?from=mobile&amp;format=80q.webp\" alt=\"\" src=\"//image.suning.cn/uimg/sop/phonecomm/192892939814201549766135_640x.jpg?from=mobile&format=80q.webp\" width=\"100%\" height=\"auto\"></p></div>",
        "goods_big_logo": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_800x800.jpg",
        "goods_small_logo": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_400x400.jpg",
        "goods_state": 2,
        "is_del": "0",
        "add_time": 1516662792,
        "upd_time": 1516662792,
        "delete_time": null,
        "hot_mumber": 0,
        "is_promote": false,
        "cat_one_id": 962,
        "cat_two_id": 981,
        "cat_three_id": 998,
        "goods_cat": "962,981,998",
        "pics": [
            {
    
    
                "pics_id": 234751,
                "goods_id": 57332,
                "pics_big": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_800x800.jpg",
                "pics_mid": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_400x400.jpg",
                "pics_sma": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_200x200.jpg",
                "pics_big_url": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_800x800.jpg",
                "pics_mid_url": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_400x400.jpg",
                "pics_sma_url": "http://image4.suning.cn/uimg/b2c/newcatentries/0070083251-000000000168369396_1_200x200.jpg"
            }
        ],
        "attrs": [
            {
    
    
                "goods_id": 57332,
                "attr_id": 8519,
                "attr_value": "400",
                "add_price": 0,
                "attr_name": "主体-型号",
                "attr_sel": "only",
                "attr_write": "manual",
                "attr_vals": "Q6"
            }
        ]
    },
    "meta": {
    
    
        "msg": "获取成功",
        "status": 200
    }
}

(3)分类API

获取分类数据
  • 请求路径:https://请求域名/api/public/v1/categories

  • 请求方法:GET

  • 请求参数

参数名 参数说明 备注
  • 响应参数
参数名 参数说明 备注
cat_id 分类ID
cat_name 分类名称
cat_level 分类级别
cat_icon 分类图标 只有3级别分类采用图标
children 子分类列表 对象数组
  • 响应数据
{
    
    
    "message": [
        {
    
    
            "cat_id": 1,
            "cat_name": "大家电",
            "cat_pid": 0,
            "cat_level": 0,
            "cat_deleted": false,
            "cat_icon": "",
            "children": [
                {
    
    
                    "cat_id": 3,
                    "cat_name": "电视",
                    "cat_pid": 1,
                    "cat_level": 1,
                    "cat_deleted": false,
                    "cat_icon": "",
                    "children": [
                    {
    
    
                        "cat_id": 5,
                        "cat_name": "曲面电视",
                        "cat_pid": 3,
                        "cat_level": 2,
                        "cat_deleted": false,
                        "cat_icon": "full/2fb113b32f7a2b161f5ee4096c319afedc3fd5a1.jpg"
                    }]
                }
            ]
        }
    ],
    "meta": {
    
    
        "msg": "获取成功",
        "status": 200
    }
}

(4)微信用户登录 API

微信登录换取 Token
  • 请求路径:https://请求域名/api/public/v1/users/wxlogin

  • 请求方法:POST

  • 请求参数

参数名 参数说明 备注
code 用户登录凭证 必要,可通过 wx.login() 获取
encryptedData 完整用户信息密文 必要,可通过 getUserInfo 获取
iv 加密算法的初始向量 必要,可通过 getUserInfo 获取
rawData 用户信息原始数据字符串 必要,可通过 getUserInfo 获取,JSON.stringify() 转字符串
signature 使用 sha1得到字符串 必要,可通过 getUserInfo 获取
  • 请求数据参考
{
    
    
  "code": "013pZWCt0GniKb1ftkBt0AxfDt0pZWCf",
  "encryptedData": "FGMaNbO4ytTFTUzK3wmtfHWoFeQJYkyMajQ5tVbQglwmnJ46SMi43Thq0OZjSSa5Msmnpdfx7yigYkdvUbsiQFyF9xMGEQLpUFcpNjnYoCQOl2Ka5zEeqpMY91ywYAsPISeu1rwvFCU2Ucenxf7gdcDPQ/jNJdORGb86DR+2gVJeg8TZiXWJ66enpynj35DiaE1jNWUSzpgbOvO40dZrWnHVwDEJN+upeSHRR/IW7t3cgtV63/GeZzNhFbUYqNHO6M1KHetwY1u8mFXuZoXwVV7DrEwEzY1btqcfW93q4ekn2uwAUeJM4U+3roBsIT5ZpEM8YtQZVsAwjaWHBe8id1H4lurEFC5/GwLnRONrIiR7KDF7MPxnMO9flWFQEfay5dt9rBELzk1Efjf2H6UnzYfh+o4MbPxtc0cUiHEnNCVcXjDtulXSRUy7RZQPmjF/tYBHHrXEFubxnK4oRBZz/A==",
  "iv": "y/ESFBaesbEzIbB1th5Knw==",
  "rawData":
    "{\"nickName\":\"优购\",\"gender\":0,\"language\":\"zh_CN\",\"city\":\"\",\"province\":\"\",\"country\":\"\",\"avatarUrl\":\"https://wx.qlogo.cn/mmopen/vi_32/icWlxE4rARHaIlib1PRmBtRa2tQicUSEHYu8UIGZ0LLic9C0PticibED6brRFCuQYeLGtwTcBYFgMtcF11N31pVhMF8g/132\"}",
  "signature": "d06cd3a54e89e6014e43694844706eaccad109bb"
}
  • 响应参数参考
参数名 参数说明 备注
token 身份验证标志
user_id 用户ID
  • 响应数据
{
    
    
  "message": {
    
    
    "user_id": 12,
    "user_email_code": null,
    "is_active": null,
    "user_sex": "男",
    "user_qq": "",
    "user_tel": "",
    "user_xueli": "本科",
    "user_hobby": "",
    "user_introduce": null,
    "create_time": 1525402223,
    "update_time": 1525402223,
    "token":
      "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjEyLCJpYXQiOjE1MjU0MDIyMjMsImV4cCI6MTUyNTQ4ODYyM30.g-4GtEQNPwT_Xs0Pq7Lrco_9DfHQQsBiOKZerkO-O-o"
  },
  "meta": {
    
     "msg": "登录成功", "status": 200 }
}

2. Access after login

  • access root path
https://请求域名/api/public/v1/my
  • Access to this series of requests must add a token to the header information
"Authorization" : token

(1) Order API

Create Order
  • Request path: https://request domain name/api/public/v1/my/orders/create

  • Request method: POST

  • request parameter

parameter name Parameter Description Remark
order_price order price necessary
consignee_addr order address necessary
order_detail order details optional, string format
goods The goods list stores a list of goods (goods_id, goods_number and goods_price) inside necessary
  • request data reference
{
    
    
  "order_price": 0.1,
  "consignee_addr": "广州市天河区",
  "order_detail":
    "[{\"goods_id\":55578,\"goods_name\":\"初语2017秋装新款潮牌女装加绒宽松BF风慵懒卫衣女套头连帽上衣\",\"goods_price\":279,\"goods_small_logo\":\"http://image2.suning.cn/uimg/b2c/newcatentries/0070067836-000000000690453616_2_400x400.jpg\",\"counts\":1,\"selectStatus\":true}]",
  "goods": [
      {
    
     
          "goods_id": 5, 
          "goods_number": 11, 
          "goods_price": 15 
      },
      {
    
     
          "goods_id": 555, 
          "goods_number": 1, 
          "goods_price": 15 
      }
  ]
}

  • response parameter
parameter name Parameter Description Remark
order_id Order Unique ID
user_id User ID
order_number order number
order_price The total amount of orders
order_pay Order payment method Payment method 0 Unpaid 1 Alipay 2 WeChat 3 Bank card
consignee_addr order address
pay_status Order payment status Order status: 0 unpaid, 1 paid
  • response data reference
{
    
    
  "message": {
    
    
    "order_id": 45,
    "user_id": 12,
    "order_number": "GD20180504000000000045",
    "order_price": 0.1,
    "order_pay": "0",
    "is_send": "否",
    "trade_no": "",
    "order_fapiao_title": "个人",
    "order_fapiao_company": "",
    "order_fapiao_content": "",
    "consignee_addr": "广州市天河区",
    "pay_status": "0",
    "create_time": 1525408071,
    "update_time": 1525408071,
    "order_detail":
      "[{\"goods_id\":55578,\"goods_name\":\"初语2017秋装新款潮牌女装加绒宽松BF风慵懒卫衣女套头连帽上衣\",\"goods_price\":279,\"goods_small_logo\":\"http://image2.suning.cn/uimg/b2c/newcatentries/0070067836-000000000690453616_2_400x400.jpg\",\"counts\":1,\"selectStatus\":true}]",
    "goods": [
      {
    
    
        "id": 64,
        "order_id": 45,
        "goods_id": 5,
        "goods_price": 15,
        "goods_number": 11,
        "goods_total_price": 15
      }
    ]
  },
  "meta": {
    
     "msg": "创建订单成功", "status": 200 }
}

order prepayment
  • Request path: https://request domain name/api/public/v1/my/orders/req_unifiedorder
  • Request method: POST
  • request parameter
parameter name Parameter Description Remark
order_number order number necessary
  • request data
{
    
     "order_number": "GD20180507000000000110" }
  • response parameter
parameter name Parameter Description Remark
pay order object WeChat payment can be initiated through wx.requestPayment(OBJECT)
timeStamp timestamp
nonceStr random string
package Return parameter of order interface
signType signature algorithm
paySign sign
order_number order number
  • response data
{
  "message": {
    "pay": {
      "timeStamp": "1525681145",
      "nonceStr": "BkPggorBXZwPGXe3",
      "package": "prepay_id=wx071619042918087bb4c1d3d72999385683",
      "signType": "MD5",
      "paySign": "D1642DEEF1663C8012EDEB9297E1D516"
    },
    "order_number": "GD20180507000000000110"
  },
  "meta": { "msg": "预付订单生成成功", "status": 200 }
}
Order payment status query
  • Request path: https://request domain name/api/public/v1/my/orders/chkOrder
  • Request method: POST
  • request parameter
parameter name Parameter Description Remark
order_number order number necessary
  • request data
{
    
     "order_number": "GD20180507000000000050" }
  • response parameter
parameter name Parameter Description Remark
data Payment status
meta Order Status
  • response data
// 支付成功
{
    "message":"支付成功",
    "meta":{"msg":"验证成功","status":200}
}

// 支付失败
{ 
    "message": null,
    "meta": { "msg": "订单未支付", "status": 400 } 
}
Order Tracking
  • Request path: https://request domain name/api/public/v1/my/orders/all
  • Request method: GET
  • request parameter
parameter name Parameter Description Remark
type 1 1 All orders 2 Payment on behalf of orders 3 Paid orders
  • 2 Response parameters
parameter name Parameter Description Remark
order_id Order Unique ID
user_id User ID
order_number order number
order_price order price
order_pay Order payment method
consignee_addr order address
pay_status Order payment status
  • response data
{
    
    
  "message": [
    {
    
    
      "order_id": 44,
      "user_id": 12,
      "order_number": "GD20180507000000000050",
      "order_price": 0.1,
      "order_pay": "0",
      "is_send": "否",
      "trade_no": "",
      "order_fapiao_title": "个人",
      "order_fapiao_company": "",
      "order_fapiao_content": "",
      "consignee_addr": "广州市天河区",
      "pay_status": "0",
      "create_time": 1525407814,
      "update_time": 1525407814,
      "order_detail":
        "[{\"goods_id\":55578,\"goods_name\":\"初语2017秋装新款潮牌女装加绒宽松BF风慵懒卫衣女套头连帽上衣\",\"goods_price\":279,\"goods_small_logo\":\"http://image2.suning.cn/uimg/b2c/newcatentries/0070067836-000000000690453616_2_400x400.jpg\",\"counts\":1,\"selectStatus\":true}]"
    }
  ],
  "meta": {
    
     "msg": "获取订单列表成功", "status": 200 }
}

Guess you like

Origin blog.csdn.net/CSDN_anhl/article/details/127396157