1. 新增视频图标及上传示例视频文件 2. 调整开发环境后端域名 3. 新增结构化媒体列表功能,区分图片与视频 4. 新增短视频弹窗预览功能,支持在审核和详情页播放 5. 调整图片和视频文件大小限制,放宽至15MB和100MB 6. 优化详情页,支持视频播放、图片视频混合画廊展示 7. 优化后台审核和详情页面,新增短视频质检模块
401 行
22 KiB
HTML
401 行
22 KiB
HTML
<div class="fc-detail-container" style="padding: 15px 15px 70px 15px; background: #F8FAFC;">
|
||
<!-- 顶部:核心指标概览 -->
|
||
<div class="row" style="margin: 0 0 15px 0;">
|
||
<div class="col-xs-6 col-sm-3" style="padding: 0 6px 0 0;">
|
||
<div style="background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; padding: 12px; text-align: center;">
|
||
<div style="font-size: 11px; color: #64748B;">审核状态</div>
|
||
<div style="font-size: 14px; font-weight: 700; margin-top: 4px;">
|
||
{if $row.audit_status == 1}
|
||
<span class="text-success">已通过</span>
|
||
{elseif $row.audit_status == 2 /}
|
||
<span class="text-danger">已驳回</span>
|
||
{else /}
|
||
<span class="text-warning">待审核</span>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xs-6 col-sm-3" style="padding: 0 6px;">
|
||
<div style="background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; padding: 12px; text-align: center;">
|
||
<div style="font-size: 11px; color: #64748B;">浏览 / 点赞</div>
|
||
<div style="font-size: 14px; font-weight: 700; color: #0F172A; margin-top: 4px;">{$row.views} / {$row.likes}</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xs-6 col-sm-3" style="padding: 0 6px;">
|
||
<div style="background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; padding: 12px; text-align: center;">
|
||
<div style="font-size: 11px; color: #64748B;">付费状态</div>
|
||
<div style="font-size: 14px; font-weight: 700; margin-top: 4px;">
|
||
{if $row.is_paid == 1}
|
||
<span class="text-success">已支付 ¥{$row.amount}</span>
|
||
{else /}
|
||
<span class="text-muted">未付费</span>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xs-6 col-sm-3" style="padding: 0 0 0 6px;">
|
||
<div style="background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 8px; padding: 12px; text-align: center;">
|
||
<div style="font-size: 11px; color: #64748B;">置顶状态</div>
|
||
<div style="font-size: 14px; font-weight: 700; margin-top: 4px;">
|
||
{if $row.is_top == 1}
|
||
<span class="text-warning">首页置顶中</span>
|
||
{else /}
|
||
<span class="text-muted">普通展示</span>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 审核结论提示条(若已驳回则突出展示原因) -->
|
||
{if $row.audit_status == 2}
|
||
<div style="margin-bottom: 15px; padding: 14px 18px; background: #FEF2F2; border: 1px solid #FCA5A5; border-radius: 8px;">
|
||
<div style="display: flex; align-items: baseline; gap: 8px;">
|
||
<span class="label label-danger" style="font-size: 12px; padding: 3px 8px;">已驳回</span>
|
||
<span style="font-weight: 700; color: #991B1B; font-size: 14px;">审核未通过原因:</span>
|
||
</div>
|
||
<div style="margin-top: 8px; font-size: 13px; line-height: 1.6; color: #7F1D1D; word-break: break-all; background: #FFFFFF; padding: 10px 14px; border-radius: 6px; border: 1px solid #FECACA;">
|
||
{$row.audit_reason|default='(管理员未填写具体驳回原因)'|htmlentities}
|
||
</div>
|
||
</div>
|
||
{elseif $row.audit_status == 1 /}
|
||
<div style="margin-bottom: 15px; padding: 10px 16px; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 8px; display: flex; align-items: center; justify-content: space-between;">
|
||
<div style="color: #166534; font-size: 13px; font-weight: 600;">
|
||
<span class="label label-success" style="font-size: 11px; margin-right: 6px;">已通过</span> 该信息已通过人工审核,正常在线展示中
|
||
</div>
|
||
{if !empty($row.updatetime)}
|
||
<span style="font-size: 12px; color: #15803D;">审核/更新时间:{$row.updatetime|date='Y-m-d H:i:s',###}</span>
|
||
{/if}
|
||
</div>
|
||
{else /}
|
||
<div style="margin-bottom: 15px; padding: 10px 16px; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 8px; display: flex; align-items: center; justify-content: space-between;">
|
||
<div style="color: #92400E; font-size: 13px; font-weight: 600;">
|
||
<span class="label label-warning" style="font-size: 11px; margin-right: 6px;">待审核</span> 该信息正在等待人工审核处理
|
||
</div>
|
||
<a href="javascript:;" id="btn-banner-to-audit" title="立即前往审核" style="color: #D97706; font-size: 12px; font-weight: 600; text-decoration: underline;">审核</a>
|
||
</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: 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: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px 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} 条
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div style="font-size: 12px; color: #94A3B8; text-align: right;">
|
||
<div>发布时间:{$row.createtime|date='Y-m-d H:i:s',###}</div>
|
||
{if !empty($row.updatetime)}
|
||
<div style="margin-top: 2px;">更新时间:{$row.updatetime|date='Y-m-d H:i:s',###}</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</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: 80px; 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: 15px;">
|
||
<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;">
|
||
{volist name="imgItems" id="img"}
|
||
<a href="javascript:;" class="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: 15px;">
|
||
<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;">HTML5 原生视频播放器</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: 220px; 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: 130px; 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 20px; z-index: 99; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 -2px 10px rgba(0,0,0,0.05);">
|
||
<div>
|
||
<button type="button" class="btn btn-default btn-xs" id="btn-to-audit" style="color: #64748B;" title="重审此条信息">重审</button>
|
||
</div>
|
||
<div>
|
||
<button type="button" class="btn btn-default btn-embossed" id="btn-close" style="padding: 6px 22px;">关闭</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
(function () {
|
||
var postId = {$row.id};
|
||
|
||
/**
|
||
* 获取最高可用 Layer 对象(支持当前窗口、父窗口、顶层窗口)
|
||
*/
|
||
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;
|
||
}
|
||
|
||
/**
|
||
* 原生点击事件捕获(零依赖 RequireJS/jQuery,页面加载瞬间即生效)
|
||
*/
|
||
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;
|
||
}
|
||
|
||
// 3. 底部关闭按钮
|
||
if (target.id === 'btn-close' || (target.closest && target.closest('#btn-close'))) {
|
||
e.preventDefault();
|
||
var l = getLayer();
|
||
if (l && l.getFrameIndex) {
|
||
var idx = l.getFrameIndex(window.name);
|
||
if (idx) {
|
||
l.close(idx);
|
||
return false;
|
||
}
|
||
}
|
||
if (window.parent && window.parent !== window) {
|
||
try { window.parent.Fast.api.close(); } catch (err) {}
|
||
}
|
||
}
|
||
|
||
// 4. 重审跳转按钮
|
||
if (target.id === 'btn-to-audit' || target.id === 'btn-banner-to-audit' || (target.closest && (target.closest('#btn-to-audit') || target.closest('#btn-banner-to-audit')))) {
|
||
e.preventDefault();
|
||
location.href = 'fc/post/detail?ids=' + postId + '&mode=audit&dialog=1';
|
||
return false;
|
||
}
|
||
}, true);
|
||
})();
|
||
</script>
|