# 登入接口 接口地址:/api/common/login 请求方式:跳转地址方式 请求数据: | 参数名 | 说明 | 备注 | | --- | --- | --- | | return_url | 前端的回调地址 | max:500 | 响应数据: ``` 登入成功将跳到地址: return_url?jwt={登入令牌} 前端需获取jwt,用于后续部分用户权限接口 ``` ```$xslt 如何使用jwt: 推荐在header里携带 x-token:jwt(安全性比较好),也可以get/post提交 ``` ```$xslt 前端需要处理登入过期时的响应: { "code": 0, // 返回状态,1代表成功,0代表失败 "msg": "登入过期", // 返回消息 "time": "1586490789", // 响应时间戳 "err_code" : 1 //判断code=0 且 err_code=1 时,表示需要重新登入 } ``` # 提交反馈 接口地址:/api/user/feedback 请求方式:post 请求数据: | 参数名 | 说明 | 备注 | | --- | --- | --- | | x-token | 登入令牌jwt | 必填 | | content | 内容 | max:500 | 响应数据:(json格式) ```json { "code": 1, // 返回状态,1代表成功,0代表失败 "msg": "success", // 返回消息 "time": "1586490789", // 响应时间戳 "data": null // 结果数据,json格式,没数据时为 null } ``` # 查询公告列表 接口地址:/api/announcement/index 请求方式:get 请求数据: | 参数名 | 说明 | 备注 | | --- | --- | --- | | page | 第几页,默认1 | int | | pagenum | 每页几条,默认20 | int,<=1000 | 响应数据: ```json { "code": 1, "err_code": 0, "msg": "查询成功", "time": "1682076315", "data": { "per_page": 20, //分页数 "current_page": 1, //当前页码 "has_more": false, //是否还有下一页 "next_item": null, //下一条数据 "data": [ { "id": 1, "title": "联系我们", "thumb_url": "http://local.appointment.com/uploads/admin/article_content/20230421/ee2a2b125a3c174e11683530a931a69e.jpg" "content": "

我们的地址是 xxx 市区 xxx 街道 xxx 号<\/p>

<\/p>

<\/p>", "admin_id": 1, "create_time": "2023-04-20 23:48:32" }, { "id": 2, "title": "测试", "thumb_url": "http://local.appointment.com/uploads/admin/article_content/20230421/ee2a2b125a3c174e11683530a931a69e.jpg" "content": "

