## app获取token
~~~[api]
get:/192.168.8.60:8011/index.php/index/publics/settoken
*code=默认值#将react.jsmd5加密后sha1加密后的值
<<<
success
{
"code": 200,
"msg": "success",
"data": "b3c7ea83114c996de20f0e6116762a8f"
}
<<<
error
{
"code": 10002,
"msg": "该应用尚未注册",
"data": ""
}
~~~
*在调用其他接口前必须先执行的操作*
## 获取员工列表
~~~[api]
post:/192.168.8.60:8011/index.php/index/api/memberlis
*token_session=默认值#必穿的token_session。值在settoken中获取
array:name#搜索条件数组
int:page#第几页
<<<
success
{
"code": 200,
"msg": "success",
"data": [
{
"id": 1,
"name": "张志",
"sex": 0,
"status": 1,
"hobby": "游泳",
"is_merried": 0,
"born_time": "1990-01-09 16:23:23",
"address": "山东路11号",
"up_time": 5,
"del_time": null,
"status_info": "正常",
"sex_info": "男",
"merried_info": "未婚"
},
{
"id": 2,
"name": "薛乐乐",
"sex": 0,
"status": 1,
"hobby": "健身",
"is_merried": 0,
"born_time": "1990-01-09 16:23:23",
"address": "山东路22号",
"up_time": 5,
"del_time": null,
"status_info": "正常",
"sex_info": "男",
"merried_info": "未婚"
}
]
}
<<<
error
"code": 10002,
"msg": "该应用尚未注册",
"data": ""
~~~
| 字段名 |描述 |
| --- | --- |
| id | 自增的id |
| name| 用户名 |
| sex_info| 性别 |
| status_info| 状态|
| hobby| 爱好|
| merried_info| 婚嫁|
| born_time| 生日|
| address| 联系地址|
| up_time| 早起时间|
| tel| 手机号|
## 新增员工
~~~[api]
post:/192.168.8.60:8011/index.php/index/api/addmember
*string:token_session#必须带的token_session
*name#用户名
int:sex#性别
int:status#状态
*string:hobby#爱好
int:is_merried#婚嫁
*string:born_time#出生日期
*string:address#联系地址
*int:up_time#起床时间
string:tel#手机号
<<<
success
{
"code": 200,
"msg": "success",
"data": "新增成功"
}
<<<
error
{
"code": 200,
"msg": "请填写员工名",
"data": "请填写员工名"
}
~~~
## 查看某个员工的详情
~~~[api]
get:/192.168.8.60:8011/index.php/index/api/getMemberInfo
*string:token_session=默认值#访问接口必带的token
*int:id#某员工的id值
<<<
success
{
"code": 200,
"msg": "success",
"data": {
"id": 1,
"name": "张志",
"sex": 0,
"status": 1,
"hobby": "游泳",
"is_merried": 0,
"born_time": "1990-01-09 16:23:23",
"address": "山东路11号",
"up_time": 5,
"del_time": null,
"tel": "18724775626",
"status_info": "正常",
"sex_info": "男",
"merried_info": "未婚"
}
}
<<<
error
{
"code": 10001,
"msg": "应用尚未登陆",
"data": ""
}
~~~
## 编辑员工信息
~~~[api]
post:/192.168.8.60:8011/index.php/index/api/editMember
*string:token_session=默认值#访问接口必带的token
*name#用户名
int:sex#性别
int:status#状态
*string:hobby#爱好
int:is_merried#婚嫁
*string:born_time#出生日期
*string:address#联系地址
*int:up_time#起床时间
string:tel#手机号
<<<
success
{
"code": 200,
"msg": "success",
"data": "编辑成功"
}
<<<
error
{
"code": 10001,
"msg": "应用尚未登陆",
"data": ""
}
~~~
##删除员工信息
~~~[api]
get:/192.168.8.60:8011/index.php/index/api/delMember
*string:token_session=默认值#访问接口必带的token_session
*int:id#需要删除的员工id
<<<
success
{
"code": 200,
"msg": "success",
"data": "删除成功"
}
<<<
error
{
"code": 200,
"msg": "ERROR",
"data": "请选择需要删除的员工"
}
~~~