mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-08 03:50:50 +08:00
chore(notice): 规范修复与安装演练收尾
This commit is contained in:
@@ -25,7 +25,7 @@ class NoticeBase extends AdminController
|
||||
*/
|
||||
protected const SUBSCRIBE_CHANNELS = [
|
||||
NoticeService::CHANNEL_INMAIL => '站内信',
|
||||
NoticeService::CHANNEL_EMAIL => '邮箱',
|
||||
NoticeService::CHANNEL_EMAIL => '邮箱',
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -72,10 +72,10 @@ class NoticeBase extends AdminController
|
||||
->order($this->sort)
|
||||
->select();
|
||||
$data = [
|
||||
'code' => 0,
|
||||
'msg' => '',
|
||||
'code' => 0,
|
||||
'msg' => '',
|
||||
'count' => $count,
|
||||
'data' => $list,
|
||||
'data' => $list,
|
||||
];
|
||||
|
||||
return json($data);
|
||||
@@ -112,11 +112,11 @@ class NoticeBase extends AdminController
|
||||
$sceneTitleMap[$scene] = $info['title'];
|
||||
}
|
||||
$msg = [
|
||||
'id' => (int) $row->id,
|
||||
'title' => (string) ($notice->title ?? '(通知已删除)'),
|
||||
'id' => (int) $row->id,
|
||||
'title' => (string) ($notice->title ?? '(通知已删除)'),
|
||||
'scene_title' => $sceneTitleMap[(string) ($notice->scene ?? '')] ?? (string) ($notice->scene ?? '-'),
|
||||
'content' => (string) ($notice->content ?? ''),
|
||||
'read_time' => (int) $row->read_time,
|
||||
'content' => (string) ($notice->content ?? ''),
|
||||
'read_time' => (int) $row->read_time,
|
||||
'create_time' => (int) $row->create_time,
|
||||
];
|
||||
$this->assign('msg', $msg);
|
||||
@@ -192,16 +192,16 @@ class NoticeBase extends AdminController
|
||||
foreach (array_keys(self::SUBSCRIBE_CHANNELS) as $channel) {
|
||||
$checked = $locked || ($subscribeMap[$scene . '|' . $channel] ?? 1) === 1;
|
||||
$cells[] = [
|
||||
'name' => 'matrix[' . $scene . '][' . $channel . ']',
|
||||
'checked' => $checked ? 'checked' : '',
|
||||
'name' => 'matrix[' . $scene . '][' . $channel . ']',
|
||||
'checked' => $checked ? 'checked' : '',
|
||||
'disabled' => $locked ? 'disabled' : '',
|
||||
];
|
||||
}
|
||||
$matrix[] = [
|
||||
'scene' => $scene,
|
||||
'title' => $info['title'],
|
||||
'scene' => $scene,
|
||||
'title' => $info['title'],
|
||||
'locked' => $locked,
|
||||
'cells' => $cells,
|
||||
'cells' => $cells,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -251,10 +251,10 @@ class NoticeBase extends AdminController
|
||||
->update(['status' => $status, 'update_time' => $now]);
|
||||
} else {
|
||||
Db::name('system_notice_subscribe')->insert([
|
||||
'admin_id' => $adminId,
|
||||
'scene' => (string) $scene,
|
||||
'channel' => (string) $channel,
|
||||
'status' => $status,
|
||||
'admin_id' => $adminId,
|
||||
'scene' => (string) $scene,
|
||||
'channel' => (string) $channel,
|
||||
'status' => $status,
|
||||
'create_time' => $now,
|
||||
'update_time' => $now,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user