🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 消息数据查询 ### 说明 用户在后台的消息中心查询消息。 ### 调用说明 > 1.引入 app\system\controller\Msgcenter; > 2.调用 getMsgs方法 ### 参数 > 请求头中需带入**token**来验证身份信息。说明:会员token(app端),非用户token > #### getMsgs里面的参数 | 参数 | 必填| 类型 | 说明 | 示例 | | --- | --- | --- | --- | --- | | send| true | bool| 是否方法调用 必须是true | true | | data| true | array| 传入具体参数 | | #### getMsgs下data里面的参数 | 参数 | 必填| 类型 | 说明 | 示例 | | --- | --- | --- | --- | --- | | title| false| string |消息标题搜索 | | | type| false| int|类型筛选;类型 用户评论3;系统消息2;其他1|1 | | status| false| int|状态筛选;1未读 2已读| 1| | page| false| int|页码;get\_al为0,默认1| 1| | size| false| int|每页数量;get\_al为0,默认10| 10| | get\_all| false| int|是否获得完整数据,1是;0否;默认1| 1| ~~~ $Msgcenter = new Msgcenter(); $Msgcenter->getMsgs($send, $data); ~~~ ### 返回参数 > 返回类型:**array** | 参数 | 类型 | 说明 | | --- | --- | --- | | code | int | 状态码,返回200表示调用成功 | | msg | string | 操作信息 | | data | array| 返回的array数据 | ### 返回信息 ~~~ [ "code" => 200, "data" => [ "list" => [ [ "id" => 1, "title" => "消息标题", "type" => "类型 用户评论3 系统消息2其他1", "from" => "来源:组件名称", "status" => "状态", "url_con" => "跳转链接文案,没有跳转为空", "url" => "跳转链接,没有跳转为空", "create_time" => 1604653186 ] ], "total_page" => 1, "now_page" => "1", "size" => "10", "num" => 1 ], "msg" => '成功', ] ~~~