diff --git a/App.vue b/App.vue
index 0e40d43..112e211 100644
--- a/App.vue
+++ b/App.vue
@@ -2,21 +2,17 @@
import {
VUE_APP_API_URL
} from "@/config";
+import Vue from 'vue'
export default {
onLaunch: function (e) {
var that = this; //获取设备信息
- this.setMenuHeight();
+ this.setAppInfo();
this.autoUpdate();
// uni.hideTabBar()
},
globalData: {
baseURL: VUE_APP_API_URL+ '/',
userInfo: null,
- navHeight: 0,
- navTopHeight: 0,
- menuTop: 0,
- menuHeight: 0,
- CustomBar: 0,
isIphoneX: false,
inviterId: null,
//分享码
@@ -245,25 +241,33 @@ export default {
}
},
- setMenuHeight() {
- uni.getSystemInfo({
- success: res => {
- console.log(res,'resaaaaa')
- this.globalData.navTopHeight = res.statusBarHeight;
- this.globalData.CustomBar = res.statusBarHeight + 45;
- this.globalData.systemInfo = res;
- let model = res.model;
- if (/iphone\sx/i.test(model) || /iphone/i.test(model) && /unknown/.test(model) || /iphone\s11/i.test(model) || /iphone\s12/i.test(model) || /iphone\s13/i.test(model)) {
- this.globalData.isIphoneX = true;
- }
- }
- });
- let menuButtonObj = uni.getMenuButtonBoundingClientRect();
- console.log(menuButtonObj,'menuButtonObj')
- this.globalData.menuTop = menuButtonObj.top;
- this.globalData.menuHeight = menuButtonObj.height;
- this.globalData.topHeight = menuButtonObj.top + menuButtonObj.height;
- this.globalData.navHeight = menuButtonObj.top;
+ // 获取系统栏高度
+ async setAppInfo() {
+ let that = this
+ return new Promise((resolve, reject) => {
+ uni.getSystemInfo({
+ success: function (e) {
+ Vue.prototype.StatusBar = e.statusBarHeight
+ // #ifdef H5
+ Vue.prototype.CustomBar = e.statusBarHeight + 45
+ // #endif
+
+ // #ifdef APP-PLUS
+ if (e.platform == 'android') {
+ Vue.prototype.CustomBar = e.statusBarHeight + 50
+ } else {
+ Vue.prototype.CustomBar = e.statusBarHeight + 45
+ }
+ // #endif
+
+ // #ifdef MP-WEIXIN
+ let custom = wx.getMenuButtonBoundingClientRect()
+ Vue.prototype.Custom = custom
+ Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight
+ // #endif
+ },
+ })
+ })
},
getInfo() {
diff --git a/components/CustomNavigator.vue b/components/CustomNavigator.vue
deleted file mode 100644
index 16d69b4..0000000
--- a/components/CustomNavigator.vue
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
- {{title}}
-
-
-
-
-
-
-
diff --git a/components/colorui/components/cu-custom.vue b/components/colorui/components/cu-custom.vue
index 0a79594..b27c117 100644
--- a/components/colorui/components/cu-custom.vue
+++ b/components/colorui/components/cu-custom.vue
@@ -59,6 +59,9 @@
+
+
-
-
diff --git a/pages/life/learnMore/index.vue b/pages/life/learnMore/index.vue
index ee8ee9a..055ea41 100644
--- a/pages/life/learnMore/index.vue
+++ b/pages/life/learnMore/index.vue
@@ -1,6 +1,10 @@
- 详情
+
+
+ 详情
+
+
@@ -20,12 +24,10 @@
-