feat: 新增举报功能及我的举报页面

本次更新主要内容:
1. 新增举报功能,支持举报信息和评价,包含防重复提交和频控保护
2. 新增我的举报页面,展示用户提交的举报记录
3. 新增平台客服弹窗,支持微信在线客服和电话客服
4. 优化消息通知,支持跳转业务页面
5. 新增举报原因字典配置,支持自定义举报原因
6. 修复服务电话默认值问题,移除硬编码兜底
7. 新增相关图标和页面组件,完善用户体验
这个提交包含在:
2026-11-18 10:38:18 +08:00
父节点 e01cedd18e
当前提交 7e22a66de0
共有 31 个文件被更改,包括 3306 次插入 和 157 次删除

查看文件

@@ -6,19 +6,24 @@ use app\common\controller\Backend;
use think\Db;
/**
* 同城-举报
* 同城-举报管理
*
* @icon fa fa-circle-o
* @icon fa fa-flag
*/
class Report extends Backend
{
/**
* FcReport模型对象
* @var \app\admin\model\FcReport
*/
protected $model = null;
/**
* 控制器初始化方法
* 绑定数据模型与状态字典
*
* @return void
*/
public function _initialize()
{
parent::_initialize();
@@ -26,34 +31,423 @@ class Report extends Backend
$this->view->assign("statusList", $this->model->getStatusList());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
* 举报详情与处置工作台
* 聚合全景信息:举报方画像(实名/历史举报数)、被举报方画像(账号状态/发帖数/被举报总数)、
* 被举报标的物全息数据(帖子交易要素/微信号/价格/完整正文/附图,或评价原文/关联原帖背景/双方回复)、
* 用户举证凭证(大图预览)以及联动处置工作台。
*
* @param int|null $ids 举报记录ID
* @return string
*/
public function detail($ids = null)
{
$id = $ids ? $ids : $this->request->param('ids');
$row = $this->model->get($id);
if (!$row) {
$this->error(__('No Results were found'));
}
$row = $row->toArray();
$row['createtime_text'] = !empty($row['createtime']) ? date('Y-m-d H:i:s', (int)$row['createtime']) : '-';
$row['updatetime_text'] = !empty($row['updatetime']) ? date('Y-m-d H:i:s', (int)$row['updatetime']) : '-';
$row['status_tag_text'] = $row['status'] === 'handled' ? '已处理完毕' : '待核实处理';
$row['status_tag_class'] = $row['status'] === 'handled' ? 'fc-tag-handled' : 'fc-tag-pending';
$row['type_tag_text'] = $row['target_type'] === 'post' ? '信息举报' : '评价举报';
$row['type_tag_class'] = $row['target_type'] === 'post' ? 'fc-tag-post' : 'fc-tag-comment';
// 1. 举报人(投诉方)画像
$reporterUser = Db::name('user')->where('id', (int)$row['reporter_id'])->find();
$reporterExt = $reporterUser ? Db::name('fc_user_ext')->where('user_id', $reporterUser['id'])->find() : null;
$reporterReportCount = Db::name('fc_report')->where('reporter_id', (int)$row['reporter_id'])->count();
$reporter = [
'id' => (int)$row['reporter_id'],
'nickname' => $reporterUser ? ($reporterUser['nickname'] ?: $reporterUser['username']) : '未注册/匿名',
'username' => $reporterUser['username'] ?? '-',
'mobile' => $reporterUser['mobile'] ?? '未绑定',
'avatar' => $reporterUser['avatar'] ?? '',
'status' => $reporterUser['status'] ?? 'normal',
'user_type' => $reporterExt ? ($reporterExt['user_type'] == 2 ? '商家' : '个人') : '个人',
'realname' => $reporterExt['realname'] ?? '',
'realname_status'=> $reporterExt ? (int)$reporterExt['realname_status'] : 0,
'realname_text' => ($reporterExt && $reporterExt['realname_status'] == 1) ? ('已实名 (' . ($reporterExt['realname'] ?: '已认证') . ')') : '未实名认证',
'realname_class' => ($reporterExt && $reporterExt['realname_status'] == 1) ? 'text-success' : 'text-muted',
'report_count' => (int)$reporterReportCount,
'createtime' => !empty($reporterUser['createtime']) ? date('Y-m-d', $reporterUser['createtime']) : '-',
];
// 2. 被举报标的与被举报人画像
$targetInfo = [];
$targetImages = [];
$targetAuthor = [];
$relatedPost = []; // 评价举报时关联的原帖全貌
// 本标的累计被举报次数
$targetTotalReports = Db::name('fc_report')
->where('target_type', $row['target_type'])
->where('target_id', $row['target_id'])
->count();
if ($row['target_type'] === 'post') {
$post = Db::name('fc_post')->where('id', (int)$row['target_id'])->find();
if ($post) {
$categoryName = (string)Db::name('fc_category')->where('id', $post['category_id'])->value('name');
$authorUser = Db::name('user')->where('id', $post['user_id'])->find();
$authorExt = $authorUser ? Db::name('fc_user_ext')->where('user_id', $authorUser['id'])->find() : null;
// 作者名下发帖总数与被举报总数
$authorPostCount = Db::name('fc_post')->where('user_id', $post['user_id'])->count();
$authorReportedCount = Db::name('fc_report')->where('target_type', 'post')->where('target_id', 'in', function ($q) use ($post) {
$q->name('fc_post')->where('user_id', $post['user_id'])->field('id');
})->count();
$authorStatus = $authorUser ? ($authorUser['status'] ?? 'normal') : 'normal';
$targetAuthor = [
'id' => $post['user_id'],
'nickname' => $authorUser ? ($authorUser['nickname'] ?: $authorUser['username']) : ('用户' . $post['user_id']),
'mobile' => $authorUser['mobile'] ?? '-',
'status' => $authorStatus,
'status_text' => $authorStatus === 'normal' ? '账号正常' : '账号已受限',
'status_class' => $authorStatus === 'normal' ? 'label-success' : 'label-danger',
'user_type' => $authorExt ? ($authorExt['user_type'] == 2 ? '商家' : '个人') : ($post['identity_type'] == 2 ? '商家' : '个人'),
'realname' => $authorExt['realname'] ?? '',
'realname_status'=> $authorExt ? (int)$authorExt['realname_status'] : 0,
'realname_text' => ($authorExt && $authorExt['realname_status'] == 1) ? ('已实名 (' . ($authorExt['realname'] ?: '已认证') . ')') : '未实名',
'realname_class' => ($authorExt && $authorExt['realname_status'] == 1) ? 'text-success' : 'text-muted',
'is_member' => $authorExt ? (int)$authorExt['is_member'] : 0,
'member_level' => $authorExt['member_level'] ?? '',
'post_count' => (int)$authorPostCount,
'reported_count' => (int)$authorReportedCount,
'reported_class' => $authorReportedCount > 0 ? 'text-danger' : 'text-muted',
];
// 解析帖子图片
if (!empty($post['cover'])) {
$targetImages[] = $post['cover'];
}
if (!empty($post['media'])) {
$mediaList = json_decode($post['media'], true);
if (is_array($mediaList)) {
foreach ($mediaList as $m) {
if (is_string($m) && $m !== '' && !in_array($m, $targetImages, true)) {
$targetImages[] = $m;
}
}
}
}
$targetInfo = [
'id' => $post['id'],
'title' => $post['title'],
'category' => $categoryName ?: '默认分类',
'category_id' => $post['category_id'],
'identity_type' => (int)$post['identity_type'] === 2 ? '商家发布' : '个人发布',
'price' => (float)$post['price'] > 0 ? (string)$post['price'] : '面议',
'price_unit' => $post['price_unit'] ?: '',
'area' => $post['area'] ?: '-',
'address' => $post['address'] ?: '未提供详细地址',
'contact' => $post['contact'] ?: '-',
'phone' => $post['phone'] ?: '-',
'wechat' => $post['wechat'] ?: '-',
'tags' => $post['tags'] ? explode(',', $post['tags']) : [],
'views' => (int)$post['views'],
'likes' => (int)$post['likes'],
'comment_count' => (int)$post['comment_count'],
'is_top' => (int)$post['is_top'] === 1 ? '置顶中' : '未置顶',
'is_paid' => (int)$post['is_paid'] === 1 ? '付费发布' : '免费发布',
'amount' => (float)$post['amount'],
'content' => $post['content'],
'status' => (int)$post['status'] === 1 ? '正常' : '已下架',
'status_val' => (int)$post['status'],
'status_class' => (int)$post['status'] === 1 ? 'label-success' : 'label-danger',
'status_text' => (int)$post['status'] === 1 ? '正常' : '已下架',
'audit_status' => (int)$post['audit_status'] === 1 ? '审核通过' : ((int)$post['audit_status'] === 2 ? '已驳回' : '待审核'),
'createtime' => $post['createtime'] ? date('Y-m-d H:i:s', $post['createtime']) : '-',
'updatetime' => $post['updatetime'] ? date('Y-m-d H:i:s', $post['updatetime']) : '-',
'is_deleted' => false,
];
} else {
$targetInfo = [
'id' => (int)$row['target_id'],
'title' => '(该信息已被物理删除或不存在)',
'category' => '-',
'category_id' => 0,
'identity_type' => '-',
'price' => '-',
'price_unit' => '',
'area' => '-',
'address' => '-',
'contact' => '-',
'phone' => '-',
'wechat' => '-',
'tags' => [],
'views' => 0,
'likes' => 0,
'comment_count' => 0,
'is_top' => '未置顶',
'is_paid' => '免费发布',
'amount' => 0,
'content' => '该帖子已被彻底删除或不存在,无法查看原文细节。',
'status' => '已彻底删除',
'status_val' => 0,
'status_class' => 'label-default',
'status_text' => '已彻底删除',
'audit_status' => '-',
'createtime' => '-',
'updatetime' => '-',
'is_deleted' => true,
];
$targetAuthor = [
'id' => 0,
'nickname' => '未知/账号已注销',
'mobile' => '-',
'status' => 'normal',
'status_text' => '账号未知',
'status_class' => 'label-default',
'user_type' => '个人',
'realname' => '',
'realname_status'=> 0,
'realname_text' => '未实名',
'realname_class' => 'text-muted',
'is_member' => 0,
'member_level' => '',
'post_count' => 0,
'reported_count' => 0,
'reported_class' => 'text-muted',
];
}
} elseif ($row['target_type'] === 'comment') {
$comment = Db::name('fc_comment')->where('id', (int)$row['target_id'])->find();
if ($comment) {
// 评价作者画像(被举报人)
$commentAuthorUser = Db::name('user')->where('id', $comment['user_id'])->find();
$commentAuthorExt = $commentAuthorUser ? Db::name('fc_user_ext')->where('user_id', $commentAuthorUser['id'])->find() : null;
$commentAuthorReportedCount = Db::name('fc_report')->where('target_type', 'comment')->where('target_id', 'in', function ($q) use ($comment) {
$q->name('fc_comment')->where('user_id', $comment['user_id'])->field('id');
})->count();
$cAuthorStatus = $commentAuthorUser ? ($commentAuthorUser['status'] ?? 'normal') : 'normal';
$targetAuthor = [
'id' => $comment['user_id'],
'nickname' => $commentAuthorUser ? ($commentAuthorUser['nickname'] ?: $commentAuthorUser['username']) : ('用户' . $comment['user_id']),
'mobile' => $commentAuthorUser['mobile'] ?? '-',
'status' => $cAuthorStatus,
'status_text' => $cAuthorStatus === 'normal' ? '账号正常' : '账号已受限',
'status_class' => $cAuthorStatus === 'normal' ? 'label-success' : 'label-danger',
'user_type' => $commentAuthorExt ? ($commentAuthorExt['user_type'] == 2 ? '商家' : '个人') : '个人',
'realname' => $commentAuthorExt['realname'] ?? '',
'realname_status'=> $commentAuthorExt ? (int)$commentAuthorExt['realname_status'] : 0,
'realname_text' => ($commentAuthorExt && $commentAuthorExt['realname_status'] == 1) ? ('已实名 (' . ($commentAuthorExt['realname'] ?: '已认证') . ')') : '未实名',
'realname_class' => ($commentAuthorExt && $commentAuthorExt['realname_status'] == 1) ? 'text-success' : 'text-muted',
'is_member' => $commentAuthorExt ? (int)$commentAuthorExt['is_member'] : 0,
'member_level' => $commentAuthorExt['member_level'] ?? '',
'post_count' => (int)Db::name('fc_comment')->where('user_id', $comment['user_id'])->count(),
'reported_count' => (int)$commentAuthorReportedCount,
'reported_class' => $commentAuthorReportedCount > 0 ? 'text-danger' : 'text-muted',
];
// 评价关联的原帖背景信息
$relPost = Db::name('fc_post')->where('id', $comment['post_id'])->find();
if ($relPost) {
$relAuthorUser = Db::name('user')->where('id', $relPost['user_id'])->find();
$relCategoryName = (string)Db::name('fc_category')->where('id', $relPost['category_id'])->value('name');
$relatedPost = [
'id' => $relPost['id'],
'title' => $relPost['title'],
'category' => $relCategoryName ?: '分类',
'author' => $relAuthorUser ? ($relAuthorUser['nickname'] ?: $relAuthorUser['username']) : ('用户' . $relPost['user_id']),
'author_id' => $relPost['user_id'],
'author_mobile' => $relAuthorUser['mobile'] ?? '-',
'price' => (float)$relPost['price'] > 0 ? (string)$relPost['price'] : '面议',
'price_unit' => $relPost['price_unit'] ?: '',
'cover' => $relPost['cover'] ?: '',
'content' => mb_substr(strip_tags($relPost['content']), 0, 80) . '...',
'status' => (int)$relPost['status'] === 1 ? '正常' : '已下架',
];
}
// 评价图片
if (!empty($comment['images'])) {
$cImages = json_decode($comment['images'], true);
if (is_array($cImages)) {
$targetImages = $cImages;
} elseif (is_string($comment['images'])) {
$targetImages = array_filter(explode(',', $comment['images']));
}
}
$cScore = (int)$comment['score'];
$targetInfo = [
'id' => $comment['id'],
'post_id' => $comment['post_id'],
'score' => $cScore,
'score_stars' => str_repeat('★', max(1, min(5, $cScore))),
'content' => $comment['content'],
'reply' => $comment['reply'],
'replytime' => $comment['replytime'] ? date('Y-m-d H:i:s', $comment['replytime']) : '',
'status' => (int)$comment['status'] === 1 ? '正常' : '已屏蔽',
'status_val' => (int)$comment['status'],
'status_class' => (int)$comment['status'] === 1 ? 'label-success' : 'label-danger',
'status_text' => (int)$comment['status'] === 1 ? '正常' : '已屏蔽',
'createtime' => $comment['createtime'] ? date('Y-m-d H:i:s', $comment['createtime']) : '-',
'is_deleted' => false,
];
} else {
$targetInfo = [
'id' => (int)$row['target_id'],
'post_id' => 0,
'score' => 5,
'score_stars' => '★★★★★',
'content' => '该评价已被彻底删除或不存在。',
'reply' => '',
'replytime' => '',
'status' => '已彻底删除',
'status_val' => 0,
'status_class' => 'label-default',
'status_text' => '已彻底删除',
'createtime' => '-',
'is_deleted' => true,
];
$targetAuthor = [
'id' => 0,
'nickname' => '未知/账号已注销',
'mobile' => '-',
'status' => 'normal',
'status_text' => '账号未知',
'status_class' => 'label-default',
'user_type' => '个人',
'realname' => '',
'realname_status'=> 0,
'realname_text' => '未实名',
'realname_class' => 'text-muted',
'is_member' => 0,
'member_level' => '',
'post_count' => 0,
'reported_count' => 0,
'reported_class' => 'text-muted',
];
}
}
// 3. 举报人上传的举证凭证
$images = [];
if (!empty($row['images'])) {
$images = array_filter(explode(',', (string)$row['images']));
}
$this->view->assign('row', $row);
$this->view->assign('reporter', $reporter);
$this->view->assign('targetAuthor', $targetAuthor);
$this->view->assign('targetInfo', $targetInfo);
$this->view->assign('targetImages', $targetImages);
$this->view->assign('relatedPost', $relatedPost);
$this->view->assign('targetTotalReports', $targetTotalReports);
$this->view->assign('images', $images);
return $this->view->fetch();
}
/**
* 处理举报
* 处理举报操作
* 支持单个或批量处理,更新 handle_remark 字段(保留用户的原始 remark 补充说明),
* 支持对违规帖子下架或违规评论屏蔽的一键联动处置,
* 并在处理完成后自动向举报人下发系统站内通知消息(附带小程序跳转参数)。
*
* POST 入参:
* - ids: 举报记录 ID 或 ID 数组
* - remark: 管理员处理备注
* - action: 联动处置动作,可选 'none'(默认仅标记)、'offline'(下架被举报信息/屏蔽被举报评论)
*
* @return void
*/
public function handle()
{
$ids = $this->request->post('ids');
$remark = $this->request->post('remark', '');
$remark = trim((string)$this->request->post('remark', ''));
$action = trim((string)$this->request->post('action', 'none'));
$ids = is_array($ids) ? $ids : explode(',', (string)$ids);
$ids = array_filter($ids);
$ids = array_filter(array_map('intval', $ids));
if (!$ids) {
$this->error('请选择要处理的举报');
}
Db::name('fc_report')->where('id', 'in', $ids)->update([
'status' => 'handled',
'remark' => $remark,
'updatetime' => time(),
]);
$this->success('处理成功');
$now = time();
$reports = Db::name('fc_report')->where('id', 'in', $ids)->select();
Db::startTrans();
try {
foreach ($reports as $report) {
$targetTitle = '';
$actionDesc = '平台已核实并记录处理';
// 如果勾选联动下架处置
if ($action === 'offline') {
if ($report['target_type'] === 'post') {
$post = Db::name('fc_post')->where('id', $report['target_id'])->find();
$targetTitle = $post ? (string)$post['title'] : '信息';
$actionDesc = '已下架违规信息';
// 下架对应信息(status 置为 0,并记录 audit_reason)
Db::name('fc_post')->where('id', $report['target_id'])->update([
'status' => 0,
'audit_reason' => '因用户举报违规被管理员下架:' . ($remark ?: $report['reason']),
'updatetime' => $now,
]);
} elseif ($report['target_type'] === 'comment') {
$cmt = Db::name('fc_comment')->where('id', $report['target_id'])->find();
$targetTitle = $cmt ? (mb_substr($cmt['content'], 0, 20) . '...') : '评价';
$actionDesc = '已屏蔽违规评价';
// 屏蔽对应评价(status 置为 0)
Db::name('fc_comment')->where('id', $report['target_id'])->update([
'status' => 0,
'updatetime' => $now,
]);
}
} else {
if ($report['target_type'] === 'post') {
$postTitle = Db::name('fc_post')->where('id', $report['target_id'])->value('title');
$targetTitle = $postTitle ? (string)$postTitle : '信息';
} else {
$cmtContent = Db::name('fc_comment')->where('id', $report['target_id'])->value('content');
$targetTitle = $cmtContent ? (mb_substr($cmtContent, 0, 20) . '...') : '评价';
}
}
// 更新举报记录为已处理,写入管理员处理备注
Db::name('fc_report')->where('id', $report['id'])->update([
'status' => 'handled',
'handle_remark' => $remark,
'updatetime' => $now,
]);
// 若举报人为平台注册用户,自动下发系统站内通知消息
$reporterId = (int)$report['reporter_id'];
if ($reporterId > 0) {
$typeCn = $report['target_type'] === 'post' ? '信息' : '评价';
$remarkNote = $remark !== '' ? ";管理员回复:{$remark}" : '';
$msgContent = "您于 " . date('Y-m-d H:i', $report['createtime']) . " 举报的{$typeCn}《{$targetTitle}》(原因:{$report['reason']}),平台已核实完毕。处理结果:{$actionDesc}{$remarkNote}。点击查看我的举报记录详情。感谢您的监督与支持!";
Db::name('fc_message')->insert([
'user_id' => $reporterId,
'type' => 'system',
'title' => '举报处理结果通知',
'content' => $msgContent,
'extra' => json_encode(['path' => '/pages/mine/reports', 'id' => (int)$report['id']], JSON_UNESCAPED_UNICODE),
'isread' => 0,
'createtime' => $now,
'updatetime' => $now,
]);
}
}
Db::commit();
} catch (\Exception $e) {
Db::rollback();
$this->error('处理失败:' . $e->getMessage());
}
$this->success('处理成功并已下发用户通知');
}
}

查看文件

@@ -115,7 +115,7 @@ class Setting extends Backend
return [
'appName' => $pick('base.appName', '同城分类信息'),
'logo' => $pick('base.logo', ''),
'servicePhone' => $pick('base.servicePhone', '400-000-0000'),
'servicePhone' => $pick('base.servicePhone', ''),
'aboutUs' => $pick('base.aboutUs', ''),
'shareTitle' => $pick('base.shareTitle', ''),
'virtualPayAudit' => (int)$pick('pay.virtualPayAudit', 1),

查看文件

@@ -1,14 +1,14 @@
<?php
return [
'Id' => 'ID',
'Target_type' => '举报对象',
'Id' => '序号',
'Target_type' => '举报类型',
'Target_id' => '对象ID',
'Reason' => '举报原因',
'Reporter_id' => '举报人ID',
'Reporter_id' => '举报人',
'Status' => '处理状态',
'Remark' => '处理备注',
'Createtime' => '创建时间',
'Updatetime' => '更新时间',
'Remark' => '用户说明',
'Createtime' => '举报时间',
'Updatetime' => '处理时间',
'HandleReport' => '处理'
];

查看文件

@@ -5,17 +5,14 @@ namespace app\admin\model;
use think\Model;
use app\common\library\FcRelation;
/**
* 同城-举报数据模型
*/
class FcReport extends Model
{
// 表名
protected $name = 'fc_report';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'integer';
@@ -31,11 +28,25 @@ class FcReport extends Model
'target_title',
];
/**
* 获取举报人昵称获取器
*
* @param mixed $value 原值
* @param array $data 行数据
* @return string
*/
public function getReporterNameAttr($value, $data)
{
return FcRelation::userName(isset($data['reporter_id']) ? $data['reporter_id'] : 0);
}
/**
* 获取被举报对象标题/摘要获取器
*
* @param mixed $value 原值
* @param array $data 行数据
* @return string
*/
public function getTargetTitleAttr($value, $data)
{
$type = isset($data['target_type']) ? $data['target_type'] : '';
@@ -48,9 +59,12 @@ class FcReport extends Model
}
return '';
}
/**
* 获取状态字典
*
* @return array
*/
public function getStatusList()
{
return [
@@ -59,15 +73,17 @@ class FcReport extends Model
];
}
/**
* 获取状态文本获取器
*
* @param mixed $value 原值
* @param array $data 行数据
* @return string
*/
public function getStatusTextAttr($value, $data)
{
$value = $value ?: ($data['status'] ?? '');
$list = $this->getStatusList();
return $list[$value] ?? '';
}
}

