diff --git a/Colorui-UniApp/App.vue b/Colorui-UniApp/App.vue
index 763e269..469e182 100755
--- a/Colorui-UniApp/App.vue
+++ b/Colorui-UniApp/App.vue
@@ -13,12 +13,18 @@
};
// #endif
- // #ifdef MP-WEIXIN
+ // #ifdef MP-WEIXIN || MP-QQ
Vue.prototype.StatusBar = e.statusBarHeight;
- let custom = wx.getMenuButtonBoundingClientRect();
- Vue.prototype.Custom = custom;
- Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
+ let capsule = wx.getMenuButtonBoundingClientRect();
+ if (capsule) {
+ Vue.prototype.Custom = capsule;
+ // Vue.prototype.capsuleSafe = uni.upx2px(750) - capsule.left + uni.upx2px(750) - capsule.right;
+ Vue.prototype.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
+ } else {
+ Vue.prototype.CustomBar = e.statusBarHeight + 50;
+ }
// #endif
+
// #ifdef MP-ALIPAY
Vue.prototype.StatusBar = e.statusBarHeight;
diff --git a/Colorui-UniApp/pages/plugin/animation.vue b/Colorui-UniApp/pages/plugin/animation.vue
index da59755..ad50feb 100755
--- a/Colorui-UniApp/pages/plugin/animation.vue
+++ b/Colorui-UniApp/pages/plugin/animation.vue
@@ -47,7 +47,7 @@
-
+
diff --git a/demo/app.js b/demo/app.js
index 00d52a0..5e956d3 100644
--- a/demo/app.js
+++ b/demo/app.js
@@ -9,9 +9,13 @@ App({
wx.getSystemInfo({
success: e => {
this.globalData.StatusBar = e.statusBarHeight;
- let custom = wx.getMenuButtonBoundingClientRect();
- this.globalData.Custom = custom;
- this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
+ let capsule = wx.getMenuButtonBoundingClientRect();
+ if (capsule) {
+ this.globalData.Custom = capsule;
+ this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
+ } else {
+ this.globalData.CustomBar = e.statusBarHeight + 50;
+ }
}
})
},
diff --git a/demo/app.json b/demo/app.json
index 3cc007a..7a79017 100644
--- a/demo/app.json
+++ b/demo/app.json
@@ -43,6 +43,7 @@
"navigationBarTextStyle": "white"
},
"usingComponents": {
- "cu-custom":"/colorui/components/cu-custom"
- }
+ "cu-custom": "/colorui/components/cu-custom"
+ },
+ "sitemapLocation": "sitemap21.json"
}
\ No newline at end of file
diff --git a/demo/pages/about/home/home.wxml b/demo/pages/about/home/home.wxml
index 2a3b6b9..386b86b 100644
--- a/demo/pages/about/home/home.wxml
+++ b/demo/pages/about/home/home.wxml
@@ -7,7 +7,7 @@
By:文晓港
-
+
diff --git a/demo/pages/plugin/animation/animation.wxml b/demo/pages/plugin/animation/animation.wxml
index 9aa2f4f..057864c 100644
--- a/demo/pages/plugin/animation/animation.wxml
+++ b/demo/pages/plugin/animation/animation.wxml
@@ -42,7 +42,7 @@
-
+
diff --git a/demo/project.config.json b/demo/project.config.json
index 25c41b2..1e8f298 100644
--- a/demo/project.config.json
+++ b/demo/project.config.json
@@ -18,6 +18,8 @@
"hidedInDevtools": []
},
"isGameTourist": false,
+ "simulatorType": "wechat",
+ "simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
diff --git a/demo/sitemap21.json b/demo/sitemap21.json
new file mode 100644
index 0000000..ca02add
--- /dev/null
+++ b/demo/sitemap21.json
@@ -0,0 +1,7 @@
+{
+ "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
+ "rules": [{
+ "action": "allow",
+ "page": "*"
+ }]
+}
\ No newline at end of file
diff --git a/template/app.js b/template/app.js
index 0dfc0b7..55b0f3e 100644
--- a/template/app.js
+++ b/template/app.js
@@ -36,9 +36,13 @@ App({
wx.getSystemInfo({
success: e => {
this.globalData.StatusBar = e.statusBarHeight;
- let custom = wx.getMenuButtonBoundingClientRect();
- this.globalData.Custom = custom;
- this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
+ let capsule = wx.getMenuButtonBoundingClientRect();
+ if (capsule) {
+ this.globalData.Custom = capsule;
+ this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
+ } else {
+ this.globalData.CustomBar = e.statusBarHeight + 50;
+ }
}
})
},