This commit is contained in:
root 2019-07-09 17:46:08 +08:00
commit 6beab92f2a

165
README.MD Normal file
View File

@ -0,0 +1,165 @@
### 推广系统接口文档
#### 1、获得公司列表
##### 接口地址
http://192.168.100.20:8888/company
##### 返回格式json
##### 请求方式get
##### 请求示范
http://192.168.100.20:8888/company?status=0
##### 请求参数说明
| 名称 | 类型 | 必填 | |
| ------ | ---- | ---- | ---------------------------------- |
| status | int | 是 | 0=未审批1=审批通过2=审批未通过 |
##### 返回参数说明
| 名称 | 类型 | 必填 | 说明 |
| ---------- | ------ | ---- | ---------------- |
| id | int | 否 | 自动产生的公司ID |
| name | string | 是 | 公司名称 |
| contact | string | 是 | 联系人 |
| tel | int | 是 | 联系电话 |
| companyid | string | 是 | 公司标识 |
| companykey | string | 是 | 用于API认证 |
##### 返回示例
{
"code": 200,
"message": [
{
"appid": "zpoHY37u",
"appkey": "undefined",
"contact": "miles",
"id": "1006",
"name": "kingsome",
"status": 0,
"tel": "17771"
},
{
"appid": "5bOaA82t",
"appkey": "undefined",
"contact": "miles",
"id": "1007",
"name": "kingsome",
"status": 0,
"tel": "17771"
}
]
}
#### 2、新增公司信息
##### 接口地址
http://192.168.100.20:8888/company
##### 返回格式json
##### 请求方式post
##### 请求示范
http://192.168.100.20:8888/company?name=kings&contact=pt&tel=1234
##### 请求参数说明
| 名称 | 类型 | 必填 | |
| ------- | ------ | ---- | -------- |
| name | string | 是 | 公司名称 |
| contact | string | 是 | 联系人 |
| tel | string | 是 | 联系电话 |
##### 返回参数说明
| 名称 | 类型 | 必填 | 说明 |
| ---- | ---- | ---- | -------- |
| code | int | 是 | 返回状态 |
| | | | |
##### 返回示例
{
"code": 200
}
#### 3、更改公司信息
##### 接口地址
http://192.168.100.20:8888/company
##### 返回格式json
##### 请求方式put
##### 请求示范
http://192.168.100.20:8888/company?appid=zpoHY37u&appkey=undefined&contact=miles&id=1006&name=kingsome&status=1&tel=17771
##### 请求参数说明
| 名称 | 类型 | 必填 | |
| ------- | ------ | ---- | -------------- |
| name | string | 是 | 公司名称 |
| contact | string | 是 | 联系人 |
| tel | string | 是 | 联系电话 |
| id | int | 是 | 公司id(唯一值) |
| appid | string | 是 | 公司标识 |
| appkey | string | 是 | 认证用,暂无 |
| status | int | 是 | 审批状态 |
##### 返回参数说明
| 名称 | 类型 | 必填 | 说明 |
| ---- | ---- | ---- | -------- |
| code | int | 是 | 返回状态 |
| | | | |
##### 返回示例
{
"code": 200
}
#### 4、删除公司信息
##### 接口地址
http://192.168.100.20:8888/company
##### 返回格式json
##### 请求方式delete
##### 请求示范
http://192.168.100.20:8888/company?id=1006
##### 请求参数说明
| 名称 | 类型 | 必填 | |
| ---- | ---- | ---- | -------------- |
| id | int | 是 | 公司id(唯一值) |
##### 返回参数说明
| 名称 | 类型 | 必填 | 说明 |
| ---- | ---- | ---- | -------- |
| code | int | 是 | 返回状态 |
| | | | |
##### 返回示例
{
"code": 200
}