修复(斗鱼领取): 资料阶段禁止进入二维码紧凑布局
This commit is contained in:
@@ -350,8 +350,13 @@ export default function DouyuFulfillmentPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<CustomerFrame
|
<CustomerFrame
|
||||||
|
profile={needsProfile}
|
||||||
compact={Boolean(
|
compact={Boolean(
|
||||||
live?.qrUrl && !live.bindReadyForConfirm && !live.bindConfirmed && !bindingFailed,
|
!needsProfile &&
|
||||||
|
live?.qrUrl &&
|
||||||
|
!live.bindReadyForConfirm &&
|
||||||
|
!live.bindConfirmed &&
|
||||||
|
!bindingFailed,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<OrderCard data={data} />
|
<OrderCard data={data} />
|
||||||
@@ -635,9 +640,21 @@ function ChoiceSwitch<T extends string>(input: {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function CustomerFrame({ compact = false, children }: { compact?: boolean; children: ReactNode }) {
|
function CustomerFrame({
|
||||||
|
compact = false,
|
||||||
|
profile = false,
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
compact?: boolean
|
||||||
|
profile?: boolean
|
||||||
|
children: ReactNode
|
||||||
|
}) {
|
||||||
return (
|
return (
|
||||||
<div className={`customer-auth-page is-huya is-douyu${compact ? ' is-compact' : ''}`}>
|
<div
|
||||||
|
className={`customer-auth-page is-huya is-douyu${profile ? ' is-profile' : ''}${
|
||||||
|
compact ? ' is-compact' : ''
|
||||||
|
}`}
|
||||||
|
>
|
||||||
<div className="customer-auth-shell">
|
<div className="customer-auth-shell">
|
||||||
<header className="customer-auth-hero" aria-hidden="true" />
|
<header className="customer-auth-hero" aria-hidden="true" />
|
||||||
<div className="customer-auth-warning">温馨提示:未成年人禁止下单</div>
|
<div className="customer-auth-warning">温馨提示:未成年人禁止下单</div>
|
||||||
|
|||||||
@@ -604,36 +604,39 @@
|
|||||||
* Safari 的地址栏和底部工具栏会动态压缩可视区域。资料阶段必须由页面滚动承载,
|
* Safari 的地址栏和底部工具栏会动态压缩可视区域。资料阶段必须由页面滚动承载,
|
||||||
* 不能把内容锁在 100vh 容器里;同时保留 dvh 和底部安全区,适配刘海屏与短屏。
|
* 不能把内容锁在 100vh 容器里;同时保留 dvh 和底部安全区,适配刘海屏与短屏。
|
||||||
*/
|
*/
|
||||||
.customer-auth-page.is-douyu:not(.is-compact) {
|
.customer-auth-page.is-douyu.is-profile {
|
||||||
height: auto;
|
height: auto;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
min-height: 100dvh;
|
min-height: 100dvh;
|
||||||
overflow-x: hidden;
|
overflow: visible;
|
||||||
overflow-y: visible;
|
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer-auth-page.is-douyu:not(.is-compact) .customer-auth-shell {
|
.customer-auth-page.is-douyu.is-profile .customer-auth-shell {
|
||||||
height: auto;
|
height: auto;
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer-auth-page.is-douyu:not(.is-compact) .customer-auth-main {
|
.customer-auth-page.is-douyu.is-profile .customer-auth-main {
|
||||||
padding-bottom: calc(40px + env(safe-area-inset-bottom));
|
padding-bottom: calc(112px + env(safe-area-inset-bottom));
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer-auth-page.is-douyu:not(.is-compact) .customer-collect-body {
|
.customer-auth-page.is-douyu.is-profile .customer-collect-body {
|
||||||
padding-bottom: calc(20px + env(safe-area-inset-bottom));
|
padding-bottom: calc(20px + env(safe-area-inset-bottom));
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer-auth-page.is-douyu:not(.is-compact) .customer-douyu-submit-bar {
|
.customer-auth-page.is-douyu.is-profile .customer-douyu-submit-bar {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
|
left: 50%;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
z-index: 5;
|
z-index: 20;
|
||||||
margin-inline: -16px;
|
width: min(100%, 480px);
|
||||||
margin-top: 4px;
|
margin: 0;
|
||||||
padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
|
padding: 14px max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom))
|
||||||
|
max(16px, env(safe-area-inset-left));
|
||||||
background: linear-gradient(180deg, rgba(35, 41, 54, 0) 0%, #232936 28%, #232936 100%);
|
background: linear-gradient(180deg, rgba(35, 41, 54, 0) 0%, #232936 28%, #232936 100%);
|
||||||
|
transform: translateX(-50%);
|
||||||
|
box-shadow: 0 -10px 28px rgba(3, 12, 34, 0.28);
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer-auth-page.is-douyu.is-compact .customer-binding-stage {
|
.customer-auth-page.is-douyu.is-compact .customer-binding-stage {
|
||||||
|
|||||||
@@ -29,13 +29,15 @@ test('斗鱼资料提交按钮在手机端保持可见且页面可滚动', async
|
|||||||
])
|
])
|
||||||
|
|
||||||
assert.ok(page.includes('customer-douyu-submit-bar'))
|
assert.ok(page.includes('customer-douyu-submit-bar'))
|
||||||
|
assert.match(page, /profile=\{needsProfile\}/)
|
||||||
|
assert.match(page, /compact=\{Boolean\(\s*!needsProfile\s*&&/s)
|
||||||
assert.match(
|
assert.match(
|
||||||
css,
|
css,
|
||||||
/\.customer-auth-page\.is-douyu:not\(\.is-compact\)\s*\{[^}]*min-height:\s*100dvh;[^}]*overflow-y:\s*visible/s,
|
/\.customer-auth-page\.is-douyu\.is-profile\s*\{[^}]*min-height:\s*100dvh;[^}]*overflow:\s*visible/s,
|
||||||
)
|
)
|
||||||
assert.match(
|
assert.match(
|
||||||
css,
|
css,
|
||||||
/\.customer-auth-page\.is-douyu:not\(\.is-compact\) \.customer-douyu-submit-bar\s*\{[^}]*position:\s*sticky;[^}]*bottom:\s*0;[^}]*env\(safe-area-inset-bottom\)/s,
|
/\.customer-auth-page\.is-douyu\.is-profile \.customer-douyu-submit-bar\s*\{[^}]*position:\s*fixed;[^}]*bottom:\s*0;[^}]*env\(safe-area-inset-bottom\)/s,
|
||||||
)
|
)
|
||||||
assert.match(
|
assert.match(
|
||||||
css,
|
css,
|
||||||
|
|||||||
Reference in New Issue
Block a user