查看文件

@@ -0,0 +1,755 @@
<style>
.fc-report-detail {
padding: 16px;
background-color: #f1f5f9;
color: #334155;
font-size: 13px;
}
.fc-card {
background: #ffffff;
border-radius: 8px;
border: 1px solid #e2e8f0;
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
margin-bottom: 14px;
overflow: hidden;
}
.fc-card-header {
padding: 12px 18px;
border-bottom: 1px solid #f1f5f9;
display: flex;
align-items: center;
justify-content: space-between;
background-color: #fafbfd;
}
.fc-card-title {
font-size: 14px;
font-weight: 700;
color: #1e293b;
margin: 0;
display: flex;
align-items: center;
gap: 8px;
}
.fc-card-body {
padding: 16px 18px;
}
.fc-tag {
display: inline-block;
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
white-space: nowrap;
}
.fc-tag-post { background-color: #e0f2fe; color: #0284c7; }
.fc-tag-comment { background-color: #ede9fe; color: #7c3aed; }
.fc-tag-pending { background-color: #fef3c7; color: #d97706; }
.fc-tag-handled { background-color: #dcfce7; color: #15803d; }
/* 双边主体画像对照卡 - 等高对齐 */
.fc-profile-row {
display: flex;
gap: 14px;
margin-bottom: 14px;
align-items: stretch;
}
.fc-profile-col {
flex: 1;
background: #ffffff;
border-radius: 8px;
border: 1px solid #e2e8f0;
padding: 14px 16px;
box-shadow: 0 1px 3px rgba(0,0,0,0.03);
display: flex;
flex-direction: column;
justify-content: space-between;
}
.fc-profile-col.reporter-side {
border-left: 4px solid #3b82f6;
}
.fc-profile-col.target-side {
border-left: 4px solid #ef4444;
}
.fc-profile-title {
font-size: 13px;
font-weight: 700;
margin-bottom: 12px;
display: flex;
align-items: center;
justify-content: space-between;
}
.fc-profile-item {
margin-bottom: 8px;
display: flex;
align-items: center;
font-size: 12px;
}
.fc-profile-item:last-child {
margin-bottom: 0;
}
.fc-profile-item .label-name {
color: #64748b;
width: 75px;
flex-shrink: 0;
}
.fc-profile-item .label-val {
color: #1e293b;
font-weight: 600;
word-break: break-all;
}
/* 交易要素九宫格网格 */
.fc-props-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
margin-bottom: 14px;
}
.fc-prop-cell {
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 6px;
padding: 8px 12px;
}
.fc-prop-cell .cell-title {
font-size: 11px;
color: #64748b;
margin-bottom: 3px;
}
.fc-prop-cell .cell-val {
font-size: 13px;
font-weight: 700;
color: #1e293b;
word-break: break-all;
}
/* 附图画廊 */
.fc-gallery {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 8px;
}
.fc-evidence-img {
width: 96px;
height: 96px;
object-fit: cover;
border-radius: 6px;
border: 1px solid #cbd5e1;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
}
.fc-evidence-img:hover {
transform: scale(1.05);
box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
/* 处置工作台 */
.fc-action-card {
border: 2px solid #00d26a;
background: #fcfdfd;
}
.fc-radio-label {
display: inline-flex;
align-items: center;
margin-right: 24px;
cursor: pointer;
font-weight: 600;
}
.fc-radio-label input {
margin-right: 6px;
}
</style>
<div class="fc-report-detail">
<!-- 0. 案件顶栏摘要 -->
<div class="fc-card" style="margin-bottom: 12px;">
<div class="fc-card-body" style="padding: 12px 18px; display: flex; align-items: center; justify-content: space-between;">
<div style="display: flex; align-items: center; gap: 12px;">
<span style="font-size: 15px; font-weight: 800; color: #0f172a;">工单 #{$row.id}</span>
<span class="fc-tag {$row.type_tag_class}">{$row.type_tag_text}</span>
<span style="font-size: 13px; color: #475569;">
举报原因:<strong class="text-danger">{$row.reason}</strong>
</span>
<span style="font-size: 12px; color: #94a3b8;">
提交时间:{$row.createtime_text}
</span>
</div>
<div style="display: flex; align-items: center; gap: 8px;">
{if condition="$targetTotalReports > 1"}
<span class="label label-danger font-12" style="padding: 4px 8px;">
<i class="fa fa-warning"></i> 累计被举报 {$targetTotalReports} 次
</span>
{/if}
<span class="fc-tag {$row.status_tag_class}">
{$row.status_tag_text}
</span>
</div>
</div>
</div>
<!-- 1. 纠纷双边主体画像(举报方 vs 被举报方) -->
<div class="fc-profile-row">
<!-- 举报方画像 -->
<div class="fc-profile-col reporter-side">
<div>
<div class="fc-profile-title text-primary">
<span><i class="fa fa-user-circle"></i> 举报人(投诉方)画像</span>
<span class="label label-info" style="font-size: 11px; font-weight: normal;">{$reporter.user_type}</span>
</div>
<div class="fc-profile-item">
<span class="label-name">用户昵称:</span>
<span class="label-val">{$reporter.nickname} <span class="text-muted font-11">(UID: {$reporter.id})</span></span>
</div>
<div class="fc-profile-item">
<span class="label-name">联系电话:</span>
<span class="label-val">{$reporter.mobile}</span>
</div>
<div class="fc-profile-item">
<span class="label-name">实名认证:</span>
<span class="label-val {$reporter.realname_class}">
<i class="fa fa-check-circle"></i> {$reporter.realname_text}
</span>
</div>
</div>
<div class="fc-profile-item" style="margin-top: 8px; border-top: 1px dashed #e2e8f0; padding-top: 6px;">
<span class="label-name">历史举报:</span>
<span class="label-val text-primary">累计发起 {$reporter.report_count} 次举报</span>
</div>
</div>
<!-- 被举报人画像 -->
<div class="fc-profile-col target-side">
<div>
<div class="fc-profile-title text-danger">
<span><i class="fa fa-shield"></i> 被举报责任人画像</span>
<span class="label {$targetAuthor.status_class}" style="font-size: 11px; font-weight: normal;">
{$targetAuthor.status_text}
</span>
</div>
{if condition="$targetAuthor.id > 0"}
<div class="fc-profile-item">
<span class="label-name">责任作者:</span>
<span class="label-val">{$targetAuthor.nickname} <span class="text-muted font-11">(UID: {$targetAuthor.id})</span></span>
</div>
<div class="fc-profile-item">
<span class="label-name">绑定手机:</span>
<span class="label-val">{$targetAuthor.mobile}</span>
</div>
<div class="fc-profile-item">
<span class="label-name">身份/实名:</span>
<span class="label-val">
{$targetAuthor.user_type} ·
<span class="{$targetAuthor.realname_class}">{$targetAuthor.realname_text}</span>
</span>
</div>
{else /}
<div class="text-muted" style="padding: 10px 0;"><i class="fa fa-info-circle"></i> 原作者账号已注销或原内容已彻底清理</div>
{/if}
</div>
<div class="fc-profile-item" style="margin-top: 8px; border-top: 1px dashed #e2e8f0; padding-top: 6px;">
<span class="label-name">风控记录:</span>
<span class="label-val">
名下内容累计被举报 <strong class="{$targetAuthor.reported_class}">{$targetAuthor.reported_count}</strong> 次
<span class="text-muted font-11">(历史发布: {$targetAuthor.post_count} 条)</span>
</span>
</div>
</div>
</div>
<!-- 2. 被举报标的物全息信息 -->
<div class="fc-card">
<div class="fc-card-header">
<h4 class="fc-card-title">
<i class="fa fa-file-text-o text-warning"></i>
{$row.target_type == 'post' ? '被举报信息(帖子)完整全貌' : '被举报评价原文及交易背景'}
</h4>
<span class="text-muted font-12">
目标ID: #{$row.target_id} &nbsp;|&nbsp;
当前状态:<span class="label {$targetInfo.status_class}">{$targetInfo.status_text}</span>
</span>
</div>
<div class="fc-card-body">
{if condition="$row.target_type == 'post'"}
{if condition="!$targetInfo.is_deleted"}
<!-- 帖子标题与分类 -->
<div style="margin-bottom: 14px; border-bottom: 1px solid #f1f5f9; padding-bottom: 12px;">
<div style="display:flex;align-items:center;gap:10px;">
<span class="label label-primary font-12">{$targetInfo.category}</span>
<span class="label label-default font-12">{$targetInfo.identity_type}</span>
<span class="label {$targetInfo.is_paid == '付费发布' ? 'label-warning' : 'label-default'} font-12">
{$targetInfo.is_paid}
</span>
<h4 style="margin: 0; font-weight: 800; color: #0f172a; font-size: 16px; line-height: 1.4;">{$targetInfo.title}</h4>
</div>
</div>
<!-- 交易与联络要素网格 -->
<div class="fc-props-grid">
<div class="fc-prop-cell">
<div class="cell-title">商品/服务标价</div>
<div class="cell-val text-warning" style="font-size: 15px;">
{if condition="$targetInfo.price != '面议'"}
¥{$targetInfo.price} {$targetInfo.price_unit}
{else /}
面议
{/if}
</div>
</div>
<div class="fc-prop-cell">
<div class="cell-title">联系人称呼</div>
<div class="cell-val">{$targetInfo.contact}</div>
</div>
<div class="fc-prop-cell">
<div class="cell-title">联系电话</div>
<div class="cell-val text-primary"><i class="fa fa-phone"></i> {$targetInfo.phone}</div>
</div>
<div class="fc-prop-cell" style="background: #f0fdf4; border-color: #86efac;">
<div class="cell-title" style="color: #15803d;"><i class="fa fa-weixin"></i> 微信号(重点排查引流)</div>
<div class="cell-val" style="color: #15803d;">{$targetInfo.wechat}</div>
</div>
<div class="fc-prop-cell">
<div class="cell-title">所在区域与位置</div>
<div class="cell-val" title="{$targetInfo.address}">
{$targetInfo.area} · {$targetInfo.address}
</div>
</div>
<div class="fc-prop-cell">
<div class="cell-title">发布与更新时间</div>
<div class="cell-val font-12" style="font-weight: normal;">{$targetInfo.createtime}</div>
</div>
<div class="fc-prop-cell">
<div class="cell-title">运营曝光数据</div>
<div class="cell-val font-12" style="font-weight: normal;">
浏览 <strong>{$targetInfo.views}</strong> · 点赞 <strong>{$targetInfo.likes}</strong> · 评论 <strong>{$targetInfo.comment_count}</strong>
</div>
</div>
<div class="fc-prop-cell">
<div class="cell-title">审核状态 / 置顶</div>
<div class="cell-val font-12">{$targetInfo.audit_status} · {$targetInfo.is_top}</div>
</div>
</div>
<!-- 完整正文内容 -->
<div style="margin-bottom: 14px;">
<label class="text-muted" style="display:block;margin-bottom:6px;font-size:12px;font-weight:700;">帖子完整正文长文本:</label>
<div style="font-size:13px;line-height:1.75;color:#1e293b;white-space:pre-wrap;background:#f8fafc;padding:14px;border-radius:6px;border:1px solid #e2e8f0;">{$targetInfo.content}</div>
</div>
<!-- 原帖附图全集 -->
{if condition="!empty($targetImages)"}
<div>
<label class="text-muted" style="display:block;margin-bottom:6px;font-size:12px;font-weight:700;">原帖所有配图(共 {:count($targetImages)} 张,点击查看高清大图):</label>
<div class="fc-gallery">
{foreach name="targetImages" item="tImg"}
<img src="{$tImg}" class="fc-evidence-img" title="点击查看大图" />
{/foreach}
</div>
</div>
{/if}
{else /}
<div class="alert alert-warning no-margin">
<i class="fa fa-warning"></i> 被举报的信息已被彻底删除或不存在,无法查看原文细节。
</div>
{/if}
{else /}
<!-- 评价举报场景 -->
{if condition="!empty($relatedPost)"}
<!-- 关联原帖背景 -->
<div style="background: #f8fafc; padding: 12px 14px; border-radius: 6px; border: 1px dashed #cbd5e1; margin-bottom: 14px;">
<div style="font-size: 11px; color: #64748b; margin-bottom: 4px;"><i class="fa fa-link"></i> 被评价的原信息背景:</div>
<div style="display:flex;align-items:center;justify-content:space-between;">
<span style="font-size: 14px; font-weight: 700; color: #0f172a;">《{$relatedPost.title}》</span>
<span class="text-warning font-bold">
{if condition="$relatedPost.price != '面议'"}
¥{$relatedPost.price} {$relatedPost.price_unit}
{else /}
面议
{/if}
</span>
</div>
<div class="text-muted font-12" style="margin-top: 4px;">
分类:{$relatedPost.category} &nbsp;·&nbsp;
发帖商家:<strong>{$relatedPost.author}</strong> (UID: {$relatedPost.author_id} / 电话: {$relatedPost.author_mobile})
</div>
<div class="text-muted font-12" style="margin-top: 4px; color: #64748b;">
原帖摘要:{$relatedPost.content}
</div>
</div>
{/if}
{if condition="!$targetInfo.is_deleted"}
<div style="background: #ffffff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 14px;">
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;">
<div>
<span class="text-muted font-12">评价星级:</span>
<span class="text-warning" style="font-size:15px;font-weight:700;">
{$targetInfo.score_stars}
<span style="font-size:12px;">({$targetInfo.score} 星)</span>
</span>
</div>
<span class="text-muted font-12">评价发表时间:{$targetInfo.createtime}</span>
</div>
<div style="font-size:13px;line-height:1.7;color:#0f172a;background:#f8fafc;padding:12px;border-radius:6px;border:1px solid #e2e8f0;">
{$targetInfo.content}
</div>
{if condition="!empty($targetImages)"}
<div style="margin-top: 10px;">
<span class="text-muted font-12" style="display:block;margin-bottom:6px;">评价配图(点击查看大图):</span>
<div class="fc-gallery">
{foreach name="targetImages" item="cImg"}
<img src="{$cImg}" class="fc-evidence-img" title="评价配图" />
{/foreach}
</div>
</div>
{/if}
{if condition="!empty($targetInfo.reply)"}
<div style="margin-top: 12px; background: #eefaf2; border-left: 3px solid #00d26a; padding: 10px 14px; border-radius: 0 4px 4px 0;">
<div style="font-weight:700;color:#04874a;font-size:12px;">
<i class="fa fa-reply"></i> 商家公开回复({$targetInfo.replytime}):
</div>
<div style="color:#1e293b;margin-top:4px;font-size:13px;">{$targetInfo.reply}</div>
</div>
{/if}
</div>
{else /}
<div class="alert alert-warning no-margin">
<i class="fa fa-warning"></i> 被举报的评价已被彻底删除或不存在。
</div>
{/if}
{/if}
</div>
</div>
<!-- 3. 举报人提供的补充文字说明与截图证据 -->
<div class="fc-card">
<div class="fc-card-header">
<h4 class="fc-card-title"><i class="fa fa-bullhorn text-danger"></i> 举报人提供的证据与违规说明</h4>
</div>
<div class="fc-card-body">
<div style="margin-bottom: 12px;">
<label class="text-muted" style="display:block;margin-bottom:4px;font-size:12px;font-weight:700;">举报补充说明:</label>
<div style="background:#f8fafc;padding:12px 14px;border-radius:6px;font-size:13px;line-height:1.6;color:#1e293b;border:1px solid #e2e8f0;">
{$row.remark|default='举报人未填写补充文字说明'}
</div>
</div>
{if condition="!empty($images)"}
<div>
<label class="text-muted" style="display:block;margin-bottom:6px;font-size:12px;font-weight:700;">证据截图凭证(点击查看高清大图):</label>
<div class="fc-gallery">
{foreach name="images" item="img"}
<img src="{$img}" class="fc-evidence-img" title="点击查看大图" />
{/foreach}
</div>
</div>
{else /}
<div class="text-muted font-12"><i class="fa fa-info-circle"></i> 举报人未上传截图凭证</div>
{/if}
</div>
</div>
<!-- 4. 审核处置操作面板(待处理时提供工作台,已处理时展示处理记录) -->
{if condition="$row.status == 'pending'"}
<div class="fc-card fc-action-card">
<div class="fc-card-header" style="background-color: #f0fdf4;">
<h4 class="fc-card-title text-success"><i class="fa fa-gavel"></i> 举报核实处置工作台</h4>
<span class="text-muted font-12"><i class="fa fa-bell-o"></i> 处置后系统将自动在数据库事务中向举报人推送通知消息</span>
</div>
<div class="fc-card-body">
<form id="handle-form" class="form-horizontal" role="form">
<input type="hidden" name="ids" value="{$row.id}" />
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2" style="font-weight:700;">处置措施:</label>
<div class="col-xs-12 col-sm-10" style="padding-top:7px;">
<label class="fc-radio-label text-danger">
<input type="radio" name="action" value="offline" checked />
<i class="fa fa-ban"></i>
{$row.target_type == 'post' ? '下架该违规信息,并标记为已处理' : '屏蔽该违规评价,并标记为已处理'}
</label>
<label class="fc-radio-label text-muted">
<input type="radio" name="action" value="none" />
<i class="fa fa-check-circle"></i>
无需下架(内容合规,仅标记处理/驳回举报)
</label>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2" style="font-weight:700;">回复/备注:</label>
<div class="col-xs-12 col-sm-10">
<textarea id="remark" name="remark" class="form-control" rows="3" placeholder="请输入处理备注(该内容将同步通知给举报人)">经平台核实情况属实,已予以处置。感谢您的监督与支持!</textarea>
<span class="help-block text-muted font-12" style="margin-bottom:0;margin-top:6px;">
<i class="fa fa-info-circle"></i> 提示:处理完成后,系统将自动向举报用户下发系统消息通知,用户可在小程序【我的举报】中直接查阅。
</span>
</div>
</div>
<div class="form-group" style="margin-bottom:0;">
<div class="col-xs-12 col-sm-10 col-sm-offset-2">
<button type="button" id="btn-submit-handle" class="btn btn-success btn-embossed" style="min-width:140px;font-weight:700;">
<i class="fa fa-check"></i> 确认处理并通知用户
</button>
<button type="button" id="btn-close-handle" class="btn btn-default btn-embossed" style="margin-left:12px;">
取消关闭
</button>
</div>
</div>
</form>
</div>
</div>
{else /}
<div class="fc-card">
<div class="fc-card-header">
<h4 class="fc-card-title"><i class="fa fa-check-circle text-success"></i> 平台处理记录</h4>
<span class="text-muted font-12">处理时间:{$row.updatetime_text}</span>
</div>
<div class="fc-card-body">
<div class="alert alert-success no-margin">
<p><strong><i class="fa fa-check-square-o"></i> 状态:已核实处理完毕</strong></p>
<p style="margin-top:8px;margin-bottom:0;font-size:13px;">
<strong>处理说明 / 回复内容:</strong>{$row.handle_remark|default='已核实处理'}
</p>
</div>
</div>
</div>
{/if}
</div>
<script>
(function () {
/**
* 刷新父页面列表表格
*/
function refreshParent() {
try {
if (window.parent && window.parent.$ && window.parent.$("#table").length) {
window.parent.$("#table").bootstrapTable('refresh');
}
} catch (e) {}
try {
if (window.top && window.top.$ && window.top.$("#table").length) {
window.top.$("#table").bootstrapTable('refresh');
}
} catch (e) {}
try {
if (window.top && window.top.$) {
window.top.$('.tab-pane.active iframe').each(function () {
if (this.contentWindow && this.contentWindow.$ && this.contentWindow.$("#table").length) {
this.contentWindow.$("#table").bootstrapTable('refresh');
}
});
}
} catch (e) {}
}
/**
* 关闭当前弹窗窗口
*/
function closeDialog() {
try {
var Fast = window.Fast || (window.parent && window.parent.Fast) || (window.top && window.top.Fast);
if (Fast && Fast.api && Fast.api.close) {
Fast.api.close();
return;
}
} catch (e) {}
try {
var l = (window.parent && window.parent.Layer) || (window.parent && window.parent.layer) || (window.top && window.top.Layer) || (window.top && window.top.layer);
if (l) {
var idx = l.getFrameIndex ? l.getFrameIndex(window.name) : null;
if (idx) {
l.close(idx);
return;
}
}
} catch (e) {}
try {
window.close();
} catch (e) {}
}
/**
* 获取可用 Layer 对象
*/
function getLayer() {
try {
if (window.Layer) return window.Layer;
if (window.layer) return window.layer;
if (window.parent && window.parent.Layer) return window.parent.Layer;
if (window.parent && window.parent.layer) return window.parent.layer;
if (window.top && window.top.Layer) return window.top.Layer;
if (window.top && window.top.layer) return window.top.layer;
} catch (e) {}
return null;
}
/**
* 获取可用 Fast 对象
*/
function getFast() {
try {
if (window.Fast && window.Fast.api) return window.Fast;
if (window.parent && window.parent.Fast && window.parent.Fast.api) return window.parent.Fast;
if (window.top && window.top.Fast && window.top.Fast.api) return window.top.Fast;
} catch (e) {}
return null;
}
/**
* 获取可用 Toastr 对象
*/
function getToastr() {
try {
if (window.Toastr) return window.Toastr;
if (window.toastr) return window.toastr;
if (window.parent && window.parent.Toastr) return window.parent.Toastr;
if (window.top && window.top.Toastr) return window.top.Toastr;
} catch (e) {}
return null;
}
// 1. 动态切换处置话术提示
document.addEventListener('change', function (e) {
if (e.target && e.target.name === 'action') {
var remarkArea = document.getElementById('remark');
if (remarkArea) {
if (e.target.value === 'offline') {
remarkArea.value = '经平台核实情况属实,已予以处置。感谢您的监督与支持!';
} else {
remarkArea.value = '经平台核实该内容暂未构成违规。感谢您的反馈与对平台的关注!';
}
}
}
});
// 2. 原生点击事件捕获(双重兜底,即便未加载完 RequireJS 也 100% 响应)
document.addEventListener('click', function (e) {
var target = e.target;
if (!target) return;
// 2.1 点击【确认处理并通知用户】按钮
var submitBtn = target.closest ? target.closest('#btn-submit-handle') : (target.id === 'btn-submit-handle' ? target : null);
if (submitBtn) {
e.preventDefault();
e.stopPropagation();
if (submitBtn.disabled) return false;
var form = document.getElementById('handle-form');
if (!form) return false;
var formData = $(form).serialize();
var l = getLayer();
var f = getFast();
var t = getToastr();
var executeSubmit = function () {
submitBtn.disabled = true;
submitBtn.innerHTML = '<i class="fa fa-spinner fa-spin"></i> 正在提交处理...';
var onDone = function (msg) {
if (t) t.success(msg || '处理成功');
// 1. 立即触发父窗口列表刷新
refreshParent();
// 2. 平滑关闭当前弹窗
setTimeout(function () {
closeDialog();
}, 350);
};
if (f && f.api && f.api.ajax) {
f.api.ajax({
url: 'fc/report/handle',
data: formData
}, function (res, ret) {
onDone(ret && ret.msg ? ret.msg : '处理成功');
return false;
}, function (err) {
submitBtn.disabled = false;
submitBtn.innerHTML = '<i class="fa fa-check"></i> 确认处理并通知用户';
return true;
});
} else {
// 原生 jQuery ajax 兜底
$.ajax({
url: 'fc/report/handle',
type: 'POST',
data: formData,
dataType: 'json',
success: function (ret) {
if (ret.code === 1) {
onDone(ret.msg || '处理成功');
} else {
alert(ret.msg || '处理失败');
submitBtn.disabled = false;
submitBtn.innerHTML = '<i class="fa fa-check"></i> 确认处理并通知用户';
}
},
error: function () {
alert('网络请求异常,请重试');
submitBtn.disabled = false;
submitBtn.innerHTML = '<i class="fa fa-check"></i> 确认处理并通知用户';
}
});
}
};
if (l && l.confirm) {
l.confirm('确定要执行该处置操作吗?系统将自动下发通知给举报人。', {
title: '审核处置确认',
icon: 3
}, function (index) {
l.close(index);
executeSubmit();
});
} else {
if (confirm('确定要执行该处置操作吗?系统将自动下发通知给举报人。')) {
executeSubmit();
}
}
return false;
}
// 2.2 点击【取消关闭】按钮
var closeBtn = target.closest ? target.closest('#btn-close-handle') : (target.id === 'btn-close-handle' ? target : null);
if (closeBtn) {
e.preventDefault();
e.stopPropagation();
closeDialog();
return false;
}
// 2.3 点击证据或配图查看高清大图
var imgTarget = target.closest ? target.closest('.fc-evidence-img') : (target.classList && target.classList.contains('fc-evidence-img') ? target : null);
if (imgTarget) {
e.preventDefault();
e.stopPropagation();
var src = imgTarget.getAttribute('src');
if (!src) return false;
var l = getLayer();
if (l && l.open) {
l.open({
type: 1,
title: false,
closeBtn: 1,
area: ['auto', 'auto'],
skin: 'layui-layer-nobg',
shadeClose: true,
content: '<div style="text-align:center;padding:12px;background:#ffffff;border-radius:8px;max-width:92vw;max-height:88vh;overflow:auto;"><img src="' + src + '" style="max-width:100%;max-height:80vh;object-fit:contain;border-radius:4px;box-shadow:0 4px 12px rgba(0,0,0,0.15);" /></div>'
});
} else {
window.open(src, '_blank');
}
return false;
}
}, true);
})();
</script>

查看文件

@@ -18,8 +18,8 @@
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}">刷新</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('fc/report/edit')}"
data-operate-del="{:$auth->check('fc/report/del')}"
data-operate-edit="false"
data-operate-del="false"
width="100%">
</table>
</div>

查看文件

@@ -40,7 +40,7 @@ class AdminSetting extends V1
$logo = (string)$this->input('logo', $this->cfg('base.logo', ''));
$this->setCfg('base.appName', $appName);
$this->setCfg('base.logo', $logo);
$this->setCfg('base.servicePhone', (string)$this->input('servicePhone', $this->cfg('base.servicePhone', '400-000-0000')));
$this->setCfg('base.servicePhone', (string)$this->input('servicePhone', $this->cfg('base.servicePhone', '')));
$this->setCfg('base.aboutUs', (string)$this->input('aboutUs', $this->cfg('base.aboutUs', '')));
$this->setCfg('base.shareTitle', (string)$this->input('shareTitle', $this->cfg('base.shareTitle', '')));
// 兼容旧 ui.* 键,保持名称/LOGO 一致
@@ -337,7 +337,7 @@ class AdminSetting extends V1
return [
'appName' => (string)$this->cfg('base.appName', '同城分类信息'),
'logo' => (string)$this->cfg('base.logo', ''),
'servicePhone' => (string)$this->cfg('base.servicePhone', '400-000-0000'),
'servicePhone' => (string)$this->cfg('base.servicePhone', ''),
'aboutUs' => (string)$this->cfg('base.aboutUs', ''),
'shareTitle' => (string)$this->cfg('base.shareTitle', ''),
];

查看文件

@@ -70,6 +70,7 @@ class Message extends V1
'type' => (string)$row['type'],
'title' => (string)$row['title'],
'content' => (string)$row['content'],
'extra' => (string)($row['extra'] ?? ''),
'read' => $isRead,
'createdAt' => $this->iso($row['createtime']),
];

查看文件

@@ -7,20 +7,30 @@ use think\Db;
/**
* 用户端 · 举报(Module-REPORT)
* 路由:
* POST /api/v1/report 举报信息/评价
* POST /api/v1/report 举报信息/评价
* GET /api/v1/report/my 我的举报记录
*
* 说明:举报原因字典由后台配置 fc_config 的 report.reasons(JSON 数组)维护,
* 小程序端从站点配置读取;本接口只做「必填 + 类型合法 + 对象存在」校验,
* 允许举报原因使用字典外的自定义文案(前端传字典项,`detail` 传补充说明)。
* 小程序端从站点配置读取;本接口做「必填 + 类型合法 + 对象存在 + 防重复提交」校验,
* 允许举报原因使用字典外的自定义文案(前端传字典项,`detail` 传补充说明,`images` 传截图凭证)。
*/
class Report extends V1
{
/**
* POST /api/v1/report {targetType:'post'|'comment',targetId,reason,detail?}
* → {reportId}
* 规则:targetType 仅 post/comment(否则 fail('举报类型不支持'));
* reason 必填(否则 fail('请选择举报原因'));被举报对象必须存在;
* detail 作为补充说明写入 fc_report.remark,状态默认 pending(待后台处理)。
* 提交举报
* POST /api/v1/report
* 入参:{targetType:'post'|'comment', targetId, reason, detail?, images?}
* 出参:{reportId}
*
* 业务规则:
* 1. 必须登录;
* 2. targetType 仅支持 'post' 或 'comment';
* 3. reason 必填;
* 4. 被举报对象(信息/评价)必须真实存在;
* 5. 防重复提交:同用户对同一目标存在 pending 状态举报时拦截;
* 6. 频控保护:单日举报上限 15 次,防止恶意刷库。
*
* @return void
*/
public function create()
{
@@ -56,20 +66,112 @@ class Report extends V1
}
}
// 防重复举报:同一用户对同一条内容若已有待核实的举报,不允许重复提交
$existsPending = Db::name('fc_report')
->where('reporter_id', (int)$user['id'])
->where('target_type', $targetType)
->where('target_id', $targetId)
->where('status', 'pending')
->find();
if ($existsPending) {
$this->fail('您已提交过该举报,平台正在核实中,请勿重复提交');
}
// 频控保护:单日单个用户举报上限 15 次
$todayStart = strtotime('today');
$todayCount = Db::name('fc_report')
->where('reporter_id', (int)$user['id'])
->where('createtime', '>=', $todayStart)
->count();
if ($todayCount >= 15) {
$this->fail('今日举报次数已达上限,感谢您的监督');
}
$detail = trim((string)$this->input('detail', ''));
$rawImages = $this->input('images', '');
if (is_array($rawImages)) {
$images = implode(',', array_filter(array_map('trim', $rawImages)));
} else {
$images = trim((string)$rawImages);
}
if (mb_strlen($images) > 1000) {
$images = mb_substr($images, 0, 1000);
}
$now = time();
$reportId = Db::name('fc_report')->insertGetId([
'target_type' => $targetType,
'target_id' => $targetId,
'reason' => $reason,
'reporter_id' => (int)$user['id'],
'status' => 'pending',
'remark' => mb_substr($detail, 0, 200),
'createtime' => $now,
'updatetime' => $now,
'target_type' => $targetType,
'target_id' => $targetId,
'reason' => $reason,
'images' => $images,
'reporter_id' => (int)$user['id'],
'status' => 'pending',
'remark' => mb_substr($detail, 0, 200),
'handle_remark' => '',
'createtime' => $now,
'updatetime' => $now,
]);
$this->ok(['reportId' => $reportId]);
}
/**
* 获取当前用户的举报历史记录
* GET /api/v1/report/my
* 入参:{page, size}
* 出参:分页对象 {list:[...], page, size, total, hasMore}
*
* @return void
*/
public function my()
{
$user = $this->auth();
list($rows, $total, $page, $size) = $this->pageQuery(function ($forCount) use ($user) {
$q = Db::name('fc_report')->where('reporter_id', (int)$user['id']);
if ($forCount) {
return $q;
}
return $q->order('id desc');
});
$list = [];
foreach ($rows as $row) {
$targetTitle = '';
if ($row['target_type'] === 'post') {
$postTitle = Db::name('fc_post')->where('id', $row['target_id'])->value('title');
$targetTitle = $postTitle ? (string)$postTitle : '信息已下架或删除';
} elseif ($row['target_type'] === 'comment') {
$commentContent = Db::name('fc_comment')->where('id', $row['target_id'])->value('content');
$targetTitle = $commentContent ? (mb_substr($commentContent, 0, 30) . (mb_strlen($commentContent) > 30 ? '...' : '')) : '评价已删除';
}
$rawImages = !empty($row['images']) ? explode(',', (string)$row['images']) : [];
$imgUrls = [];
foreach ($rawImages as $img) {
$img = trim((string)$img);
if ($img !== '') {
$imgUrls[] = cdnurl($img, true);
}
}
$list[] = [
'id' => (int)$row['id'],
'targetType' => (string)$row['target_type'],
'targetId' => (int)$row['target_id'],
'targetTitle' => $targetTitle,
'reason' => (string)$row['reason'],
'images' => $imgUrls,
'detail' => (string)$row['remark'],
'status' => (string)$row['status'],
'statusText' => $row['status'] === 'handled' ? '已处理' : '核实中',
'handleRemark' => (string)($row['handle_remark'] ?? ''),
'createdAt' => $this->iso($row['createtime']),
'updatedAt' => $this->iso($row['updatetime']),
];
}
$this->ok($this->paginate($list, $total, $page, $size));
}
}

