From f6211c3e4fb6ac880d53b74b5ab17de18bcbec7c Mon Sep 17 00:00:00 2001 From: zhanjunhao <642307404@qq.com> Date: Thu, 26 Nov 2026 16:06:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(promotion):=20=E7=A8=B3=E5=AE=9A=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E5=BC=B9=E7=AA=97=E5=88=87=E6=8D=A2=E9=AB=98=E5=BA=A6?= =?UTF-8?q?=E5=B9=B6=E6=9A=82=E9=9A=90=E8=97=8F=E5=A5=96=E5=8A=B1=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/CHANGELOG.md | 20 +++++++- .../promotion/PromotionPosterModal.jsx | 39 +++++++------- src/components/promotion/promotion-poster.css | 51 ++++++++++++------- 3 files changed, 74 insertions(+), 36 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index e27e7575..9a353014 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,6 @@ # 变更记录(CHANGELOG) -> 状态:有效(持续追加) · 更新:2026-11-25 · 版本:v3.10 +> 状态:有效(持续追加) · 更新:2026-11-26 · 版本:v3.11 对现状仍有影响的功能与修复记录,按日期倒序。改造、迁移、优化等一次性过程不在此记录。 @@ -8,6 +8,24 @@ **记录规则**:每条写“范围、变更、影响、回滚、关联”五项;回滚优先 `git revert <提交>`,提交含多项改动时按文件还原(`git checkout <提交>^ -- <文件>`),不整仓 reset。本文不作为规则依据。 +## 2026-11-26 + +### 修复 · 稳定推广分享弹窗高度 + +- **范围**:顶栏「推广分享」弹窗的链接分享和海报分享页签。 +- **变更**:两个页签共用等高的内容区,并按视口限制高度。邀请卡片和海报预览共用列宽、圆角和最小高度。 +- **影响**:切换页签时弹窗位置保持稳定,两张卡片对齐,内容超出可用高度时在页签内滚动。 +- **回滚**:恢复推广分享弹窗原有的页签高度、滚动和预览卡片样式。 +- **关联**:`src/components/promotion/promotion-poster.css`。 + +### 调整 · 暂时隐藏推广分享中的邀请奖励规则入口 + +- **范围**:顶栏「推广 → 推广分享」弹窗。 +- **变更**:暂停渲染弹窗底部「查看邀请奖励规则」入口。 +- **影响**:用户仍可通过弹窗分享邀请链接、邀请码和海报。 +- **回滚**:将 `SHOW_INVITATION_REWARD_RULES` 设为 `true`。 +- **关联**:`src/components/promotion/PromotionPosterModal.jsx`。 + ## 2026-11-25 ### 优化 · 成员排行按需加载并固定翻页结果 diff --git a/src/components/promotion/PromotionPosterModal.jsx b/src/components/promotion/PromotionPosterModal.jsx index 9f09b441..af55b3e5 100644 --- a/src/components/promotion/PromotionPosterModal.jsx +++ b/src/components/promotion/PromotionPosterModal.jsx @@ -22,6 +22,9 @@ import { API, showError, showSuccess, copy } from '../../helpers'; const { Text, Title, Paragraph } = Typography; +// 暂时隐藏推广弹窗里的邀请奖励规则入口。 +const SHOW_INVITATION_REWARD_RULES = false; + // 默认海报模板配置 const DEFAULT_TEMPLATES = [ { id: 'blue', name: '科技蓝' }, @@ -449,23 +452,25 @@ const PromotionPosterModal = ({ visible, onClose }) => { title={t('邀请链接获取中,请稍后')} /> )} - + {SHOW_INVITATION_REWARD_RULES && ( + + )} )} diff --git a/src/components/promotion/promotion-poster.css b/src/components/promotion/promotion-poster.css index d2f40e0d..9a120ba8 100644 --- a/src/components/promotion/promotion-poster.css +++ b/src/components/promotion/promotion-poster.css @@ -10,6 +10,9 @@ --pm-soft: var(--brand-primary-soft); --pm-qr-surface: var(--ui-color-white); --pm-poster-ink: var(--ui-color-white); + --pm-body-max-height: calc(100dvh - 200px); + --pm-tab-panel-height: 448px; + --pm-preview-min-height: 418px; max-width: calc(100vw - 32px); padding-block: 24px; } @@ -29,23 +32,44 @@ right: 24px; } .promotion-modal .ant-modal-body { - max-height: calc(100dvh - 160px); + max-height: var(--pm-body-max-height); overflow-y: auto; overscroll-behavior: contain; } +.promotion-tabs { + max-block-size: var(--pm-body-max-height); +} .promotion-tabs > .ant-tabs-nav { + flex-shrink: 0; margin-bottom: 24px; } +.promotion-tabs > .ant-tabs-body-holder { + flex: 0 1 var(--pm-tab-panel-height); + min-block-size: 0; + overflow-y: auto; + overscroll-behavior: contain; + scrollbar-gutter: stable; +} .pm-tab-label { display: inline-flex; align-items: center; gap: 8px; } -.pm-link-layout { +.pm-link-layout, +.pm-poster-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; - align-items: stretch; + align-items: start; +} +.pm-invitation-card, +.pm-preview-stage { + min-block-size: var(--pm-preview-min-height); + border-radius: 12px; +} +.pm-share-details, +.pm-poster-options { + align-self: center; } .pm-invitation-card { display: flex; @@ -53,7 +77,6 @@ align-items: center; padding: 28px 20px; border: 1px solid var(--pm-border); - border-radius: 12px; background: var(--pm-muted); text-align: center; min-width: 0; @@ -195,12 +218,6 @@ flex-shrink: 0; color: var(--pm-secondary); } -.pm-poster-layout { - display: grid; - grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); - gap: 32px; - align-items: center; -} .promotion-modal [data-poster-template='blue'] { --pm-template-background: #2455b8; } @@ -217,7 +234,6 @@ display: flex; justify-content: center; padding-inline: 16px; - border-radius: 12px; background: var(--pm-template-background); color: var(--pm-poster-ink); min-width: 0; @@ -228,8 +244,7 @@ align-items: center; width: min(100%, 280px); min-width: 0; - min-height: 448px; - padding: 32px 8px 24px; + padding: 28px 8px 20px; text-align: center; overflow-wrap: anywhere; } @@ -246,7 +261,7 @@ color: inherit; } .pm-poster h3 { - margin: 20px 0; + margin: 16px 0; font-size: 16px; line-height: 1.5; color: inherit; @@ -312,6 +327,10 @@ outline-offset: 3px; } @media (max-width: 600px) { + .promotion-modal.ant-modal { + --pm-tab-panel-height: 760px; + --pm-preview-min-height: 395px; + } .promotion-modal .ant-modal-container { padding: 20px; } @@ -322,9 +341,6 @@ top: 18px; right: 16px; } - .promotion-modal .ant-modal-body { - max-height: calc(100dvh - 136px); - } .pm-link-layout, .pm-poster-layout { grid-template-columns: minmax(0, 1fr); @@ -344,7 +360,6 @@ width: 100%; } .pm-poster { - min-height: 408px; padding-block: 24px 20px; } .pm-template-list {