fix: WebView 传入 statusBarHeight 并设置刘海区背景色
愈心魔方页全屏 web-view,URL 带 sbh 参数;页面背景与 H5 暖色对齐。
This commit is contained in:
+3
-1
@@ -10,7 +10,9 @@
|
|||||||
"path": "pages/yxg-magic/index",
|
"path": "pages/yxg-magic/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom",
|
||||||
|
"backgroundColor": "#ffd1c7",
|
||||||
|
"backgroundColorTop": "#ffd1c7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<web-view :src="h5Url"></web-view>
|
<web-view class="yxg-webview" :src="h5Url"></web-view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { YXG_H5_HOME_URL } from '@/util/yxgConfig.js'
|
import { computed } from 'vue'
|
||||||
|
import { YXG_H5_BASE, YXG_H5_VERSION } from '@/util/yxgConfig.js'
|
||||||
|
|
||||||
const h5Url = YXG_H5_HOME_URL
|
const sys = uni.getSystemInfoSync()
|
||||||
|
const sbh = sys.statusBarHeight || 0
|
||||||
|
const h5Url = computed(
|
||||||
|
() => `${YXG_H5_BASE}?mp=1&v=${YXG_H5_VERSION}&sbh=${sbh}`,
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.yxg-webview {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/** 愈心魔方 H5(digital-psychology user-h5) */
|
/** 愈心魔方 H5(digital-psychology user-h5) */
|
||||||
export const YXG_H5_VERSION = '20260825'
|
export const YXG_H5_VERSION = '202608252'
|
||||||
export const YXG_H5_BASE = 'https://h5.yuxingu.com.cn/psy/'
|
export const YXG_H5_BASE = 'https://h5.yuxingu.com.cn/psy/'
|
||||||
export const YXG_H5_HOME_URL = `${YXG_H5_BASE}?mp=1&v=${YXG_H5_VERSION}`
|
export const YXG_H5_HOME_URL = `${YXG_H5_BASE}?mp=1&v=${YXG_H5_VERSION}`
|
||||||
|
|||||||
Reference in New Issue
Block a user