CRMChat
首页
官网
技术社区
开源地址
序言
系统介绍
安装教程
PHP设置
站点配置
运行服务
程序安装
使用文档
新手入门
站点引用
灵活的超链接使用
深入对接客服
APP打包
消息推送
UNIAPP调试
功能介绍
接口文档
目录结构
PHP目录接口
VUE目录结构
命令行介绍
Think-swoole命令
应用KEY命令
命令行安装命令
开发文档
后台前端打包
常见问题
安装后出现:数据获取失败
客服端登录成功,用户端还是进入了客服反馈
消息能发送、无法收到、刷新后可以看到
接口文档
# chat > v1.0.0 # 总后台/公用接口(无需授权) ## GET 获取验证码 GET /api/admin/captcha_pro > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» img|string|true|none|验证码图片base64| |»» key|string|true|none|验证码key| ## POST 登录 POST /api/admin/login > Body 请求参数 ```yaml type: object properties: account: type: string description: 账号 pwd: type: string description: 密码 imgcode: type: string description: 验证码 key: type: string description: 验证码key required: - account - pwd - imgcode - key ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |body|body|object|false|none| |» account|body|string|true|账号| |» pwd|body|string|true|密码| |» imgcode|body|string|true|验证码| |» key|body|string|true|验证码key| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取登录信息 GET /api/admin/login/info > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» slide|[string]|true|none|登录页轮播图| |»» logo_square|string|true|none|透明logo| |»» logo_rectangle|string|true|none|方形logo| |»» login_logo|string|true|none|登录正常logo| # 总后台/统计 ## GET 统计 GET /api/admin/chart/sum ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 客户首页统计 GET /api/admin/chart ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |year|query|string|true|年| |month|query|string|true|月| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/客服管理/客服管理 ## GET 客服登录 GET /api/admin/chat/kefu/login/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|客服id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 修改客服表单 GET /api/admin/chat/kefu/{id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|客服id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取添加客服表单 GET /api/admin/chat/kefu/add ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除客服 DELETE /api/admin/chat/kefu/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|客服id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改客服 PUT /api/admin/chat/kefu/{id} > Body 请求参数 ```yaml type: object properties: avatar: type: string nickname: type: string account: type: string phone: type: string status: type: string notify: type: string customer: type: string password: type: string true_password: type: string required: - avatar - account - phone ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|客服id| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» avatar|body|string|true|none| |» nickname|body|string|false|none| |» account|body|string|true|none| |» phone|body|string|true|none| |» status|body|string|false|none| |» notify|body|string|false|none| |» customer|body|string|false|none| |» password|body|string|false|none| |» true_password|body|string|false|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 聊天记录 GET /api/admin/chat/kefu/record/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|客服id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改客服状态 PUT /api/admin/chat/kefu/set_status/{id}/{status} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|客服id| |status|path|string|true|状态值| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 添加客服 POST /api/admin/chat/kefu > Body 请求参数 ```yaml type: object properties: avatar: type: string description: 客服头像 uid: type: string description: 用户uid customer: type: string notify: type: string phone: type: string description: 手机号码 account: type: string description: 账号 password: type: string description: 密码 true_password: type: string description: 确认密码 nickname: type: string status: type: string required: - avatar - phone - account - password - true_password ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» avatar|body|string|true|客服头像| |» uid|body|string|false|用户uid| |» customer|body|string|false|none| |» notify|body|string|false|none| |» phone|body|string|true|手机号码| |» account|body|string|true|账号| |» password|body|string|true|密码| |» true_password|body|string|true|确认密码| |» nickname|body|string|false|none| |» status|body|string|false|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 客服列表 GET /api/admin/chat/kefu ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |page|query|string|true|页码| |limit|query|string|true|展示数量| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 查看对话 GET /api/admin/chat/kefu/chat_list ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |uid|query|string|false|none| |to_uid|query|string|false|none| |id|query|string|true|客服id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/客服管理/反馈管理 ## GET 获取修改用户反馈 GET /api/admin/chat/feedback/{%24id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |$id|path|string|true|列表id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 反馈列表 GET /api/admin/chat/feedback ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |title|query|string|false|none| |time|query|string|false|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除用户反馈 DELETE /api/admin/chat/feedback/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|列表id| |Authori-zation|header|string|false|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改用户反馈 PUT /api/admin/chat/feedback/{id} > Body 请求参数 ```yaml type: object properties: make: type: string description: 备注 status: type: string description: 状态0=未查看,1=已查看 ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|列表id| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» make|body|string|false|备注| |» status|body|string|false|状态0=未查看,1=已查看| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/客服管理/话术资源 ## GET 获取话术详情 GET /api/admin/chat/speechcraft/{%24id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |$id|path|string|true|话术列表id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 话术列表 GET /api/admin/chat/speechcraft ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 保存话术(创建话术) POST /api/admin/chat/speechcraft > Body 请求参数 ```yaml type: object properties: title: type: string description: 话术标题 message: type: string description: 话术内容 cate_id: type: string description: 全局话术分类id sort: type: string description: 排序 ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» title|body|string|false|话术标题| |» message|body|string|false|话术内容| |» cate_id|body|string|false|全局话术分类id| |» sort|body|string|false|排序| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除话术 DELETE /api/admin/chat/speechcraft/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|列表id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改话术 PUT /api/admin/chat/speechcraft/{id} > Body 请求参数 ```yaml type: object properties: title: type: string description: 话术标题 message: type: string description: 话术内容 cate_id: type: string description: 全局话术分类id sort: type: string description: 排序 required: - title - cate_id ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|false|none| |body|body|object|false|none| |» title|body|string|true|话术标题| |» message|body|string|false|话术内容| |» cate_id|body|string|true|全局话术分类id| |» sort|body|string|false|排序| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取修改话术 GET /api/admin/chat/speechcraft/{%24id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |$id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取话术创建 GET /api/admin/chat/speechcraft/create ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/客服管理/话术分类 ## GET 获取话术创建 GET /api/admin/chat/speechcraftcate/create ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取修改话术分类 GET /api/admin/chat/speechcraftcate/{%24id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |$id|path|string|true|f分类id| |Authori-zation|header|string|false|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 取话术分类列表 GET /api/admin/chat/speechcraftcate ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 保存话术分类 POST /api/admin/chat/speechcraftcate > Body 请求参数 ```yaml type: object properties: name: type: string description: 分类名称 sort: type: string description: 排序 required: - name ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» name|body|string|true|分类名称| |» sort|body|string|false|排序| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改话术分类 PUT /api/admin/chat/speechcraftcate/{id} > Body 请求参数 ```yaml type: object properties: name: type: string description: 分类名称 sort: type: string description: 排序 required: - name ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|分类id| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» name|body|string|true|分类名称| |» sort|body|string|false|排序| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除话术分类 DELETE /api/admin/chat/speechcraftcate/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|分类id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取话术分类详情 GET /api/admin/chat/speechcraftcate/{%24id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |$id|path|string|true|分类id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/系统管理/管理员 ## GET 退出登陆 GET /api/admin/setting/admin/logout ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改管理员状态 PUT /api/admin/setting/set_status/{id}/{status} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|管理员id| |status|path|string|true|状态值| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/系统管理/菜单管理 ## GET 获取权限菜单创建接口 GET /api/admin/setting/menus/create ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取权限菜单列表接口 GET /api/admin/setting/menus ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 保存权限菜单接口 POST /api/admin/setting/menus ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除权限菜单接口 DELETE /api/admin/setting/menus/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改权限菜单接口 PUT /api/admin/setting/menus/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取修改权限菜单接口 GET /api/admin/setting/menus/{id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/系统管理/应用管理 ## PUT 重置应用token PUT /api/admin/app/reset/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改应用接口 PUT /api/admin/app/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除应用接口 DELETE /api/admin/app/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|应用ID| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 保存应用接口 POST /api/admin/app > Body 请求参数 ```yaml type: object properties: icon: type: string description: 应用图标 example: http://chat.lfmn.fun/uploads/attach/2021/07/20210708/90d8b487cea7ea2545cafcbafb6f6735.jpg name: type: string description: 应用名称 example: 李星云 introduce: type: string description: 应用简介 required: - icon - name ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» icon|body|string|true|应用图标| |» name|body|string|true|应用名称| |» introduce|body|string|false|应用简介| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取应用列表接口 GET /api/admin/app ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取修改应用接口 GET /api/admin/app/{id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|应用id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取应用创建接口 GET /api/admin/app/create ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/附件相关 ## GET 图片附件列表 GET /api/admin/file/file ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» list|[object]|true|none|none| |»»» att_id|integer|true|none|none| |»»» name|string|true|none|名称| |»»» att_dir|string|true|none|地址| |»»» satt_dir|string|true|none|地址| |»»» att_size|string|true|none|大小| |»»» att_type|string|true|none|类型| |»»» pid|integer|true|none|none| |»»» time|integer|true|none|添加时间| |»»» image_type|integer|true|none|附件类型| |»»» module_type|integer|true|none|none| |»»» real_name|string|true|none|none| |»» count|integer|true|none|none| ## PUT 修改图片名称 PUT /api/admin/file/file/update/{id} > Body 请求参数 ```yaml type: object properties: real_name: type: string description: " 图片名称" ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|附件id| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» real_name|body|string|false|图片名称| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 删除图片 POST /api/admin/file/file/delete > Body 请求参数 ```yaml type: object properties: ids: type: string description: 附件id required: - ids ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» ids|body|string|true|附件id| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 移动图片分类 PUT /api/admin/file/file/do_mov > Body 请求参数 ```yaml type: object properties: pid: type: string images: type: string ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» pid|body|string|false|none| |» images|body|string|false|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 上传图片 POST /api/admin/file/upload/{upload_type} > Body 请求参数 ```yaml type: object properties: file: type: string format: binary pid: type: string description: 分类ID example: 分类ID required: - file ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |upload_type|path|string|true|图片上传类型 1本地 2七牛云 3OSS 4COS | |Authori-zation|header|string|true|none| |body|body|object|false|none| |» file|body|string(binary)|true|none| |» pid|body|string|false|分类ID| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» src|string|true|none|图片地址| # 总后台/附件相关/附件分类管理 ## GET 附件分类列表 GET /api/admin/file/category ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 保存附件分类 POST /api/admin/file/category > Body 请求参数 ```yaml type: object properties: pid: type: string description: 上级id name: type: string description: 分类名称 required: - pid - name ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» pid|body|string|true|上级id| |» name|body|string|true|分类名称| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改附件分类 PUT /api/admin/file/category/{id} > Body 请求参数 ```yaml type: object properties: pid: type: string name: type: string ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|分类id| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» pid|body|string|false|none| |» name|body|string|false|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除附件分类 DELETE /api/admin/file/category/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|分类id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取修改附件分类 GET /api/admin/file/category/{%24id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |$id|path|string|true|分类id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/用户管理/用户分组 ## GET 获取分组创建接口 GET /api/admin/user/group/create ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» rules|[object]|true|none|none| |»»» type|string|false|none|none| |»»» field|string|false|none|none| |»»» value|string|false|none|none| |»»» title|string|false|none|none| |»»» props|object|false|none|none| |»»»» type|string|true|none|none| |»»»» placeholder|string|true|none|none| |»»» validate|[object]|false|none|none| |»»»» message|string|false|none|none| |»»»» required|boolean|false|none|none| |»»»» type|string|false|none|none| |»»»» trigger|string|false|none|none| |»» title|string|true|none|none| |»» action|string|true|none|none| |»» method|string|true|none|none| |»» info|string|true|none|none| |»» status|boolean|true|none|none| ## DELETE 删除分组接口 DELETE /api/admin/user/group/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改分组接口 PUT /api/admin/user/group/%3Cid%3E ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 保存分组接口 POST /api/admin/user/group > Body 请求参数 ```yaml type: object properties: group_name: type: string description: 名称 ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» group_name|body|string|false|名称| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取分组列表接口 GET /api/admin/user/group ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» list|[object]|true|none|none| |»»» id|integer|true|none|none| |»»» group_name|string|true|none|分组名称| |»» count|integer|true|none|分组总数| ## GET 获取修分组签接口 GET /api/admin/user/group/{id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» rules|[object]|true|none|none| |»»» type|string|true|none|none| |»»» field|string|true|none|none| |»»» value|integer|true|none|none| |»»» title|string|false|none|none| |»»» props|object|false|none|none| |»»»» type|string|true|none|none| |»»»» placeholder|string|true|none|none| |»»» validate|[object]|false|none|none| |»»»» message|string|false|none|none| |»»»» required|boolean|false|none|none| |»»»» type|string|false|none|none| |»»»» trigger|string|false|none|none| |»» title|string|true|none|none| |»» action|string|true|none|none| |»» method|string|true|none|none| |»» info|string|true|none|none| |»» status|boolean|true|none|none| # 总后台/用户管理/用户标签 ## POST 保存标签接口 POST /api/admin/user/label > Body 请求参数 ```yaml type: object properties: cate_id: type: string description: 分类id label: type: string description: 标签名称 required: - cate_id - label ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» cate_id|body|string|true|分类id| |» label|body|string|true|标签名称| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取标签列表接口 GET /api/admin/user/label ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |cate_id|query|string|true|分类id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取标签创建接口 GET /api/admin/user/label/create ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取修改标签接口 GET /api/admin/user/label/{id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|获取修改标签表单| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改标签接口 PUT /api/admin/user/label/{id} > Body 请求参数 ```yaml type: object properties: cate_id: type: string description: 分类id label: type: string description: 标签 required: - cate_id - label ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» cate_id|body|string|true|分类id| |» label|body|string|true|标签| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除标签接口 DELETE /api/admin/user/label/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/用户管理/用户标签/标签分类 ## POST 保存标签分类接口 POST /api/admin/user/label/cate ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取标签分类列表接口 GET /api/admin/user/label/cate ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» data|[object]|true|none|none| |»»» id|integer|true|none|分类id| |»»» pid|integer|true|none|上级id| |»»» owner_id|integer|true|none|所属类型| |»»» name|string|true|none|分类名称| |»»» sort|integer|true|none|排序| |»»» type|integer|true|none|类型| |»»» other|string|true|none|其他参数| |»»» add_time|integer|true|none|添加时间| |»» count|integer|true|none|总条数| ## PUT 修改标签分类接口 PUT /api/admin/user/label/cate/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除标签分类接口 DELETE /api/admin/user/label/cate/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取标签分类创建接口 GET /api/admin/user/label/cate/create ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取修改标签分类接口 GET /api/admin/user/label/cate/{id}/edit ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/用户管理/用户列表 ## GET 获取修改用户表单 GET /api/admin/user/edit/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|用户id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» rules|[object]|true|none|none| |»»» type|string|true|none|none| |»»» field|string|true|none|none| |»»» value|string|true|none|none| |»»» title|string|true|none|none| |»»» props|object|true|none|none| |»»»» type|string|true|none|none| |»»»» maxLength|integer|false|none|none| |»»»» title|string|false|none|none| |»»»» src|string|false|none|none| |»»»» icon|string|false|none|none| |»»»» width|string|false|none|none| |»»»» height|string|false|none|none| |»»»» placeholder|string|true|none|none| |»»»» multiple|boolean|false|none|none| |»»» options|[object]|false|none|none| |»»»» label|string|true|none|none| |»»»» value|integer|true|none|none| |»» title|string|true|none|none| |»» action|string|true|none|none| |»» method|string|true|none|none| |»» info|string|true|none|none| |»» status|boolean|true|none|none| ## GET 获取全部标签 GET /api/admin/user/label/all ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|query|string|false|用户id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|[object]|true|none|none| |»» name|string|true|none|分类名称| |»» id|integer|true|none|分类id| |»» label|[object]|true|none|标签| |»»» id|integer|true|none|标签id| |»»» label|string|true|none|标签名称| |»»» user_id|integer|true|none|用户id| |»»» cate_id|integer|true|none|分类id| |»»» create_time|string|true|none|创建时间| ## GET 获取全部分组 GET /api/admin/user/group/all ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|[object]|true|none|none| |»» id|integer|true|none|分组id| |»» group_name|string|true|none|分组名称| ## GET 用户列表 GET /api/admin/user/index ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |nickname|query|string|false|昵称或手机号搜索| |group_id|query|string|false|分组id| |time|query|string|false|时间搜索| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» list|[object]|true|none|none| |»»» id|integer|true|none|自增id| |»»» uid|integer|true|none|用户端uid| |»»» group_id|integer|true|none|分组id| |»»» nickname|string|true|none|昵称| |»»» avatar|string|true|none|头像| |»»» phone|string|true|none|手机号| |»»» last_ip|string|true|none|访问ip| |»»» appid|string|true|none|应用id| |»»» remarks|string|true|none|备注| |»»» is_delete|integer|true|none|是否删除| |»»» is_kefu|integer|true|none|是否客服| |»»» is_tourist|integer|true|none|是否游客| |»»» type|integer|true|none|来源类型| |»»» sex|integer|true|none|性别| |»»» create_time|string|true|none|创建时间| |»»» update_time|string|true|none|更新时间| |»» count|integer|true|none|总条数| ## PUT 批量修改用户标签 PUT /api/admin/user/batch/label > Body 请求参数 ```yaml type: object properties: "ids[]": type: string description: 用户id "label_id[]": type: string description: 标签id "un_label_id[]": type: string description: 取消的标签id required: - ids[] - label_id[] ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» ids[]|body|string|true|用户id| |» label_id[]|body|string|true|标签id| |» un_label_id[]|body|string|false|取消的标签id| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改用户 PUT /api/admin/user/update/{id} > Body 请求参数 ```yaml type: object properties: avatar: type: string description: 头像 nickname: type: string description: 昵称 group_id: type: string description: 分组 remarks: type: string description: 备注 required: - avatar - nickname ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» avatar|body|string|true|头像| |» nickname|body|string|true|昵称| |» group_id|body|string|false|分组| |» remarks|body|string|false|备注| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 批量修改用户分组 PUT /api/admin/user/batch/group > Body 请求参数 ```yaml type: object properties: "ids[]": type: string group_id: type: string required: - ids[] - group_id ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» ids[]|body|string|true|none| |» group_id|body|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 总后台/维护管理/配置分类 ## GET 获取配置分类列表接口 GET /api/admin/setting/config_class ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |status|query|string|false|状态| |title|query|string|false|标题| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» list|[object]|true|none|none| |»»» id|integer|true|none|none| |»»» pid|integer|true|none|上级id| |»»» title|string|true|none|分类名称| |»»» eng_title|string|true|none|分类名称| |»»» status|integer|true|none|状态| |»»» info|integer|true|none|说明| |»»» icon|string|true|none|图标| |»»» type|integer|true|none|类型| |»»» sort|integer|true|none|排序| |»»» children|[object]|false|none|none| |»»»» id|integer|true|none|none| |»»»» pid|integer|true|none|none| |»»»» title|string|true|none|none| |»»»» eng_title|string|true|none|none| |»»»» status|integer|true|none|none| |»»»» info|integer|true|none|none| |»»»» icon|string|true|none|none| |»»»» type|integer|true|none|none| |»»»» sort|integer|true|none|none| |»» count|integer|true|none|none| # 客服后台/用户标签 ## GET 获取用户信息 GET /api/kefu/user/info/{userId} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |userId|path|string|true|用户自增id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取用户标签 GET /api/kefu/user/label/{userId} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |userId|path|string|true|用户自增ID| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 保存用户标签 PUT /api/kefu/user/label > Body 请求参数 ```yaml type: object properties: "user_ids[]": type: string example: 用户自增id label: type: string example: 标签名称 required: - user_ids[] - label ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» user_ids[]|body|string|true|none| |» label|body|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 客服后台/公用接口 ## POST 客服登录 POST /api/kefu/login > Body 请求参数 ```yaml type: object properties: account: type: string description: 账号 password: type: string description: 密码 required: - account - password ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |body|body|object|false|none| |» account|body|string|true|账号| |» password|body|string|true|密码| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 退出登录 POST /api/kefu/user/logout ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 客服后台/客户列表 ## GET 获取当前客服客户列表 GET /api/kefu/user/list ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |nickname|query|string|false|客户名称| |Authori-zation|header|string|true|none| > 返回示例 > 成功 ```json { "status": 200, "msg": "ok", "data": { "S": [ { "id": 2, "appid": "202116257358989495", "user_id": 118, "to_user_id": 1, "nickname": "寿司", "avatar": "http://chat.lfmn.fun/uploads/attach/2021/07/20210708/90d8b487cea7ea2545cafcbafb6f6735.jpg", "is_tourist": 0, "online": 0, "type": 0, "add_time": 0, "update_time": 0, "mssage_num": 0, "message": "", "message_type": 0, "initials": "S" } ] } } ``` ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 设置用户标签 PUT /api/kefu/user/label/{userId} > Body 请求参数 ```yaml type: object properties: "label_ids[]": type: string "un_label_ids[]": type: string required: - label_ids[] - un_label_ids[] ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |userId|path|string|true|none| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» label_ids[]|body|string|true|none| |» un_label_ids[]|body|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 用户标签 GET /api/kefu/user/label ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|query|string|true|用户user_id| |Authori-zation|header|string|true|none| > 返回示例 > 成功 ```json { "status": 200, "msg": "ok", "data": [ { "id": 1, "label": "测试标签", "uid_id": 114, "cate_id": 0, "create_time": "2021-07-13 15:51:49", "user": [] } ] } ``` ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 和客服聊天过的用户 GET /api/kefu/user/record ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|query|string|true|none| |Authori-zation|header|string|true|none| > 返回示例 > 成功 ```json { "status": 200, "msg": "ok", "data": [] } ``` ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 客服后台/用户分组 ## PUT 修改用户分组 PUT /api/kefu/user/group/{userId}/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |userId|path|string|true|用户自增id| |id|path|string|true|分组id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取所有分组 GET /api/kefu/user/group ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 客服后台/个人中心 ## GET 获取当前登录客服信息 GET /api/kefu/user/userInfo ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改当前登录客服 PUT /api/kefu/user/userInfo > Body 请求参数 ```yaml type: object properties: nickname: type: string description: 昵称 avatar: type: string description: 头像 password: type: string description: 不修改返回6个星号 example: "******" phone: type: string description: 手机号 required: - nickname - avatar - phone ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» nickname|body|string|true|昵称| |» avatar|body|string|true|头像| |» password|body|string|false|不修改返回6个星号| |» phone|body|string|true|手机号| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 修改图像 POST /api/kefu/upload > Body 请求参数 ```yaml type: object properties: file: type: string description: 图片 format: binary filename: type: string description: 文件名称 required: - file - filename ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» file|body|string(binary)|true|图片| |» filename|body|string|true|文件名称| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 客服后台/客服工作台 ## DELETE 删除分类 DELETE /api/kefu/service/cate/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|分类id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 编辑分类 PUT /api/kefu/service/cate/{id} > Body 请求参数 ```yaml type: object properties: name: type: string description: 分类名称 sort: type: string description: 排序 required: - name ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|none| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» name|body|string|true|分类名称| |» sort|body|string|false|排序| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 添加话术 POST /api/kefu/service/speechcraft > Body 请求参数 ```yaml type: object properties: title: type: string description: 话术标题 cate_id: type: string description: 分类全局话术id message: type: string description: 话术内容 sort: type: string description: 排序 required: - title - message ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» title|body|string|true|话术标题| |» cate_id|body|string|false|分类全局话术id| |» message|body|string|true|话术内容| |» sort|body|string|false|排序| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 客服话术 GET /api/kefu/service/speechcraft ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 当前客服详细信息 GET /api/kefu/service/info ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 聊天记录 GET /api/kefu/service/list ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 保存分类 POST /api/kefu/service/cate > Body 请求参数 ```yaml type: object properties: name: type: string description: 分类名称 sort: type: string description: 排序 ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» name|body|string|false|分类名称| |» sort|body|string|false|排序| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 客服转接(有问题) POST /api/kefu/service/transfer > Body 请求参数 ```yaml type: object properties: kefuToUserId: type: string description: 转接uid user_id: type: string description: 发送人uid ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» kefuToUserId|body|string|false|转接uid| |» user_id|body|string|false|发送人uid| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 转接客服列表 GET /api/kefu/service/transfer_list ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## DELETE 删除话术 DELETE /api/kefu/service/speechcraft/{id} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|话术id| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## PUT 修改话术 PUT /api/kefu/service/speechcraft/{id} > Body 请求参数 ```yaml type: object properties: title: type: string description: " 话术标题" cate_id: type: string description: 分类全局话术id message: type: string description: " 话术内容" required: - title - cate_id - message ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |id|path|string|true|话术id| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» title|body|string|true|话术标题| |» cate_id|body|string|true|分类全局话术id| |» message|body|string|true|话术内容| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 客服后台/统计 ## GET 获取当前客服统计(首页) GET /api/kefu/statistics/index ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |year|query|string|true|年| |month|query|string|true|月| |Authori-zation|header|string|true|none| > 返回示例 > 成功 ```json { "status": 200, "msg": "ok", "data": [] } ``` ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取客户统计 GET /api/kefu/statistics/all ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 > 成功 ```json { "status": 200, "msg": "ok", "data": { "all": 1, "toDayKefu": 0, "month": 0, "toDayTourist": 0 } } ``` ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # APP ## POST 上传图片 POST /api/mobile/service/upload > Body 请求参数 ```yaml type: object properties: filename: type: string example: file required: - filename ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» filename|body|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取客服广告 GET /api/mobile/service/adv ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## POST 保存客服反馈内容 POST /api/mobile/service/feedback > Body 请求参数 ```yaml type: object properties: rela_name: type: string description: 姓名 phone: type: string description: 电话 content: type: string description: 内容 required: - rela_name - phone - content ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» rela_name|body|string|true|姓名| |» phone|body|string|true|电话| |» content|body|string|true|内容| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取反馈页面广告位内容 GET /api/mobile/service/feedback ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取缓存 GET /api/mobile/service/cache/{key} ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |key|path|string|true|缓存key| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 ## GET 获取聊天记录 GET /api/mobile/user/record ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 状态码 **200** |名称|类型|必选|约束|说明| |---|---|---|---|---| |» status|integer|true|none|none| |» msg|string|true|none|none| |» data|object|true|none|none| |»» serviceList|[string]|true|none|聊天记录| |»» to_user_id|integer|true|none|聊天人id| |»» uid|string|true|none|当前用户id| |»» nickname|string|true|none|当前用户nickname| |»» avatar|string|true|none|当前用户头像| |»» to_user_nickname|string|true|none|聊天人昵称| |»» to_user_avatar|string|true|none|聊天人头像| |»» site_name|string|true|none|页面标题| |»» is_tourist|string|true|none|是否为游客:1=是,0=否| |»» user_id|string|true|none|当前用户自增id| ## POST 保存缓存 POST /api/mobile/service/cache > Body 请求参数 ```yaml type: object properties: key: type: string description: 缓存key值 value: type: string description: 缓存值 required: - key - value ``` ### 请求参数 |名称|位置|类型|必选|说明| |---|---|---|---|---| |Authori-zation|header|string|true|none| |body|body|object|false|none| |» key|body|string|true|缓存key值| |» value|body|string|true|缓存值| > 返回示例 ### 返回结果 |状态码|状态码含义|说明|数据模型| |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|成功|Inline| ### 返回数据结构 # 数据模型
本页目录