From 8739811b04a72c8fcc987e7daee2b1cd3052b2d0 Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Thu, 29 Oct 2026 17:06:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(pc-decorate):=20PC=E7=AB=AF=E6=A5=BC?= =?UTF-8?q?=E5=B1=82=E8=A3=85=E4=BF=AE=E7=BB=84=E4=BB=B6=E4=BD=93=E7=B3=BB?= =?UTF-8?q?=E8=A7=84=E8=8C=83=E9=BB=98=E8=AE=A4=E8=A1=8C=E9=AB=98=E4=B8=8E?= =?UTF-8?q?=E5=90=84=E6=A5=BC=E5=B1=82=E7=BB=84=E4=BB=B6=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/indexDecorate/RowWrapper.vue | 47 +- .../indexDecorate/components/Carousel.vue | 114 +- .../components/CategoryMegaMenu.vue | 475 +++++++- .../indexDecorate/components/ChannelFloor.vue | 17 +- .../indexDecorate/components/GoodsGrid.vue | 15 +- .../indexDecorate/components/GoodsList.vue | 132 ++- .../indexDecorate/components/GridFloor.vue | 41 +- .../indexDecorate/components/HotZone.vue | 31 +- .../indexDecorate/components/NoticeBar.vue | 185 +-- .../indexDecorate/components/PromoGroup.vue | 22 +- .../components/RecommendFeed.vue | 140 ++- .../indexDecorate/components/TitleBar.vue | 122 +- .../indexDecorate/components/UserBenefits.vue | 275 ++--- .../indexDecorate/components/VideoPlayer.vue | 103 +- .../indexDecorate/presets/double11Preset.js | 95 +- .../pc/config-panel/PanelCarousel.vue | 2 +- .../pc/config-panel/PanelCategoryMegaMenu.vue | 21 +- .../pc/config-panel/PanelChannelFloor.vue | 666 ++++++++--- .../pc/config-panel/PanelGoods.vue | 1011 ++++++++++++++++- .../pc/config-panel/PanelGoodsGrid.vue | 658 ++++++++--- .../pc/config-panel/PanelGridFloor.vue | 660 ++++++++--- .../pc/config-panel/PanelHotZone.vue | 494 +++++++- .../pc/config-panel/PanelNotice.vue | 378 +++++- .../pc/config-panel/PanelPromoGroup.vue | 407 ++++++- .../pc/config-panel/PanelRecommendFeed.vue | 182 ++- .../pc/config-panel/PanelTitle.vue | 351 +++++- .../pc/config-panel/PanelUserBenefits.vue | 528 ++++++++- .../pc/config-panel/PanelVideo.vue | 406 ++++++- .../pc/config-panel/RowConfigPanel.vue | 2 +- .../page-decoration/pc/config-panel/index.vue | 28 +- .../src/views/page-decoration/pc/config.js | 83 +- .../src/views/page-decoration/pc/index.vue | 151 ++- .../pc/presets/double11Preset.js | 95 +- .../pc/template/TplCarousel.vue | 155 +-- .../pc/template/TplCategoryMegaMenu.vue | 368 +++++- .../pc/template/TplChannelFloor.vue | 4 +- .../page-decoration/pc/template/TplGoods.vue | 62 +- .../pc/template/TplGoodsGrid.vue | 4 +- .../pc/template/TplGridFloor.vue | 6 +- .../page-decoration/pc/template/TplNotice.vue | 159 ++- .../pc/template/TplRecommendFeed.vue | 126 +- .../page-decoration/pc/template/TplTitle.vue | 45 +- .../page-decoration/pc/template/TplTopBar.vue | 10 +- .../pc/template/TplUserBenefits.vue | 247 ++-- .../page-decoration/pc/template/TplVideo.vue | 73 +- 45 files changed, 7340 insertions(+), 1856 deletions(-) diff --git a/buyer/src/components/indexDecorate/RowWrapper.vue b/buyer/src/components/indexDecorate/RowWrapper.vue index e1b9eba0e..69c91ef89 100644 --- a/buyer/src/components/indexDecorate/RowWrapper.vue +++ b/buyer/src/components/indexDecorate/RowWrapper.vue @@ -27,6 +27,8 @@ :component-style="comp.componentStyle || {}" + :row-style="row.rowStyle || {}" + />
@@ -93,7 +95,9 @@ const rowWrapperStyle = computed(() => { if (s.height !== undefined && s.height !== '') { const h = String(s.height).trim(); if (h && Number(h) > 0) { - style.minHeight = /^\d+$/.test(h) ? `${h}px` : h; + const hVal = /^\d+$/.test(h) ? `${h}px` : h; + style.height = hVal; + style.minHeight = hVal; } } @@ -136,7 +140,7 @@ const rowInnerFlexStyle = computed(() => { const s = props.row.rowStyle || {}; - return { + const styleObj = { display: 'flex', @@ -150,10 +154,23 @@ const rowInnerFlexStyle = computed(() => { width: '100%', + height: '100%', + gap: `${s.gap || 0}px` }; + if (s.height !== undefined && s.height !== '') { + const h = String(s.height).trim(); + if (h && Number(h) > 0) { + const hVal = /^\d+$/.test(h) ? `${h}px` : h; + styleObj.height = hVal; + styleObj.minHeight = hVal; + } + } + + return styleObj; + }); @@ -163,6 +180,15 @@ function getComponentCellStyle(style, rowStyle = {}, totalComps = 1) { if (!style) return { flex: '1 1 0%' }; const s = {}; + + if (rowStyle?.height !== undefined && rowStyle?.height !== '') { + const rh = String(rowStyle.height).trim(); + if (rh && Number(rh) > 0) { + const rhVal = /^\d+$/.test(rh) ? `${rh}px` : rh; + s.height = rhVal; + s.minHeight = rhVal; + } + } const gap = Number(rowStyle?.gap) || 0; const totalGap = (totalComps > 1 && gap > 0) ? gap * (totalComps - 1) : 0; @@ -275,12 +301,22 @@ function getComponentCellStyle(style, rowStyle = {}, totalComps = 1) { box-sizing: border-box; + display: flex; + + flex-direction: column; + .row-inner-flex { box-sizing: border-box; + flex: 1; + + height: 100%; + + min-height: 0; + .component-cell { @@ -295,6 +331,13 @@ function getComponentCellStyle(style, rowStyle = {}, totalComps = 1) { height: 100%; + > * { + flex: 1; + height: 100%; + width: 100%; + box-sizing: border-box; + } + } } diff --git a/buyer/src/components/indexDecorate/components/Carousel.vue b/buyer/src/components/indexDecorate/components/Carousel.vue index d47014440..e5b0841cf 100644 --- a/buyer/src/components/indexDecorate/components/Carousel.vue +++ b/buyer/src/components/indexDecorate/components/Carousel.vue @@ -7,9 +7,10 @@ :style="customStyle" > @@ -37,6 +38,10 @@ const props = defineProps({ componentStyle: { type: Object, default: () => ({}) + }, + rowStyle: { + type: Object, + default: () => ({}) } }); @@ -55,48 +60,32 @@ const slidesList = computed(() => { })); } return [ - { title: '出游囤好货', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', url: '/goodsList?seckill=1' }, - { title: '科技新品', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_2.png', url: '/goodsList?category=1' }, - { title: '原产地直采', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_3.png', url: '/goodsList?category=2' }, - { title: '大牌美妆', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_4.png', url: '/goodsList?category=3' } + { title: '潮流数码', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', url: '/goodsList?category=1' }, + { title: '奢宠美妆', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_2.png', url: '/goodsList?category=2' }, + { title: '运动潮流', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_3.png', url: '/goodsList?category=3' }, + { title: '居家生活', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_4.png', url: '/goodsList?category=4' } ]; }); -function getAspectRatioCss(ratio) { - if (ratio === '16:9') return '16 / 9'; - if (ratio === '2:1') return '2 / 1'; - if (ratio === '3:1') return '3 / 1'; - if (ratio === 'custom') return null; - return '2.5 / 1'; -} - const customStyle = computed(() => { const s = props.componentStyle || {}; - const fit = props.options.fitMode || 'contain'; + const fit = props.options.fitMode || 'cover'; + const hasRowHeight = Boolean(props.rowStyle?.height && Number(props.rowStyle.height) > 0); const styleObj = { - borderRadius: Array.isArray(s.radius) + borderRadius: Array.isArray(s.radius) && s.radius.some(r => r > 0) ? `${s.radius[0]}px ${s.radius[1]}px ${s.radius[2]}px ${s.radius[3]}px` : '8px', - backgroundColor: s.backgroundColor || '#ffffff', - '--carousel-fit': fit + backgroundColor: (s.backgroundColor && s.backgroundColor !== 'transparent') ? s.backgroundColor : '#ffffff', + '--carousel-fit': fit, + height: '100%', + minHeight: hasRowHeight ? '0' : '420px' }; - if (props.options.height) { + if (props.options.aspectRatio === 'custom' && props.options.height) { styleObj.height = `${props.options.height}px`; - styleObj.aspectRatio = 'auto'; - } else { - const ratio = props.options.aspectRatio || '2.5:1'; - const ratioCss = getAspectRatioCss(ratio); - if (ratioCss) { - styleObj.aspectRatio = ratioCss; - styleObj['--carousel-ratio'] = ratioCss; - } else { - styleObj.height = `${s.height || 420}px`; - styleObj.aspectRatio = 'auto'; - } + styleObj.minHeight = `${props.options.height}px`; } - return styleObj; }); @@ -104,6 +93,7 @@ const customStyle = computed(() => { diff --git a/buyer/src/components/indexDecorate/components/ChannelFloor.vue b/buyer/src/components/indexDecorate/components/ChannelFloor.vue index f39ad1c92..dac1e7ece 100644 --- a/buyer/src/components/indexDecorate/components/ChannelFloor.vue +++ b/buyer/src/components/indexDecorate/components/ChannelFloor.vue @@ -98,8 +98,21 @@ diff --git a/buyer/src/components/indexDecorate/presets/double11Preset.js b/buyer/src/components/indexDecorate/presets/double11Preset.js index bc707cb73..edb8b6ba9 100644 --- a/buyer/src/components/indexDecorate/presets/double11Preset.js +++ b/buyer/src/components/indexDecorate/presets/double11Preset.js @@ -22,7 +22,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 40 }, "components": [ { @@ -77,7 +78,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 12, 0 - ] + ], + "height": 120 }, "components": [ { @@ -99,7 +101,10 @@ export const DOUBLE11_PAGE_DOCUMENT = { "华为Mate 70", "五粮液普五", "耐克碳板跑鞋" - ] + ], + "showSearchTypes": true, + "defaultSearchType": "goods", + "storePlaceholder": "请输入店铺名称" } } ] @@ -120,7 +125,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -193,7 +199,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { ], "justifyContent": "space-between", "alignItems": "stretch", - "gap": 12 + "gap": 12, + "height": 320 }, "components": [ { @@ -366,7 +373,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 4, 12 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 40 }, "components": [ { @@ -427,7 +435,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 14 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 120 }, "components": [ { @@ -532,7 +541,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -569,7 +579,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 160 }, "components": [ { @@ -634,7 +645,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 750 }, "components": [ { @@ -711,7 +723,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 180 }, "components": [ { @@ -771,7 +784,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0 ], - "justifyContent": "space-between" + "justifyContent": "space-between", + "height": 360 }, "components": [ { @@ -874,7 +888,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 14, 20 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 450 }, "components": [ { @@ -924,7 +939,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -962,7 +978,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 560 }, "components": [ { @@ -1043,7 +1060,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 560 }, "components": [ { @@ -1121,7 +1139,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 620 }, "components": [ { @@ -1190,7 +1209,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1203,7 +1223,7 @@ export const DOUBLE11_PAGE_DOCUMENT = { }, "options": { "title": "双11爆款必买热销榜", - "subtitle": "TOP RANKINGS · 亿万买家真实下单好评热选", + "subtitle": "TOP RANKINGS · 平台高人气甄选热卖", "tag": "实时榜单", "moreText": "查看完整榜单 >", "moreUrl": "/goodsList" @@ -1228,7 +1248,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 420 }, "components": [ { @@ -1343,7 +1364,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1381,7 +1403,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 360 }, "components": [ { @@ -1395,6 +1418,7 @@ export const DOUBLE11_PAGE_DOCUMENT = { "options": { "videoUrl": "https://vjs.zencdn.net/v/oceans.mp4", "coverUrl": "https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/video/video_cover.png", + "url": "/goodsList?brand=1", "title": "双11全球狂欢发布盛典 · 年度旗舰好物真实开箱测评", "autoplay": false } @@ -1417,7 +1441,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1455,7 +1480,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 220 }, "components": [ { @@ -1513,7 +1539,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1551,7 +1578,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 20, 24 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": "" }, "components": [ { @@ -1588,7 +1616,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1626,7 +1655,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 980 }, "components": [ { @@ -1740,7 +1770,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1778,7 +1809,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 1270 }, "components": [ { @@ -1893,7 +1925,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 24, 0 - ] + ], + "height": 450 }, "components": [ { diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelCarousel.vue b/manager/src/views/page-decoration/pc/config-panel/PanelCarousel.vue index 04b8724c2..9cacb755e 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelCarousel.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelCarousel.vue @@ -214,7 +214,7 @@ if (props.options.showIndicator === undefined) props.options.showIndicator = tru if (!props.options.effect) props.options.effect = 'fade'; if (!props.options.fitMode) props.options.fitMode = 'contain'; if (!props.options.aspectRatio) props.options.aspectRatio = '2.5:1'; -if (props.options.height === undefined) props.options.height = 380; +if (props.options.height === undefined) props.options.height = 420; if (!Array.isArray(props.options.list)) { props.options.list = [ { title: '出游囤好货', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', url: '/goodsList?seckill=1' }, diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelCategoryMegaMenu.vue b/manager/src/views/page-decoration/pc/config-panel/PanelCategoryMegaMenu.vue index 774f3adc3..233e8dfd1 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelCategoryMegaMenu.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelCategoryMegaMenu.vue @@ -6,7 +6,7 @@
内容设置 @@ -69,14 +69,26 @@
- -
+ +
+ 数据来源 + + 系统分类 (自动) + 手动自定义 + + + 已启用系统商品分类,前后台自动拉取商城最新分类及二级、三级悬浮大菜单。 + +
+ + +
分类条目 共 {{ (options.categories || []).length }} 项 @@ -153,6 +165,7 @@ const props = defineProps({ }); // 初始化默认字段 +if (!props.options.source) props.options.source = 'system'; if (!props.options.title) props.options.title = '分类'; if (!props.options.textColor) props.options.textColor = '#111927'; if (!props.options.fontSize) props.options.fontSize = 14; diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelChannelFloor.vue b/manager/src/views/page-decoration/pc/config-panel/PanelChannelFloor.vue index eef0d2861..92de71932 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelChannelFloor.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelChannelFloor.vue @@ -3,46 +3,142 @@
标题区设置
-
+
展示标题区
- +
场景主视觉
+ +
- 主视觉图片 - + 主视觉图片 (建议尺寸 520x560px) +
+
+ + +
+ +
+ + + + 选择图片 + +
+
-
+ +
主视觉大标题 - +
+
主视觉副标题 - +
+
行动按钮文案 - +
+ +
按钮跳转链接 - + +
-
+ +
主视觉视觉风格 主题渐变 @@ -54,38 +150,113 @@
- 活动入口 ({{ options.promos?.length || 0 }} 个) + 专属活动入口 ({{ options.promos?.length || 0 }} 个) 添加活动
-
+
-
- - - - - + +
+ 入口 {{ pIdx + 1 }}{{ p.title ? ` · ${p.title}` : '' }} +
+ + + + + + + + + +
-
- + + +
+
+ 角标标签 + +
+
+ 活动标题 + +
+
+ +
+ 活动描述 + +
+ + +
+ 跳转链接 + +
+
+ 暂无活动入口,点击右上角“添加活动” +
场景商品位 ({{ options.goods?.length || 0 }} 件) - - 选择真实商品 - +
+ 清空 + 选择商品 +
-
+
展示商品数量
@@ -104,34 +275,32 @@
- - - + + +
@@ -217,6 +493,12 @@ function toggleSelect(item) { padding-bottom: 14px; border-bottom: 1px dashed #e2e8f0; + &:last-child { + border-bottom: none; + margin-bottom: 0; + padding-bottom: 0; + } + .section-title { font-size: 13px; font-weight: 600; @@ -232,38 +514,223 @@ function toggleSelect(item) { .form-item { display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 8px; + flex-direction: column; + gap: 5px; + margin-bottom: 10px; + + &.flex-row { + flex-direction: row; + align-items: center; + justify-content: space-between; + } .item-label { font-size: 12px; color: #475569; - margin-right: 8px; + font-weight: 500; white-space: nowrap; } } } + .mt-6 { + margin-top: 6px; + } + + .mt-10 { + margin-top: 10px; + } + + .mr-4 { + margin-right: 4px; + } + + .flex-1 { + flex: 1; + } + + .micro-label { + font-size: 11px; + color: #64748b; + margin-bottom: 2px; + display: block; + } + + .picker-flex-wrap { + display: flex; + align-items: center; + gap: 8px; + + .thumb-preview-box { + position: relative; + width: 58px; + height: 40px; + border-radius: 4px; + border: 1px dashed #cbd5e1; + background: #ffffff; + cursor: pointer; + overflow: hidden; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + flex-shrink: 0; + transition: border-color 0.2s; + + &:hover { + border-color: #409eff; + } + + .preview-img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + + .thumb-empty-icon { + font-size: 15px; + color: #94a3b8; + } + + .thumb-empty-tip { + font-size: 10px; + color: #94a3b8; + line-height: 1; + margin-top: 2px; + } + + .thumb-clear-btn { + position: absolute; + top: 2px; + right: 2px; + background: rgba(0, 0, 0, 0.65); + color: #ffffff; + width: 14px; + height: 14px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + cursor: pointer; + + &:hover { + background: #ef4444; + } + } + } + + .input-with-action { + display: flex; + align-items: center; + gap: 6px; + + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; + } + } + } + + .link-picker-wrap { + display: flex; + align-items: center; + gap: 6px; + + .link-input-icon { + color: #94a3b8; + } + + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; + + &.link-btn { + background: #ecf5ff; + border-color: #b3d8ff; + color: #409eff; + + &:hover { + background: #409eff; + color: #ffffff; + } + } + } + } + + .link-current-tag { + display: flex; + align-items: center; + gap: 4px; + font-size: 11px; + background: #eff6ff; + border: 1px solid #dbeafe; + border-radius: 4px; + padding: 2px 8px; + margin-top: 2px; + overflow: hidden; + + .tag-label { + color: #3b82f6; + font-weight: 500; + flex-shrink: 0; + } + + .tag-val { + color: #1e40af; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } + .promos-list-editor { display: flex; flex-direction: column; - gap: 8px; + gap: 10px; .promo-editor-card { background: #f8fafc; - padding: 8px; - border-radius: 6px; + padding: 10px; + border-radius: 8px; border: 1px solid #e2e8f0; + .promo-card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 8px; + padding-bottom: 6px; + border-bottom: 1px solid #edf2f7; + + .promo-idx-badge { + font-size: 12px; + font-weight: 600; + color: #334155; + } + + .promo-actions { + display: flex; + align-items: center; + gap: 2px; + } + } + .promo-row-1 { display: flex; - gap: 6px; - margin-bottom: 6px; + gap: 8px; } } } + .empty-tip { + font-size: 12px; + color: #94a3b8; + text-align: center; + padding: 16px 0; + } + .goods-list-preview { max-height: 200px; overflow-y: auto; @@ -310,59 +777,4 @@ function toggleSelect(item) { } } } - -.modal-goods-pool { - max-height: 360px; - overflow-y: auto; - display: flex; - flex-direction: column; - gap: 8px; - - .pool-item { - display: flex; - align-items: center; - gap: 12px; - padding: 8px 12px; - border: 1px solid #e2e8f0; - border-radius: 6px; - cursor: pointer; - transition: all 0.2s; - - &:hover { - border-color: #4f46e5; - } - - &.selected { - background: #eef2ff; - border-color: #4f46e5; - } - - .pool-thumb { - width: 44px; - height: 44px; - border-radius: 4px; - object-fit: cover; - } - - .pool-meta { - flex: 1; - .pool-name { - font-size: 13px; - color: #1e293b; - margin-bottom: 4px; - } - .pool-price { - font-size: 12px; - color: #e11d48; - font-weight: 700; - } - } - - .check-icon { - color: #4f46e5; - font-size: 18px; - font-weight: 800; - } - } -} diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelGoods.vue b/manager/src/views/page-decoration/pc/config-panel/PanelGoods.vue index 5a72ae8d3..8328c0e30 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelGoods.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelGoods.vue @@ -1,19 +1,44 @@ @@ -176,125 +361,278 @@ function toggleSelect(item) { .form-item { display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 8px; + flex-direction: column; + gap: 5px; + margin-bottom: 10px; + + &.flex-row { + flex-direction: row; + align-items: center; + justify-content: space-between; + } .item-label { font-size: 12px; color: #475569; - margin-right: 8px; - white-space: nowrap; + font-weight: 500; + } + } + } + + .mr-4 { + margin-right: 4px; + } + + .btn-group { + display: flex; + align-items: center; + gap: 6px; + } + + .link-picker-wrap { + display: flex; + align-items: center; + gap: 6px; + + .link-input-icon { + color: #94a3b8; + } + + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; + + &.link-btn { + background: #ecf5ff; + border-color: #b3d8ff; + color: #409eff; + + &:hover { + background: #409eff; + color: #ffffff; + } + } + } + } + + .link-current-tag { + display: flex; + align-items: center; + gap: 4px; + font-size: 11px; + background: #eff6ff; + border: 1px solid #dbeafe; + border-radius: 4px; + padding: 3px 8px; + margin-top: 4px; + overflow: hidden; + + .tag-label { + color: #3b82f6; + font-weight: 500; + flex-shrink: 0; + } + + .tag-val { + color: #1e40af; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + flex: 1; + } + + .url-clear-icon { + font-size: 12px; + color: #94a3b8; + cursor: pointer; + flex-shrink: 0; + + &:hover { + color: #ef4444; } } } .goods-grid-preview { - max-height: 240px; + max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; - gap: 6px; - margin-top: 8px; + gap: 8px; .grid-item-row { display: flex; align-items: center; gap: 8px; background: #f8fafc; - padding: 6px 8px; + padding: 8px; border-radius: 6px; + border: 1px solid #e2e8f0; + transition: background 0.15s ease; - .idx-badge { - font-size: 11px; - font-weight: 700; - color: #94a3b8; - width: 16px; - text-align: center; + &:hover { + background: #f1f5f9; } - .g-thumb { - width: 36px; - height: 36px; + .idx-badge { + width: 18px; + height: 18px; + background: #e2e8f0; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + font-weight: 700; + color: #475569; + flex-shrink: 0; + } + + .thumb-wrap-mini { + position: relative; + width: 44px; + height: 44px; border-radius: 4px; - object-fit: cover; + overflow: hidden; + flex-shrink: 0; + cursor: pointer; + border: 1px solid #cbd5e1; + + .g-thumb { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + + .thumb-tip { + position: absolute; + inset: 0; + background: rgba(15, 23, 42, 0.7); + color: #ffffff; + font-size: 10px; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition: opacity 0.2s; + } + + &:hover .thumb-tip { + opacity: 1; + } } .g-info { flex: 1; - overflow: hidden; + min-width: 0; display: flex; flex-direction: column; + gap: 4px; - .g-name { - font-size: 12px; - color: #1e293b; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; + .g-name-input { + :deep(.el-input__inner) { + font-size: 12px; + padding: 0 6px; + height: 24px; + } } - .g-price { - font-size: 11px; - font-weight: 700; - color: #e11d48; + .g-meta-row { + display: flex; + align-items: center; + justify-content: space-between; + gap: 6px; + + .price-input-wrap { + display: flex; + align-items: center; + gap: 2px; + font-size: 11px; + color: #ef4444; + font-weight: 600; + + .price-mini-input { + width: 70px; + :deep(.el-input__inner) { + font-size: 11px; + padding: 0 4px; + height: 22px; + color: #ef4444; + font-weight: 600; + } + } + } + } + + .item-url-badge { + display: flex; + align-items: center; + gap: 4px; + font-size: 10px; + background: #eff6ff; + border: 1px solid #dbeafe; + border-radius: 3px; + padding: 2px 6px; + color: #2563eb; + + .url-label { + font-size: 10px; + flex-shrink: 0; + } + + .url-text { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + flex: 1; + } + + .url-clear-icon { + cursor: pointer; + flex-shrink: 0; + font-size: 11px; + color: #94a3b8; + + &:hover { + color: #ef4444; + } + } + } + } + + .action-btn-col { + display: flex; + flex-direction: column; + align-items: center; + gap: 2px; + flex-shrink: 0; + + .el-button { + margin: 0; + padding: 2px; + height: auto; + font-size: 12px; } } } } -} -.modal-goods-pool { - max-height: 360px; - overflow-y: auto; - display: flex; - flex-direction: column; - gap: 8px; - - .pool-item { - display: flex; - align-items: center; - gap: 12px; - padding: 8px 12px; - border: 1px solid #e2e8f0; + .goods-empty-tip { + padding: 18px 12px; + border: 1px dashed #cbd5e1; border-radius: 6px; - cursor: pointer; - transition: all 0.2s; + display: flex; + flex-direction: column; + align-items: center; + gap: 8px; + color: #94a3b8; + font-size: 12px; + background: #f8fafc; - &:hover { - border-color: #f97316; - } - - &.selected { - background: #fff7ed; - border-color: #f97316; - } - - .pool-thumb { - width: 44px; - height: 44px; - border-radius: 4px; - object-fit: cover; - } - - .pool-meta { - flex: 1; - .pool-name { - font-size: 13px; - color: #1e293b; - margin-bottom: 4px; - } - .pool-price { - font-size: 12px; - color: #e11d48; - font-weight: 700; - } - } - - .check-icon { - color: #f97316; - font-size: 18px; - font-weight: 800; + .empty-btn-row { + display: flex; + gap: 12px; } } } diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelGridFloor.vue b/manager/src/views/page-decoration/pc/config-panel/PanelGridFloor.vue index 6be88463a..c8193a96d 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelGridFloor.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelGridFloor.vue @@ -3,23 +3,54 @@
楼层大标题设置
-
+
展示楼层标题
楼层编号 - +
楼层名称 - +
英文/副标题 - + +
+ + +
+ “查看更多”跳转链接 + +
@@ -33,7 +64,7 @@
- + @@ -41,29 +72,89 @@
- +
-
左侧专属大促海报
-
- 展示左侧海报 +
左侧营销海报 / 横幅设置
+
+ 展示左侧海报横幅
@@ -71,7 +162,7 @@
右侧商品排版
-
+
单行展示列数 3 列 @@ -85,17 +176,27 @@
楼层商品数据 ({{ options.goods?.length || 0 }} 件) - - 选择真实商品 - +
+ 清空 + 选择商品 +
- +
+ +
换图
+
- {{ g.goodsName }} - ¥{{ g.price }} + {{ g.goodsName }} +
+ ¥{{ g.price }} + + + {{ g.url ? '已配链接' : '选链接' }} + +
@@ -104,34 +205,32 @@
- - - + + +
@@ -231,43 +475,184 @@ function toggleSelect(item) { .form-item { display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 8px; + flex-direction: column; + gap: 5px; + margin-bottom: 10px; + + &.flex-row { + flex-direction: row; + align-items: center; + justify-content: space-between; + } .item-label { font-size: 12px; color: #475569; - margin-right: 8px; - white-space: nowrap; + font-weight: 500; } } .form-row-2 { display: flex; - gap: 10px; - margin-bottom: 8px; + gap: 8px; + } - .flex-1 { - flex: 1; + .tags-editor-wrap { + display: flex; + flex-direction: column; + gap: 6px; + + .tag-edit-row { + display: flex; + align-items: center; + gap: 6px; } } } - .tags-editor-wrap { - display: flex; - flex-direction: column; - gap: 6px; + .mr-4 { + margin-right: 4px; + } - .tag-edit-row { + .mt-10 { + margin-top: 10px; + } + + .flex-1 { + flex: 1; + } + + .picker-flex-wrap { + display: flex; + align-items: center; + gap: 8px; + + .thumb-preview-box { + position: relative; + width: 58px; + height: 40px; + border-radius: 4px; + border: 1px dashed #cbd5e1; + background: #ffffff; + cursor: pointer; + overflow: hidden; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + flex-shrink: 0; + transition: border-color 0.2s; + + &:hover { + border-color: #409eff; + } + + .preview-img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + + .thumb-empty-icon { + font-size: 15px; + color: #94a3b8; + } + + .thumb-empty-tip { + font-size: 10px; + color: #94a3b8; + line-height: 1; + margin-top: 2px; + } + + .thumb-clear-btn { + position: absolute; + top: 2px; + right: 2px; + background: rgba(0, 0, 0, 0.65); + color: #ffffff; + width: 14px; + height: 14px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + cursor: pointer; + + &:hover { + background: #ef4444; + } + } + } + + .input-with-action { display: flex; align-items: center; - gap: 8px; + gap: 6px; + + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; + } + } + } + + .link-picker-wrap { + display: flex; + align-items: center; + gap: 6px; + + .link-input-icon { + color: #94a3b8; + } + + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; + + &.link-btn { + background: #ecf5ff; + border-color: #b3d8ff; + color: #409eff; + + &:hover { + background: #409eff; + color: #ffffff; + } + } + } + } + + .link-current-tag { + display: flex; + align-items: center; + gap: 4px; + font-size: 11px; + background: #eff6ff; + border: 1px solid #dbeafe; + border-radius: 4px; + padding: 3px 8px; + margin-top: 4px; + overflow: hidden; + + .tag-label { + color: #3b82f6; + font-weight: 500; + flex-shrink: 0; + } + + .tag-val { + color: #1e40af; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } } .goods-list-preview { - max-height: 240px; + max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; @@ -281,12 +666,41 @@ function toggleSelect(item) { background: #f8fafc; padding: 6px 8px; border-radius: 6px; + border: 1px solid #e2e8f0; - .g-thumb { - width: 36px; - height: 36px; + .thumb-wrap-mini { + position: relative; + width: 38px; + height: 38px; border-radius: 4px; - object-fit: cover; + overflow: hidden; + flex-shrink: 0; + cursor: pointer; + border: 1px solid #cbd5e1; + + .g-thumb { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + + .thumb-tip { + position: absolute; + inset: 0; + background: rgba(15, 23, 42, 0.7); + color: #ffffff; + font-size: 10px; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition: opacity 0.2s; + } + + &:hover .thumb-tip { + opacity: 1; + } } .g-info { @@ -294,6 +708,7 @@ function toggleSelect(item) { overflow: hidden; display: flex; flex-direction: column; + gap: 2px; .g-name { font-size: 12px; @@ -303,68 +718,19 @@ function toggleSelect(item) { text-overflow: ellipsis; } - .g-price { - font-size: 11px; - font-weight: 700; - color: #e11d48; + .g-meta-row { + display: flex; + align-items: center; + justify-content: space-between; + + .g-price { + font-size: 11px; + font-weight: 700; + color: #e11d48; + } } } } } } - -.modal-goods-pool { - max-height: 360px; - overflow-y: auto; - display: flex; - flex-direction: column; - gap: 8px; - - .pool-item { - display: flex; - align-items: center; - gap: 12px; - padding: 8px 12px; - border: 1px solid #e2e8f0; - border-radius: 6px; - cursor: pointer; - transition: all 0.2s; - - &:hover { - border-color: #3b82f6; - } - - &.selected { - background: #eff6ff; - border-color: #3b82f6; - } - - .pool-thumb { - width: 44px; - height: 44px; - border-radius: 4px; - object-fit: cover; - } - - .pool-meta { - flex: 1; - .pool-name { - font-size: 13px; - color: #1e293b; - margin-bottom: 4px; - } - .pool-price { - font-size: 12px; - color: #e11d48; - font-weight: 700; - } - } - - .check-icon { - color: #3b82f6; - font-size: 18px; - font-weight: 800; - } - } -} diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelHotZone.vue b/manager/src/views/page-decoration/pc/config-panel/PanelHotZone.vue index f2a3aa83c..5dd0518d7 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelHotZone.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelHotZone.vue @@ -1,48 +1,219 @@ @@ -99,45 +331,219 @@ function handleAddZone() { } } - .hotzone-preview { - margin-top: 10px; - max-height: 140px; - overflow: hidden; - border: 1px solid #cbd5e1; - border-radius: 6px; + .input-with-action { + display: flex; + align-items: center; + gap: 6px; - .img-preview { - width: 100%; - object-fit: cover; + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; } } - .zones-list { - display: flex; - flex-direction: column; - gap: 8px; + .hotzone-preview-box { + margin-top: 10px; + border: 1px solid #cbd5e1; + border-radius: 6px; + overflow: hidden; + background: #f8fafc; - .zone-card { - background: #f8fafc; - border: 1px solid #e2e8f0; - border-radius: 6px; - padding: 8px; + .img-preview { + width: 100%; + max-height: 140px; + object-fit: cover; + display: block; + } - .zone-header { + .preview-actions-bar { + display: flex; + justify-content: flex-end; + align-items: center; + gap: 8px; + padding: 6px 10px; + background: #f1f5f9; + border-top: 1px solid #e2e8f0; + } + } + } + + .zones-list { + display: flex; + flex-direction: column; + gap: 12px; + + .zone-card-item { + background: #f8fafc; + border: 1px solid #e2e8f0; + border-radius: 8px; + padding: 12px; + transition: border-color 0.2s, box-shadow 0.2s; + + &:hover { + border-color: #cbd5e1; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); + } + + .zone-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + padding-bottom: 8px; + border-bottom: 1px solid #edf2f7; + + .zone-idx-title { display: flex; - justify-content: space-between; + align-items: center; + gap: 6px; font-size: 12px; - color: #64748b; - margin-bottom: 6px; + font-weight: 600; + color: #334155; + + .zone-num-badge { + background: #409EFF; + color: #ffffff; + font-size: 10px; + font-weight: 700; + width: 16px; + height: 16px; + border-radius: 50%; + display: inline-flex; + align-items: center; + justify-content: center; + } } - .zone-inputs { + .zone-header-btns { + display: flex; + align-items: center; + gap: 2px; + } + } + + .zone-body-inputs { + display: flex; + flex-direction: column; + gap: 10px; + + .field-item { display: flex; flex-direction: column; + gap: 4px; + + .field-lbl { + font-size: 11px; + font-weight: 500; + color: #64748b; + } + } + + .link-picker-row { + display: flex; + align-items: center; gap: 6px; + + .link-prefix-icon { + color: #94a3b8; + } + + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; + + &.link-btn { + background: #ecf5ff; + border-color: #b3d8ff; + color: #409EFF; + + &:hover { + background: #409EFF; + color: #ffffff; + } + } + } + } + + .link-current-tag { + display: flex; + align-items: center; + gap: 4px; + font-size: 11px; + background: #eff6ff; + border: 1px solid #dbeafe; + border-radius: 4px; + padding: 2px 8px; + margin-top: 2px; + overflow: hidden; + + .tag-label { + color: #3b82f6; + flex-shrink: 0; + font-weight: 500; + } + + .tag-val { + color: #1e40af; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-family: monospace; + } + } + + .coord-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 6px; + + .coord-cell { + display: flex; + align-items: center; + gap: 4px; + background: #ffffff; + border: 1px solid #e2e8f0; + border-radius: 4px; + padding: 2px 6px; + + .coord-lbl { + font-size: 11px; + font-weight: 600; + color: #64748b; + flex-shrink: 0; + } + + .coord-input { + width: 100%; + + :deep(.el-input__wrapper) { + padding: 0 2px; + box-shadow: none !important; + } + + :deep(.el-input__inner) { + font-size: 11px; + text-align: center; + } + } + } } } } } + + .empty-zones-box { + text-align: center; + padding: 20px; + color: #94a3b8; + font-size: 12px; + border: 1px dashed #cbd5e1; + border-radius: 6px; + background: #f8fafc; + } + + .mr-4 { + margin-right: 4px; + } } diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelNotice.vue b/manager/src/views/page-decoration/pc/config-panel/PanelNotice.vue index 423c71c6d..e5f63dd58 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelNotice.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelNotice.vue @@ -1,29 +1,82 @@ @@ -99,33 +276,209 @@ function handleAddCard() { color: #475569; } } + } - .cards-list { - display: flex; - flex-direction: column; - gap: 10px; + .cards-list { + display: flex; + flex-direction: column; + gap: 14px; - .promo-card-item { - background: #f8fafc; - border: 1px solid #e2e8f0; - border-radius: 6px; - padding: 10px; + .promo-card-item { + background: #f8fafc; + border: 1px solid #e2e8f0; + border-radius: 8px; + padding: 12px; + transition: border-color 0.2s, box-shadow 0.2s; - .card-header { - display: flex; - justify-content: space-between; + &:hover { + border-color: #cbd5e1; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); + } + + .card-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; + padding-bottom: 8px; + border-bottom: 1px solid #edf2f7; + + .card-idx-badge { font-size: 12px; - color: #64748b; - margin-bottom: 8px; + font-weight: 600; + color: #334155; } - .card-inputs { + .card-actions { + display: flex; + align-items: center; + gap: 4px; + } + } + + .card-inputs { + display: flex; + flex-direction: column; + gap: 10px; + + .input-row { display: flex; flex-direction: column; + gap: 4px; + + .field-label { + font-size: 11px; + font-weight: 500; + color: #64748b; + } + } + + .picker-flex-wrap { + display: flex; + align-items: center; + gap: 8px; + + .thumb-preview-box { + position: relative; + width: 58px; + height: 40px; + border-radius: 4px; + border: 1px dashed #cbd5e1; + background: #ffffff; + cursor: pointer; + overflow: hidden; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + flex-shrink: 0; + transition: border-color 0.2s; + + &:hover { + border-color: #409EFF; + } + + .preview-img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + + .thumb-empty-icon { + font-size: 15px; + color: #94a3b8; + } + + .thumb-empty-tip { + font-size: 10px; + color: #94a3b8; + line-height: 1; + margin-top: 2px; + } + + .thumb-clear-btn { + position: absolute; + top: 2px; + right: 2px; + background: rgba(0, 0, 0, 0.65); + color: #ffffff; + width: 14px; + height: 14px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 10px; + cursor: pointer; + + &:hover { + background: #ef4444; + } + } + } + + .input-with-action { + flex: 1; + display: flex; + align-items: center; + gap: 6px; + + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; + } + } + } + + .link-picker-wrap { + display: flex; + align-items: center; gap: 6px; + + .link-input-icon { + color: #94a3b8; + } + + .action-picker-btn { + flex-shrink: 0; + padding: 0 10px; + + &.link-btn { + background: #ecf5ff; + border-color: #b3d8ff; + color: #409EFF; + + &:hover { + background: #409EFF; + color: #ffffff; + } + } + } + } + + .link-current-tag { + display: flex; + align-items: center; + gap: 4px; + font-size: 11px; + background: #eff6ff; + border: 1px solid #dbeafe; + border-radius: 4px; + padding: 2px 8px; + margin-top: 2px; + overflow: hidden; + + .tag-label { + color: #3b82f6; + flex-shrink: 0; + font-weight: 500; + } + + .tag-val { + color: #1e40af; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-family: monospace; + } } } } } + + .empty-cards-tip { + text-align: center; + padding: 20px; + color: #94a3b8; + font-size: 12px; + border: 1px dashed #cbd5e1; + border-radius: 6px; + background: #f8fafc; + } + + .mr-4 { + margin-right: 4px; + } } diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelRecommendFeed.vue b/manager/src/views/page-decoration/pc/config-panel/PanelRecommendFeed.vue index e3baa29e5..fe53bcd39 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelRecommendFeed.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelRecommendFeed.vue @@ -46,9 +46,14 @@
推荐商品池 ({{ options.goods?.length || 0 }} 件) - - 选择真实商品 - +
+ + 清空 + + + 选择商品 + +
@@ -56,7 +61,7 @@ {{ idx === 0 ? '精选' : idx + 1 }}
- {{ g.goodsName }} + {{ g.goodsName }} ¥{{ g.price }}
@@ -64,36 +69,39 @@
+
+ 暂未选择特定商品,前台将展示系统推荐商品 + + + 点击添加商品 + +
- - - + + +
@@ -172,6 +188,12 @@ function toggleSelect(item) { justify-content: space-between; align-items: center; } + + .btn-group { + display: flex; + align-items: center; + gap: 8px; + } } .form-item { @@ -190,7 +212,7 @@ function toggleSelect(item) { } .goods-list-preview { - max-height: 200px; + max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; @@ -204,14 +226,16 @@ function toggleSelect(item) { background: #f8fafc; padding: 6px 8px; border-radius: 6px; + border: 1px solid #f1f5f9; .idx-tag { - font-size: 10px; + font-size: 11px; font-weight: 700; - background: #fee2e2; - color: #dc2626; - padding: 2px 4px; + color: #64748b; + background: #e2e8f0; + padding: 1px 5px; border-radius: 3px; + white-space: nowrap; } .g-thumb { @@ -243,60 +267,18 @@ function toggleSelect(item) { } } } -} -.modal-goods-pool { - max-height: 360px; - overflow-y: auto; - display: flex; - flex-direction: column; - gap: 8px; - - .pool-item { - display: flex; - align-items: center; - gap: 12px; - padding: 8px 12px; - border: 1px solid #e2e8f0; + .goods-empty-tip { + padding: 16px; + text-align: center; + background: #f8fafc; border-radius: 6px; - cursor: pointer; - transition: all 0.2s; - - &:hover { - border-color: #ef4444; - } - - &.selected { - background: #fef2f2; - border-color: #ef4444; - } - - .pool-thumb { - width: 44px; - height: 44px; - border-radius: 4px; - object-fit: cover; - } - - .pool-meta { - flex: 1; - .pool-name { - font-size: 13px; - color: #1e293b; - margin-bottom: 4px; - } - .pool-price { - font-size: 12px; - color: #e11d48; - font-weight: 700; - } - } - - .check-icon { - color: #ef4444; - font-size: 18px; - font-weight: 800; - } + font-size: 12px; + color: #94a3b8; + display: flex; + flex-direction: column; + align-items: center; + gap: 6px; } } diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelTitle.vue b/manager/src/views/page-decoration/pc/config-panel/PanelTitle.vue index 819ba77ce..093b08419 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelTitle.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelTitle.vue @@ -5,15 +5,77 @@
主标题文案 - +
-
+ +
+ 标题图标 / 徽标图片 (可选) +
+
+ +
+ + 选图 +
+
换图
+
+
+
+ + + + 选择图片 + +
+
建议尺寸 32x32 或 48x48px,展示在标题前缀
+
+
+
+ + +
+ 主标题点击跳转链接 (可选) + + +
+ +
副标题文字 - +
-
+
对齐方式 靠左对齐 @@ -21,25 +83,57 @@
-
+
显示右侧“查看更多”
-
- 更多链接文案 - -
+
diff --git a/manager/src/views/page-decoration/pc/config-panel/PanelVideo.vue b/manager/src/views/page-decoration/pc/config-panel/PanelVideo.vue index b8014a07c..39a35a21a 100644 --- a/manager/src/views/page-decoration/pc/config-panel/PanelVideo.vue +++ b/manager/src/views/page-decoration/pc/config-panel/PanelVideo.vue @@ -1,20 +1,136 @@ diff --git a/manager/src/views/page-decoration/pc/config-panel/RowConfigPanel.vue b/manager/src/views/page-decoration/pc/config-panel/RowConfigPanel.vue index ee65ace5b..6995a9106 100644 --- a/manager/src/views/page-decoration/pc/config-panel/RowConfigPanel.vue +++ b/manager/src/views/page-decoration/pc/config-panel/RowConfigPanel.vue @@ -88,7 +88,7 @@ type="text" v-model="row.rowStyle.height" class="dim-input" - placeholder="40" + placeholder="默认" />
diff --git a/manager/src/views/page-decoration/pc/config-panel/index.vue b/manager/src/views/page-decoration/pc/config-panel/index.vue index e7662f216..bc1e0f8c7 100644 --- a/manager/src/views/page-decoration/pc/config-panel/index.vue +++ b/manager/src/views/page-decoration/pc/config-panel/index.vue @@ -211,6 +211,20 @@ import { ref, computed } from 'vue'; +import { + House, Compass, Picture, ShoppingBag, Ticket, Document, Menu, Bottom as BottomIcon, + List, Grid, Fold, PictureRounded, Medal, Aim, FullScreen, Files, VideoCamera, + Goods, Postcard, Reading, DArrowRight, CollectionTag, Star, Edit, Bell, + Search, User, Rank +} from '@element-plus/icons-vue'; + +const iconMap = { + House, Compass, Picture, ShoppingBag, Ticket, Document, Menu, Bottom: BottomIcon, + List, Grid, Fold, PictureRounded, Medal, Aim, FullScreen, Files, VideoCamera, + Goods, Postcard, Reading, DArrowRight, CollectionTag, Star, Edit, Bell, + Search, User, Rank +}; + import RowConfigPanel from './RowConfigPanel.vue'; import ComponentConfigPanel from './ComponentConfigPanel.vue'; @@ -367,19 +381,11 @@ const currentSelectedTitle = computed(() => { const currentSelectedIcon = computed(() => { - if (props.selectedComponent) { - - if (props.selectedComponent.icon) return props.selectedComponent.icon; - - const def = COMPONENT_DEFINITIONS.find(d => d.type === props.selectedComponent.type); - - return def?.icon || 'Grid'; - + const iconName = props.selectedComponent.icon || COMPONENT_DEFINITIONS.find(d => d.type === props.selectedComponent.type)?.icon; + return iconMap[iconName] || Grid; } - - return 'Rank'; - + return Rank; }); diff --git a/manager/src/views/page-decoration/pc/config.js b/manager/src/views/page-decoration/pc/config.js index 57d7b9d6b..1d23db8d3 100644 --- a/manager/src/views/page-decoration/pc/config.js +++ b/manager/src/views/page-decoration/pc/config.js @@ -93,6 +93,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'topBar', + defaultRowHeight: 40, name: '快捷栏', @@ -130,7 +131,7 @@ export const COMPONENT_DEFINITIONS = [ radius: [0, 0, 0, 0], - padding: [0, 16, 0, 16] + padding: [0, 0, 0, 0] } @@ -139,6 +140,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'searchHeader', + defaultRowHeight: 120, name: '搜索头部', @@ -152,7 +154,10 @@ export const COMPONENT_DEFINITIONS = [ logoUrl: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/logo/logo.png', - placeholder: '搜索品牌或商品', + placeholder: '请输入商品名称', + showSearchTypes: true, + defaultSearchType: 'goods', + storePlaceholder: '请输入店铺名称', hotWords: ['手机', '数码家电', '秋季上新', '电脑整机', '智能手表'], @@ -180,7 +185,7 @@ export const COMPONENT_DEFINITIONS = [ radius: [0, 0, 0, 0], - padding: [16, 20, 16, 20] + padding: [16, 0, 16, 0] } @@ -189,6 +194,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'footerNav', + defaultRowHeight: 450, name: '页脚导航', @@ -257,6 +263,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'categoryNav', + defaultRowHeight: 48, name: '类目导航', group: 'navigation', icon: 'List', @@ -292,6 +299,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'channelGrid', + defaultRowHeight: 120, name: '频道宫格', group: 'navigation', icon: 'Grid', @@ -318,15 +326,17 @@ export const COMPONENT_DEFINITIONS = [ { type: 'categoryMegaMenu', - name: '类目弹层', + defaultRowHeight: 320, + name: '商品分类', group: 'navigation', icon: 'Fold', description: '垂直分类菜单与多级展开弹层', defaultOptions: { - title: '分类', + title: '商品分类', + source: 'system', textColor: '#111927', fontSize: 14, - activeColor: '#ea580c', + activeColor: '#409EFF', categories: [ { name: '精选频道', @@ -360,8 +370,8 @@ export const COMPONENT_DEFINITIONS = [ }, defaultComponentStyle: { widthRatio: '16.67%', - backgroundColor: 'transparent', - radius: [0, 0, 0, 0], + backgroundColor: '#ffffff', + radius: [8, 8, 8, 8], padding: [0, 0, 0, 0] } }, @@ -373,6 +383,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'carousel', + defaultRowHeight: 320, name: '轮播图', group: 'media', icon: 'PictureRounded', @@ -385,7 +396,7 @@ export const COMPONENT_DEFINITIONS = [ showIndicator: true, fitMode: 'contain', aspectRatio: '2.5:1', - height: 380, + height: 420, list: [ { img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', @@ -411,8 +422,8 @@ export const COMPONENT_DEFINITIONS = [ }, defaultComponentStyle: { widthRatio: '66.67%', - backgroundColor: 'transparent', - radius: [0, 0, 0, 0], + backgroundColor: '#ffffff', + radius: [8, 8, 8, 8], padding: [0, 0, 0, 0] } }, @@ -420,6 +431,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'brandWall', + defaultRowHeight: 220, name: '品牌图', group: 'media', icon: 'Medal', @@ -444,6 +456,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'hotZone', + defaultRowHeight: 750, name: '热区图', group: 'media', icon: 'Aim', @@ -488,6 +501,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'freeLayout', + defaultRowHeight: 450, name: '自由布局', @@ -518,6 +532,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'promoGroup', + defaultRowHeight: 180, name: '活动卡组', @@ -552,6 +567,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'video', + defaultRowHeight: 360, name: '视频', group: 'media', icon: 'VideoCamera', @@ -559,6 +575,7 @@ export const COMPONENT_DEFINITIONS = [ defaultOptions: { videoUrl: '', coverUrl: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/video/video_cover.png', + url: '', autoPlay: false, loop: false, controls: true, @@ -580,6 +597,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'goodsList', + defaultRowHeight: 980, name: '商品列表', @@ -709,6 +727,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'gridFloor', + defaultRowHeight: 560, name: '宫格楼层', @@ -824,6 +843,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'goodsGrid', + defaultRowHeight: 420, name: '商品宫格', group: 'commerce', icon: 'Menu', @@ -864,6 +884,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'goodsCard', + defaultRowHeight: 360, name: '商品卡片', @@ -874,6 +895,8 @@ export const COMPONENT_DEFINITIONS = [ description: '精选单品爆款特写大卡片', defaultOptions: { + type: 'goodsCard', + showSales: false, goodsId: '1', goodsInfo: { id: '1', goodsName: '旗舰 5G 智能手机 12GB+256GB 超光影影像系统', price: '3999.00', originalPrice: '4599.00', thumbnail: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/goods/goods_1.png' }, customTitle: '年度年度旗舰 · 科技美学', @@ -899,6 +922,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'bannerFloor', + defaultRowHeight: 560, name: '横幅楼层', @@ -940,6 +964,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'goodsBar', + defaultRowHeight: 280, name: '商品条', @@ -976,6 +1001,7 @@ export const COMPONENT_DEFINITIONS = [ }, {type: 'channelFloor', + defaultRowHeight: 620, name: '频道楼层', @@ -1019,6 +1045,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'recommendFeed', + defaultRowHeight: 1270, name: '推荐商品', @@ -1059,6 +1086,7 @@ export const COMPONENT_DEFINITIONS = [ // 5. 营销 (2个) { type: 'userBenefits', + defaultRowHeight: 320, name: '用户权益', group: 'marketing', icon: 'User', @@ -1092,6 +1120,7 @@ export const COMPONENT_DEFINITIONS = [ }, { type: 'couponList', + defaultRowHeight: 160, name: '优惠券', @@ -1131,6 +1160,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'titleBar', + defaultRowHeight: 48, name: '标题栏', @@ -1165,6 +1195,7 @@ export const COMPONENT_DEFINITIONS = [ }, {type: 'articleContent', + defaultRowHeight: '', name: '文章内容', group: 'content', icon: 'Document', @@ -1201,6 +1232,7 @@ export const COMPONENT_DEFINITIONS = [ { type: 'noticeBar', + defaultRowHeight: 40, name: '公告快讯', @@ -1234,7 +1266,7 @@ export const COMPONENT_DEFINITIONS = [ export const DEFAULT_ROW_STYLE = { width: 1920, - height: 40, + height: '', gap: 0, margin: [0, 0, 0, 0], padding: [0, 0, 0, 0], @@ -1250,27 +1282,32 @@ export const DEFAULT_ROW_STYLE = { */ export function createRow(component = null) { - const rowId = `row_${Date.now()}_${Math.random().toString(36).substring(2, 7)}`; - const components = []; + let rowHeight = ''; if (component) { - - components.push(createComponent(component)); - + if (component.type && !component.componentStyle) { + // 传入的是组件定义 def + components.push(createComponent(component)); + if (component.defaultRowHeight !== undefined && component.defaultRowHeight !== null) { + rowHeight = component.defaultRowHeight; + } + } else { + // 传入的是已有组件实例 + components.push(component); + const def = COMPONENT_DEFINITIONS.find(d => d.type === component.type); + if (def?.defaultRowHeight !== undefined && def?.defaultRowHeight !== null) { + rowHeight = def.defaultRowHeight; + } + } } return { - id: rowId, - - rowStyle: { ...DEFAULT_ROW_STYLE }, - + rowStyle: { ...DEFAULT_ROW_STYLE, height: rowHeight }, components - }; - } diff --git a/manager/src/views/page-decoration/pc/index.vue b/manager/src/views/page-decoration/pc/index.vue index 8123593a0..3fd5d1c6a 100644 --- a/manager/src/views/page-decoration/pc/index.vue +++ b/manager/src/views/page-decoration/pc/index.vue @@ -143,7 +143,7 @@ - + @@ -329,17 +329,21 @@ v-if="resolveCanvasTemplate(comp.type)" + :component="comp" + :options="comp.options || {}" :component-style="comp.componentStyle || {}" + :row-style="row.rowStyle || {}" + />
- + @@ -435,7 +439,7 @@ @selectedGoodsData="handleGlobalGoodsSelected" /> - + @@ -478,7 +482,7 @@ import { List, Grid, Fold, PictureRounded, Medal, Aim, FullScreen, VideoCamera, - Goods, Postcard, Reading, DArrowRight, CollectionTag, Star, Edit, Bell + Goods, Postcard, Reading, DArrowRight, CollectionTag, Star, Edit, Bell, User } from '@element-plus/icons-vue'; @@ -516,7 +520,7 @@ const iconMap = { List, Grid, Fold, PictureRounded, Medal, Aim, FullScreen, Files, VideoCamera, - Goods, Postcard, Reading, DArrowRight, CollectionTag, Star, Edit, Bell + Goods, Postcard, Reading, DArrowRight, CollectionTag, Star, Edit, Bell, User, Search }; @@ -795,55 +799,26 @@ function clearSelection() { // 规范化:确保每个组件都是独立的一行(一个组件是一行) function normalizeRows(list) { - if (!Array.isArray(list)) return []; - const normalized = []; - list.forEach(r => { - - if (r.components && r.components.length > 1) { - - r.components.forEach((c, idx) => { - - const singleRow = createRow(); - - singleRow.id = idx === 0 ? r.id : `row_${Date.now()}_${Math.random().toString(36).substring(2, 6)}_${idx}`; - - singleRow.rowStyle = JSON.parse(JSON.stringify(r.rowStyle || DEFAULT_ROW_STYLE)); - - singleRow.components = [c]; - - normalized.push(singleRow); - - }); - - } else { - - normalized.push(r); - + if (!r) return; + if (r.rowStyle && (r.rowStyle.height === 40 || r.rowStyle.height === "40")) { + r.rowStyle.height = ""; } - + normalized.push(r); }); - return normalized; - } // 拖拽克隆生成行(一个组件是一行) function handleCloneAsRow(def) { - markDirty(); - const newComp = createComponent(def); - - const newRow = createRow(); - + const newRow = createRow(def); newRow.components = [newComp]; - return newRow; - } // 点击左侧「+」或组件卡片:追加新组件(支持同排自动合并) @@ -857,15 +832,13 @@ function handleAppendComponent(def) { // 1. 若当前选中的是无组件的空白行,放入该行 if (selectedRow.value && (!selectedRow.value.components || selectedRow.value.components.length === 0)) { - selectedRow.value.components = [newComp]; - + if (def.defaultRowHeight !== undefined && def.defaultRowHeight !== null && def.defaultRowHeight !== '' && (!selectedRow.value.rowStyle.height || selectedRow.value.rowStyle.height === '')) { + selectedRow.value.rowStyle.height = def.defaultRowHeight; + } selectedCompId.value = newComp.id; - configPanelRef.value?.selectComponentTab(); - return; - } // 2. 若当前选中的行已有组件且宽度未满 100%(例如已有 50% 频道宫格,再点击则同行放置) @@ -894,9 +867,7 @@ function handleAppendComponent(def) { } // 3. 否则新建独立行 - - const newRow = createRow(); - + const newRow = createRow(def); newRow.components = [newComp]; if (selectedRowId.value) { @@ -943,10 +914,14 @@ function openLinkPicker(callback) { } } -function openGoodsPicker(callback) { +function openGoodsPicker(callback, initialSelected = []) { pendingGoodsCallback.value = callback; if (liliDialogRef.value) { - liliDialogRef.value.clearGoodsSelected(); + if (initialSelected && Array.isArray(initialSelected) && initialSelected.length) { + liliDialogRef.value.goodsData = initialSelected.map(item => ({ ...item })); + } else { + liliDialogRef.value.clearGoodsSelected(); + } liliDialogRef.value.goodsFlag = true; liliDialogRef.value.flag = true; } @@ -1021,8 +996,10 @@ provide('openGoodsPicker', openGoodsPicker); const picModelFlag = ref(false); const ossManageRef = ref(null); const pendingImageCallback = ref(null); +const currentPickerType = ref('pic'); function openImagePicker(callback) { + currentPickerType.value = 'pic'; pendingImageCallback.value = callback; picModelFlag.value = true; nextTick(() => { @@ -1036,6 +1013,21 @@ function openImagePicker(callback) { }); } +function openVideoPicker(callback) { + currentPickerType.value = 'video'; + pendingImageCallback.value = callback; + picModelFlag.value = true; + nextTick(() => { + if (ossManageRef.value) { + ossManageRef.value.selectImage = true; + ossManageRef.value.fileType = 'video'; + if (typeof ossManageRef.value.changeFileType === 'function') { + ossManageRef.value.changeFileType(); + } + } + }); +} + function handleGlobalImageSelected(val) { picModelFlag.value = false; let url = ''; @@ -1056,6 +1048,7 @@ function handleImageDialogClose() { } provide('openImagePicker', openImagePicker); +provide('openVideoPicker', openVideoPicker); function handleAddNewRow() { markDirty(); @@ -1090,6 +1083,19 @@ function moveRow(index, offset) { } +function moveRowTo(fromIndex, toIndex) { + if (fromIndex === undefined || fromIndex === null || fromIndex < 0) return; + if (toIndex === undefined || toIndex === null || toIndex < 0) return; + const list = pageDocument.value.list; + if (!Array.isArray(list) || fromIndex >= list.length || toIndex >= list.length) return; + if (fromIndex === toIndex) return; + + markDirty(); + const [removed] = list.splice(fromIndex, 1); + list.splice(toIndex, 0, removed); + selectedRowId.value = removed.id; +} + function moveRowToExtreme(index, direction) { markDirty(); @@ -1211,7 +1217,7 @@ function handleDuplicateComp(row, cIndex, comp) { selectedCompId.value = clone.id; Message.success('已复制到当前行(同行展示)'); } else { - const newRow = createRow(); + const newRow = createRow(clone); newRow.components = [clone]; const rIdx = pageDocument.value.list.findIndex(r => r.id === row.id); if (rIdx !== -1) { @@ -1273,7 +1279,9 @@ function getRowWrapperStyle(style) { if (style.height !== undefined && style.height !== '') { const h = String(style.height).trim(); if (h && Number(h) > 0) { - s.minHeight = /^\d+$/.test(h) ? `${h}px` : h; + const hVal = /^\d+$/.test(h) ? `${h}px` : h; + s.height = hVal; + s.minHeight = hVal; } } @@ -1311,15 +1319,24 @@ function getRowWrapperStyle(style) { } function getRowFlexStyle(style) { - if (!style) return { display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', width: '100%' }; + if (!style) return { display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', width: '100%', height: '100%' }; const s = { display: 'flex', flexDirection: 'row', flexWrap: 'nowrap', alignItems: style.alignItems || 'stretch', justifyContent: style.justifyContent || 'flex-start', - width: '100%' + width: '100%', + height: '100%' }; + if (style.height !== undefined && style.height !== '') { + const h = String(style.height).trim(); + if (h && Number(h) > 0) { + const hVal = /^\d+$/.test(h) ? `${h}px` : h; + s.height = hVal; + s.minHeight = hVal; + } + } if (style.gap !== undefined && style.gap !== '') { const g = String(style.gap).trim(); if (g && Number(g) > 0) { @@ -1336,6 +1353,15 @@ function getCompWrapperStyle(style, rowStyle = {}, totalComps = 1) { if (!style) return {}; const s = {}; + + if (rowStyle?.height !== undefined && rowStyle?.height !== '') { + const rh = String(rowStyle.height).trim(); + if (rh && Number(rh) > 0) { + const rhVal = /^\d+$/.test(rh) ? `${rh}px` : rh; + s.height = rhVal; + s.minHeight = rhVal; + } + } const gap = Number(rowStyle?.gap) || 0; const totalGap = (totalComps > 1 && gap > 0) ? gap * (totalComps - 1) : 0; @@ -2035,6 +2061,10 @@ onUnmounted(() => { box-sizing: border-box; + display: flex; + + flex-direction: column; + border: 2px solid transparent; transition: border-color 0.2s; @@ -2241,7 +2271,7 @@ onUnmounted(() => { box-sizing: border-box; - overflow: hidden; + overflow: visible; flex: 1; @@ -2251,6 +2281,13 @@ onUnmounted(() => { height: 100%; + > * { + flex: 1; + height: 100%; + width: 100%; + box-sizing: border-box; + } + .comp-mock-placeholder { display: flex; diff --git a/manager/src/views/page-decoration/pc/presets/double11Preset.js b/manager/src/views/page-decoration/pc/presets/double11Preset.js index bc707cb73..edb8b6ba9 100644 --- a/manager/src/views/page-decoration/pc/presets/double11Preset.js +++ b/manager/src/views/page-decoration/pc/presets/double11Preset.js @@ -22,7 +22,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 40 }, "components": [ { @@ -77,7 +78,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 12, 0 - ] + ], + "height": 120 }, "components": [ { @@ -99,7 +101,10 @@ export const DOUBLE11_PAGE_DOCUMENT = { "华为Mate 70", "五粮液普五", "耐克碳板跑鞋" - ] + ], + "showSearchTypes": true, + "defaultSearchType": "goods", + "storePlaceholder": "请输入店铺名称" } } ] @@ -120,7 +125,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -193,7 +199,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { ], "justifyContent": "space-between", "alignItems": "stretch", - "gap": 12 + "gap": 12, + "height": 320 }, "components": [ { @@ -366,7 +373,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 4, 12 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 40 }, "components": [ { @@ -427,7 +435,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 14 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 120 }, "components": [ { @@ -532,7 +541,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -569,7 +579,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 160 }, "components": [ { @@ -634,7 +645,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 750 }, "components": [ { @@ -711,7 +723,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 180 }, "components": [ { @@ -771,7 +784,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0 ], - "justifyContent": "space-between" + "justifyContent": "space-between", + "height": 360 }, "components": [ { @@ -874,7 +888,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 14, 20 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 450 }, "components": [ { @@ -924,7 +939,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -962,7 +978,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 560 }, "components": [ { @@ -1043,7 +1060,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 560 }, "components": [ { @@ -1121,7 +1139,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 620 }, "components": [ { @@ -1190,7 +1209,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1203,7 +1223,7 @@ export const DOUBLE11_PAGE_DOCUMENT = { }, "options": { "title": "双11爆款必买热销榜", - "subtitle": "TOP RANKINGS · 亿万买家真实下单好评热选", + "subtitle": "TOP RANKINGS · 平台高人气甄选热卖", "tag": "实时榜单", "moreText": "查看完整榜单 >", "moreUrl": "/goodsList" @@ -1228,7 +1248,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 420 }, "components": [ { @@ -1343,7 +1364,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1381,7 +1403,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 360 }, "components": [ { @@ -1395,6 +1418,7 @@ export const DOUBLE11_PAGE_DOCUMENT = { "options": { "videoUrl": "https://vjs.zencdn.net/v/oceans.mp4", "coverUrl": "https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/video/video_cover.png", + "url": "/goodsList?brand=1", "title": "双11全球狂欢发布盛典 · 年度旗舰好物真实开箱测评", "autoplay": false } @@ -1417,7 +1441,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1455,7 +1480,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 220 }, "components": [ { @@ -1513,7 +1539,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1551,7 +1578,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 20, 24 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": "" }, "components": [ { @@ -1588,7 +1616,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1626,7 +1655,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 980 }, "components": [ { @@ -1740,7 +1770,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 0, 0 - ] + ], + "height": 48 }, "components": [ { @@ -1778,7 +1809,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 16, 16 ], - "borderRadius": "8px" + "borderRadius": "8px", + "height": 1270 }, "components": [ { @@ -1893,7 +1925,8 @@ export const DOUBLE11_PAGE_DOCUMENT = { 0, 24, 0 - ] + ], + "height": 450 }, "components": [ { diff --git a/manager/src/views/page-decoration/pc/template/TplCarousel.vue b/manager/src/views/page-decoration/pc/template/TplCarousel.vue index 4382e9f34..7c86797bf 100644 --- a/manager/src/views/page-decoration/pc/template/TplCarousel.vue +++ b/manager/src/views/page-decoration/pc/template/TplCarousel.vue @@ -57,6 +57,10 @@ const props = defineProps({ componentStyle: { type: Object, default: () => ({}) + }, + rowStyle: { + type: Object, + default: () => ({}) } }); @@ -78,10 +82,10 @@ const slidesList = computed(() => { })); } return [ - { title: '出游囤好货', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', url: '/goodsList?seckill=1' }, - { title: '科技新品', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_2.png', url: '/goodsList?category=1' }, - { title: '原产地直采', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_3.png', url: '/goodsList?category=2' }, - { title: '大牌美妆', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_4.png', url: '/goodsList?category=3' } + { title: '潮流数码', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_1.png', url: '/goodsList?category=1' }, + { title: '奢宠美妆', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_2.png', url: '/goodsList?category=2' }, + { title: '运动潮流', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_3.png', url: '/goodsList?category=3' }, + { title: '居家生活', img: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/carousel/banner_4.png', url: '/goodsList?category=4' } ]; }); @@ -89,41 +93,25 @@ const currentSlide = computed(() => { return slidesList.value[currentIdx.value] || slidesList.value[0]; }); -function getAspectRatioCss(ratio) { - if (ratio === '16:9') return '16 / 9'; - if (ratio === '2:1') return '2 / 1'; - if (ratio === '3:1') return '3 / 1'; - if (ratio === 'custom') return null; - return '2.5 / 1'; -} - const customStyle = computed(() => { const s = props.componentStyle || {}; - const fit = props.options.fitMode || 'contain'; + const fit = props.options.fitMode || 'cover'; + const hasRowHeight = Boolean(props.rowStyle?.height && Number(props.rowStyle.height) > 0); const styleObj = { - borderRadius: Array.isArray(s.radius) + borderRadius: Array.isArray(s.radius) && s.radius.some(r => r > 0) ? `${s.radius[0]}px ${s.radius[1]}px ${s.radius[2]}px ${s.radius[3]}px` : '8px', - backgroundColor: s.backgroundColor || '#ffffff', - '--carousel-fit': fit + backgroundColor: (s.backgroundColor && s.backgroundColor !== 'transparent') ? s.backgroundColor : '#ffffff', + '--carousel-fit': fit, + height: '100%', + minHeight: hasRowHeight ? '0' : '420px' }; - if (props.options.height) { + if (props.options.aspectRatio === 'custom' && props.options.height) { styleObj.height = `${props.options.height}px`; - styleObj.aspectRatio = 'auto'; - } else { - const ratio = props.options.aspectRatio || '2.5:1'; - const ratioCss = getAspectRatioCss(ratio); - if (ratioCss) { - styleObj.aspectRatio = ratioCss; - styleObj['--carousel-ratio'] = ratioCss; - } else { - styleObj.height = `${s.height || 420}px`; - styleObj.aspectRatio = 'auto'; - } + styleObj.minHeight = `${props.options.height}px`; } - return styleObj; }); @@ -158,6 +146,7 @@ function stopTimer() { } function resetTimer() { + stopTimer(); startTimer(); } @@ -180,6 +169,7 @@ onBeforeUnmount(() => { diff --git a/manager/src/views/page-decoration/pc/template/TplCategoryMegaMenu.vue b/manager/src/views/page-decoration/pc/template/TplCategoryMegaMenu.vue index b98517f06..fa9df3821 100644 --- a/manager/src/views/page-decoration/pc/template/TplCategoryMegaMenu.vue +++ b/manager/src/views/page-decoration/pc/template/TplCategoryMegaMenu.vue @@ -1,32 +1,83 @@ @@ -79,7 +239,6 @@ const customStyle = computed(() => { .tpl-category-mega-menu { width: 100%; height: 100%; - min-height: 420px; box-sizing: border-box; background: #ffffff; border: 1px solid #e2e8f0; @@ -87,16 +246,23 @@ const customStyle = computed(() => { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); display: flex; flex-direction: column; - user-select: none; - overflow: hidden; + position: relative; + overflow: visible; + + &.is-hovering { + z-index: 1050; + } .menu-header { - padding: 14px 16px 6px; + height: 42px; + padding: 0 16px; display: flex; align-items: center; + border-bottom: 1px solid #f1f5f9; + flex-shrink: 0; .header-title { - font-size: 15px; + font-size: 14px; font-weight: 700; color: #1e293b; letter-spacing: 0.5px; @@ -107,15 +273,19 @@ const customStyle = computed(() => { flex: 1; display: flex; flex-direction: column; - justify-content: space-between; - padding: 2px 0 10px; + justify-content: space-evenly; + padding: 4px 0 8px; + box-sizing: border-box; + min-height: 0; + overflow-y: auto; .cat-item { display: flex; align-items: center; justify-content: space-between; - padding: 8px 16px; + padding: 6px 16px; cursor: pointer; + user-select: none; transition: all 0.15s ease; .cat-name { @@ -128,14 +298,15 @@ const customStyle = computed(() => { } .arrow-icon { - font-size: 12px; + font-size: 11px; color: #94a3b8; transition: transform 0.15s ease, color 0.15s ease; flex-shrink: 0; } - &:hover { - background: #fff7ed; + &:hover, + &.is-active { + background: #ecf5ff; .cat-name { color: var(--active-color, #409EFF); @@ -149,5 +320,124 @@ const customStyle = computed(() => { } } } + + .mega-flyout-panel { + position: absolute; + top: 0; + left: 100%; + width: 780px; + min-height: 100%; + max-height: 520px; + background: #ffffff; + z-index: 1100; + box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04); + border: 1px solid #e2e8f0; + border-left: none; + border-radius: 0 8px 8px 0; + padding: 16px 20px; + box-sizing: border-box; + display: flex; + flex-direction: column; + + .flyout-top-tags { + display: flex; + flex-wrap: wrap; + gap: 8px; + padding-bottom: 12px; + border-bottom: 1px solid #f1f5f9; + margin-bottom: 12px; + flex-shrink: 0; + + .top-tag-pill { + display: inline-flex; + align-items: center; + gap: 4px; + padding: 4px 10px; + background: #f8fafc; + border-radius: 14px; + font-size: 12px; + font-weight: 600; + color: #334155; + cursor: default; + + .pill-arrow { + font-size: 10px; + color: #94a3b8; + } + } + } + + .flyout-content-scroll { + flex: 1; + overflow-y: auto; + padding-right: 6px; + + &::-webkit-scrollbar { + width: 4px; + } + &::-webkit-scrollbar-thumb { + background: #cbd5e1; + border-radius: 4px; + } + + .cat-row { + display: flex; + align-items: flex-start; + padding: 10px 0; + border-bottom: 1px dashed #f1f5f9; + + &:last-child { + border-bottom: none; + } + + .lvl2-title { + width: 96px; + flex-shrink: 0; + display: inline-flex; + align-items: center; + gap: 3px; + color: #1e293b; + font-weight: 600; + font-size: 12px; + padding-top: 1px; + + .lvl2-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .lvl2-arrow { + font-size: 10px; + color: #94a3b8; + } + } + + .lvl3-tags-wrap { + flex: 1; + display: flex; + flex-wrap: wrap; + gap: 6px 14px; + + .lvl3-tag { + font-size: 12px; + color: #64748b; + line-height: 1.6; + } + } + } + } + } +} + +.fade-flyout-enter-active, +.fade-flyout-leave-active { + transition: opacity 0.15s ease, transform 0.15s ease; +} + +.fade-flyout-enter-from, +.fade-flyout-leave-to { + opacity: 0; + transform: translateX(-4px); } diff --git a/manager/src/views/page-decoration/pc/template/TplChannelFloor.vue b/manager/src/views/page-decoration/pc/template/TplChannelFloor.vue index e24078672..8ecc62491 100644 --- a/manager/src/views/page-decoration/pc/template/TplChannelFloor.vue +++ b/manager/src/views/page-decoration/pc/template/TplChannelFloor.vue @@ -462,11 +462,11 @@ const customStyle = computed(() => { flex: 1; .goods-name { - font-size: 12px; + font-size: 14px; color: #1e293b; font-weight: 500; line-height: 1.4; - height: 34px; + height: 40px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; diff --git a/manager/src/views/page-decoration/pc/template/TplGoods.vue b/manager/src/views/page-decoration/pc/template/TplGoods.vue index f0050c83d..cf623df8d 100644 --- a/manager/src/views/page-decoration/pc/template/TplGoods.vue +++ b/manager/src/views/page-decoration/pc/template/TplGoods.vue @@ -5,6 +5,9 @@
{{ options.title }} {{ options.subtitle }} + + 🏷️ {{ options.categoryName || `分类: ${options.categoryId}` }} +
{{ options.moreText || '查看更多' }} > @@ -32,11 +35,6 @@ {{ g.goodsName }}
-
- 已售 {{ 120 + idx * 85 }}+ 件 - 99%好评 -
-
¥ @@ -93,6 +91,10 @@ const defaultMockGoods = [ { id: '12', goodsName: '航空级铝镁合金静音万向轮拉杆登机箱 20英寸防刮耐磨', price: '499.00', originalPrice: '699.00', thumbnail: 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/goods/goods_7.png' } ]; +const isGoodsCard = computed(() => { + return props.component?.type === 'goodsCard' || props.options?.type === 'goodsCard'; +}); + const actualColumns = computed(() => { // 商品列表整行默认 6 列 let baseCols = Number(props.options?.columns) || 6; @@ -126,7 +128,7 @@ const customStyle = computed(() => { }); const sampleGoods = computed(() => { - if (Array.isArray(props.options.goods) && props.options.goods.length > 0) { + if (props.options.dataSource === 'manual' && Array.isArray(props.options.goods) && props.options.goods.length > 0) { return props.options.goods; } const count = props.options.goodsCount || (actualColumns.value * 2) || 12; @@ -153,26 +155,30 @@ const sampleGoods = computed(() => { gap: 10px; .main-title { - font-size: 20px; + font-size: 18px; font-weight: 700; color: #1e293b; } .sub-title { - font-size: 13px; + font-size: 12px; color: #94a3b8; } + + .category-tag-badge { + font-size: 11px; + background: #eff6ff; + border: 1px solid #bfdbfe; + color: #2563eb; + padding: 2px 6px; + border-radius: 4px; + font-weight: 500; + } } .more-link { - font-size: 13px; + font-size: 12px; color: #64748b; - cursor: pointer; - transition: color 0.2s; - - &:hover { - color: #e11d48; - } } } @@ -187,22 +193,6 @@ const sampleGoods = computed(() => { padding: 10px; display: flex; flex-direction: column; - transition: all 0.25s ease; - - &:hover { - transform: translateY(-3px); - box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08); - border-color: #e2e8f0; - - .thumb-img { - transform: scale(1.05); - } - - .add-cart-circle { - background: #e11d48; - color: #ffffff; - } - } .card-thumb-wrap { position: relative; @@ -217,7 +207,6 @@ const sampleGoods = computed(() => { width: 100%; height: 100%; object-fit: cover; - transition: transform 0.3s; } .self-tag { @@ -239,10 +228,11 @@ const sampleGoods = computed(() => { flex: 1; .goods-name { - font-size: 12px; + font-size: 14px; + font-weight: 500; color: #1e293b; line-height: 1.4; - height: 34px; + height: 40px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; @@ -302,12 +292,10 @@ const sampleGoods = computed(() => { display: flex; align-items: center; justify-content: center; - cursor: pointer; - transition: all 0.2s; } } } } } } - + \ No newline at end of file diff --git a/manager/src/views/page-decoration/pc/template/TplGoodsGrid.vue b/manager/src/views/page-decoration/pc/template/TplGoodsGrid.vue index 4857d4630..5f8b8be12 100644 --- a/manager/src/views/page-decoration/pc/template/TplGoodsGrid.vue +++ b/manager/src/views/page-decoration/pc/template/TplGoodsGrid.vue @@ -249,11 +249,11 @@ const customStyle = computed(() => { flex: 1; .cell-name { - font-size: 13px; + font-size: 14px; color: #334155; font-weight: 500; line-height: 1.4; - height: 36px; + height: 40px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; diff --git a/manager/src/views/page-decoration/pc/template/TplGridFloor.vue b/manager/src/views/page-decoration/pc/template/TplGridFloor.vue index c4576af98..5b01e3e9c 100644 --- a/manager/src/views/page-decoration/pc/template/TplGridFloor.vue +++ b/manager/src/views/page-decoration/pc/template/TplGridFloor.vue @@ -122,7 +122,7 @@ const posterTags = computed(() => { }); const posterImg = computed(() => { - return props.options?.posterImg || 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/banner-floor/floor_banner_1.png'; + return props.options?.bannerImg || props.options?.posterImg || 'https://lilishop-pc.oss-cn-beijing.aliyuncs.com/static/banner-floor/floor_banner_1.png'; }); const showPoster = computed(() => { @@ -444,11 +444,11 @@ const customStyle = computed(() => { flex: 1; .goods-name-line { - font-size: 13px; + font-size: 14px; color: #1e293b; font-weight: 500; line-height: 1.4; - height: 36px; + height: 40px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; diff --git a/manager/src/views/page-decoration/pc/template/TplNotice.vue b/manager/src/views/page-decoration/pc/template/TplNotice.vue index 0fecce2e4..fc02a6abe 100644 --- a/manager/src/views/page-decoration/pc/template/TplNotice.vue +++ b/manager/src/views/page-decoration/pc/template/TplNotice.vue @@ -10,7 +10,13 @@ >
-
+ icon +
@@ -146,161 +152,146 @@ const customStyle = computed(() => { align-items: center; box-sizing: border-box; user-select: none; + background: #ffffff; border: 1px solid #eef2f6; gap: 12px; + border-radius: 8px; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + overflow: hidden; + + &.is-mini { + gap: 6px; + padding: 0 8px !important; + + .notice-badge-box { + .badge-title, .badge-divider { + display: none; + } + } + } + + &.is-compact { + gap: 8px; + padding: 0 10px !important; + + .notice-badge-box { + .badge-divider { + display: none; + } + } + } - /* 左侧徽章 */ .notice-badge-box { display: flex; align-items: center; - gap: 6px; + gap: 8px; flex-shrink: 0; .badge-icon { - color: #ef4444; + color: #f97316; display: flex; align-items: center; + justify-content: center; + } + + .badge-custom-img { + width: 18px; + height: 18px; + object-fit: contain; + flex-shrink: 0; } .badge-title { - font-size: 14px; - font-weight: 800; + font-size: 13px; + font-weight: 700; color: #0f172a; white-space: nowrap; - letter-spacing: -0.2px; } .badge-divider { width: 1px; height: 14px; - background: #e2e8f0; - margin-left: 6px; + background: #cbd5e1; + margin-left: 4px; } } - /* 中间快讯轮播视口 */ .notice-content-viewport { flex: 1; + min-width: 0; height: 40px; overflow: hidden; position: relative; - min-width: 0; .notice-items-strip { - transition: transform 0.4s ease-in-out; + transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); + display: flex; + flex-direction: column; .notice-strip-item { height: 40px; display: flex; align-items: center; gap: 8px; - min-width: 0; + box-sizing: border-box; .notice-item-tag { - font-size: 10px; - font-weight: 700; + font-size: 11px; padding: 1px 6px; - border-radius: 3px; + border-radius: 4px; + font-weight: 600; flex-shrink: 0; &.tag-new { - background: #fee2e2; - color: #dc2626; - } - &.tag-promo { - background: #ffedd5; - color: #ea580c; - } - &.tag-notice { background: #eff6ff; color: #2563eb; + border: 1px solid #bfdbfe; } + + &.tag-promo { + background: #fef2f2; + color: #ef4444; + border: 1px solid #fecaca; + } + + &.tag-notice { + background: #fffbeb; + color: #d97706; + border: 1px solid #fde68a; + } + &.tag-hot { background: #fdf2f8; color: #db2777; + border: 1px solid #fbcfe8; } } .notice-item-title { flex: 1; + min-width: 0; font-size: 13px; color: #334155; - overflow: hidden; white-space: nowrap; + overflow: hidden; text-overflow: ellipsis; - min-width: 0; - transition: color 0.2s; } .notice-item-time { font-size: 11px; color: #94a3b8; - white-space: nowrap; flex-shrink: 0; - margin-right: 4px; } } } } - /* 右侧更多 */ .notice-more-action { flex-shrink: 0; - font-size: 12px; - color: #64748b; - cursor: pointer; - transition: color 0.2s; - &:hover { - color: #ef4444; - } - } - - /* 紧凑形态 (三分之一) */ - &.is-compact { - gap: 8px; - - .notice-badge-box { - .badge-title { - font-size: 13px; - } - .badge-divider { - margin-left: 2px; - } - } - - .notice-content-viewport { - .notice-strip-item { - .notice-item-title { - font-size: 12px; - } - } - } - } - - /* 极简微缩形态 (六分之一) */ - &.is-mini { - gap: 4px; - padding: 0 8px !important; - - .notice-badge-box { - .badge-title { - display: none; - } - .badge-divider { - display: none; - } - } - - .notice-content-viewport { - .notice-strip-item { - .notice-item-tag { - display: none; - } - .notice-item-title { - font-size: 11px; - } - } + .more-text { + font-size: 12px; + color: #64748b; } } } diff --git a/manager/src/views/page-decoration/pc/template/TplRecommendFeed.vue b/manager/src/views/page-decoration/pc/template/TplRecommendFeed.vue index f91cb4f35..03fffba5d 100644 --- a/manager/src/views/page-decoration/pc/template/TplRecommendFeed.vue +++ b/manager/src/views/page-decoration/pc/template/TplRecommendFeed.vue @@ -27,7 +27,40 @@
{{ featuredGoods.goodsName }}
-
99.8% 高好评 · 猜你对这款高人气科技数码感兴趣
+
官方甄选 · 猜你对这款高人气商品感兴趣
+ + +
+ 🔥 镇店爆品 + 🛡️ 官方正品 + ⚡ 极速发货 + 🏷️ 售后无忧 +
+ + +
+
+ 100% + 品质正品 +
+
+
+ 极速达 + 顺丰速运 +
+
+
+ TOP 1 + 品类热榜 +
+
+ + +
+
✓ 7天无理由退换货
+
✓ 赠运费险 · 破损包赔
+
+
¥ @@ -86,8 +119,7 @@
{{ item.goodsName }}
- 已售 {{ 200 + idx * 70 }}+ - 98%好评 + 甄选推荐
@@ -312,10 +344,92 @@ const customStyle = computed(() => { background: #fff7ed; padding: 4px 8px; border-radius: 4px; - margin-bottom: 12px; + margin-bottom: 10px; line-height: 1.3; } + .big-tags-row { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-bottom: 10px; + + .feat-tag { + font-size: 11px; + color: #475569; + background: #f1f5f9; + padding: 2px 7px; + border-radius: 4px; + font-weight: 500; + + &.highlight { + color: #dc2626; + background: #fee2e2; + font-weight: 600; + } + } + } + + .big-stats-bar { + display: flex; + align-items: center; + justify-content: space-around; + background: #f8fafc; + border: 1px solid #e2e8f0; + border-radius: 6px; + padding: 8px 6px; + margin-bottom: 10px; + + .stat-cell { + display: flex; + flex-direction: column; + align-items: center; + gap: 2px; + + .stat-val { + font-size: 13px; + font-weight: 700; + color: #0f172a; + } + + .stat-lbl { + font-size: 10px; + color: #64748b; + } + } + + .stat-line { + width: 1px; + height: 20px; + background: #cbd5e1; + } + } + + .big-guarantees { + display: flex; + flex-direction: column; + gap: 4px; + padding: 6px 10px; + background: #fbfbfb; + border-left: 3px solid #ef4444; + border-radius: 0 4px 4px 0; + margin-bottom: 12px; + + .guar-item { + font-size: 11px; + color: #475569; + display: flex; + align-items: center; + gap: 4px; + + .guar-icon { + color: #16a34a; + font-weight: 700; + font-size: 11px; + } + } + } + .big-price-row { margin-top: auto; display: flex; @@ -438,10 +552,10 @@ const customStyle = computed(() => { flex: 1; .goods-title { - font-size: 12px; + font-size: 14px; color: #1e293b; line-height: 1.4; - height: 34px; + height: 40px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; diff --git a/manager/src/views/page-decoration/pc/template/TplTitle.vue b/manager/src/views/page-decoration/pc/template/TplTitle.vue index 375975bb1..6960c3c0a 100644 --- a/manager/src/views/page-decoration/pc/template/TplTitle.vue +++ b/manager/src/views/page-decoration/pc/template/TplTitle.vue @@ -7,6 +7,12 @@ ]" >
+ icon {{ options.mainTitle || '楼层主标题' }} {{ options.subtitle }}
@@ -53,11 +59,18 @@ const isCompact = computed(() => props.componentStyle?.widthRatio === '33.33%'); .title-content { display: flex; - align-items: baseline; + align-items: center; flex-wrap: wrap; - gap: 4px 10px; + gap: 8px 10px; min-width: 0; + .title-custom-icon { + width: 24px; + height: 24px; + object-fit: contain; + flex-shrink: 0; + } + .main-t { font-size: 22px; font-weight: 800; @@ -84,6 +97,10 @@ const isCompact = computed(() => props.componentStyle?.widthRatio === '33.33%'); &.is-compact { .title-content { + .title-custom-icon { + width: 20px; + height: 20px; + } .main-t { font-size: 18px; } @@ -99,37 +116,31 @@ const isCompact = computed(() => props.componentStyle?.widthRatio === '33.33%'); &.is-mini { flex-direction: column; align-items: flex-start; - gap: 4px; + gap: 6px; &.align-center { align-items: center; .more-link { position: static; - margin-top: 2px; + margin-top: 4px; } } .title-content { - flex-direction: column; - align-items: flex-start; - gap: 2px; - + .title-custom-icon { + width: 16px; + height: 16px; + } .main-t { - font-size: 16px; + font-size: 15px; } .sub-t { - font-size: 12px; + font-size: 11px; } } - &.align-center .title-content { - align-items: center; - text-align: center; - } - .more-link { - font-size: 12px; - margin-top: 2px; + font-size: 11px; } } } diff --git a/manager/src/views/page-decoration/pc/template/TplTopBar.vue b/manager/src/views/page-decoration/pc/template/TplTopBar.vue index c4c4c5bb5..2c9f3be48 100644 --- a/manager/src/views/page-decoration/pc/template/TplTopBar.vue +++ b/manager/src/views/page-decoration/pc/template/TplTopBar.vue @@ -72,13 +72,15 @@ const customStyle = computed(() => { } .bar-inner { - width: 100%; + width: 1200px; max-width: 100%; - padding: 0 24px; + margin: 0 auto; + padding: 0; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; + height: 100%; .bar-left { display: flex; @@ -98,7 +100,7 @@ const customStyle = computed(() => { white-space: nowrap; .auth-btn { - color: #ff6a00; + color: #409EFF; cursor: pointer; &:hover { text-decoration: underline; @@ -120,7 +122,7 @@ const customStyle = computed(() => { white-space: nowrap; &:hover { - color: #ff6a00; + color: #409EFF; } } } diff --git a/manager/src/views/page-decoration/pc/template/TplUserBenefits.vue b/manager/src/views/page-decoration/pc/template/TplUserBenefits.vue index 7c7850d48..ce04addbb 100644 --- a/manager/src/views/page-decoration/pc/template/TplUserBenefits.vue +++ b/manager/src/views/page-decoration/pc/template/TplUserBenefits.vue @@ -30,65 +30,29 @@
-
+
0
{{ options.cartText || '购物车' }}
-
+
0
{{ options.couponText || '优惠券' }}
-
+
0
{{ options.orderText || '订单' }}
- -
- - -
-
-
- 热点快报 - HOT -
- 查看全部 > -
-
-
- · - 精选优质好物 官方正品保障 -
-
- · - 双11狂欢 跨店每满300减50 -
-
- · - 新人专享好礼 注册立领大礼包 -
-
-
- - +
-
- - 收藏 -
-
- - 足迹 -
-
- - 红包 -
-
- - 客服 +
+ + {{ srv.name }}
@@ -106,16 +70,48 @@ const props = defineProps({ componentStyle: { type: Object, default: () => ({}) + }, + rowStyle: { + type: Object, + default: () => ({}) } }); +const defaultServices = [ + { name: '收藏', url: '/member/favorites', icon: 'Star' }, + { name: '足迹', url: '/member/footprint', icon: 'Clock' }, + { name: '红包', url: '/couponCenter', icon: 'Present' }, + { name: '客服', url: '/article', icon: 'Service' } +]; + +const iconMap = { + Star, + Clock, + Present, + Service +}; + +function getServiceIcon(iconName) { + return iconMap[iconName] || Service; +} + +const displayServices = computed(() => { + if (Array.isArray(props.options?.services) && props.options.services.length > 0) { + return props.options.services; + } + return defaultServices; +}); + const customStyle = computed(() => { const s = props.componentStyle || {}; + const hasRowHeight = Boolean(props.rowStyle?.height && Number(props.rowStyle.height) > 0); return { - backgroundColor: s.backgroundColor || '#ffffff', - borderRadius: Array.isArray(s.radius) + backgroundColor: (s.backgroundColor && s.backgroundColor !== 'transparent') ? s.backgroundColor : '#ffffff', + borderRadius: Array.isArray(s.radius) && s.radius.some(r => r > 0) ? `${s.radius[0]}px ${s.radius[1]}px ${s.radius[2]}px ${s.radius[3]}px` - : '8px' + : '8px', + height: '100%', + minHeight: hasRowHeight ? '0' : '420px' }; }); @@ -124,18 +120,19 @@ const customStyle = computed(() => { .tpl-user-benefits { width: 100%; height: 100%; - min-height: 420px; box-sizing: border-box; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03); - padding: 14px 12px 10px; + padding: 24px 16px 20px; + gap: 12px; display: flex; flex-direction: column; justify-content: space-between; user-select: none; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + overflow: hidden; .user-main-info { display: flex; @@ -143,8 +140,8 @@ const customStyle = computed(() => { gap: 8px; .avatar-box { - width: 40px; - height: 40px; + width: 48px; + height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0; @@ -175,7 +172,7 @@ const customStyle = computed(() => { .badge-tag { align-self: flex-start; padding: 1px 6px; - background: #fff2e8; + background: #ecf5ff; color: #409EFF; font-size: 10px; font-weight: 700; @@ -208,38 +205,28 @@ const customStyle = computed(() => { .action-btn-row { display: flex; gap: 8px; - margin-top: 10px; + margin-top: 8px; .action-btn { flex: 1; - height: 28px; - line-height: 28px; + height: 32px; + line-height: 32px; font-size: 12px; font-weight: 500; text-align: center; border-radius: 14px; - cursor: pointer; box-sizing: border-box; - transition: all 0.15s ease; &.login-btn { background: #409EFF; color: #ffffff; - box-shadow: 0 2px 6px rgba(255, 96, 0, 0.25); - - &:hover { - background: #66b1ff; - } + box-shadow: 0 2px 6px rgba(64, 158, 255, 0.25); } &.register-btn { background: #ffffff; color: #409EFF; border: 1px solid #409EFF; - - &:hover { - background: #fff7ed; - } } } } @@ -248,21 +235,21 @@ const customStyle = computed(() => { display: flex; align-items: center; justify-content: space-around; - padding: 8px 0; - margin-top: 10px; + padding: 12px 0; + margin-top: 6px; background: #f8fafc; border-radius: 6px; .metric-card { - text-align: center; - flex: 1; - cursor: pointer; + display: flex; + flex-direction: column; + align-items: center; .metric-val { font-size: 15px; font-weight: 700; - color: #0f172a; - line-height: 1.1; + color: #409EFF; + line-height: 1.2; } .metric-label { @@ -270,128 +257,30 @@ const customStyle = computed(() => { color: #64748b; margin-top: 2px; } - - &:hover { - .metric-val, .metric-label { - color: #409EFF; - } - } - } - } - - .section-divider { - height: 1px; - background: #f1f5f9; - margin: 8px 0 6px; - } - - .news-section { - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - padding: 0 2px; - - .news-header { - display: flex; - align-items: center; - justify-content: space-between; - margin-bottom: 6px; - - .news-title-wrap { - display: flex; - align-items: center; - gap: 4px; - - .news-title { - font-size: 12px; - font-weight: 700; - color: #1e293b; - } - - .hot-badge { - background: #ef4444; - color: #ffffff; - font-size: 9px; - font-weight: 700; - padding: 0 3px; - border-radius: 2px; - line-height: 1.2; - } - } - - .news-more { - font-size: 11px; - color: #94a3b8; - cursor: pointer; - - &:hover { - color: #409EFF; - } - } - } - - .news-list { - display: flex; - flex-direction: column; - gap: 5px; - - .news-item { - display: flex; - align-items: center; - gap: 4px; - font-size: 11px; - color: #475569; - cursor: pointer; - line-height: 1.3; - transition: color 0.15s; - - .dot { - color: #409EFF; - font-weight: 700; - } - - .news-text { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - &:hover { - color: #409EFF; - } - } } } .quick-service-row { display: flex; - align-items: center; justify-content: space-around; - padding-top: 8px; + align-items: center; + padding-top: 14px; border-top: 1px dashed #f1f5f9; - margin-top: 4px; + margin-top: 6px; .service-item { display: flex; flex-direction: column; align-items: center; gap: 2px; - cursor: pointer; color: #64748b; - transition: color 0.15s; .service-icon { - font-size: 14px; + font-size: 20px; } .service-name { - font-size: 10px; - line-height: 1; - } - - &:hover { - color: #409EFF; + font-size: 11px; } } } diff --git a/manager/src/views/page-decoration/pc/template/TplVideo.vue b/manager/src/views/page-decoration/pc/template/TplVideo.vue index 579169dde..3a4746ac0 100644 --- a/manager/src/views/page-decoration/pc/template/TplVideo.vue +++ b/manager/src/views/page-decoration/pc/template/TplVideo.vue @@ -1,8 +1,28 @@ @@ -24,7 +44,7 @@ const props = defineProps({ const customStyle = computed(() => { const s = props.componentStyle || {}; return { - height: `${props.options?.height || 360}px`, + height: `${props.options?.height || 450}px`, borderRadius: Array.isArray(s.radius) ? `${s.radius[0]}px ${s.radius[1]}px ${s.radius[2]}px ${s.radius[3]}px` : '8px' @@ -48,30 +68,69 @@ const customStyle = computed(() => { align-items: center; justify-content: center; + .video-el { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + } + .cover-img { width: 100%; height: 100%; object-fit: cover; + display: block; } .play-btn { position: absolute; - width: 50px; - height: 50px; + width: 54px; + height: 54px; border-radius: 50%; background: rgba(225, 29, 72, 0.9); color: #ffffff; display: flex; align-items: center; justify-content: center; - font-size: 20px; - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); + font-size: 22px; + box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); transition: transform 0.2s ease; + cursor: pointer; &:hover { transform: scale(1.08); } } + + .video-link-badge { + position: absolute; + top: 12px; + right: 12px; + max-width: 60%; + display: flex; + align-items: center; + gap: 5px; + padding: 4px 10px; + background: rgba(15, 23, 42, 0.75); + border: 1px solid rgba(255, 255, 255, 0.2); + border-radius: 20px; + backdrop-filter: blur(4px); + font-size: 11px; + color: #e2e8f0; + overflow: hidden; + pointer-events: none; + + .badge-icon { + font-size: 11px; + flex-shrink: 0; + } + + .badge-text { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } } }