This commit is contained in:
2025-09-20 21:04:45 +08:00
commit d204ffe6fa
9 changed files with 203 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
const app = getApp()
Page({
data: {
url: app.globalData.webUrl
}
})
+3
View File
@@ -0,0 +1,3 @@
{
"navigationStyle": "custom"
}
+3
View File
@@ -0,0 +1,3 @@
<view class="web-view-container">
<web-view src="{{url}}"/>
</view>
+38
View File
@@ -0,0 +1,38 @@
/* Remove all default margins and padding */
page {
margin: 0;
padding: 0;
height: 100vh;
overflow: hidden;
}
/* Full screen container that extends beyond safe area */
.web-view-container {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
overflow: hidden;
}
/* Web-view styling for absolute full screen coverage */
web-view {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
border: none;
outline: none;
/* Force extension beyond safe area on iPhone 14 */
margin-top: calc(-1 * env(safe-area-inset-top, 0px));
margin-top: calc(-1 * constant(safe-area-inset-top, 0px));
height: calc(100vh + env(safe-area-inset-top, 0px) + env(safe-area-inset-bottom, 0px));
height: calc(100vh + constant(safe-area-inset-top, 0px) + constant(safe-area-inset-bottom, 0px));
}