标签:
The Real API prefix please refer to jones.z (QQ: 2810898115).
[枚举打印, enum value print]:
http://www.cnblogs.com/jwiter/p/5451043.html
-----------------------------------------------------------------------------------
Login
URL:
http://localhost:2448/api/ashx/service.ashx?action=login&loginname=zhazha&loginPwd=8888
POST / GET
Remark:
loginname & loginPwd is essential;
will get a token after correct login;
the token will expire in 24 Hours.
API Response sample:
{
"data": {
"Approved": false,
"CompanyName": "宁波有为科技有限公司",
"CreatedStamp": "/Date(1462080096046+0800)/",
"Email": "633@ss.com",
"IdNo": "52623",
"Key": "1aff546e-c460-446f-8139-1c676afbf46d",
"LoginName": "zhazha",
"Password": null,
"RealName": "牛二",
"Token": "bf8eadb2-a42e-4d8b-9a4d-0b69de8544ef"
},
"msg": "登录成功",
"responseCode": {
"msgCode": 200,
"msgDetail": "OK"
},
"serverTime": "2016-05-01 13:21:36",
"success": true
}
getDictionarys
1) 取父级
URL:
http://localhost:2448/api/ashx/service.ashx?action=getDictionarys&token=4484E69D-8B6B-4F2E-89B6-8106B5B4A198
POST / GET
Response data sample:
{
"data": {
"List": [
{
"CreatedStamp": "/Date(1462074405971+0800)/",
"Key": "03e98553-d65b-485b-8c14-1e13ee8e2793",
"Name": "空调品牌",
"ParentKey": null,
"Tag": "AirConditionBrand"
},
{
"CreatedStamp": "/Date(1462074405971+0800)/",
"Key": "fbbb640d-9ce0-46d6-bf2b-7d9d548fc4a4",
"Name": "房屋类型",
"ParentKey": null,
"Tag": "HouseType"
},
{
"CreatedStamp": "/Date(1462074405971+0800)/",
"Key": "811aa0eb-4016-4aa8-bec9-db43102f08e6",
"Name": "房间类型",
"ParentKey": null,
"Tag": "RoomType"
}
]
},
"msg": "success",
"responseCode": {
"msgCode": 200,
"msgDetail": "OK"
},
"serverTime": "2016-05-01 11:46:45",
"success": true
}
2) 取子级
URL:
{
"data": {
"List": [
{
"CreatedStamp": "/Date(1462073970333+0800)/",
"Key": "fbcddf58-954e-4249-9b95-4e94d3efa589",
"Name": "金立",
"ParentKey": "03e98553-d65b-485b-8c14-1e13ee8e2793",
"Tag": null
},
{
"CreatedStamp": "/Date(1462073970334+0800)/",
"Key": "be1e3057-7fae-4064-9fdd-ebf97264e78e",
"Name": "格力",
"ParentKey": "03e98553-d65b-485b-8c14-1e13ee8e2793",
"Tag": null
}
]
},
"msg": "success",
"responseCode": {
"msgCode": 200,
"msgDetail": "OK"
},
"serverTime": "2016-05-01 11:39:32",
"success": true
}
3) 没有授权的异常情况
URL:
response data sample:
{
"data": null,
"msg": null,
"responseCode": {
"msgCode": 401,
"msgDetail": "Unauthorized"
},
"serverTime": "2016-05-01 12:52:45",
"success": false
}
(to be added.)
(the end)
标签:
原文地址:http://www.cnblogs.com/jwiter/p/5450978.html