fix: 完善后台信息审核与表单编辑规范,优化前端发布交互
这个提交包含在:
@@ -144,9 +144,7 @@ class Postaudit extends Backend
|
||||
'content' => $auditStatus === 1
|
||||
? sprintf('您发布的信息「%s」已通过审核并上架展示。', $post['title'])
|
||||
: sprintf('您发布的信息「%s」未通过审核,原因:%s', $post['title'], $reason),
|
||||
'target_id' => $post['id'],
|
||||
'target_type'=> 'post',
|
||||
'status' => 0,
|
||||
'isread' => 0,
|
||||
'createtime' => time(),
|
||||
]);
|
||||
|
||||
@@ -159,7 +157,7 @@ class Postaudit extends Backend
|
||||
}
|
||||
|
||||
$actionText = $auditStatus === 1 ? '审核通过' : '审核驳回';
|
||||
AdminLog::record(sprintf('%s,涉及 %d 条信息(成功 %d 条,跳过 %d 条)', $actionText, count($ids), $changed, $skipped));
|
||||
AdminLog::setTitle(sprintf('%s,涉及 %d 条信息(成功 %d 条,跳过 %d 条)', $actionText, count($ids), $changed, $skipped));
|
||||
|
||||
$msg = $changed > 0
|
||||
? sprintf('%s成功(已处理 %d 条)', $actionText, $changed)
|
||||
@@ -258,6 +256,22 @@ class Postaudit extends Backend
|
||||
return $this->view->fetch('fc/post/detail');
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核队列位置(供审核工作台显示「第 x / y 条」和上/下一条)
|
||||
* GET fc/postaudit/queue?id=123
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function queue()
|
||||
{
|
||||
$id = (int)$this->request->param('id', 0);
|
||||
$row = Db::name('fc_post')->where('id', $id)->whereNull('deletetime')->find();
|
||||
if (!$row) {
|
||||
$this->error('信息不存在或已删除');
|
||||
}
|
||||
$this->success('', null, $this->auditQueue($row));
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算待审核队列的上下文(第几条、总数、上一条、下一条)
|
||||
*
|
||||
|
||||
在新工单中引用
屏蔽一个用户