promotion/README.MD
2019-07-09 19:24:03 +08:00

200 lines
4.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

### 推广系统接口文档
#### 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对应公司信息 |
| | | | 上述参数为空返回所有信息 |
##### 返回参数说明
| 名称 | 类型 | 必填 | 说明 |
| ---------- | ------ | ---- | ---------------- |
| 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
}
#### 5、添加位置服务信息
##### 接口地址
http://192.168.100.20:8888/location
##### 返回格式json
##### 请求方式get
##### 请求示范
http://192.168.100.20:8888/location
##### 请求参数说明
| 名称 | 类型 | 必填 | |
| ---- | ---- | ---- | ---- |
| | | | |
##### 返回参数说明
| 名称 | 类型 | 必填 | 说明 |
| ---- | ---- | ---- | -------- |
| code | int | 是 | 返回状态 |
| | | | |
##### 返回示例
{
"code": 200
}