@lina
2019-10-09T14:36:47.000000Z
字数 7486
阅读 385
列表项
秒云达
1.0
后台
- 【测试url】http://admin.qian.guangying.link/api
- 【线上url】/api
X-location
: [string] 坐标 lng-lat 请求头带此字段X-unique-key
: [string] 服务端下发的标识,取window.uniqueKey 请求头带此字段X-city
: [string] 所在城市名称 请求头带此字段X-platform-code
: [string] 平台标识字段,所有请求均需要此字段,取window.platformCode 请求头带此字段
- POST请求Content-Type为:Content-Type:application/x-www-form-urlencoded
- 文件上传时Content-Type为:Content-Type:multipart/form-data
- 对于:Content-Type:application/json:Content-Type:application/xml不保证完全支持,请谨慎使用
- 【线上url】待定
- 【测试url】http://admin.qian.guangying.link/api
- 【线上url】/api/
通用图片上传文件服务
请求URL
POST
/image
请求参数
file
: 文件
响应
{
error_code: 0,
data: {
url: 'http://xxx'
}
}
url
: [string] 文件的访问URL
注:请求图片时,需解析图片的cookie,不然无法认证
GET
/captcha
POST
/verifycode
请求参数
captcha_code
: [string] 图形验证码phone
: [string] 手机号
响应
{
error_code: 0,
data: {
}
}
error_code
: [int] 服务器状态码,0 为正常状态,异常状态待定。error_message
:[string] 错误信息,但error_code
不为 0 时返回
data
: [object] 数据字段,所有响应数据都在此字段中list
: [array],当返回数据为列表时会将数据放在该字段
page
: [int] 当前页码,默认为1total
: [int] 总页数pageSize
: [int]
每页数量:本项目常用page_size==10
示例
{
status: 0,
msg: '',
data: {
list: [{
key: value
}],
total: 23
}
}
gender
:[int]0: 未知
1: 男
2: 女
status
: [int]0:未启用
1:启用
status
: [int]1签约申请,2待签约,3已签约,4已驳回,5已取消
{
real_name varchar(16) not null,
phone varchar(16) not null,
id_number varchar(32) not null comment '身份证',
age int(3) default 0 not null comment '年龄',
gender int(1) default 0 not null comment '0未知 1男 2女',
nation varchar(12) default '' not null comment '民族',
marital_sts int(1) not null comment ' 1未婚 2已婚 3离异',
political_sts int(1) not null comment '1共产党员 2共青团员 3群众',
acct_type int(1) not null comment '户口类型,0农村,1城市',
acct_prc_id int null comment '户籍省份id',
acct_prc_name varchar(16) null comment '户籍省份',
acct_city_id int null comment '户籍城市id',
acct_city_name varchar(12) null,
acct_coy_id int null comment '户籍区/县id',
acct_coy_name varchar(255) null comment '户籍区、县名称',
acct_addr varchar(16) null comment '户籍详细地址',
province_id int null,
province_name varchar(12) null,
city_id int null,
city_name varchar(12) null,
county_id int null,
county_name varchar(255) null,
addr varchar(255) null,
em_contact_name varchar(16) null comment '紧急联系人姓名',
em_contact_phone varchar(32) null comment '紧急联系人电话',
em_contact_relationship varchar(32) null comment '与紧急联系人的关系',
id_card_front varchar(256) null comment '身份证正面照片',
id_card_back varchar(256) null comment '身份证反面照片'
company_id int default 0 not null comment '所属用人单位id',(company对象里包含名称)
work_pos varchar(16) null comment '岗位',
work_exp 数组是工作经验,
employee_edu 数组是学历信息
}
{
em_id int not null comment '签约人',
employee 表示签约人信息,
ad_user_id int not null comment '处理人id,管理员id',
ad_user 表示管理员信息,
work_pos varchar(16) default '' not null comment '岗位',
company_id int default 0 not null comment '用人单位id' ,
company 对象表示公司信息,
entry_date date null comment '入职日期',
contract_id int default 0 null comment '合同id',
salary decimal(15, 2) default 0.00 not null comment '薪资',
contract 对象合同信息,
apply_time timestamp default CURRENT_TIMESTAMP not null comment '申请时间',
status int(1) not null comment '1签约申请,2待签约,3已签约,4已驳回,5已取消',
reason varchar(256) null comment '驳回原因',
}
{
contract_name varchar(32) not null comment '合同名称',
contract_body varchar(32) not null comment '合同主体',
company_id int not null comment '用人单位id',
sign_year int(2) not null comment '合同年限',
file_url varchar(64) not null comment '合同文件地址',
status int(1) default 1 not null comment '0禁用,1启用',
}
{
username varchar(32) not null,
name varchar(16) null comment '姓名',
phone varchar(16) null comment '电话',
email varchar(32) null comment '邮箱',
status int(1) default 1 not null comment '0 禁用,1启用',
}
请求URL
GET
/sign_apply
status参数必填
请求参数
keyword
: [string] 关键字搜索姓名、手机号、证件号码 【非必填】status
: [int] 签约状态 【必填】page
: [string] 当前页数 【必填】pageSize
: [string] 每页数量【非必填】start_date
: [date] 入职日期 YYYY-MM-dd格式(只有已签约才有)【非必填】end_date
: [date] 入职日期 YYYY-MM-dd格式(只有已签约才有)【非必填】company_id
: [int] 用人单位id【非必填】
响应
{
"status": 0,
"msg": "",
"data":{
list: [
@签约信息
],
total: 122 // 总数
}
}
请求URL
PUT
/sign_apply/${apply_id}/reject
apply_id是列表下发的主键id,不是签约人的id
请求参数
reason
: [string] 拒绝原因,长度最长为256 【必填】
响应
{
"status": 0,
"msg": "保存成功",
"data": null
}
请求URL
PUT
/sign_apply/{apply_id}/migrate
请求参数
ad_user_id
: [int] 转给具体哪个处理人,非自己 【必填】
响应
{
"status": 0,
"msg": "保存成功",
"data": null
}
请求URL
PUT
/sign_apply/{apply_id}/send
请求参数
company_id
: [int] 用人单位【必填】addr
: [string] 选择的地址【必填】entry_date
: [string] YYYY-MM-dd格式入职时间【必填】work_pos
: [string] 岗位【必填】contract_id
: [int] 合同id【必填】salary
: [int] 薪资【必填】real_name
: [string] 姓名 【必填】
响应
{
"status": 0,
"data": null
"msg": ""
}
请求URL
GET
/employee/id
id为签约人id
请求参数
无
{
"status": 0,
"data": {
@签约人简历信息
},
"msg": ""
}
PUT
/employee/id
id为签约人id
请求参数
基本信息字段
: [string] 略employee_edu
: [array] 教育情况【必填】work_exp
: [array] 工作情况 【必填】
下面给出请求字段
{
"id": 1,
"real_name": "贾向庭",
"phone": "18801156569",
"id_number": "362302199509204035",
...基本信息略
"employee_edu": [
{
"id": 1,
"em_id": 1,
"school": "北京理工大学",
"edu_type": "junior",
"start_date": "2016-08-07",
"end_date": "2019-08-29",
"record_sts": 1,
}
],
"work_exp": [
{
"id": 1,
"em_id": 1,
"company": "依图科技",
"work_pos": "测试",
"salary": "年薪300w",
"departure_reason": "2019-09-29",
"start_date": "2019-08-31",
"end_date": "2019-08-31",
"record_sts": 1
},
{
"id": 2,
"em_id": 1,
"company": "test",
"work_pos": "test",
"salary": "2019-08-07",
"departure_reason": "2019-08-29",
"start_date": "2019-08-31",
"end_date": "2019-08-31",
"record_sts": 1,
}
]
}
请求URL
GET
/contract
请求参数
page
: [int] 获取页数【必填】pageSize
: [int] 每页大小,默认10 【非必填】
响应
{
"status": 0,
"msg": "",
"data": {
list: [
@合同信息
],
total: 122 // 总数
}
}
请求URL
POST
/contract
请求参数
contract_name
: [string] 合同名称 最大32个字符 【必填】contract_body
: [string] 合同主体 最大32个字符 【必填】sign_year
: [int] 合同年限 0~99【必填】company_id
: [int] 公司id 【必填】file_url
: [string] 合同文件url 【必填】
响应
{
"status": 0,
"msg": "",
"data": null,
}
POST
/contract/{id}
请求参数
contract_name
: [string] 合同名称 最大32个字符 【必填】contract_body
: [string] 合同主体 最大32个字符 【必填】sign_year
: [int] 合同年限 0~99【必填】company_id
: [int] 公司id 【必填】file_url
: [string] 合同文件url 【必填】
响应
{
"status": 0,
"msg": "",
"data": null,
}
请求URL
PUT
/contract/{id}/status
请求参数
status
[int] 0禁用,1启用
响应
{
"status": 0,
"msg": "",
"data": null,
}
请求URL
GET
/manager
请求参数
page
: [int] 获取页数【必填】pageSize
: [int] 每页大小,默认10 【非必填】
响应
{
"status": 0,
"msg": "",
"data": {
list: [
@管理员信息
],
total: 122 // 总数
}
}
请求URL
POST
/manager
请求参数
username
: [string] 最少6位最大32个字符 【必填】name
: [string] 姓名 最大个字符 【必填】phone
: [int] 电话【必填】password
: [int] 最少6位 最大32个字符 【必填】
响应
{
"status": 0,
"msg": "",
"data": null,
}
POST
/manager/{id}
请求参数
username
: [string] 最少6位最大32个字符 【必填】name
: [string] 姓名 最大个字符 【必填】phone
: [int] 电话【必填】password
: [int] 最少6位 最大32个字符 【必填】
响应
{
"status": 0,
"msg": "",
"data": null,
}
请求URL
PUT
/manager/{id}/status
请求参数
status
[int] 0禁用,1启用
响应
{
"status": 0,
"msg": "",
"data": null,
}
请求URL
GET
/dict/{dict_item}
dict_item
为Edu_Type则表示获取学历类型的字典
请求参数
无
{
"status": 0,
"msg": "",
"data": [
{
"dict_key": "junior",
"dict_value": "初中"
}, // 还有其他的,具体见dictionary表
],
}
请求URL
GET
/work_pos
请求参数
无
{
"status": 0,
"msg": "",
"data": [
"A岗位", "B岗位","C岗位",
],
}
请求URL
PUT
/work_pos
请求参数
work_pos
: [string] A岗位,B岗位,C岗位 用逗号拼接
{
"status": 0,
"msg": "",
"data": null
}
请求URL
GET
/companies
请求参数
无
{
"status": 0,
"msg": "",
"data": [
{
"id": 1,
"company_name": "test",
}
]
}
请求URL
GET
/handlers
请求参数
无
{
"status": 0,
"msg": "",
"data": [
{
"id": 1,
"name": "test",
}
]
}
只有id, company_name(长度最大32),addr(长度最大512,用英文逗号分隔)三个字段
/company get
/company post 新建
/company/{id} put 编辑
/company/{id} get 查看
请求URL
POST
/weixin/bind
见resources/views/verify.blade.php
window.apiHost = '{{$apiHostType}}://{{$apiHostName}}';
window.apiHostName = '{{$apiHostName}}';
window.params = '{{$params}}}';
params包括userWechatId
、real_name
,两个字段,name字段可能为空
请求URL
POST
/esign/verify
请求参数
id_number
: [string] 身份证real_name
: [string] 身份证userWechatId
: [string] user_wechat表主键的hashid的值
{
"status": 0,
"msg": "",
"data": [
{
"id": 1,
"name": "test",
}
]
}