FEAT => 本次更新项目为:更新环境变量及标题为“存客宝”,新增应用模式标识,优化iOS设备安全区域高度计算
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# 基础环境变量示例
|
||||
# VITE_API_BASE_URL=http://www.yishi.com
|
||||
VITE_API_BASE_URL=https://ckbapi.quwanzhi.com
|
||||
VITE_APP_TITLE=Nkebao Base
|
||||
VITE_APP_TITLE=存客宝
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# 基础环境变量示例
|
||||
VITE_API_BASE_URL=https://ckbapi.quwanzhi.com
|
||||
VITE_APP_TITLE=Nkebao Base
|
||||
|
||||
VITE_APP_TITLE=存客宝
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Nkebao Base</title>
|
||||
<title>存客宝</title>
|
||||
<style>
|
||||
html {
|
||||
font-size: 16px;
|
||||
|
||||
@@ -74,6 +74,7 @@ const IframeDebugPage: React.FC = () => {
|
||||
console.log("message.type", message.type);
|
||||
if ([TYPE_EMUE.CONFIG].includes(message.type)) {
|
||||
localStorage.setItem("paddingTop", message.data.paddingTop);
|
||||
localStorage.setItem("isAppMode", "true");
|
||||
navigate("/");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -49,8 +49,8 @@ export function getSafeAreaHeight() {
|
||||
// 2. 设备检测
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
||||
const isAndroid = /Android/.test(navigator.userAgent);
|
||||
|
||||
if (isIOS) {
|
||||
const isAppMode = Boolean(localStorage.getItem("isAppMode"));
|
||||
if (isIOS && isAppMode) {
|
||||
// iOS 设备
|
||||
const isIPhoneX = window.screen.height >= 812;
|
||||
return isIPhoneX ? 44 : 20;
|
||||
|
||||
Reference in New Issue
Block a user