{{include "header.html"}} {{include "nav.html"}} {{/* 首页(index.html) 版式顺序按「商城转化 + 企业站信任」两条线交替推进: 轮播(品牌/活动)→ 促销横幅 → 产品推荐(商城主转化)→ 实力数据(企业站信任) → 最新动态(内容活跃度)→ 客户评价(口碑)→ 合作伙伴(背书)→ 咨询条(留资) ⚠️ 每个区块都用真实数据或 .ThemesExt 配置,**没有数据就不渲染**: 空数据还渲染出标题和空网格,是「看起来像坏了」最常见的来源。 */}} {{$ext := .ThemesExt}} {{/* ------------------------------------------------------------------ 轮播 */}} {{if index $ext "show_slides"}} {{$slides := HomeSlides}} {{if $slides}}
{{end}} {{end}} {{/* -------------------------------------------------------------- 服务保障条 */}} {{/* 对标头部电商首页:首屏下方必须有「价值主张 / 服务保障」条(次主视觉层级), 用 4 个图标化承诺把免运 / 退换 / 质保 / 客服一次交代清楚,降低首访用户的决策顾虑。 文案按本主题的行业定位写死,不依赖 ext 配置 —— 保证任何站点都有内容、不出空区块。 */}}
{{/* -------------------------------------------------------------- 促销横幅 */}} {{/* ⚠️ 促销横幅刻意用**扁平的 4 个标量键**而不是一个 promo_banner 对象: 主题数据表单(vvdata_schema.json)只支持 text/url/switch/array 等标量类型, 嵌成对象后台就编辑不了 —— 运营改一句文案得去改模板。 */}} {{$promoTitle := index $ext "promo_title"}} {{if $promoTitle}}
{{/* ⚠️ 渐变第二站用 rgba 而不是 color-mix:旧浏览器不支持 color-mix 时 整条 background 声明会被丢弃 → 深色底上白字直接看不见。 */}}
{{$promoTitle}}
{{with index $ext "promo_desc"}}
{{.}}
{{end}}
{{with index $ext "promo_url"}} {{with index $ext "promo_btn_text"}}{{.}}{{else}}立即查看{{end}} {{end}}
{{end}} {{/* -------------------------------------------------------------- 产品推荐 */}} {{$products := ColumnContents "products" 8}} {{if $products}}

{{with index $ext "products_title"}}{{.}}{{else}}产品推荐{{end}}

{{/* 副标题。⚠️ 默认文案里**不能写死「货到付款」**(2026-10-07 起它可被后台关闭): 运营关掉 COD 后首页还在宣传,用户到结算页才发现付不了。 所以兜底按 .ShopCODEnabled 分两种说法;运营在主题数据 products_sub 里填了就以它为准(上面 with 优先)。 */}}

{{with index $ext "products_sub"}}{{.}} {{else}}{{if .ShopCODEnabled}}精选热销产品,支持在线下单与{{.ShopCODTitle}}{{else}}精选热销产品,支持在线下单{{end}}{{end}}

查看全部 →
{{range $products}}
{{if .Img}} {{.Title}} {{else}}
暂无图片
{{end}} {{if .Ext}} {{$badge := index .Ext "badge"}} {{if $badge}} {{$badge}} {{end}} {{end}}

{{.Title}}

{{if .Description}}

{{StrSub .Description 70}}

{{end}}
{{if .Price}}
¥{{printf "%.2f" .Price}}
{{end}} {{if gt .Sales 0}}
已售 {{.Sales}} 件
{{end}}
{{/* 加购按钮:只提交商品 ID,数量固定 1(列表页没有数量选择器)。 🚨 商城关闭时不渲染按钮 —— /cart 此时是 404,按钮在、点下去 404 比不显示更糟。 */}} {{if $.ShopEnabled}} {{if and (ne .StockLimit 2) (le .Stock 0)}} 已售罄 {{else}} {{end}} {{else}} 查看详情 {{end}}
{{end}}
{{end}} {{/* ------------------------------------------------------------ 企业实力数据 */}} {{$cards := index $ext "stats_cards"}} {{if $cards}}

企业实力

用数据说话,持续为客户提供稳定的产品与服务

{{range $cards}} {{$bg := index . "bg"}}
{{index . "value"}}
{{index . "label"}}
{{end}}
{{end}} {{/* ---------------------------------------------------------------- 最新动态 */}} {{$news := ColumnContents "news" 3}} {{if $news}}

最新动态

了解我们的最新产品进展与行业观点

更多资讯 →
{{range $news}}
{{if .Img}} {{.Title}} {{else}}
暂无图片
{{end}}

{{.Title}}

{{if .Description}}

{{StrSub .Description 80}}

{{end}}
{{ParseTime .CreatedAt "2006-01-02"}} 阅读更多 →
{{end}}
{{end}} {{/* ---------------------------------------------------------------- 客户评价 */}} {{$testimonials := index $ext "testimonials"}} {{if $testimonials}}

客户评价

来自真实合作伙伴的使用反馈

{{range $testimonials}}

{{index . "content"}}

{{StrSub (index . "name") 1}}
{{index . "name"}}
{{with index . "company"}}
{{.}}
{{end}}
{{end}}
{{end}} {{/* ---------------------------------------------------------------- 合作伙伴 */}} {{$partners := index $ext "partners"}} {{if $partners}}

合作伙伴

与众多行业客户共同成长

{{/* 合作伙伴 / 合作品牌。 */}}
{{range $partners}} {{/* 🚨 没有 logo 时渲染**文字字标**而不是塞一张占位图: 主题默认数据给不出真实 logo,用无关图片冒充客户品牌比空着更糟 (客户看到自己 logo 位置是张风景照会直接质疑)。 运营在后台上传 logo 后自动切回图片,两种形态都能看。 */}}
{{$logo := index . "logo"}} {{if $logo}} {{/* 🚨 合作伙伴 logo 必须 object-contain:object-cover 会把非正方形 logo 裁掉一半。 */}} {{index . {{else}} {{index . "name"}} {{end}}
{{end}}
{{end}} {{/* ------------------------------------------------------------ 底部咨询 CTA */}} {{if index $ext "show_cta"}}

{{with index $ext "cta_title"}}{{.}}{{else}}还在犹豫该选哪一款?{{end}}

{{with index $ext "cta_desc"}}{{.}}{{else}}留下你的需求,我们会在 1 个工作日内给出方案与报价。{{end}}

{{end}} {{include "footer.html"}} {{include "js.html"}} {{if index $ext "show_slides"}} {{$slides := HomeSlides}} {{if $slides}} {{end}} {{end}}