From 2d4a316129366d9ce11d2886503fa7e048b1514a Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Wed, 21 Oct 2026 15:16:25 +0800 Subject: [PATCH] =?UTF-8?q?style(home):=20=E4=BC=98=E5=8C=96=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=A8=A1=E6=9D=BF=E7=BB=84=E4=BB=B6=E9=97=B4=E8=B7=9D?= =?UTF-8?q?=E4=B8=8E=E5=BA=97=E9=93=BA=E5=8D=A1=E7=89=87=E8=A7=86=E8=A7=89?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将所有模板组件的 pageGap/marginBottom 默认值从 10rpx 调整为 0 - 重构店铺卡片样式一为全景大片橱窗布局,添加自营标签与图片加载容错 - 重构店铺卡片样式二为大牌名店街 + 精品橱窗风格,优化商品封面与价格展示 - 促销详情模板添加 isRealGoods 过滤,无有效数据时整块不渲染 - 修复 u-notice-bar 横向滚动模式下 text 需为字符串的类型兼容问题 - 统一将模板中 HTML 实体 > 改为插值表达式避免转义异常 --- pages/tabbar/home/template/tpl.scss | 2 +- pages/tabbar/home/template/tpl_article.vue | 2 +- pages/tabbar/home/template/tpl_blank.vue | 2 +- pages/tabbar/home/template/tpl_coupon.vue | 2 +- pages/tabbar/home/template/tpl_integral.vue | 4 +- pages/tabbar/home/template/tpl_line.vue | 2 +- pages/tabbar/home/template/tpl_notice.vue | 17 +- .../home/template/tpl_promotions_detail.vue | 44 +++- pages/tabbar/home/template/tpl_rich_text.vue | 2 +- pages/tabbar/home/template/tpl_shop.vue | 244 +++++++++++++----- pages/tabbar/home/template/tpl_title.vue | 2 +- 11 files changed, 235 insertions(+), 88 deletions(-) diff --git a/pages/tabbar/home/template/tpl.scss b/pages/tabbar/home/template/tpl.scss index 4083f84..0d4693c 100644 --- a/pages/tabbar/home/template/tpl.scss +++ b/pages/tabbar/home/template/tpl.scss @@ -9,7 +9,7 @@ $home-layout-padding: 16rpx; .layout { padding: $home-layout-padding; - margin: 8rpx 0; + margin: 0; background: #fff; } .layout, diff --git a/pages/tabbar/home/template/tpl_article.vue b/pages/tabbar/home/template/tpl_article.vue index 97a2178..29d317c 100644 --- a/pages/tabbar/home/template/tpl_article.vue +++ b/pages/tabbar/home/template/tpl_article.vue @@ -50,7 +50,7 @@ const wrapperStyle = computed(() => { return { background: res.bgColor || "#FFFFFF", padding: `20rpx ${res.paddingX ?? 0}rpx`, - marginBottom: `${res.pageGap ?? 10}rpx`, + marginBottom: `${res.pageGap ?? 0}rpx`, borderRadius: `${res.borderRadius ?? 0}rpx`, overflow: "hidden", }; diff --git a/pages/tabbar/home/template/tpl_blank.vue b/pages/tabbar/home/template/tpl_blank.vue index cd3984b..2eea600 100644 --- a/pages/tabbar/home/template/tpl_blank.vue +++ b/pages/tabbar/home/template/tpl_blank.vue @@ -18,7 +18,7 @@ const blankStyle = computed(() => { return { background: bg, height: `${res.height ?? 10}rpx`, - margin: `0 ${res.paddingX ?? 0}rpx ${res.pageGap ?? 10}rpx`, + margin: `0 ${res.paddingX ?? 0}rpx ${res.pageGap ?? 0}rpx`, }; }); diff --git a/pages/tabbar/home/template/tpl_coupon.vue b/pages/tabbar/home/template/tpl_coupon.vue index 32688a5..0192fca 100644 --- a/pages/tabbar/home/template/tpl_coupon.vue +++ b/pages/tabbar/home/template/tpl_coupon.vue @@ -205,7 +205,7 @@ const wrapperStyle = computed(() => { return { background: res.bgColor || "#FFFFFF", padding: `20rpx ${res.paddingX ?? 0}rpx`, - marginBottom: `${res.pageGap ?? 10}rpx`, + marginBottom: `${res.pageGap ?? 0}rpx`, borderRadius: `${res.borderRadius ?? 0}rpx`, overflow: "hidden", }; diff --git a/pages/tabbar/home/template/tpl_integral.vue b/pages/tabbar/home/template/tpl_integral.vue index e26d0b6..af59161 100644 --- a/pages/tabbar/home/template/tpl_integral.vue +++ b/pages/tabbar/home/template/tpl_integral.vue @@ -9,7 +9,7 @@ /> {{ title }} - 更多 > + {{ "更多 >" }} @@ -125,7 +125,7 @@ const wrapperStyle = computed(() => { return { background: res.bgColor || "#FFFFFF", padding: `0 ${res.paddingX ?? 0}rpx`, - marginBottom: `${res.pageGap ?? 10}rpx`, + marginBottom: `${res.pageGap ?? 0}rpx`, borderRadius: `${res.borderRadius ?? 0}rpx`, overflow: "hidden", }; diff --git a/pages/tabbar/home/template/tpl_line.vue b/pages/tabbar/home/template/tpl_line.vue index 27b5459..de31812 100644 --- a/pages/tabbar/home/template/tpl_line.vue +++ b/pages/tabbar/home/template/tpl_line.vue @@ -20,7 +20,7 @@ const wrapperStyle = computed(() => { return { background: bg, padding: `0 ${res.paddingX ?? 0}rpx`, - marginBottom: `${res.pageGap ?? 10}rpx`, + marginBottom: `${res.pageGap ?? 0}rpx`, }; }); diff --git a/pages/tabbar/home/template/tpl_notice.vue b/pages/tabbar/home/template/tpl_notice.vue index a9d8820..9ed734b 100644 --- a/pages/tabbar/home/template/tpl_notice.vue +++ b/pages/tabbar/home/template/tpl_notice.vue @@ -12,7 +12,7 @@ :direction="directionValue" :bg-color="styled ? 'transparent' : item.bk_color" :color="item.color" - :text="texts" + :text="noticeText" @click="clickNotice" > @@ -67,8 +67,19 @@ const texts = computed(() => titleList.value.map((t: any) => String(t.context)) ); -function clickNotice(index: number) { - const target = titleList.value[index]; +// uView-plus 的 notice-bar 在横向滚动(direction="row")时要求 text 为字符串,竖向(column)可为数组 +const noticeText = computed(() => { + if (directionValue.value === "row") { + return texts.value.join(" "); + } + return texts.value; +}); + +function clickNotice(index?: number) { + const target = + typeof index === "number" + ? titleList.value[index] || titleList.value[0] + : titleList.value[0]; if (target && target.url) { modelNavigateTo(target); } diff --git a/pages/tabbar/home/template/tpl_promotions_detail.vue b/pages/tabbar/home/template/tpl_promotions_detail.vue index 953d94c..972cd8f 100644 --- a/pages/tabbar/home/template/tpl_promotions_detail.vue +++ b/pages/tabbar/home/template/tpl_promotions_detail.vue @@ -1,5 +1,5 @@ - 更多 > + {{ "更多 >" }} @@ -226,7 +226,7 @@ {{ firstItem.title || "精彩直播" }} {{ firstItem.title1 || "精彩抢先看" }} - 更多 > + {{ "更多 >" }} Exciting live streaming @@ -299,7 +299,7 @@ {{ firstItem.title1 || "邀请你的好友来参与" }} - GO > + {{ "GO >" }} {{ firstItem.title1 || "邀请好友来砍价" }} - GO > + {{ "GO >" }} - 更多 > + {{ "更多 >" }}
-
+