[TOC=2]
## 枚举变量
### 接收用户类型:( receiver_type )
| 可选值 | 说明 |
| --- | --- |
| admin | 后台管理 |
| user | 前端用户 |
| store | 门店 |
| community | 小区 |
### 接收用户群组:( receiver_group )
| 可选值 | 说明 |
| --- | --- |
| personal | 个人 |
| admin | 管理 |
| store | 门店 |
| community | 小区 |
| all | 全体用户 |
| user | 前端用户 |
## 消息列表
~~~[api]
get:/message/list
int:current_page=1#当前页
int:page_number=10#页码
<<<
success
{
"code": 0,
"data": {
"list": [
{
"id": 1,
"title": "群发消息",//消息标题
"content": "群发内容",//消息内容
"receiver_group": "user",//接收群组
"creator_type": "admin",//发送群组
"creator_id": 1,//发送人id
"link": "",//连接地址
"create_time": "2018-04-23 15:58:05"
}
],
"current_page": 1,
"page_number": 10,
"total": 1
}
}
~~~
## 单独消息
~~~[api]
post:/message/sendPersonal
*string:title=标题#消息接收标题
*string:content=内容#消息内容
*string:receiver_type=user#接收用户类型 详情见枚举变量
*int:receiver_id=1#接收用户的id
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "接收用户类型格式不正确"
}
~~~
## 群组消息
~~~[api]
post:/message/sendGroups
*string:title=标题#消息接收标题
*string:content=内容#消息内容
*string:receiver_group=all#接收用户组 详情见枚举变量
<<<
success
{
"code": 0
}
<<<
error
{
"code": -1,
"msg": "接收用户组类型格式不正确"
}
~~~
## 删除消息
~~~[api]
post:/message/delete
*int:id=1#消息id
<<<
success
{
"code": 0
}
~~~
## 消息搜索
~~~[api]
get:/message/search
*string:search=消息标题#消息的标题关键字
string:receiver_group=all#接收用户组 详情见枚举变量 默认所有的
<<<
success
{
"code": 0,
"data": {
"list": [
{
"id": 3,
"title": " 我是群的",
"content": "群发内容",
"receiver_group": "user",
"creator_type": "admin",
"creator_id": 1,
"link": "",
"create_time": "2018-04-25 11:44:43"
}
]
}
}
~~~