Name Last Update
..
cms Loading commit data...
common Loading commit data...
coupon_code Loading commit data...
database Loading commit data...
guang Loading commit data...
shops Loading commit data...
suggest Loading commit data...
suppliers Loading commit data...
Database-upgrad.md Loading commit data...
README.md Loading commit data...
activityInfo.md Loading commit data...
auth_interface.md Loading commit data...
baseproduct.md Loading commit data...
brand.md Loading commit data...
brandCooperation.md Loading commit data...
brandSeries.md Loading commit data...
limitCode.md Loading commit data...
limitProduct.md Loading commit data...
model.md Loading commit data...
net_sale.md Loading commit data...
pact.md Loading commit data...
product-color.md Loading commit data...
product-element.md Loading commit data...
product-material.md Loading commit data...
product-sort-attribute.md Loading commit data...
product-style.md Loading commit data...
product-washtips.md Loading commit data...
product.md Loading commit data...
productPrice.md Loading commit data...
productSort.md Loading commit data...
product_extra_info.md Loading commit data...
product_photo.md Loading commit data...
product_size.md Loading commit data...
search_words.md Loading commit data...
shoot_require.md Loading commit data...
size-attribute.md Loading commit data...
size.md Loading commit data...
sortsize.md Loading commit data...

关于接口定义规约

通用规则

  • 所有的服务接口都用POST方法请求
  • 提交参数采用RAW的JSON文本,
  • 返回数据也是JSON
  • 字段命名采用驼峰的方式分隔多个单词

关于服务接口命名

模块名+/+方法名称

例如:auth/getAccoutList 账户权限模块的获取账号列表

关于请求参数

入参采用RAW的JSON文本

还是以获取账号列表的接口定义为例

范例:

{
   "account":"test",//用户名
   "truename":"张三",//姓名
   "email":"hb@126.com",//邮件
   "phone":"1850021224",//电话
   "identity":"32054778955412"//身份
}

关于返回

  • 要有返回码
  • 返回数据是json

范例:

{
    "code":200,
    "data":{
        "list":[
         {
            "username":"xxx",
            "truename":"xxx",
            "email":"xxx@126.com",
            "phone":"18602554147",
            "identity_cn":"sdasd",
            "status":"0",
            "pid":123,
            "create_time":1423234344
         },...
        ],
        "offset":0,
        "limit":50,
        "total":1000
    },
    "message":""
}