测试<\/p>", "admin_id": 2, "create_time": "2023-04-21 18:58:00" } ] } } ``` # 查询专家列表 接口地址:/api/specialist/index 请求方式:get / post 请求数据: | 参数名 | 说明 | 备注 | | --- | --- | --- | | page | 第几页,默认1 | int | | pagenum | 每页几条,默认20 | int,<=:1000 | 响应数据: ```json { "code": 1, "err_code": 0, "msg": "查询成功", "time": "1682090806", "data": { "per_page": 20, //分页数 "current_page": 1,//当前页码 "has_more": false,//是否还有下一页 "next_item": null, //下一条数据 "data": [ { "id": 1, "name": "张站长", //姓名 "title": "心里医生", //职称 "head_pic": "http://xxxxxxxx", //头像 "sex": 1, //性别:0未知 1男 2女 "desc": "心里医生", //简介 "consultation_direction": "心里医生",//咨询方向 "address_id": 1, //地址id "phone":"123123" //联系电话 } ] } } ``` # 获取地址列表 接口地址:/api/appointment/addressList 请求方式:get / post 请求数据: | 参数名 | 说明 | 备注 | | --- | --- | --- | | page | 第几页,默认1 | int | | pagenum | 每页几条,默认20 | int,<=:1000 | 响应数据: ```json { "code": 1, "err_code": 0, "msg": "查询成功", "time": "1682257527", "data": { "per_page": 20, "current_page": 1, "has_more": false, "next_item": null, "data": [ { "id": 1, "title": "厦门曙光医院", "thumb_url": "http://local.appointment.com/uploads/admin/article_content/20230421/ee2a2b125a3c174e11683530a931a69e.jpg" "address": "福建省厦门市湖里区金尚路127号" }, { "id": 2, "title": "厦门前埔医院", "thumb_url": "http://local.appointment.com/uploads/admin/article_content/20230421/ee2a2b125a3c174e11683530a931a69e.jpg" "address": "地址 : 福建省厦门市湖里区仙岳路3777号\r\n电话 : 0592-5262666" } ] } } ``` # 按地址获取号源信息 接口地址:/api/appointment/getTicketByAddressId 请求方式:get / post 请求数据: | 参数名 | 说明 | 备注 | | --- | --- | --- | | address_id | 地址ID | 必填,int | | daytime | 日期,默认今天 | dateFormat:y-m-d | 响应数据:(json格式) ```json { "code": 1, "err_code": 0, "data": [ { "id": 3, //号源ID "appointment_id": 1, "appointment_daytime": 1682265600, //排号日期 "appointment_daytime_text": "2023-04-24", //排号日期 "provider_id": 3, "address_id": 1, "morning_use": 1, // 上午已被领取(预约号个数) "afternoon_use": 11, // 下午已被领取 "night_use": 0, // 晚上已被领取 "price": 12, //服务价格 "morning_remaining": 29, // 上午剩余(预约号个数) "afternoon_remaining": 10, // 下午剩余 "night_remaining": 10, // 晚上剩余 "morning_num": 30, // 上午放号个数 "morning_start_time": "08:00:00", "morning_end_time": "12:00:00", "afternoon_num": 1, // 下午放号个数 "afternoon_start_time": "14:00:00", "afternoon_end_time": "18:00:00", "night_num": 10, //晚上放号个数 "night_start_time": "20:00:00", "night_end_time": "23:59:59", "status": 1, "create_time": "2023-04-22 16:24:02", "morning_time_period": [ { "period": "08:00:00 - 08:08:00", // 上午可预约时间段 "status": 0 // 状态 , 0 可预约 , 1 已被预约 }, { "period": "08:08:00 - 08:16:00", "status": 0 }, { "period": "08:16:00 - 08:24:00", "status": 0 }, { "period": "08:24:00 - 08:32:00", "status": 0 }, { "period": "08:32:00 - 08:40:00", "status": 0 } ], "afternoon_time_period": [ // 下午可预约时间段 { "period": "14:00:00 - 18:00:00", "status": 0 } ], "night_time_period": [ // 晚上可预约时间段 { "period": "20:00:00 - 20:23:59", "status": 0 }, { "period": "20:23:59 - 20:47:58", "status": 0 }, { "period": "20:47:58 - 21:11:57", "status": 0 } ], "specialist": { //专家信息 "id": 3, "name": "王医生", "title": "妇科大夫", "head_pic": "", "sex": 0, "desc": "妇科大夫", "consultation_direction": "妇科大夫", "address_id": 1, "phone": "" } }, { //其他号源信息 }, { //其他号源信息 } ], "time": "1682318054", "msg": "查询成功" } ``` # 按时间获取地址列表 接口地址:/api/appointment/addressListByDayTime 请求方式:get / post 请求数据: | 参数名 | 说明 | 备注 | | --- | --- | --- | | daytime | 日期,默认今天 | dateFormat:y-m-d | | page | 第几页,默认1 | int | | pagenum | 每页几条,默认20 | int,<=:1000 | 响应数据: ```json { "code": 1, "err_code": 0, "msg": "查询成功", "time": "1682261424", "data": { "per_page": 20, "current_page": 1, "has_more": false, "next_item": null, "data": [ { "id": 1, "title": "厦门曙光医院", "thumb_url": "", "address": "福建省厦门市湖里区金尚路127号" } ] } } ``` # 预约申请 接口地址:/api/user/application 请求方式:get / post | 参数名 | 说明 | 备注 | | --- | --- | --- | | x-token | 登入令牌jwt | require必填 | | name | 姓名 | require , max:50 | | age | 年龄 | int | | birthday | 出生年月 | string , max:50 | | sex | 性别:1男 2女 | int | | phone | 电话 | require,max:50 | | id_card | 身份证 | max:50 | | childs_num | 子女数量 | int | | problem_desc | 问题描述 | max:200 | | requirement_desc | 需求描述 | max:200 | | appointment_ticket_id | 号源id | require, int | | appointment_period | 时段:1上午,2下午,3晚上 | require, int | | appointment_time | 预约时间段 | require, dateFormat: H:i:s - H:i:s | 响应数据: ```json { "code": 0, "err_code": 0, "msg": "此账号 30 天内爽约 3 次, 2 天内不能再预约", "time": "1682333036", "data": null } ``` ```json { "code": 1, "err_code": 0, "msg": " 预约成功", "time": "1682332924", "data": null } ``` # 我的预约列表 接口地址:/api/user/applicationList 请求方式:get / post | 参数名 | 说明 | 备注 | | --- | --- | --- | | x-token | 登入令牌jwt | 必填 | | status | 状态 (默认0): 0全部,1待完成,2已完成 | int | | page | 第几页,默认1 | int | | pagenum | 每页几条,默认20 | int,<=:1000 | 响应数据: ```json { "code": 1, "err_code": 0, "msg": "查询成功", "time": "1682333270", "data": { "per_page": 20, "current_page": 1, "has_more": false, "next_item": null, "data": [ { "id": 3, "name": "小明", "user_id": 1, "age": 0, "birthday": "", "sex": 0, "phone": "1231214545", "id_card": "", "childs_num": 0, "problem_desc": "", "requirement_desc": "", "address_id": "1", "provider_id": 1, "appointment_ticket_id": 1, "appointment_time": "08:00:00 - 12:00:00", "status": 0, "remark": "", "create_time": "2023-04-24 18:42:04", "finish_time": "", "address": { "id": 1, "title": "厦门曙光医院", "thumb_url":"", "address": "福建省厦门市湖里区金尚路127号" }, "specialist": { "id": 1, "name": "张站长", "title": "心里医生", "head_pic": "https:\/\/iph.href.lu\/400x200\/?text=%E5%BF%83%E9%87%8C%E5%92%A8%E8%AF%A2&fg=666666&bg=cccccc", "sex": 2, "desc": "心里医生", "consultation_direction": "心里医生", "address_id": 1, "phone": "12121212" } }, { "id": 2, "name": "小明", "user_id": 1, "age": 0, "birthday": "", "sex": 0, "phone": "1231214545", "id_card": "", "childs_num": 0, "problem_desc": "", "requirement_desc": "", "address_id": "1", "provider_id": 1, "appointment_ticket_id": 1, "appointment_time": "08:00:00 - 12:00:00", "status": 0, "remark": "", "create_time": "2023-04-24 18:42:02", "finish_time": "", "address": { "id": 1, "title": "厦门曙光医院", "thumb_url":"", "address": "福建省厦门市湖里区金尚路127号" }, "specialist": { "id": 1, "name": "张站长", "title": "心里医生", "head_pic": "https:\/\/iph.href.lu\/400x200\/?text=%E5%BF%83%E9%87%8C%E5%92%A8%E8%AF%A2&fg=666666&bg=cccccc", "sex": 2, "desc": "心里医生", "consultation_direction": "心里医生", "address_id": 1, "phone": "12121212" } } ] } } ```