feat(promotion): 稳定分享弹窗切换高度并暂隐藏奖励入口
This commit is contained in:
+19
-1
@@ -1,6 +1,6 @@
|
|||||||
# 变更记录(CHANGELOG)
|
# 变更记录(CHANGELOG)
|
||||||
|
|
||||||
> 状态:有效(持续追加) · 更新:2026-11-25 · 版本:v3.10
|
> 状态:有效(持续追加) · 更新:2026-11-26 · 版本:v3.11
|
||||||
|
|
||||||
对现状仍有影响的功能与修复记录,按日期倒序。改造、迁移、优化等一次性过程不在此记录。
|
对现状仍有影响的功能与修复记录,按日期倒序。改造、迁移、优化等一次性过程不在此记录。
|
||||||
|
|
||||||
@@ -8,6 +8,24 @@
|
|||||||
|
|
||||||
**记录规则**:每条写“范围、变更、影响、回滚、关联”五项;回滚优先 `git revert <提交>`,提交含多项改动时按文件还原(`git checkout <提交>^ -- <文件>`),不整仓 reset。本文不作为规则依据。
|
**记录规则**:每条写“范围、变更、影响、回滚、关联”五项;回滚优先 `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
|
## 2026-11-25
|
||||||
|
|
||||||
### 优化 · 成员排行按需加载并固定翻页结果
|
### 优化 · 成员排行按需加载并固定翻页结果
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ import { API, showError, showSuccess, copy } from '../../helpers';
|
|||||||
|
|
||||||
const { Text, Title, Paragraph } = Typography;
|
const { Text, Title, Paragraph } = Typography;
|
||||||
|
|
||||||
|
// 暂时隐藏推广弹窗里的邀请奖励规则入口。
|
||||||
|
const SHOW_INVITATION_REWARD_RULES = false;
|
||||||
|
|
||||||
// 默认海报模板配置
|
// 默认海报模板配置
|
||||||
const DEFAULT_TEMPLATES = [
|
const DEFAULT_TEMPLATES = [
|
||||||
{ id: 'blue', name: '科技蓝' },
|
{ id: 'blue', name: '科技蓝' },
|
||||||
@@ -449,6 +452,7 @@ const PromotionPosterModal = ({ visible, onClose }) => {
|
|||||||
title={t('邀请链接获取中,请稍后')}
|
title={t('邀请链接获取中,请稍后')}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{SHOW_INVITATION_REWARD_RULES && (
|
||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='pm-rewards'
|
className='pm-rewards'
|
||||||
@@ -466,6 +470,7 @@ const PromotionPosterModal = ({ visible, onClose }) => {
|
|||||||
</span>
|
</span>
|
||||||
<ChevronRight size={18} aria-hidden />
|
<ChevronRight size={18} aria-hidden />
|
||||||
</button>
|
</button>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
--pm-soft: var(--brand-primary-soft);
|
--pm-soft: var(--brand-primary-soft);
|
||||||
--pm-qr-surface: var(--ui-color-white);
|
--pm-qr-surface: var(--ui-color-white);
|
||||||
--pm-poster-ink: 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);
|
max-width: calc(100vw - 32px);
|
||||||
padding-block: 24px;
|
padding-block: 24px;
|
||||||
}
|
}
|
||||||
@@ -29,23 +32,44 @@
|
|||||||
right: 24px;
|
right: 24px;
|
||||||
}
|
}
|
||||||
.promotion-modal .ant-modal-body {
|
.promotion-modal .ant-modal-body {
|
||||||
max-height: calc(100dvh - 160px);
|
max-height: var(--pm-body-max-height);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
}
|
}
|
||||||
|
.promotion-tabs {
|
||||||
|
max-block-size: var(--pm-body-max-height);
|
||||||
|
}
|
||||||
.promotion-tabs > .ant-tabs-nav {
|
.promotion-tabs > .ant-tabs-nav {
|
||||||
|
flex-shrink: 0;
|
||||||
margin-bottom: 24px;
|
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 {
|
.pm-tab-label {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
.pm-link-layout {
|
.pm-link-layout,
|
||||||
|
.pm-poster-layout {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
|
||||||
gap: 32px;
|
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 {
|
.pm-invitation-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -53,7 +77,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 28px 20px;
|
padding: 28px 20px;
|
||||||
border: 1px solid var(--pm-border);
|
border: 1px solid var(--pm-border);
|
||||||
border-radius: 12px;
|
|
||||||
background: var(--pm-muted);
|
background: var(--pm-muted);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -195,12 +218,6 @@
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
color: var(--pm-secondary);
|
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'] {
|
.promotion-modal [data-poster-template='blue'] {
|
||||||
--pm-template-background: #2455b8;
|
--pm-template-background: #2455b8;
|
||||||
}
|
}
|
||||||
@@ -217,7 +234,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-inline: 16px;
|
padding-inline: 16px;
|
||||||
border-radius: 12px;
|
|
||||||
background: var(--pm-template-background);
|
background: var(--pm-template-background);
|
||||||
color: var(--pm-poster-ink);
|
color: var(--pm-poster-ink);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -228,8 +244,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
width: min(100%, 280px);
|
width: min(100%, 280px);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
min-height: 448px;
|
padding: 28px 8px 20px;
|
||||||
padding: 32px 8px 24px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
@@ -246,7 +261,7 @@
|
|||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
.pm-poster h3 {
|
.pm-poster h3 {
|
||||||
margin: 20px 0;
|
margin: 16px 0;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
@@ -312,6 +327,10 @@
|
|||||||
outline-offset: 3px;
|
outline-offset: 3px;
|
||||||
}
|
}
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
|
.promotion-modal.ant-modal {
|
||||||
|
--pm-tab-panel-height: 760px;
|
||||||
|
--pm-preview-min-height: 395px;
|
||||||
|
}
|
||||||
.promotion-modal .ant-modal-container {
|
.promotion-modal .ant-modal-container {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
@@ -322,9 +341,6 @@
|
|||||||
top: 18px;
|
top: 18px;
|
||||||
right: 16px;
|
right: 16px;
|
||||||
}
|
}
|
||||||
.promotion-modal .ant-modal-body {
|
|
||||||
max-height: calc(100dvh - 136px);
|
|
||||||
}
|
|
||||||
.pm-link-layout,
|
.pm-link-layout,
|
||||||
.pm-poster-layout {
|
.pm-poster-layout {
|
||||||
grid-template-columns: minmax(0, 1fr);
|
grid-template-columns: minmax(0, 1fr);
|
||||||
@@ -344,7 +360,6 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.pm-poster {
|
.pm-poster {
|
||||||
min-height: 408px;
|
|
||||||
padding-block: 24px 20px;
|
padding-block: 24px 20px;
|
||||||
}
|
}
|
||||||
.pm-template-list {
|
.pm-template-list {
|
||||||
|
|||||||
Reference in New Issue
Block a user