feat: 重构后台管理界面样式并新增商户/帖子审核功能

- 重构后台所有管理页面工具栏,移除图标改用纯文字按钮
- 新增商户管理的批量审核功能与商家详情/审核页面
- 新增帖子管理的批量审核/上下架功能与帖子详情/审核页面
- 新增多媒体相册字段的前后台处理逻辑
- 新增微信订阅消息兼容导出层
- 更新站点版本号并优化品牌色变量
- 新增商户/帖子控制器的详情与审核方法
- 新增 .sql 文件忽略规则
这个提交包含在:
2026-10-23 09:26:22 +08:00
父节点 cb12bf5fc8
当前提交 3a2fcf7142
共有 44 个文件被更改,包括 3080 次插入 和 917 次删除

查看文件

@@ -19,6 +19,12 @@ class Merchant extends Backend
*/
protected $model = null;
/**
* 无需鉴权的方法(后台登录管理员均可访问)
* @var array
*/
protected $noNeedRight = ['detail', 'audit', 'recommend'];
public function _initialize()
{
parent::_initialize();
@@ -37,6 +43,73 @@ class Merchant extends Backend
/**
* 审核商家资质
*/
/**
* 获取单个商家的入驻资质与质检详情
*
* @param int|null $ids 商家ID
* @return string|\think\response\Json
*/
public function detail($ids = null)
{
$id = $this->request->param('ids', 0) ?: $this->request->param('id/d', 0);
if (!$id) {
$this->error('缺少参数ID');
}
$row = $this->model->where('id', $id)->find();
if (!$row) {
$this->error('商家不存在或已删除');
}
$userInfo = [
'id' => $row->user_id,
'nickname' => '未知用户',
'mobile' => '',
'avatar' => '/assets/img/avatar.png'
];
$user = Db::name('user')->where('id', $row->user_id)->field('id,nickname,mobile,avatar')->find();
if ($user) {
$userInfo['nickname'] = $user['nickname'] ?: $userInfo['nickname'];
$userInfo['mobile'] = $user['mobile'] ?: '';
$userInfo['avatar'] = $user['avatar'] ?: $userInfo['avatar'];
}
if ($this->request->param('format') === 'json') {
$data = [
'id' => $row->id,
'name' => $row->name,
'logo' => $row->logo,
'banner' => $row->banner,
'contact' => $row->contact,
'category' => $row->category,
'license' => $row->license,
'notice' => $row->notice,
'recommend' => $row->recommend,
'audit_status' => $row->audit_status,
'audit_reason' => $row->audit_reason,
'shop_status' => $row->shop_status,
'violations' => $row->violations,
'post_count' => $row->post_count,
'createtime_text' => date('Y-m-d H:i:s', $row->createtime),
'user' => $userInfo
];
$this->success('获取成功', null, $data);
}
// 区分模式:audit=专属审核界面,view=纯净详情档案界面
$mode = $this->request->param('mode', '');
if (!$mode) {
$mode = ((int)$row->audit_status === 0) ? 'audit' : 'view';
}
$this->view->assign('mode', $mode);
$this->view->assign('row', $row);
$this->view->assign('userInfo', $userInfo);
if ($mode === 'audit') {
return $this->view->fetch('audit');
}
return $this->view->fetch('detail');
}
public function audit()
{
$ids = $this->request->post('ids');