通知详情
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\admin\model\NoticeModel::detail |
| 所属业务 | 消息通知 |
| 来源模块/系统 | 消息通知模型 |
功能说明
通知详情
调用示例
$id = 1;
$result = (new \app\admin\model\NoticeModel())->detail($id);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
id | int | 否 | — | — | 通知ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
notice | object | 通知列表 |
notice.id | int | ID |
notice.title | string | 标题 |
notice.content | string | 内容 |
notice.attachment | string | 附件,逗号分隔 |
notice.accept_time | int | 接收时间 |
notice.read | int | 是否已读:1是,0否 |
notice.type | string | 消息类型:idcsmart官方通知,system系统通知 |
notice.rel_id | int | 关联ID,消息类型是idcsmart时,表示官方消息ID |
count | int | 总数 |
before | object | 上一条 |
next | object | 下一条 |
正常返回
{
"notice": {
"id": 1,
"title": "示例名称",
"content": "string",
"attachment": "string",
"accept_time": 1752984000,
"read": 1,
"type": "string",
"rel_id": 1
},
"count": 1,
"before": {},
"next": {}
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |