判断企业名字是否被注册
- 前提参数 userid token
- 地址 :
/api/v4.0/legal_enterprise/<string:enterprise_name>
方法 GET
参数
- enterprise_name :企业名称,长度不能小于5
返回值
- code 200 成功 -2 企业被注册
- msg
例子
http://172.26.106.36:5000/api/v4.0/legal_enterprise/apple?userid=xxx&token=xxxx
返回
{
"code": 200,
"data": "",
"msg": ""
}
创建企业
- 前提参数 userid token
- 地址 :
/api/v4.0/create_enterprise
方法 GET POST
参数
- enterprise_name :企业名称,长度不能小于5
- phone :电话
- address 地址
- lon 经度 Float 格式:121.487798
- lat 纬度 格式: 31.213695
- radius 半径(米) 整数
- standered_checkin_time 标准上班时间 格式: 09:30:00 下同
- standered_checkout_time 标准下班时间
- lunchbreak_start_time 午休开始时间(可以为空)
- lunchbreak_end_time 午休结束时间 (可以为空)
- icon_id 企业图片 [0-6)
返回值
- code 200 成功 -1 员工已有企业
- msg
例子
http://172.26.106.36:5000/api/v4.0/create_enterprise?userid=1&phone=13126939916&enterprise_name=apple&address=%E6%B9%98%E6%BD%AD%E9%81%931%E5%8F%B7&lon=121.487798&lat=31.213695&radius=100&standered_checkin_time=09:30:00&standered_checkout_time=17:30:00&token=xxx
返回
{
"code": 200,
"data": "",
"msg": "\u521b\u5efa\u6210\u529f"
}
搜索企业
- 前提参数 userid token
- 地址 :
/api/v4.0/search_enterprise/<string:enterprise_name>
方法 GET POST
参数
- enterprise_name :搜索名称
返回值
- code 200 成功
- msg
- data 数组 包含企业对象
- enterprise_id 企业id 字符串类型
- enterprise_name 企业名称
例子
http://172.26.106.36:5000/api/v4.0/search_enterprise/appl?userid=xxx&token=xxx
返回
{
"code": 200,
"data": [
{
"enterprise_id": "asdasd",
"enterprise_name": "apple"
},
{
"enterprise_id": "asdasd",
"enterprise_name": "apple2"
}
],
"msg": ""
}
申请加入企业
- 前提参数 userid token 下面俩地址都行
- 地址1 :
/api/v4.0/apply/<string:enterprise_id>
- 地址2 :
/api/v4.0/apply_name/<string:enterprise_name>
方法 GET
参数
- 地址1参数 enterprise_id 企业id(字符串类型)
- 地址2参数 enterprise_name 企业名称
返回值
- code 200 成功 -1 用户已经有企业 -2 企业不存在
- msg
例子
http://172.26.106.36:5000/api/v4.0/apply_name/apple4?userid=fac3e6797cb04aa2a2a37c830eb6b29b&token=xxx
返回
{
"code": 200,
"data": "",
"msg": "\u7533\u8bf7\u6210\u529f"
}
加入企业状态
- 前提参数 userid token
- 地址 :
/api/v4.0/apply_status
方法 GET
参数
返回值
- code 200 成功
- msg
- data 数组 包含企业对象
- apply_eid 申请企业id (字符串类型)
- apply_name 申请企业名称
- apply_state 申请企业状态 -1 拒绝 0 是申请中 1 是通过
例子
http://172.26.106.36:5000/api/v4.0/apply_status?userid=5&token=xxxx
返回
{
"code": 200,
"data": {
"apply_eid": "123123",
"apply_name": "apple",
"apply_state": "0"
},
"msg": ""
}