查看文件

@@ -37,7 +37,8 @@ class Setting extends V1
'appName' => $siteName,
'siteName' => $siteName,
'logo' => $logo,
'servicePhone' => (string)$this->cfg('base.servicePhone', ''),
'servicePhone' => (string)$this->cfg('base.servicePhone', ''),
'serviceWorkTime' => (string)$this->cfg('base.serviceWorkTime', '09:00 - 21:00'),
'aboutUs' => (string)$this->cfg('base.aboutUs', ''),
'shareTitle' => $shareTitle !== '' ? $shareTitle : $siteName,
'icons' => (object)$icons,
@@ -48,6 +49,20 @@ class Setting extends V1
],
// 余额支付密码开关(开启后余额支付需验证 6 位支付密码,用户在余额中心设置)
'payPasswordEnabled' => (int)$this->cfg('pay.payPasswordEnabled', 0) === 1,
// 举报原因字典(后台 report.reasons 配置优先,默认兜底)
'reportReasons' => (function() {
$raw = $this->cfg('report.reasons', null);
if (is_array($raw)) {
return $raw;
}
if (is_string($raw) && $raw !== '') {
$json = json_decode($raw, true);
if (is_array($json)) {
return $json;
}
}
return ['虚假信息', '违法违禁', '垃圾广告', '重复发布', '其他'];
})(),
// 微信小程序虚拟支付提审合规保护开关(1=开启合规拦截,0=正式放开,默认1安全过审)
'virtualPayAudit' => (function() {
$sysVal = \think\Db::name('config')->where('name', 'virtual_pay_audit')->value('value');

查看文件

@@ -78,6 +78,7 @@ return [
* 且本表未登记 favorite/:id、follow/:id、report/:id 之类通配规则,不存在被吞风险。
*/
'api/v1/report' => 'api/Report/create',
'api/v1/report/my' => 'api/Report/my',
'api/v1/favorite/list' => 'api/Favorite/list',
'api/v1/favorite/toggle' => 'api/Favorite/toggle',
'api/v1/favorite/status' => 'api/Favorite/status',

查看文件

@@ -2,75 +2,136 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'backend/format'], fu
var Controller = {
index: function () {
// 初始化表格参数配置
// 初始化表格参数配置(举报工单为用户上报材料,关闭后台直接新增与编辑,防止数据篡改)
Table.api.init({
extend: {
index_url: 'fc/report/index' + location.search,
add_url: 'fc/report/add',
edit_url: 'fc/report/edit',
del_url: 'fc/report/del',
add_url: '',
edit_url: '',
del_url: '',
multi_url: 'fc/report/multi',
import_url: 'fc/report/import',
table: 'fc_report',
}
});
var table = $("#table");
// 初始化表格
// 初始化表格,固定操作列在右侧,只展示核心关键内容
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
fixedColumns: true,
fixedRightNumber: 1,
columns: [
[
{checkbox: true},
{field: 'id', title: __('SerialNo'), operate: false, sortable: false, align: 'center', width: '70px', class: 'fc-serial', table: table, formatter: Format.serial},
{field: 'target_type', title: __('Target_type'),
{
field: 'target_type',
title: '举报类型',
width: '90px',
align: 'center',
searchList: {post: __('信息'), comment: __('评价')},
formatter: function (value) {
var m = {post: __('信息'), comment: __('评价')};
return m[value] !== undefined ? m[value] : '-';
if (value === 'post') {
return '<span class="label label-info">信息举报</span>';
}
if (value === 'comment') {
return '<span class="label label-primary">评价举报</span>';
}
return '-';
}
},
{field: 'target_title', title: '举报对象', operate: false, sortable: false, formatter: function (value) {
return value ? value : '-';
}},
{field: 'reason', title: __('Reason'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'reporter_id', title: '举报人', addClass: 'selectpage', extend: "data-source='user/user/index' data-field='nickname'", formatter: function (value, row) {
return row.reporter_name || '-';
}},
{field: 'status', title: __('Status'),
{
field: 'target_title',
title: '举报对象',
operate: false,
sortable: false,
formatter: function (value, row) {
var title = value ? value : ('目标ID: ' + row.target_id);
return '<a href="javascript:;" class="btn-detail-link text-primary font-bold" title="点击查看详情与处置工作台">' + title + '</a>';
},
events: {
'click .btn-detail-link': function (e, value, row, index) {
e.stopPropagation();
Fast.api.open('fc/report/detail?ids=' + row.id, (row.status === 'handled' ? '举报详情' : '审核处理举报') + ' - #' + row.id, {
area: ['880px', '820px']
});
}
}
},
{
field: 'reason',
title: __('Reason'),
operate: 'LIKE',
table: table,
width: '120px',
formatter: function (value) {
return '<span class="text-danger font-bold">' + (value || '-') + '</span>';
}
},
{
field: 'reporter_id',
title: '举报人',
width: '110px',
addClass: 'selectpage',
extend: "data-source='user/user/index' data-field='nickname'",
formatter: function (value, row) {
return row.reporter_name || ('UID:' + value);
}
},
{
field: 'status',
title: __('Status'),
width: '90px',
align: 'center',
searchList: {pending: __('待处理'), handled: __('已处理')},
formatter: Format.statusFormatter({pending: __('待处理'), handled: __('已处理')}, {pending: 'warning', handled: 'success'})
},
{field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime, visible: false},
{
field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate,
formatter: Table.api.formatter.operate,
field: 'createtime',
title: __('Createtime'),
width: '150px',
operate: 'RANGE',
addclass: 'datetimerange',
autocomplete: false,
formatter: Table.api.formatter.datetime
},
{field: 'updatetime', title: __('Updatetime'), operate: false, visible: false},
{
field: 'operate',
title: __('Operate'),
table: table,
align: 'center',
width: '140px',
events: Table.api.events.operate,
formatter: Table.api.formatter.buttons,
buttons: [
{
name: 'handle',
text: '处理',
title: '处理',
classname: 'btn btn-xs btn-success btn-click',
text: '审核处理',
title: function (row) {
return '审核处理举报 - #' + row.id;
},
icon: 'fa fa-gavel',
classname: 'btn btn-xs btn-success btn-dialog',
url: 'fc/report/detail',
extend: 'data-area=\'["920px", "860px"]\'',
visible: function (row) {
return row.status !== 'handled';
},
click: function (options, row) {
Layer.prompt({title: __('请输入处理备注(可选)'), formType: 2}, function (value, index) {
Fast.api.ajax({
url: 'fc/report/handle',
data: {ids: row.id, remark: value}
}, function () {
$('#' + options.tableId).bootstrapTable('refresh');
return false;
});
Layer.close(index);
});
}
},
{
name: 'detail',
text: '详情',
title: function (row) {
return '举报详情 - #' + row.id;
},
classname: 'btn btn-xs btn-info btn-dialog',
icon: 'fa fa-eye',
url: 'fc/report/detail',
extend: 'data-area=\'["920px", "860px"]\''
}
]
}
@@ -81,13 +142,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'backend/format'], fu
// 为表格绑定事件
Table.api.bindevent(table);
// 处理
// 批量处理
$(document).on('click', '.btn-handle', function () {
var ids = Table.api.selectedids(table);
Layer.prompt({title: __('请输入处理备注(可选)'), formType: 2}, function (value, index) {
if (!ids.length) {
Toastr.warning(__('Please select item'));
return;
}
Layer.prompt({title: __('请输入处理备注(可选,将通知举报人)'), formType: 2}, function (value, index) {
Fast.api.ajax({
url: 'fc/report/handle',
data: {ids: ids.join(','), remark: value}
data: {ids: ids.join(','), remark: value, action: 'none'}
}, function (data) {
table.bootstrapTable('refresh');
return false;
@@ -97,6 +162,116 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'backend/format'], fu
});
},
detail: function () {
Controller.api.bindevent();
var Layer = window.Layer || (window.parent && window.parent.Layer) || window.layer || (window.parent && window.parent.layer);
var Fast = window.Fast || (window.parent && window.parent.Fast) || Backend.api;
var Toastr = window.Toastr || (window.parent && window.parent.Toastr);
// 1. 动态切换处置话术
$(document).off('change', 'input[name="action"]').on('change', 'input[name="action"]', function () {
if ($(this).val() === 'offline') {
$('#remark').val('经平台核实情况属实,已予以处置。感谢您的监督与支持!');
} else {
$('#remark').val('经平台核实该内容暂未构成违规。感谢您的反馈与对平台的关注!');
}
});
// 2. 确认处理并通知用户
$(document).off('click', '#btn-submit-handle').on('click', '#btn-submit-handle', function () {
var $btn = $(this);
if ($btn.prop('disabled')) return;
var form = $('#handle-form');
var data = form.serialize();
var doSubmit = function () {
$btn.prop('disabled', true).html('<i class="fa fa-spinner fa-spin"></i> 正在提交处理...');
Fast.api.ajax({
url: 'fc/report/handle',
data: data
}, function (res, ret) {
if (Toastr) Toastr.success(ret && ret.msg ? ret.msg : '处理成功');
// 1. 立即刷新父级页面或Tab中的列表表格
try {
if (window.parent && window.parent.$ && window.parent.$("#table").length) {
window.parent.$("#table").bootstrapTable('refresh');
}
} catch (e) {}
try {
if (window.top && window.top.$) {
window.top.$('.tab-pane.active iframe').each(function () {
if (this.contentWindow && this.contentWindow.$ && this.contentWindow.$("#table").length) {
this.contentWindow.$("#table").bootstrapTable('refresh');
}
});
}
} catch (e) {}
// 2. 立即关闭当前弹窗
setTimeout(function () {
if (Fast.api && Fast.api.close) {
Fast.api.close();
} else if (window.parent && window.parent.layer) {
var idx = window.parent.layer.getFrameIndex(window.name);
window.parent.layer.close(idx);
}
}, 350);
return false;
}, function () {
$btn.prop('disabled', false).html('<i class="fa fa-check"></i> 确认处理并通知用户');
});
};
if (Layer && Layer.confirm) {
Layer.confirm('确定要执行该处置操作吗?系统将自动下发通知给举报人。', {
title: '审核处置确认',
icon: 3
}, function (index) {
Layer.close(index);
doSubmit();
});
} else {
if (confirm('确定要执行该处置操作吗?系统将自动下发通知给举报人。')) {
doSubmit();
}
}
});
// 3. 取消关闭
$(document).off('click', '#btn-close-handle').on('click', '#btn-close-handle', function () {
if (Fast && Fast.api && Fast.api.close) {
Fast.api.close();
} else if (parent && parent.layer) {
var idx = parent.layer.getFrameIndex(window.name);
parent.layer.close(idx);
} else {
window.close();
}
});
// 4. 图片点击大图预览
$(document).off('click', '.fc-evidence-img').on('click', '.fc-evidence-img', function (e) {
e.preventDefault();
var src = $(this).attr('src');
if (!src) return;
var l = (window.parent && window.parent.Layer) || window.Layer || window.layer || (window.parent && window.parent.layer);
if (l && l.open) {
l.open({
type: 1,
title: false,
closeBtn: 1,
area: ['auto', 'auto'],
skin: 'layui-layer-nobg',
shadeClose: true,
content: '<div style="text-align:center;padding:12px;background:#ffffff;border-radius:8px;max-width:92vw;max-height:88vh;overflow:auto;"><img src="' + src + '" style="max-width:100%;max-height:80vh;object-fit:contain;border-radius:4px;box-shadow:0 4px 12px rgba(0,0,0,0.15);" /></div>'
});
} else {
window.open(src, '_blank');
}
});
},
add: function () {
Controller.api.bindevent();
},

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 4.5 MiB

查看文件

@@ -1,14 +1,35 @@
/**
* 接口模块 · 举报(用户端)
* 对应契约 §2.1:POST /report {targetType:'post'|'comment', targetId, reason, detail?} → {reportId}
* 对应接口契约:
* - POST /report 提交举报 {targetType:'post'|'comment', targetId, reason, detail?, images?} → {reportId}
* - GET /report/my 查询我的举报记录 {page, size} → 分页列表
*/
import { post } from '../utils/request.js'
import { post, get } from '../utils/request.js'
import { REPORT_REASONS } from '../constants/report.js'
export const reportApi = {
/** 提交举报(原因取自常量清单,默认与后端 report.reasons 一致) */
/**
* 提交举报
* @param {Object} payload 举报载荷
* @param {'post'|'comment'} payload.targetType 举报对象类型
* @param {number} payload.targetId 被举报对象ID
* @param {string} payload.reason 举报原因
* @param {string} [payload.detail] 详细说明
* @param {string|string[]} [payload.images] 凭证图片
* @returns {Promise<{reportId: number}>}
*/
create: (payload = {}) => post('/report', payload, { silent: true }),
/** 举报原因清单(供页面 uni.showActionSheet 使用) */
/**
* 查询我的举报历史记录
* @param {Object} [params] 分页参数
* @param {number} [params.page] 当前页
* @param {number} [params.size] 每页条数
* @returns {Promise<{list: Array, page: number, size: number, total: number}>}
*/
my: (params = {}) => get('/report/my', params, { silent: true }),
/** 举报原因默认清单 */
reasons: REPORT_REASONS,
}

查看文件

@@ -77,6 +77,7 @@ export const ICON_GROUPS = [
{ key: 'crown', name: '会员王冠', file: 'crown.png' },
{ key: 'check', name: '权益已享', file: 'check.png' },
{ key: 'shield', name: '认证/安全', file: 'shield.png' },
{ key: 'verify', name: '举报/合规', file: 'verify.png' },
{ key: 'image', name: '图片', file: 'image.png' },
{ key: 'image-white', name: '图片(白)', file: 'image-white.png' },
{ key: 'video', name: '视频', file: 'video.png' },

查看文件

@@ -48,7 +48,7 @@ const ENV = IS_PROD ? 'production' : 'development'
// 各环境后端域名(dev=运行 / prod=发行)
const HOSTS = {
dev: 'https://5c789ab7.r9.cpolar.cn', // 本地后端(phpstudy 虚拟域名与端口 9980)
dev: 'https://412b20ec.r9.cpolar.cn', // 本地后端(phpstudy 虚拟域名与端口 9980)
prod: 'https://shanjianxiaocang.com', // 远程正式后端
}
// 接口统一前缀

查看文件

@@ -23,6 +23,7 @@ export const uiState = reactive({
siteName: '',
appName: '',
servicePhone: '',
serviceWorkTime: '09:00 - 21:00',
aboutUs: '',
shareTitle: '',
subscribe: {},
@@ -30,6 +31,8 @@ export const uiState = reactive({
payPasswordEnabled: false,
// 微信小程序虚拟支付提审防审模式(默认开启,杜绝提审首屏闪现付费会员)
virtualPayAudit: true,
// 举报原因字典(后台下发)
reportReasons: [],
loaded: false,
})
@@ -43,11 +46,13 @@ export function applyUiConfig(cfg = {}) {
uiState.siteName = cfg.siteName || cfg.appName || ''
uiState.appName = cfg.appName || cfg.siteName || ''
uiState.servicePhone = cfg.servicePhone || ''
uiState.serviceWorkTime = cfg.serviceWorkTime || '09:00 - 21:00'
uiState.aboutUs = cfg.aboutUs || ''
uiState.shareTitle = cfg.shareTitle || cfg.siteName || cfg.appName || ''
uiState.subscribe = cfg.subscribe || {}
uiState.payPasswordEnabled = !!(cfg && cfg.payPasswordEnabled)
uiState.virtualPayAudit = cfg.virtualPayAudit !== undefined ? !!cfg.virtualPayAudit : true
uiState.reportReasons = Array.isArray(cfg.reportReasons) ? cfg.reportReasons : []
setRemoteUi(cfg)
}

查看文件

@@ -145,8 +145,14 @@ export function safeNavigateBack(fallbackUrl = '/pages/index/index', delta = 1)
}
}
/**
* 安全返回上一页的快捷别名
*/
export const safeBack = safeNavigateBack
export default {
safeNavigateTo,
safeRedirectTo,
safeNavigateBack,
safeBack,
}

查看文件

@@ -25,7 +25,12 @@ export function getNavMetrics() {
// #endif
// #ifndef H5
const sys = uni.getSystemInfoSync ? uni.getSystemInfoSync() : null
let sys = null
if (typeof uni.getWindowInfo === 'function') {
sys = uni.getWindowInfo()
} else if (typeof uni.getSystemInfoSync === 'function') {
sys = uni.getSystemInfoSync()
}
if (sys && sys.statusBarHeight) {
statusBarHeight = sys.statusBarHeight
}

查看文件

@@ -0,0 +1,419 @@
<template>
<view v-if="show" class="contact-modal__mask" @click="handleClose" @touchmove.stop.prevent>
<view class="contact-modal__panel" @click.stop>
<!-- 顶部下拉把手 -->
<view class="contact-modal__handle-bar"></view>
<!-- 极简头部标题 -->
<view class="contact-modal__head">
<text class="contact-modal__title">联系客服</text>
<view class="contact-modal__close-btn" @click="handleClose">
<text class="contact-modal__close-icon">✕</text>
</view>
</view>
<!-- 极简客服卡片列表 -->
<view class="contact-modal__body">
<!-- 选项 1:微信在线客服 -->
<!-- #ifdef MP-WEIXIN -->
<button
class="contact-modal__btn-reset contact-card"
open-type="contact"
:session-from="computedSessionFrom"
:send-message-title="sendTitle"
:send-message-path="sendPath"
:send-message-img="sendImg"
:show-message-card="showMessageCard"
@click="onWechatContactTap"
>
<view class="contact-card__icon-box contact-card__icon-box--wechat">
<image class="contact-card__icon-img" src="/static/icons/wechat-service.svg" mode="aspectFit" />
</view>
<view class="contact-card__info">
<text class="contact-card__name">在线客服</text>
<text class="contact-card__sub">微信实时沟通</text>
</view>
<text class="contact-card__arrow">›</text>
</button>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view class="contact-card" @click="onNonWechatContactTap">
<view class="contact-card__icon-box contact-card__icon-box--wechat">
<image class="contact-card__icon-img" src="/static/icons/wechat-service.svg" mode="aspectFit" />
</view>
<view class="contact-card__info">
<text class="contact-card__name">在线客服</text>
<text class="contact-card__sub">微信小程序专享</text>
</view>
<text class="contact-card__arrow">›</text>
</view>
<!-- #endif -->
<!-- 选项 2:客服热线电话(仅后台配置了电话时展示,不设任何硬编码兜底) -->
<view v-if="displayPhone" class="contact-card" @click="handleCallPhone">
<view class="contact-card__icon-box contact-card__icon-box--phone">
<image class="contact-card__icon-img" src="/static/icons/phone-call.svg" mode="aspectFit" />
</view>
<view class="contact-card__info">
<text class="contact-card__name">电话客服</text>
<text class="contact-card__sub">{{ displayPhone }} · {{ displayWorkTime }}</text>
</view>
<text class="contact-card__arrow">›</text>
</view>
</view>
<!-- 底部取消按钮 -->
<view class="contact-modal__foot">
<view class="contact-modal__cancel-btn" @click="handleClose">
<text class="contact-modal__cancel-text">取消</text>
</view>
</view>
</view>
</view>
</template>
<script>
/**
* 平台统一极简客服弹窗组件(轻氧浅绿设计规范)
* 包含:
* 1. 微信原生在线客服(open-type="contact")
* 2. 官方客服电话拨打(uni.makePhoneCall)
*/
import { iconUrl, uiState } from '@/common/store/ui.js'
import { useUserStore } from '@/common/store/index.js'
export default {
name: 'FcContactModal',
props: {
/** 控制弹窗显隐 */
show: {
type: Boolean,
default: false,
},
/** 客服会话上下文透传来源(如:mine_service、post_1002 等) */
sessionFrom: {
type: String,
default: '',
},
/** 自定义客服电话,为空时读取全局 uiState.servicePhone,未配置时不展示电话卡片 */
phone: {
type: String,
default: '',
},
/** 服务时间文案,为空时读取全局 uiState.serviceWorkTime,再次兜底 09:00 - 21:00 */
workTime: {
type: String,
default: '',
},
/** 会话卡片标题(可选) */
sendTitle: {
type: String,
default: '',
},
/** 会话卡片跳转路径(可选) */
sendPath: {
type: String,
default: '',
},
/** 会话卡片封面图(可选) */
sendImg: {
type: String,
default: '',
},
/** 是否展示小程序卡片消息 */
showMessageCard: {
type: Boolean,
default: false,
},
},
computed: {
/**
* 展示客服电话号码(无任何硬编码兜底,未配置时返回空串)
* @returns {string}
*/
displayPhone() {
if (this.phone && this.phone.trim()) {
return this.phone.trim()
}
return (uiState.servicePhone || '').trim()
},
/**
* 展示服务时间
* @returns {string}
*/
displayWorkTime() {
if (this.workTime && this.workTime.trim()) {
return this.workTime.trim()
}
return (uiState.serviceWorkTime || '09:00 - 21:00').trim()
},
/**
* 动态计算携带的用户会话标记
* @returns {string}
*/
computedSessionFrom() {
let uid = 0
try {
uid = useUserStore().state.userInfo?.id || 0
} catch (e) {}
const base = this.sessionFrom ? this.sessionFrom : 'support'
return `${base}|uid:${uid}`
},
},
methods: {
iconUrl,
/**
* 关闭弹窗
*/
handleClose() {
this.$emit('close')
this.$emit('update:show', false)
},
/**
* 微信原生客服点击回调
*/
onWechatContactTap() {
setTimeout(() => {
this.handleClose()
}, 300)
},
/**
* 非微信环境下点击微信客服处理
*/
onNonWechatContactTap() {
uni.showToast({
title: '请直接拨打客服电话咨询',
icon: 'none',
duration: 2000,
})
},
/**
* 拨打客服热线
*/
handleCallPhone() {
const dial = this.displayPhone.replace(/[^\d]/g, '') || '4008886688'
uni.makePhoneCall({
phoneNumber: dial,
fail: () => {},
complete: () => {
this.handleClose()
},
})
},
},
}
</script>
<style lang="scss" scoped>
/* 遮罩背景 */
.contact-modal__mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(15, 23, 42, 0.46);
backdrop-filter: blur(4px);
z-index: 999;
display: flex;
align-items: flex-end;
}
/* 抽屉面板 */
.contact-modal__panel {
width: 100%;
background: #ffffff;
border-radius: 40rpx 40rpx 0 0;
box-shadow: 0 -12rpx 40rpx rgba(15, 23, 42, 0.08);
overflow: hidden;
display: flex;
flex-direction: column;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
animation: panelSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes panelSlideUp {
from {
transform: translateY(100%);
opacity: 0.8;
}
to {
transform: translateY(0);
opacity: 1;
}
}
/* 顶部把手 */
.contact-modal__handle-bar {
width: 72rpx;
height: 8rpx;
background: #e2e8f0;
border-radius: 4rpx;
margin: 20rpx auto 6rpx;
}
/* 头部居中极简标题 */
.contact-modal__head {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 40rpx 20rpx;
border-bottom: 1rpx solid #f8fafc;
position: relative;
}
.contact-modal__title {
font-size: 32rpx;
font-weight: 700;
color: #0f172a;
}
.contact-modal__close-btn {
width: 56rpx;
height: 56rpx;
border-radius: 50%;
background: #f8fafc;
display: flex;
align-items: center;
justify-content: center;
margin-right: -6rpx;
&:active {
background: #f1f5f9;
}
}
.contact-modal__close-icon {
font-size: 24rpx;
color: #94a3b8;
line-height: 1;
}
/* 选项卡片区 */
.contact-modal__body {
padding: 24rpx 36rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
}
/* 原生 button 样式重置 */
.contact-modal__btn-reset {
margin: 0;
padding: 0;
background: none;
border: none;
border-radius: 0;
box-sizing: border-box;
text-align: left;
line-height: inherit;
overflow: visible;
&::after {
border: none;
}
}
/* 极简卡片:白底 + 细边框 + 呼吸感微阴影 */
.contact-card {
display: flex;
align-items: center;
padding: 24rpx 28rpx;
background: #ffffff;
border: 1rpx solid #f1f5f9;
border-radius: 20rpx;
box-shadow: 0 2rpx 12rpx rgba(15, 23, 42, 0.03);
transition: all 0.2s ease;
&:active {
transform: scale(0.985);
background: #f8fafc;
}
}
/* 左侧图标底座 */
.contact-card__icon-box {
width: 80rpx;
height: 80rpx;
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
margin-right: 24rpx;
}
.contact-card__icon-box--wechat {
background: #ecfdf5;
border: 1rpx solid #d1fae5;
}
.contact-card__icon-box--phone {
background: #fffbeb;
border: 1rpx solid #fef3c7;
}
.contact-card__icon-img {
width: 44rpx;
height: 44rpx;
}
/* 卡片文本 */
.contact-card__info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
.contact-card__name {
font-size: 29rpx;
font-weight: 700;
color: #1e293b;
line-height: 1.3;
margin-bottom: 4rpx;
}
.contact-card__sub {
font-size: 23rpx;
color: #64748b;
line-height: 1.35;
}
/* 右侧极简箭头 */
.contact-card__arrow {
font-size: 36rpx;
font-weight: 400;
color: #cbd5e1;
line-height: 1;
padding-left: 12rpx;
}
/* 底部取消按钮 */
.contact-modal__foot {
padding: 8rpx 36rpx 28rpx;
}
.contact-modal__cancel-btn {
width: 100%;
height: 84rpx;
border-radius: 42rpx;
background: #f8fafc;
border: 1rpx solid #e2e8f0;
display: flex;
align-items: center;
justify-content: center;
&:active {
background: #f1f5f9;
}
}
.contact-modal__cancel-text {
font-size: 28rpx;
color: #475569;
font-weight: 600;
}
</style>

查看文件

@@ -0,0 +1,700 @@
<template>
<view v-if="show" class="report-modal__mask" @click="handleClose" @touchmove.stop.prevent>
<view class="report-modal__panel" @click.stop>
<!-- 顶部下拉把手 -->
<view class="report-modal__handle-bar"></view>
<!-- 弹窗标题 -->
<view class="report-modal__header">
<view class="report-modal__title-group">
<text class="report-modal__title">{{ titleText }}</text>
<text v-if="targetName" class="report-modal__subtitle">对象:{{ targetName }}</text>
</view>
<view class="report-modal__close-btn" @click="handleClose">
<text class="report-modal__close-icon">✕</text>
</view>
</view>
<!-- 安全监督承诺条 -->
<view class="report-modal__notice">
<text class="report-modal__notice-text">平台将对您的举报信息严格保密,并在核实后通过系统消息向您反馈处置结果。</text>
</view>
<!-- 内容滚动区 -->
<scroll-view class="report-modal__scroll" scroll-y :show-scrollbar="false">
<!-- 1. 举报原因(必选) -->
<view class="report-modal__section">
<view class="report-modal__section-header">
<text class="report-modal__section-title">选择违规原因</text>
<text class="report-modal__section-required">* 必选</text>
</view>
<view class="report-modal__reasons-grid">
<view
v-for="item in availableReasons"
:key="item"
class="report-modal__reason-tag"
:class="{ 'report-modal__reason-tag--active': currentReason === item }"
@click="selectReason(item)"
>
<text class="report-modal__reason-text">{{ item }}</text>
<view v-if="currentReason === item" class="report-modal__reason-badge">
<text class="report-modal__reason-check">✓</text>
</view>
</view>
</view>
</view>
<!-- 2. 详细说明(选填) -->
<view class="report-modal__section">
<view class="report-modal__section-header">
<text class="report-modal__section-title">补充详细说明</text>
<text class="report-modal__section-counter">{{ detailText.length }}/200</text>
</view>
<view class="report-modal__textarea-wrap">
<textarea
v-model="detailText"
class="report-modal__textarea"
placeholder="请详细描述具体的违规事实、受骗经过或异常情况(选填)"
placeholder-class="report-modal__textarea-placeholder"
maxlength="200"
:cursor-spacing="60"
/>
</view>
</view>
<!-- 3. 上传截图凭证(选填,最多4张) -->
<view class="report-modal__section">
<view class="report-modal__section-header">
<text class="report-modal__section-title">上传证据截图</text>
<text class="report-modal__section-sub">聊天记录、转账或违规截图(选填,最多4张)</text>
</view>
<view class="report-modal__images-grid">
<!-- 已上传图片 -->
<view
v-for="(imgUrl, idx) in imageList"
:key="imgUrl + idx"
class="report-modal__img-item"
@click="previewImage(idx)"
>
<image class="report-modal__img-thumb" :src="formatImgUrl(imgUrl)" mode="aspectFill" />
<view class="report-modal__img-del" @click.stop="removeImage(idx)">
<text class="report-modal__img-del-icon">✕</text>
</view>
</view>
<!-- 上传中占位 -->
<view v-if="uploading" class="report-modal__img-item report-modal__img-item--uploading">
<text class="report-modal__img-loading-txt">上传中…</text>
</view>
<!-- 添加图片按钮 -->
<view
v-if="imageList.length < 4 && !uploading"
class="report-modal__img-uploader"
@click="chooseAndUploadImage"
>
<text class="report-modal__img-uploader-plus">+</text>
<text class="report-modal__img-uploader-txt">{{ imageList.length }}/4</text>
</view>
</view>
</view>
</scroll-view>
<!-- 底部提交操作栏 -->
<view class="report-modal__footer">
<button
class="report-modal__submit-btn"
:class="{ 'report-modal__submit-btn--disabled': !currentReason || submitting || uploading }"
:loading="submitting"
:disabled="!currentReason || submitting || uploading"
@click="handleSubmit"
>
{{ submitting ? '正在提交…' : '确认提交举报' }}
</button>
</view>
</view>
</view>
</template>
<script>
/**
* 组件 · 举报与维权申诉弹窗(BottomSheet)
*
* 遵循轻氧浅绿 Mint Green 视觉主题规范与本地生活合规存证要求:
* 1. 支持举报信息(post)与评价(comment);
* 2. 纯原生字符串数组解包,彻底消除微信小程序 Structured Clone 异常;
* 3. 支持选择原因、填写 200 字详细文字说明、上传最多 4 张截图凭证;
* 4. 提交后自动对接到后端 fc_report 与后台全功能核实处置工作台。
*/
import reportApi from '@/common/api/report.js'
import postApi from '@/common/api/post.js'
import { REPORT_REASONS } from '@/common/constants/report.js'
import { assetUrl } from '@/common/utils/format.js'
export default {
name: 'FcReportModal',
props: {
/** 是否展示弹窗 */
show: {
type: Boolean,
default: false,
},
/** 举报目标类型:post 信息 | comment 评价 */
targetType: {
type: String,
default: 'post',
},
/** 举报目标ID */
targetId: {
type: [Number, String],
required: true,
},
/** 目标摘要展示名称(如帖子标题、评价内容片段) */
targetTitle: {
type: String,
default: '',
},
/** 外部可注入的举报原因列表 */
reasons: {
type: Array,
default: () => [],
},
},
data() {
return {
currentReason: '',
detailText: '',
imageList: [],
uploading: false,
submitting: false,
}
},
computed: {
/**
* 弹窗主标题
* @returns {string}
*/
titleText() {
return this.targetType === 'comment' ? '举报违规评价' : '举报违规信息'
},
/**
* 截断显示的对象名称
* @returns {string}
*/
targetName() {
if (!this.targetTitle) return ''
const clean = this.targetTitle.replace(/\s+/g, ' ').trim()
return clean.length > 20 ? clean.slice(0, 20) + '…' : clean
},
/**
* 可选原因列表(脱除 Vue 响应式代理并保障是纯字符串数组)
* @returns {string[]}
*/
availableReasons() {
const source = (this.reasons && this.reasons.length) ? this.reasons : REPORT_REASONS
const list = []
for (let i = 0; i < source.length; i++) {
const item = source[i]
const str = typeof item === 'string' ? item.trim() : (item && String(item.label || item.value || '').trim())
if (str && !list.includes(str)) {
list.push(str)
}
}
return list.length ? list : ['虚假信息', '违法违禁', '垃圾广告', '重复发布', '引诱私下交易', '其他']
},
},
watch: {
show(val) {
if (val) {
// 每次弹开重置状态
this.currentReason = this.availableReasons[0] || '虚假信息'
this.detailText = ''
this.imageList = []
this.uploading = false
this.submitting = false
}
},
},
methods: {
/**
* 格式化图片地址为可渲染 URL
* @param {string} url
* @returns {string}
*/
formatImgUrl(url) {
return assetUrl(url)
},
/**
* 选择举报原因
* @param {string} reason
*/
selectReason(reason) {
this.currentReason = reason
},
/**
* 关闭弹窗
*/
handleClose() {
if (this.submitting) return
this.$emit('close')
},
/**
* 移除某张已上传图片
* @param {number} idx
*/
removeImage(idx) {
this.imageList.splice(idx, 1)
},
/**
* 预览已上传截图
* @param {number} currentIdx
*/
previewImage(currentIdx) {
const urls = this.imageList.map((u) => assetUrl(u))
uni.previewImage({
current: urls[currentIdx],
urls,
})
},
/**
* 选择并上传图片凭证(最多 4 张)
*/
chooseAndUploadImage() {
const maxRemain = 4 - this.imageList.length
if (maxRemain <= 0) return
uni.chooseImage({
count: maxRemain,
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: async (res) => {
const tempFilePaths = res.tempFilePaths || []
if (!tempFilePaths.length) return
this.uploading = true
uni.showLoading({ title: '正在上传凭证…' })
try {
for (let i = 0; i < tempFilePaths.length; i++) {
const path = tempFilePaths[i]
const uploaded = await postApi.uploadMedia(path, 'image')
if (uploaded && uploaded.url) {
this.imageList.push(uploaded.url)
}
}
} catch (e) {
uni.showToast({ title: e.message || '部分凭证上传失败', icon: 'none' })
} finally {
this.uploading = false
uni.hideLoading()
}
},
})
},
/**
* 提交举报表单
*/
async handleSubmit() {
if (!this.currentReason) {
uni.showToast({ title: '请选择违规原因', icon: 'none' })
return
}
if (this.submitting || this.uploading) return
this.submitting = true
try {
const payload = {
targetType: this.targetType,
targetId: Number(this.targetId),
reason: this.currentReason,
detail: this.detailText.trim(),
images: this.imageList,
}
await reportApi.create(payload)
uni.showToast({
title: '举报已提交核实',
icon: 'success',
duration: 2000,
})
this.$emit('success', payload)
this.$emit('close')
} catch (e) {
uni.showToast({
title: e.message || '提交失败,请重试',
icon: 'none',
})
} finally {
this.submitting = false
}
},
},
}
</script>
<style lang="scss" scoped>
.report-modal__mask {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 999;
background: rgba(15, 23, 42, 0.55);
backdrop-filter: blur(4rpx);
display: flex;
align-items: flex-end;
animation: reportModalFadeIn 0.22s ease-out;
}
.report-modal__panel {
width: 100%;
max-height: 85vh;
background: #ffffff;
border-radius: 36rpx 36rpx 0 0;
box-shadow: 0 -8rpx 36rpx rgba(15, 23, 42, 0.12);
display: flex;
flex-direction: column;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
animation: reportModalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
box-sizing: border-box;
}
.report-modal__handle-bar {
width: 72rpx;
height: 8rpx;
background: #e2e8f0;
border-radius: 4rpx;
margin: 18rpx auto 8rpx;
}
.report-modal__header {
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 16rpx 32rpx 14rpx;
}
.report-modal__title-group {
flex: 1;
min-width: 0;
margin-right: 20rpx;
}
.report-modal__title {
font-size: 34rpx;
font-weight: 700;
color: #1e293b;
line-height: 1.3;
display: block;
}
.report-modal__subtitle {
font-size: 24rpx;
color: #64748b;
margin-top: 6rpx;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.report-modal__close-btn {
width: 56rpx;
height: 56rpx;
border-radius: 28rpx;
background: #f1f5f9;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&:active {
background: #e2e8f0;
}
}
.report-modal__close-icon {
font-size: 26rpx;
color: #64748b;
line-height: 1;
}
.report-modal__notice {
margin: 0 32rpx 16rpx;
padding: 14rpx 20rpx;
background: #f2fef7;
border: 1rpx solid #bbf7d0;
border-radius: 14rpx;
}
.report-modal__notice-text {
font-size: 22rpx;
color: #00a854;
line-height: 1.45;
display: block;
}
.report-modal__scroll {
flex: 1;
max-height: 58vh;
padding: 0 32rpx;
box-sizing: border-box;
}
.report-modal__section {
margin-bottom: 28rpx;
}
.report-modal__section-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 14rpx;
}
.report-modal__section-title {
font-size: 28rpx;
font-weight: 600;
color: #1e293b;
}
.report-modal__section-required {
font-size: 22rpx;
color: #ef4444;
font-weight: 500;
}
.report-modal__section-counter,
.report-modal__section-sub {
font-size: 22rpx;
color: #94a3b8;
}
.report-modal__reasons-grid {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
}
.report-modal__reason-tag {
position: relative;
padding: 14rpx 24rpx;
border-radius: 16rpx;
background: #f8fafc;
border: 1rpx solid #e2e8f0;
transition: all 0.2s ease;
display: inline-flex;
align-items: center;
justify-content: center;
&:active {
opacity: 0.85;
}
&--active {
background: #ecfdf5;
border-color: #00d26a;
box-shadow: 0 2rpx 10rpx rgba(0, 210, 106, 0.15);
.report-modal__reason-text {
color: #00a854;
font-weight: 600;
}
}
}
.report-modal__reason-text {
font-size: 26rpx;
color: #334155;
line-height: 1.3;
}
.report-modal__reason-badge {
position: absolute;
right: -4rpx;
bottom: -4rpx;
width: 24rpx;
height: 24rpx;
border-radius: 12rpx;
background: #00d26a;
display: flex;
align-items: center;
justify-content: center;
}
.report-modal__reason-check {
color: #ffffff;
font-size: 16rpx;
line-height: 1;
font-weight: 700;
}
.report-modal__textarea-wrap {
background: #f8fafc;
border: 1rpx solid #e2e8f0;
border-radius: 20rpx;
padding: 16rpx 20rpx;
box-sizing: border-box;
&:focus-within {
border-color: #00d26a;
background: #ffffff;
}
}
.report-modal__textarea {
width: 100%;
height: 150rpx;
font-size: 26rpx;
color: #1e293b;
line-height: 1.5;
box-sizing: border-box;
}
.report-modal__textarea-placeholder {
color: #94a3b8;
font-size: 24rpx;
}
.report-modal__images-grid {
display: flex;
flex-wrap: wrap;
gap: 16rpx;
}
.report-modal__img-item {
position: relative;
width: 150rpx;
height: 150rpx;
border-radius: 18rpx;
overflow: hidden;
background: #f1f5f9;
&--uploading {
display: flex;
align-items: center;
justify-content: center;
border: 1rpx dashed #00d26a;
background: #ecfdf5;
}
}
.report-modal__img-thumb {
width: 100%;
height: 100%;
}
.report-modal__img-del {
position: absolute;
top: 8rpx;
right: 8rpx;
width: 36rpx;
height: 36rpx;
border-radius: 18rpx;
background: rgba(15, 23, 42, 0.65);
display: flex;
align-items: center;
justify-content: center;
z-index: 2;
&:active {
background: rgba(239, 68, 68, 0.9);
}
}
.report-modal__img-del-icon {
color: #ffffff;
font-size: 20rpx;
line-height: 1;
}
.report-modal__img-loading-txt {
font-size: 22rpx;
color: #00a854;
}
.report-modal__img-uploader {
width: 150rpx;
height: 150rpx;
border-radius: 18rpx;
border: 2rpx dashed #cbd5e1;
background: #f8fafc;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4rpx;
&:active {
background: #f1f5f9;
border-color: #00d26a;
}
}
.report-modal__img-uploader-plus {
font-size: 44rpx;
color: #94a3b8;
line-height: 1;
}
.report-modal__img-uploader-txt {
font-size: 20rpx;
color: #94a3b8;
}
.report-modal__footer {
padding: 18rpx 32rpx 20rpx;
background: #ffffff;
border-top: 1rpx solid #f1f5f9;
}
.report-modal__submit-btn {
width: 100%;
height: 88rpx;
border-radius: 44rpx;
background: linear-gradient(135deg, #00e070 0%, #00d26a 100%);
color: #ffffff;
font-size: 30rpx;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8rpx 20rpx rgba(0, 210, 106, 0.28);
border: none;
&::after {
border: none;
}
&:active {
opacity: 0.9;
transform: scale(0.99);
}
&--disabled {
background: #cbd5e1 !important;
color: #ffffff !important;
box-shadow: none !important;
opacity: 0.7;
}
}
@keyframes reportModalFadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes reportModalSlideUp {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
</style>

查看文件

@@ -212,13 +212,14 @@
| 方法 | 路径 | 入参 | 返回 |
| --- | --- | --- | --- |
| POST | `/report` | `{ targetType: 'post'\|'comment', targetId, reason, detail? }` | `{ reportId }` |
| POST | `/report` | `{ targetType: 'post'\|'comment', targetId, reason, detail?, images? }` | `{ reportId }` |
| GET | `/report/my` | `{ page, size }` | 分页 `list:[{id,targetType,targetId,targetTitle,reason,images,detail,status,statusText,handleRemark,createdAt,updatedAt}]` |
| GET | `/favorite/list` | `{ page, size }` | 分页 `list:[Post]`(与信息流同构) |
| POST | `/favorite/toggle` | `{ postId }` | `{ faved, count }` |
| POST | `/follow/toggle` | `{ userId }` | `{ followed }` |
| POST | `/favorite/status` | `{ postIds: [], userIds: [] }` | `{ faved: { postId: bool }, followed: { userId: bool } }` |
- **举报**:`targetType` 仅 `post`/`comment`(否则「举报类型不支持」);`reason` 必填(否则「请选择举报原因」,字典见 `report.reasons`);被举报对象必须存在;`detail` 写入 `fc_report.remark`,状态默认 `pending`。
- **举报**:`targetType` 仅 `post`/`comment`(否则「举报类型不支持」);`reason` 必填(否则「请选择举报原因」,字典见 `report.reasons`);被举报对象必须存在;支持防重复提交(同对象待核实中不允许重复提交)与日频控(单日上限 15 次);`images` 支持多图凭证;`detail` 写入 `fc_report.remark`,后台处理备注写入 `handle_remark`,支持一键联动处置(下架违规信息/屏蔽违规评价)。
- **收藏 / 关注**:`faved=true` 表示本次操作后为「已收藏」,`count` 为该信息当前收藏总数;`follow/toggle` 不能关注自己(「不能关注自己」)。两表均有唯一索引,并发写入幂等。
- **批量回显**:`favorite/status` 入参为空数组时返回**空对象** `{}`,查询结果按请求的 id 全量回填(未收藏/未关注为 `false`)。

查看文件

@@ -58,6 +58,7 @@
"postcss" : true
},
"usingComponents" : true,
"lazyCodeLoading" : "requiredComponents",
"optimization" : {
"subPackages" : true
},

查看文件

@@ -215,6 +215,15 @@
"backgroundColor": "#f2fef7"
}
},
{
"path": "pages/mine/reports",
"style": {
"navigationBarTitleText": "我的举报",
"navigationStyle": "custom",
"enablePullDownRefresh": true,
"backgroundColor": "#f2fef7"
}
},
{
"path": "pages/order/detail",
"style": {

查看文件

@@ -308,8 +308,13 @@
<text class="detail__map-go-arrow">›</text>
</view>
</view>
<view class="detail__report" @click="openReport">
<text class="detail__report-text">举报该信息 ›</text>
<view class="detail__help-row">
<view class="detail__report" @click="openContact">
<text class="detail__report-text">平台客服咨询 ›</text>
</view>
<view class="detail__report" @click="openReport">
<text class="detail__report-text">举报该信息 ›</text>
</view>
</view>
</view>
@@ -383,11 +388,14 @@
<text class="detail__cmt-reply-tag">发布者回复</text>
<text class="detail__cmt-reply-text">{{ c.reply }}</text>
</view>
<view v-if="isSelf" class="detail__cmt-actions">
<view class="detail__cmt-action-btn" @click="onOpenReply(c)">
<view class="detail__cmt-actions">
<view v-if="isSelf" class="detail__cmt-action-btn" @click="onOpenReply(c)">
<image class="fc-icon fc-icon--xs" :src="iconUrl('edit')" mode="aspectFit" />
<text class="detail__cmt-action-text">{{ c.reply ? '修改回复' : '回复' }}</text>
</view>
<view class="detail__cmt-report-btn" @click="openCommentReport(c)">
<text class="detail__cmt-report-text">举报</text>
</view>
</view>
</view>
<text v-if="!comments.length" class="detail__cmt-empty">暂无评价,快来抢沙发~</text>
@@ -444,6 +452,28 @@
@confirm="confirmDial"
/>
<!-- 平台客服弹窗(支持微信在线客服携带当前帖子卡片 + 官方电话) -->
<fc-contact-modal
:show="showContactModal"
:session-from="'detail_post_' + id"
:send-title="post.title || '同城信息咨询'"
:send-path="'/pages/detail/detail?id=' + id"
:send-img="shareCardImg"
:show-message-card="true"
@close="showContactModal = false"
/>
<!-- 维权与举报申诉弹窗(支持选择原因、输入补充说明与上传截图证据) -->
<fc-report-modal
:show="reportModalVisible"
:target-type="reportTargetType"
:target-id="reportTargetId"
:target-title="reportTargetTitle"
:reasons="getReportReasons()"
@close="reportModalVisible = false"
@success="onReportSuccess"
/>
<!-- 评价弹层 -->
<view v-if="showComment && !isAudit" class="detail__mask" @click="showComment = false" @touchmove.stop.prevent>
<view class="detail__sheet" @click.stop>
@@ -552,10 +582,12 @@ import { useUserStore } from '@/common/store/index.js'
import { pay } from '@/common/utils/pay.js'
import FcNavbar from '@/components/fc-navbar/fc-navbar.vue'
import FcCallModal from '@/components/fc-call-modal/fc-call-modal.vue'
import FcContactModal from '@/components/fc-contact-modal/fc-contact-modal.vue'
import FcReportModal from '@/components/fc-report-modal/fc-report-modal.vue'
import QRCode from '@/common/utils/qrcode-generator.js'
export default {
components: { FcNavbar, FcCallModal },
components: { FcNavbar, FcCallModal, FcContactModal, FcReportModal },
data() {
return {
id: 0,
@@ -574,6 +606,11 @@ export default {
viewQuotaLeft: 0,
viewQuotaUnlimited: false,
showCallModal: false,
showContactModal: false,
reportModalVisible: false,
reportTargetType: 'post',
reportTargetId: 0,
reportTargetTitle: '',
dialSubmitting: false,
unlockSubmitting: false,
comments: [],
@@ -602,8 +639,12 @@ export default {
},
computed: {
/**
* 相对发布时间
* 客服会话卡片封面图
* @returns {string}
*/
shareCardImg() {
return this.imageUrls && this.imageUrls.length ? this.imageUrls[0] : (this.post.cover ? assetUrl(this.post.cover) : '')
},
/**
* 是否为商家发布的信息
* @returns {boolean}
@@ -875,6 +916,12 @@ export default {
methods: {
iconUrl,
assetUrl,
/**
* 打开平台客服咨询弹窗
*/
openContact() {
this.showContactModal = true
},
/**
* 获取分类插画
*/
@@ -1312,23 +1359,65 @@ export default {
}
},
/**
* 举报
* 获取当前有效的举报原因字典列表(脱除 Vue 响应式 Proxy 并保障符合小程序 ActionSheet 规范)
* @returns {string[]}
*/
getReportReasons() {
let source = []
if (typeof uiState !== 'undefined' && uiState && Array.isArray(uiState.reportReasons) && uiState.reportReasons.length > 0) {
source = uiState.reportReasons
} else if (Array.isArray(this.reportReasons) && this.reportReasons.length > 0) {
source = this.reportReasons
} else if (Array.isArray(REPORT_REASONS) && REPORT_REASONS.length > 0) {
source = REPORT_REASONS
}
// 微信小程序原生通信桥基于 Structured Clone,无法克隆 Vue 3 Proxy 对象;
// 此处彻底解包为纯原生 JS 字符串数组,并过滤空白项
const plainList = []
for (let i = 0; i < source.length; i++) {
const item = source[i]
if (typeof item === 'string') {
const str = item.trim()
if (str) plainList.push(str)
} else if (item && typeof item === 'object') {
const str = String(item.label || item.name || item.title || item.value || '').trim()
if (str) plainList.push(str)
}
}
const finalList = plainList.length > 0 ? plainList : ['虚假信息', '违法违禁', '垃圾广告', '重复发布', '其他']
// 微信小程序 showActionSheet 规范限制 itemList 最大项数为 6
return finalList.slice(0, 6)
},
/**
* 举报该信息:唤起支持原因选择、说明输入与凭证上传的维权申诉弹窗
*/
openReport() {
if (!this.ensureLogin()) return
uni.showActionSheet({
itemList: this.reportReasons,
success: async (r) => {
const reason = this.reportReasons[r.tapIndex]
if (!reason) return
try {
await reportApi.create({ targetType: 'post', targetId: this.id, reason })
uni.showToast({ title: '举报已提交核实', icon: 'none' })
} catch (e) {
uni.showToast({ title: e.message || '提交失败', icon: 'none' })
}
},
})
this.reportTargetType = 'post'
this.reportTargetId = this.id
this.reportTargetTitle = (this.post && this.post.title) ? this.post.title : '同城发布信息'
this.reportModalVisible = true
},
/**
* 举报违规评价:唤起支持原因选择、说明输入与凭证上传的维权申诉弹窗
* @param {Object} comment 评价对象
*/
openCommentReport(comment) {
if (!comment || !comment.id) return
if (!this.ensureLogin()) return
this.reportTargetType = 'comment'
this.reportTargetId = comment.id
this.reportTargetTitle = comment.content || '用户评价'
this.reportModalVisible = true
},
/**
* 举报成功后回调处理
* @param {Object} payload 提交的举报载荷
*/
onReportSuccess(payload) {
// 可扩展埋点或记录日志
},
/**
* 跳转至个人用户公开主页
@@ -2700,10 +2789,15 @@ export default {
line-height: 1;
margin-top: -6rpx;
}
.detail__report {
.detail__help-row {
margin-top: 16rpx;
display: flex;
justify-content: flex-end;
justify-content: space-between;
align-items: center;
}
.detail__report {
display: flex;
align-items: center;
}
.detail__report-text {
font-size: $fc-font-xs;
@@ -2793,9 +2887,24 @@ export default {
}
.detail__cmt-actions {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 20rpx;
margin-top: 14rpx;
}
.detail__cmt-report-btn {
padding: 6rpx 10rpx;
display: inline-flex;
align-items: center;
}
.detail__cmt-report-text {
font-size: $fc-font-xs;
color: $fc-text-placeholder;
&:active {
color: $fc-text-secondary;
}
}
.detail__cmt-action-btn {
display: inline-flex;
align-items: center;

查看文件

@@ -111,6 +111,7 @@ import messageApi from '@/common/api/message.js'
import { MESSAGE_TYPE } from '@/common/constants/ui.js'
import { fromNow } from '@/common/utils/format.js'
import { iconUrl } from '@/common/store/ui.js'
import { safeNavigateTo } from '@/common/utils/nav.js'
export default {
components: { FcNavbar, FcEmpty, FcTabbar },
@@ -465,7 +466,7 @@ export default {
})
},
/**
* 点击查看通知详情并标记已读
* 点击查看通知详情并标记已读(支持跳转业务页面)
* @param {Object} m 通知项对象
*/
async openMsg(m) {
@@ -476,13 +477,45 @@ export default {
uni.$emit('refreshUnreadCount')
} catch (e) {}
}
uni.showModal({
title: m.title || '通知详情',
content: m.content || '',
showCancel: false,
confirmText: '我知道了',
confirmColor: '#00A854',
})
// 解析 extra 跳转路径
let targetPath = ''
if (m.extra) {
try {
const extraObj = typeof m.extra === 'string' ? JSON.parse(m.extra) : m.extra
if (extraObj && extraObj.path) {
targetPath = extraObj.path
}
} catch (e) {
if (typeof m.extra === 'string' && m.extra.startsWith('/')) {
targetPath = m.extra
}
}
}
if (targetPath) {
uni.showModal({
title: m.title || '通知详情',
content: m.content || '',
showCancel: true,
cancelText: '我知道了',
confirmText: '去查看',
confirmColor: '#00A854',
success: (res) => {
if (res.confirm) {
safeNavigateTo(targetPath)
}
},
})
} else {
uni.showModal({
title: m.title || '通知详情',
content: m.content || '',
showCancel: false,
confirmText: '我知道了',
confirmColor: '#00A854',
})
}
},
},
}

查看文件

@@ -110,11 +110,19 @@
<view class="mine__tabbar-space"></view>
<fc-tabbar :current="4" />
<!-- 平台统一客服服务弹窗(微信在线客服 + 电话客服) -->
<fc-contact-modal
:show="showContactModal"
session-from="mine_center"
@close="showContactModal = false"
/>
</view>
</template>
<script>
import FcTabbar from '@/components/fc-tabbar/fc-tabbar.vue'
import FcContactModal from '@/components/fc-contact-modal/fc-contact-modal.vue'
import memberApi from '@/common/api/member.js'
import { useUserStore } from '@/common/store/index.js'
import { iconUrl, loadUiConfig, uiState } from '@/common/store/ui.js'
@@ -123,13 +131,15 @@ import { getNavMetrics } from '@/common/utils/navbar.js'
import { safeNavigateTo } from '@/common/utils/nav.js'
export default {
components: { FcTabbar },
components: { FcTabbar, FcContactModal },
data() {
return {
statusBarHeight: 20,
navBarHeight: 44,
capsulePadding: 0,
assets: { balance: 0, points: 0, couponCount: 0, coupons: [] },
// 客服弹窗控制显隐
showContactModal: false,
// 版本号点击计数器与计时器(用于管理员隐藏彩蛋)
versionClickCount: 0,
versionClickTimer: null,
@@ -137,6 +147,7 @@ export default {
menuItems: [
{ iconKey: 'edit', text: '编辑个人资料', url: '/pages/mine/profile' },
{ iconKey: 'shield', text: '商家认证与信息', action: 'merchant' },
{ iconKey: 'verify', text: '我的举报记录', url: '/pages/mine/reports' },
{ iconKey: 'mine-service', text: '联系客服', action: 'support' },
{ iconKey: 'mine-about', text: '关于我们', action: 'about' },
],
@@ -479,24 +490,10 @@ export default {
},
/**
* 在线客服处理
* 在线客服处理(唤起微信在线客服与电话客服选择弹窗)
*/
handleSupport() {
// 客服电话来自后台「系统设置 → 系统配置 → 小程序配置」,留空时用内置兜底
const phone = (uiState.servicePhone || '400-888-6688').trim()
const dial = phone.replace(/[^\d]/g, '') || '4008886688'
uni.showModal({
title: '平台客服',
content: `客服电话:${phone}\n服务时间:09:00 - 21:00`,
confirmText: '拨打电话',
cancelText: '取消',
confirmColor: '#04874a',
success: (res) => {
if (res.confirm) {
uni.makePhoneCall({ phoneNumber: dial, fail: () => {} })
}
},
})
this.showContactModal = true
},
/**

查看文件

@@ -0,0 +1,376 @@
<template>
<view class="report-page fc-page">
<!-- 顶部统一渐变沉浸式导航栏 -->
<fc-navbar title="我的举报" theme="gradient" :show-back="true" />
<!-- 首屏骨架加载态 -->
<view v-if="loading && !list.length" class="report-page__loading">
<view v-for="i in 3" :key="i" class="fc-skeleton report-page__skeleton"></view>
</view>
<!-- 空数据提示 -->
<fc-empty
v-else-if="!list.length"
icon="inbox"
text="暂无举报记录"
btn-text="返回个人中心"
@action="goBack"
/>
<!-- 举报卡片列表 -->
<view v-else class="report-page__list">
<view v-for="item in list" :key="item.id" class="report-card fc-card">
<!-- 卡片头部:对象类型徽章 + 状态标签 -->
<view class="report-card__header">
<view class="report-card__tags">
<text class="report-card__type-tag" :class="'report-card__type-tag--' + item.targetType">
{{ item.targetType === 'post' ? '信息举报' : '评价举报' }}
</text>
<text class="report-card__reason-tag">{{ item.reason }}</text>
</view>
<text
class="report-card__status"
:class="{
'report-card__status--pending': item.status === 'pending',
'report-card__status--handled': item.status === 'handled'
}"
>
{{ item.statusText }}
</text>
</view>
<!-- 举报目标摘要(如果是帖子支持点击前往查看) -->
<view class="report-card__target" @click="handleTargetClick(item)">
<text class="report-card__target-title fc-ellipsis-2">{{ item.targetTitle }}</text>
<text v-if="item.targetType === 'post'" class="report-card__target-arrow">›</text>
</view>
<!-- 用户补充说明 -->
<view v-if="item.detail" class="report-card__detail">
<text class="report-card__detail-label">补充说明:</text>
<text class="report-card__detail-text">{{ item.detail }}</text>
</view>
<!-- 凭证图片展示 -->
<view v-if="item.images && item.images.length" class="report-card__images">
<image
v-for="(img, imgIdx) in item.images"
:key="imgIdx"
class="report-card__img"
:src="assetUrl(img)"
mode="aspectFill"
@click.stop="previewImage(item.images, imgIdx)"
/>
</view>
<!-- 时间戳 -->
<view class="report-card__time">
<text>提交时间:{{ item.createdAt }}</text>
</view>
<!-- 平台处理结果反馈区域(仅已处理项展示) -->
<view v-if="item.status === 'handled'" class="report-card__result">
<view class="report-card__result-head">
<image class="fc-icon fc-icon--xs" :src="iconUrl('verify')" mode="aspectFit" />
<text class="report-card__result-title">平台处理反馈</text>
<text class="report-card__result-time">{{ item.updatedAt }}</text>
</view>
<text class="report-card__result-content">
{{ item.handleRemark ? item.handleRemark : '平台已核实并对违规行为进行了严肃处置,感谢您对维护社区健康环境的支持!' }}
</text>
</view>
</view>
<!-- 分页底线 -->
<view class="report-page__more">
<text v-if="loading">加载中…</text>
<text v-else-if="!hasMore">— 没有更多了 —</text>
<text v-else @click="loadMore">点击加载更多</text>
</view>
</view>
</view>
</template>
<script>
import FcNavbar from '@/components/fc-navbar/fc-navbar.vue'
import FcEmpty from '@/components/fc-empty/fc-empty.vue'
import reportApi from '@/common/api/report.js'
import { safeNavigateTo, safeNavigateBack, safeBack } from '@/common/utils/nav.js'
import { iconUrl } from '@/common/store/ui.js'
import { assetUrl } from '@/common/utils/format.js'
export default {
components: { FcNavbar, FcEmpty },
data() {
return {
list: [],
page: 1,
size: 10,
total: 0,
hasMore: true,
loading: false,
}
},
/**
* 页面加载生命周期
*/
onLoad() {
this.fetchList(true)
},
/**
* 下拉刷新生命周期
*/
onPullDownRefresh() {
this.fetchList(true)
},
/**
* 页面上拉触底生命周期
*/
onReachBottom() {
if (this.hasMore && !this.loading) {
this.loadMore()
}
},
methods: {
iconUrl,
assetUrl,
/**
* 拉取我的举报列表数据
* @param {boolean} [reset=false] 是否重置为第一页
*/
async fetchList(reset = false) {
if (reset) {
this.page = 1
this.hasMore = true
}
if (this.loading) return
this.loading = true
try {
const res = await reportApi.my({ page: this.page, size: this.size })
const rows = (res && res.list) || []
this.total = (res && res.total) || 0
this.list = reset ? rows : [...this.list, ...rows]
this.hasMore = !!(res && res.hasMore)
} catch (e) {
uni.showToast({ title: e.message || '加载失败', icon: 'none' })
} finally {
this.loading = false
uni.stopPullDownRefresh()
}
},
/**
* 加载更多数据
*/
loadMore() {
if (!this.hasMore || this.loading) return
this.page += 1
this.fetchList(false)
},
/**
* 预览凭证图片
* @param {string[]} images 图片数组
* @param {number} current 当前选中的图片索引
*/
previewImage(images, current) {
if (!images || !images.length) return
const fullUrls = images.map((u) => assetUrl(u))
uni.previewImage({
urls: fullUrls,
current: fullUrls[current] || fullUrls[0],
})
},
/**
* 点击被举报对象(如果是信息且未删除,可跳转查看)
* @param {Object} item 举报项对象
*/
handleTargetClick(item) {
if (item.targetType === 'post' && item.targetId > 0) {
safeNavigateTo(`/pages/detail/detail?id=${item.targetId}`)
}
},
/**
* 返回上一页
*/
goBack() {
safeBack()
},
},
}
</script>
<style lang="scss" scoped>
.report-page {
min-height: 100vh;
background: #F2FEF7;
padding-bottom: 40rpx;
&__loading {
padding: 24rpx;
}
&__skeleton {
height: 220rpx;
border-radius: $fc-radius;
margin-bottom: 24rpx;
}
&__list {
padding: 24rpx;
}
&__more {
text-align: center;
padding: 30rpx 0 10rpx;
font-size: $fc-font-xs;
color: $fc-text-placeholder;
}
}
.report-card {
background: #ffffff;
border-radius: $fc-radius;
padding: 24rpx;
margin-bottom: 24rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.03);
&__header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
}
&__tags {
display: flex;
align-items: center;
gap: 12rpx;
}
&__type-tag {
font-size: 20rpx;
font-weight: 600;
padding: 4rpx 12rpx;
border-radius: 6rpx;
background: #E8F9F0;
color: #00A854;
&--comment {
background: #EFF6FF;
color: #2563EB;
}
}
&__reason-tag {
font-size: 20rpx;
padding: 4rpx 12rpx;
border-radius: 6rpx;
background: #F1F5F9;
color: #475569;
}
&__status {
font-size: 24rpx;
font-weight: 600;
&--pending {
color: #F59E0B;
}
&--handled {
color: #00A854;
}
}
&__target {
display: flex;
align-items: center;
justify-content: space-between;
background: #F8FAFC;
border-radius: 10rpx;
padding: 16rpx 20rpx;
margin-bottom: 16rpx;
&-title {
font-size: $fc-font;
font-weight: 500;
color: #1E293B;
line-height: 1.4;
flex: 1;
}
&-arrow {
font-size: 32rpx;
color: #94A3B8;
margin-left: 12rpx;
}
}
&__detail {
margin-bottom: 16rpx;
font-size: $fc-font-sm;
line-height: 1.5;
&-label {
color: #64748B;
}
&-text {
color: #334155;
}
}
&__images {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
margin-bottom: 16rpx;
}
&__img {
width: 140rpx;
height: 140rpx;
border-radius: 8rpx;
background: #E2E8F0;
}
&__time {
font-size: $fc-font-xs;
color: $fc-text-placeholder;
margin-bottom: 12rpx;
}
&__result {
margin-top: 16rpx;
padding: 20rpx;
background: #F2FEF7;
border-radius: 12rpx;
border-left: 6rpx solid #00D26A;
&-head {
display: flex;
align-items: center;
gap: 8rpx;
margin-bottom: 8rpx;
}
&-title {
font-size: $fc-font-sm;
font-weight: 600;
color: #00A854;
flex: 1;
}
&-time {
font-size: 20rpx;
color: #94A3B8;
}
&-content {
display: block;
font-size: $fc-font-sm;
color: #334155;
line-height: 1.5;
}
}
}
</style>

查看文件

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28">
<path fill="#F59E0B" d="M7.4 3.5c-.8 0-1.6.4-2.1 1.1-.9 1.2-1.4 3.1-.7 5.7 1.2 4.4 4.8 8.7 8.9 10.9 2.5 1.3 4.6 1.3 6 .5.8-.5 1.3-1.3 1.4-2.2.1-.9-.3-1.8-1-2.3l-3.1-2.1c-.8-.5-1.8-.4-2.4.3l-1.3 1.3c-.2.2-.6.3-.9.1-1.8-1-3.6-2.8-4.6-4.6-.2-.3-.1-.7.1-.9l1.3-1.3c.7-.7.8-1.6.3-2.4L9.2 4.4c-.4-.6-1.1-.9-1.8-.9z"/>
</svg>

之后

宽度:  |  高度:  |  大小: 404 B

二进制
uniapp/static/icons/verify.png 普通文件

二进制文件未显示。

之后

宽度:  |  高度:  |  大小: 1.1 KiB

查看文件

@@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28">
<path fill="#07C160" d="M10.8 4C5.94 4 2 7.42 2 11.64c0 2.37 1.25 4.5 3.2 5.92l-.8 2.38 2.82-1.42c1.12.33 2.33.51 3.58.51.35 0 .69-.02 1.03-.05a7.35 7.35 0 0 1-.23-1.83c0-4.32 3.8-7.82 8.5-7.82.44 0 .88.03 1.3.09C20.6 6.13 16.14 4 10.8 4zm-3.1 5.22c.7 0 1.27.57 1.27 1.28 0 .7-.57 1.27-1.27 1.27-.71 0-1.28-.57-1.28-1.27 0-.71.57-1.28 1.28-1.28zm5.95 0c.7 0 1.27.57 1.27 1.28 0 .7-.57 1.27-1.27 1.27-.7 0-1.27-.57-1.27-1.27 0-.71.57-1.28 1.27-1.28z"/>
<path fill="#00A854" d="M19.5 10.55c-4.04 0-7.32 2.95-7.32 6.58 0 3.63 3.28 6.57 7.32 6.57 1.04 0 2.03-.2 2.92-.55l2.36 1.18-.67-1.99c1.64-1.19 2.71-2.98 2.71-4.99.01-3.85-3.27-6.8-7.32-6.8zm-2.48 4.41c-.55 0-.99-.44-.99-.99 0-.55.44-.99.99-.99.55 0 .99.44.99.99 0 .55-.44.99-.99.99zm4.96 0c-.55 0-.99-.44-.99-.99 0-.55.44-.99.99-.99.55 0 .99.44.99.99 0 .55-.44.99-.99.99z"/>
</svg>

之后

宽度:  |  高度:  |  大小: 922 B