上次错误

This commit is contained in:
2026-08-08 16:26:31 +08:00
parent 8101177cb5
commit ba660d0c57
50 changed files with 1250 additions and 1326 deletions
+3 -4
View File
@@ -2,8 +2,7 @@
$n = $n ?? null;
$layoutArr = [];
if (!empty($n['layout'])) { $d = json_decode($n['layout'], true); if (is_array($d)) $layoutArr = $d; }
// 模式渲染:可视化编辑(builder)且有 layout → 画布;否则固定版式(正文富文本)
$useBuilder = !empty($layoutArr) && ($n['mode'] ?? '') !== 'fixed';
$hasCanvas = !empty($layoutArr);
?>
<section class="page-hero">
<div class="container">
@@ -15,12 +14,12 @@ $useBuilder = !empty($layoutArr) && ($n['mode'] ?? '') !== 'fixed';
<nav class="breadcrumb"><a href="<?php echo site_url(); ?>">首页</a> / <a href="<?php echo site_url('news'); ?>">新闻动态</a> / <?php echo e($n['title']); ?></nav>
</div>
<?php if ($useBuilder): ?>
<?php if ($hasCanvas): ?>
<?php echo \Core\View::buffer('parts/canvas', ['layout' => $layoutArr, 'item' => $n, 'module' => 'news']); ?>
<?php else: ?>
<section class="section" style="padding-top:10px">
<div class="container" style="max-width:780px">
<article class="detail-desc detail-rich" style="font-size:16px"><?php echo $n['content']; ?></article>
<article class="detail-desc" style="font-size:16px"><?php echo e($n['content']); ?></article>
</div>
</section>
<?php endif; ?>