[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
無
~~~