修复(斗鱼领取): 提交按钮适配苹果浏览器滚动与安全区
This commit is contained in:
+20
-15
@@ -163,6 +163,7 @@ export default function App() {
|
||||
|
||||
function DouyuFulfillmentApplication() {
|
||||
useClearStrayHash()
|
||||
useCustomerMobileViewport()
|
||||
return (
|
||||
<BrowserRouter>
|
||||
<Suspense fallback={<RouteLoading />}>
|
||||
@@ -192,21 +193,7 @@ function OrderServiceApplication() {
|
||||
|
||||
function CustomerFulfillmentApplication() {
|
||||
useClearStrayHash()
|
||||
/**
|
||||
* 客户履约页固定移动端:
|
||||
* 全局 base.css 给 body 设了 min-width:320px,worker.css 又用 overflow-x:hidden
|
||||
* 裁掉横向溢出。应用内浏览器/分屏/系统显示放大时,实际视口可能小于 320px,
|
||||
* 页面右侧(输入框、商品值、提示文案)会被直接裁掉。
|
||||
* 这里只给客户履约路由挂移动端根类,覆盖最小宽度,不影响后台与打手端。
|
||||
*/
|
||||
useLayoutEffect(() => {
|
||||
document.documentElement.classList.add('customer-mobile-html')
|
||||
document.body.classList.add('customer-mobile-body')
|
||||
return () => {
|
||||
document.documentElement.classList.remove('customer-mobile-html')
|
||||
document.body.classList.remove('customer-mobile-body')
|
||||
}
|
||||
}, [])
|
||||
useCustomerMobileViewport()
|
||||
// 非标准子路径也按首段路径绑定平台,避免 /c/.../extra 这类地址绕过严格绑定。
|
||||
const prefix = window.location.pathname.split('/').filter(Boolean)[0]
|
||||
const wildcardPlatform = prefix === 'c' ? 'huya' : prefix === 'd' ? 'weibo' : undefined
|
||||
@@ -387,6 +374,24 @@ function useClearStrayHash() {
|
||||
}, [])
|
||||
}
|
||||
|
||||
/**
|
||||
* 客户领取/履约页固定按移动端处理:
|
||||
* 全局 base.css 给 body 设了 min-width:320px,worker.css 又用 overflow-x:hidden
|
||||
* 裁掉横向溢出。应用内浏览器/分屏/系统显示放大时,实际视口可能小于 320px,
|
||||
* 页面右侧(输入框、商品值、提示文案)会被直接裁掉。
|
||||
* 这里只给客户页面路由挂移动端根类,覆盖最小宽度,不影响后台与打手端。
|
||||
*/
|
||||
function useCustomerMobileViewport() {
|
||||
useLayoutEffect(() => {
|
||||
document.documentElement.classList.add('customer-mobile-html')
|
||||
document.body.classList.add('customer-mobile-body')
|
||||
return () => {
|
||||
document.documentElement.classList.remove('customer-mobile-html')
|
||||
document.body.classList.remove('customer-mobile-body')
|
||||
}
|
||||
}, [])
|
||||
}
|
||||
|
||||
function WorkerApplication() {
|
||||
return (
|
||||
<BrowserRouter>
|
||||
|
||||
Reference in New Issue
Block a user