[TOC]
# 获取用户信息
~~~[api]
post:/api/user/getInfo
<<<
success
{
"code": 1,
"msg": "获取成功!",
"data": {
"uid": 2,
"reg_type": null,
"wechat_openid": null,
"wechat_openid_xcx": null,
"wechat_openid_pc": null,
"sina_openid": null,
"qq_openid": null,
"wechat_subscribe": 0,
"username": "13345678988",
"checked": 1,
"address_id": 0,
"nickname": null,
"sex": 0,
"userpic": null,
"is_agent": 0,
"pid": 0,
"agent_level": 0,
"total_bonus": "0.000",
"points": 0,
"cash_points": 0,
"predeposit": "0.00",
"use_predeposit": "0.00",
"wish": 0,
"regdate": 1557292621,
"lastdate": 0,
"regip": null,
"lastip": null,
"loginnum": 0,
"email": null,
"telephone": "13345678988",
"groupid": 0,
"areaid": 0,
"message": 0,
"islock": 0
},
"url": "/api/User/getinfo",
"wait": 3
}
<<<
error
{
"code": 0,
"msg": "请登录后再试!",
"data": “”,
"url": "/api/User/getinfo",
"wait": 3
}
~~~
# 添加宝宝
~~~[api]
post:/api/user/dealbaby
*string:name=王红#宝宝姓名
*birthday=1996-10-8#年月日
sex=1#性别男1女2
touxiang=#头像地址
number:id=0#宝宝表的ID 大于1为更新 小于1为新增
<<<
success
{
"code": 1,
"msg": "操作成功!",
"data": "",
"url": "/api/User/dealbaby",
"wait": 3
}
<<<
error
{
"code": 0,
"msg": "操作失败!",
"data": "",
"url": "/api/User/dealbaby",
"wait": 3
}
~~~
# 获取宝宝
~~~[api]
post:/api/user/getbaby
<<<
success
{
"code": 1,
"msg": "获取成功",
"data": [
{
"id": 1,
"name": "王红",
"touxiang": null,
"birthday": "1996-10-8",
"sex": 2,
"created_time": 1557386632,
"user_id": 1
}
],
"url": "/api/User/getbaby",
"wait": 3
}
<<<
error
{
"code": 0,
"msg": "操作失败!",
"data": "",
"url": "/api/User/dealbaby",
"wait": 3
}
~~~
# 更新昵称和地址
~~~[api]
post:/api/user/updateUser
*string:key=username#用户昵称
*string:data=广东佛山无影脚#地址
<<<
success
{
"code": 1,
"msg": "操作成功",
"data": "",
"url": "/api/User/updateuser",
"wait": 3
}
<<<
error
{
"code": 0,
"msg": "请登录后再试!",
"data": "",
"url": "",
"wait": 3
}
~~~
# 预约
~~~[api]
post:/api/user/addyuyue
*integer:baby_id=1#宝宝ID
*date:date=20190511#预约日期
*string:time_type=am#预约时间 am上午 pm下午
*string:uid=07f3c8b5fa19fe1e6240a9ea#接种点编码
*integer:yimiao_id=1#疫苗ID
<<<
success
{
"code": 1,
"msg": "操作成功!",
"data": "",
"url": "/api/User/yuyue",
"wait": 3
}
<<<
error
{
"code": 0,
"msg": "您已经预约过改诊所了,预约时间为2019-05-11上午",
"data": "",
"url": "",
"wait": 3
}
~~~
# 我的预约
~~~[api]
get:/api/user/myYuyue
<<<
success
{
"code": 1,
"msg": "获取成功!",
"data": [
{
"id": 1,
"jiezhongdian_id": 2,
"date": "2019-05-11",
"time_type": 0,
"user_id": 1,
"created_time": 1557453115,
"baby_id": 1,
"status": 0,//是否已经使用 0 进行 1 已进行
"yimiao_id": 1,
"time_type_text": "上午",
"babyInfo": {
"id": 1,
"name": "王红",
"touxiang": null,
"birthday": "1996-10-8",
"sex": 2
},
"yimiaoInfo": {
"id": 1,
"name": "乙肝",
"icon": null
}
}
],
"url": "/api/User/myyuyue",
"wait": 3
}
<<<
error
无
~~~