1. 新增视频图标及上传示例视频文件 2. 调整开发环境后端域名 3. 新增结构化媒体列表功能,区分图片与视频 4. 新增短视频弹窗预览功能,支持在审核和详情页播放 5. 调整图片和视频文件大小限制,放宽至15MB和100MB 6. 优化详情页,支持视频播放、图片视频混合画廊展示 7. 优化后台审核和详情页面,新增短视频质检模块
314 行
18 KiB
HTML
314 行
18 KiB
HTML
<div class="fc-detail-container" style="padding: 15px 15px 75px 15px; background: #F8FAFC;">
|
||
<!-- 顶部:送审主体与待审提醒 -->
|
||
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
|
||
<div class="panel-body" style="padding: 16px;">
|
||
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;">
|
||
<div style="display: flex; align-items: center; gap: 12px;">
|
||
<img src="{$userInfo.avatar|default='/assets/img/avatar.png'}" style="width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #E2E8F0;">
|
||
<div>
|
||
<div style="font-size: 15px; font-weight: 700; color: #1E293B;">
|
||
{$userInfo.nickname|htmlentities}
|
||
<span class="label label-info" style="font-weight: normal; font-size: 11px; margin-left: 6px;">UID: {$userInfo.id}</span>
|
||
</div>
|
||
<div style="font-size: 12px; color: #64748B; margin-top: 3px;">
|
||
绑定手机:<strong>{$userInfo.mobile|default='未绑定'}</strong> · 历史发帖:{$userInfo.post_count} 条 · 提交于:{$row.createtime|date='Y-m-d H:i:s',###}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div>
|
||
{if $row.audit_status == 1}
|
||
<span class="label label-success" style="font-size: 13px; padding: 6px 12px; border-radius: 4px;">当前状态:已审核通过</span>
|
||
{elseif $row.audit_status == 2 /}
|
||
<span class="label label-danger" style="font-size: 13px; padding: 6px 12px; border-radius: 4px;">当前状态:已驳回</span>
|
||
{else /}
|
||
<span class="label label-warning" style="font-size: 13px; padding: 6px 12px; border-radius: 4px;">待人工审核</span>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
|
||
{if $row.audit_status == 2 && $row.audit_reason}
|
||
<div style="margin-top: 14px; padding: 10px 14px; background: #FEF2F2; border: 1px solid #FCA5A5; border-radius: 6px; color: #991B1B; font-size: 13px;">
|
||
<strong>上次驳回原因:</strong>{$row.audit_reason|htmlentities}
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 商家门店资料(仅商家发布或有关联门店时展示) -->
|
||
{if !empty($merchantInfo)}
|
||
<div class="panel panel-default" style="border: 1px solid #BBF7D0; background: #F0FDF4; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
|
||
<div class="panel-body" style="padding: 14px 16px;">
|
||
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 8px;">
|
||
<div style="display: flex; align-items: center; gap: 8px;">
|
||
<span class="label label-warning" style="font-size: 11px; padding: 3px 8px;"><i class="fa fa-briefcase"></i> 认证商家门店</span>
|
||
<strong style="font-size: 15px; color: #166534;">{$merchantInfo.name|htmlentities}</strong>
|
||
{if $merchantInfo.audit_status == 1}
|
||
<span class="badge" style="background: #15803D; font-size: 10px;">资质已核验</span>
|
||
{/if}
|
||
</div>
|
||
{if !empty($merchantInfo.category)}
|
||
<span style="font-size: 12px; color: #166534; background: #DCFCE7; padding: 2px 8px; border-radius: 4px;">经营类目:{$merchantInfo.category|htmlentities}</span>
|
||
{/if}
|
||
</div>
|
||
<div class="row" style="font-size: 12px; color: #166534; line-height: 1.8;">
|
||
<div class="col-xs-12 col-sm-6">
|
||
<i class="fa fa-map-marker text-success"></i> 门店地址:<strong>{$merchantInfo.address|default='未填写实体地址'|htmlentities}</strong>
|
||
</div>
|
||
<div class="col-xs-12 col-sm-6">
|
||
<i class="fa fa-phone text-success"></i> 门店联系人:{$merchantInfo.contact|default='-'|htmlentities}
|
||
</div>
|
||
{if !empty($merchantInfo.notice)}
|
||
<div class="col-xs-12" style="margin-top: 4px;">
|
||
<i class="fa fa-bullhorn text-warning"></i> 门店公告:<span style="color: #14532D;">{$merchantInfo.notice|htmlentities}</span>
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{/if}
|
||
|
||
<!-- 送审核心内容核验卡 -->
|
||
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 15px;">
|
||
<div class="panel-body" style="padding: 20px;">
|
||
<div style="display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px;">
|
||
<div>
|
||
<span class="label label-default" style="font-size: 12px; padding: 4px 8px;">{$row.category_name|default='未分类'}</span>
|
||
{if isset($row.identity_type) && $row.identity_type == 2}
|
||
<span class="label label-warning" style="font-size: 11px; padding: 3px 6px; margin-left: 6px;">商家发布</span>
|
||
{else /}
|
||
<span class="label label-info" style="font-size: 11px; padding: 3px 6px; margin-left: 6px;">个人发布</span>
|
||
{/if}
|
||
</div>
|
||
<div style="font-size: 20px; font-weight: 700; color: #EA580C;">
|
||
{if $row.price > 0}
|
||
¥ {$row.price} {if $row.price_unit}<small style="color: #64748B; font-size: 13px;">{$row.price_unit}</small>{/if}
|
||
{else /}
|
||
面议 / 免费
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
|
||
<h3 style="margin: 0 0 14px 0; font-size: 18px; font-weight: 700; color: #0F172A; line-height: 1.4;">
|
||
{$row.title|htmlentities}
|
||
</h3>
|
||
|
||
{if !empty($row.tags)}
|
||
<div style="margin-bottom: 16px;">
|
||
{volist name=":explode(',', (string)$row.tags)" id="tag"}
|
||
{if trim($tag)}
|
||
<span style="display: inline-block; background: #EEF2FF; color: #4338CA; padding: 2px 8px; border-radius: 4px; font-size: 12px; margin-right: 6px; margin-bottom: 4px;">{$tag}</span>
|
||
{/if}
|
||
{/volist}
|
||
</div>
|
||
{/if}
|
||
|
||
<div class="row" style="background: #F8FAFC; border: 1px solid #EDEFF3; border-radius: 6px; padding: 12px; margin: 0 0 16px 0; font-size: 13px; color: #334155;">
|
||
<div class="col-xs-12 col-sm-6" style="margin-bottom: 6px;">
|
||
<span style="color: #64748B;">服务区域:</span><strong>{$row.area|default='-'}</strong> {if !empty($row.address)}· {$row.address|htmlentities}{/if}
|
||
</div>
|
||
<div class="col-xs-12 col-sm-6" style="margin-bottom: 6px;">
|
||
<span style="color: #64748B;">联系人:</span><strong>{$row.contact|default='-'}</strong>
|
||
</div>
|
||
<div class="col-xs-12 col-sm-6">
|
||
<span style="color: #64748B;">联系电话:</span><strong>{$row.phone|default='-'}</strong>
|
||
</div>
|
||
<div class="col-xs-12 col-sm-6">
|
||
<span style="color: #64748B;">微信号:</span><strong>{$row.wechat|default='-'}</strong>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="font-weight: 700; color: #1E293B; margin-bottom: 8px; font-size: 14px;">详细内容描述:</div>
|
||
<div style="background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 6px; padding: 14px; min-height: 90px; font-size: 14px; line-height: 1.7; color: #334155; white-space: pre-wrap; word-break: break-all;">
|
||
{$row.content|default='(发布人未填写详细正文描述)'|htmlentities}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
{php}
|
||
$mediaListSafe = !empty($mediaList) ? $mediaList : [];
|
||
if (empty($mediaItems) && !empty($mediaListSafe)) {
|
||
$mediaItems = [];
|
||
foreach ($mediaListSafe as $m) {
|
||
$pathOnly = parse_url($m, PHP_URL_PATH) ?: $m;
|
||
$ext = strtolower(pathinfo($pathOnly, PATHINFO_EXTENSION));
|
||
$isVideo = in_array($ext, ['mp4', 'mov', 'avi', 'wmv', 'm4v', '3gp', 'flv', 'mkv', 'webm'], true);
|
||
$mediaItems[] = ['url' => $m, 'is_video' => $isVideo, 'ext' => $ext];
|
||
}
|
||
}
|
||
$imgItems = [];
|
||
$videoItems = [];
|
||
if (!empty($mediaItems)) {
|
||
foreach ($mediaItems as $item) {
|
||
if (!empty($item['is_video'])) {
|
||
$videoItems[] = $item;
|
||
} else {
|
||
$imgItems[] = $item;
|
||
}
|
||
}
|
||
}
|
||
{/php}
|
||
<!-- 上栏:实拍图片质检区 -->
|
||
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 16px;">
|
||
<div class="panel-heading" style="background: #FFFFFF; border-bottom: 1px solid #F1F5F9; font-weight: 700; color: #1E293B; font-size: 14px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;">
|
||
<span>送审图片质检 ({:count($imgItems)} 张)</span>
|
||
<span style="font-size: 12px; font-weight: normal; color: #64748B;">点击查看原图细节</span>
|
||
</div>
|
||
<div class="panel-body" style="padding: 16px;">
|
||
{if empty($imgItems)}
|
||
<div style="text-align: center; color: #94A3B8; padding: 16px;">用户未上传附加图片</div>
|
||
{else /}
|
||
<div style="display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;" class="fc-media-gallery">
|
||
{volist name="imgItems" id="img"}
|
||
<a href="javascript:;" class="fc-media-preview fc-media-preview-img" data-url="{$img.url}" title="点击在弹窗中查看大图" style="display: block; width: 110px; height: 110px; border-radius: 8px; overflow: hidden; border: 1px solid #E2E8F0; background: #F8FAFC; box-shadow: 0 1px 3px rgba(0,0,0,0.04);">
|
||
<img src="{$img.url}" style="width: 100%; height: 100%; object-fit: cover;">
|
||
</a>
|
||
{/volist}
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 下栏:实拍短视频质检区 -->
|
||
<div class="panel panel-default" style="border: 1px solid #E2E8F0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); margin-bottom: 20px;">
|
||
<div class="panel-heading" style="background: #FFFFFF; border-bottom: 1px solid #F1F5F9; font-weight: 700; color: #1E293B; font-size: 14px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;">
|
||
<span>送审短视频质检 ({:count($videoItems)} 个)</span>
|
||
<span style="font-size: 12px; font-weight: normal; color: #64748B;">在线试听与画面合规质检</span>
|
||
</div>
|
||
<div class="panel-body" style="padding: 16px;">
|
||
{if empty($videoItems)}
|
||
<div style="text-align: center; color: #94A3B8; padding: 16px;">用户未上传实拍短视频</div>
|
||
{else /}
|
||
<div style="display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;">
|
||
{volist name="videoItems" id="vid"}
|
||
<div style="width: 240px; border-radius: 8px; overflow: hidden; border: 1px solid #CBD5E1; background: #0F172A; box-shadow: 0 2px 8px rgba(0,0,0,0.08);">
|
||
<video src="{$vid.url}" controls preload="metadata" style="width: 100%; height: 140px; display: block; object-fit: contain; background: #000;"></video>
|
||
<div style="padding: 8px 12px; background: #1E293B; color: #E2E8F0; font-size: 12px; display: flex; justify-content: space-between; align-items: center;">
|
||
<span><i class="fa fa-video-camera text-success"></i> 审核短视频</span>
|
||
<a href="javascript:;" class="fc-media-preview-video" data-url="{$vid.url}" style="color: #38BDF8; font-size: 12px; text-decoration: none; cursor: pointer;"><i class="fa fa-play-circle"></i> 弹窗试看</a>
|
||
</div>
|
||
</div>
|
||
{/volist}
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 审核专属底部操作栏:队列导航 + 三键 -->
|
||
<div class="fc-detail-footer" style="position: fixed; bottom: 0; left: 0; right: 0; background: #FFFFFF; border-top: 1px solid #E2E8F0; padding: 12px 24px; z-index: 99; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -2px 10px rgba(0,0,0,0.05);">
|
||
<div class="fc-audit-nav">
|
||
<button type="button" class="btn btn-default btn-sm" id="btn-prev" {if !$queue.prev}disabled{/if}>‹ 上一条</button>
|
||
{if $queue.index > 0}
|
||
<span class="fc-audit-nav__pos">第 <strong>{$queue.index}</strong> / {$queue.total} 条</span>
|
||
{else /}
|
||
<span class="fc-audit-nav__pos text-muted">不在待审核队列</span>
|
||
{/if}
|
||
<button type="button" class="btn btn-default btn-sm" id="btn-next" {if !$queue.next}disabled{/if}>下一条 ›</button>
|
||
</div>
|
||
<div class="fc-audit-actions">
|
||
<span class="fc-audit-kbd">快捷键:A 通过 · R 驳回 · ← → 切换</span>
|
||
<button type="button" class="btn btn-danger btn-embossed" id="btn-reject" style="padding: 6px 22px; font-weight: 600;">驳回</button>
|
||
<button type="button" class="btn btn-success btn-embossed" id="btn-pass" style="padding: 6px 22px; font-weight: 600;">通过</button>
|
||
<button type="button" class="btn btn-default btn-embossed" id="btn-close" style="padding: 6px 18px;">关闭</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
// 队列信息供 post.js / postaudit.js 的审核工作台使用
|
||
window.postQueue = {:json_encode($queue)};
|
||
|
||
(function () {
|
||
function getLayer() {
|
||
try {
|
||
if (window.top && window.top.Layer) return window.top.Layer;
|
||
if (window.top && window.top.layer) return window.top.layer;
|
||
} catch (e) {}
|
||
try {
|
||
if (window.parent && window.parent.Layer) return window.parent.Layer;
|
||
if (window.parent && window.parent.layer) return window.parent.layer;
|
||
} catch (e) {}
|
||
return window.Layer || window.layer || null;
|
||
}
|
||
|
||
document.addEventListener('click', function (e) {
|
||
var target = e.target;
|
||
|
||
// 1. 图集点击弹窗大图预览
|
||
var imgLink = target.closest ? target.closest('.fc-media-preview-img') : null;
|
||
if (imgLink) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var currentUrl = imgLink.getAttribute('data-url') || (imgLink.querySelector('img') ? imgLink.querySelector('img').getAttribute('src') : '');
|
||
var allLinks = document.querySelectorAll('.fc-media-preview-img');
|
||
var photos = [];
|
||
var startIdx = 0;
|
||
|
||
for (var i = 0; i < allLinks.length; i++) {
|
||
var src = allLinks[i].getAttribute('data-url') || (allLinks[i].querySelector('img') ? allLinks[i].querySelector('img').getAttribute('src') : '');
|
||
if (src) {
|
||
photos.push({
|
||
alt: '送审图集预览',
|
||
src: src
|
||
});
|
||
if (src === currentUrl) {
|
||
startIdx = photos.length - 1;
|
||
}
|
||
}
|
||
}
|
||
|
||
var l = getLayer();
|
||
if (l && l.photos) {
|
||
l.photos({
|
||
photos: {
|
||
title: '送审图片质检预览',
|
||
start: startIdx,
|
||
data: photos
|
||
},
|
||
shade: 0.75,
|
||
closeBtn: 1,
|
||
anim: 5
|
||
});
|
||
} else if (l) {
|
||
l.open({
|
||
type: 1,
|
||
title: '送审图片质检预览',
|
||
shadeClose: true,
|
||
maxmin: true,
|
||
area: ['700px', '520px'],
|
||
content: '<div style="display:flex;align-items:center;justify-content:center;height:100%;background:#000;"><img src="' + currentUrl + '" style="max-width:100%;max-height:100%;object-fit:contain;" /></div>'
|
||
});
|
||
}
|
||
return false;
|
||
}
|
||
|
||
// 2. 短视频点击弹窗播放试看
|
||
var videoBtn = target.closest ? target.closest('.fc-media-preview-video') : null;
|
||
if (videoBtn) {
|
||
e.preventDefault();
|
||
e.stopPropagation();
|
||
|
||
var videoUrl = videoBtn.getAttribute('data-url');
|
||
if (!videoUrl) return false;
|
||
|
||
var l = getLayer();
|
||
if (l) {
|
||
var html = '<div style="width:100%;height:100%;background:#000;display:flex;align-items:center;justify-content:center;">' +
|
||
'<video src="' + videoUrl + '" controls autoplay style="width:100%;height:100%;max-width:100%;max-height:100%;outline:none;background:#000;"></video>' +
|
||
'</div>';
|
||
l.open({
|
||
type: 1,
|
||
title: '<i class="fa fa-video-camera text-success"></i> 送审短视频试看',
|
||
area: ['680px', '480px'],
|
||
shade: 0.75,
|
||
shadeClose: true,
|
||
maxmin: true,
|
||
content: html
|
||
});
|
||
}
|
||
return false;
|
||
}
|
||
}, true);
|
||
})();
|
||
</script>
|