说明
- 下列为后端提供的REST接口,包含uri, 参数, 及返回值
- 使用ajax调用, 传递数据格式为json
接口
用户登入
地址: /customer/login
参数1
phone: string
返回1
2success: bool,
token: string?
用户提交预约维修
地址: /customer/appointment
参数:1
2
3
4
5
6
7name: string,
email: string?,
campus: string,
deviceVersion: string,
systemVersion: string,
description: string,
file: string?
返回:1
success: bool
用户修改当前预约单
地址: /customer/modifyAppointment
参数:1
2
3
4
5
6
7name: string,
email: string?,
campus: string,
deviceVersion: string,
systemVersion: string,
description: string,
file: string?
返回:1
success: bool
用户删除预约
地址: /customer/deleteAppointment
参数:
1 | orderId: string |
返回:
1 | success: bool |
用户登出
地址: /customer/logout
参数:
返回:
1 | success: bool |
用户获取当前预约
地址: /customer/getCurrentAppointment
参数:
返回:
1 | success: bool, |
用户回复某个预约/为某个预约添加评论
地址: /customer/reply
参数:
1 | appointmentId: number, |
返回:
1 | success: bool |
用户获取历史预约
地址: /customer/getAppointments
参数:
返回:
1 | success: bool, |
实际效果举例:
1 | { |
后台登陆
地址: /admin/login
参数:
1 | username: string, |
返回:
1 | success: bool, |
后台登出
地址: /admin/logout
参数:1
token: string
返回:
1 | success: bool |
后台修改自己的密码
地址: /admin/modifyPassword
参数:1
2oldPassword: string,
newPassword: string
返回:1
success: bool
后台查看预约
地址: /admin/listAppointments
参数:
1 | campus: string?, //可以取"xianlin", "gulou", "all", 不传返回全部 |
返回:
1 | success: bool, |
后台接单
地址: /admin/acceptAppointment
参数:1
appointmentId: string
返回:
1 | success: bool |
后台回复预约
地址: /admin/reply
参数:1
2appointmentId: string,
content: string,
返回:
1 | success: bool |
管理员添加后台账号
地址 /admin/createMember
参数:1
2
3
4username: string,
password: string,
location: string,
name: string
返回:1
success: bool
管理员获取后台列表
地址: /admin/listAllMembers
参数:
返回:
1 | success: bool |
管理员修改后台密码
地址: /admin/modifyMemberPassword
参数:
1 | memberId: string, |
返回:
1 | success: bool |