main
liudan 1 year ago
parent 1d4536aa8e
commit f09fa7d583
  1. 19
      pages/index/category/two-catgory.vue

@ -103,7 +103,10 @@ export default {
options: [{
custom: true //
}],
selectedItem:{}
selectedItem:{},
statusBarHeight: 20,/* 状态栏高度 */
navBarHeight: 45,/* 导航栏高度 */
windowWidth: 375,/* 窗口宽度 */
};
},
computed: {},
@ -116,6 +119,20 @@ export default {
created() {
console.log('%c当前分类:二级分类', 'color:green;background:yellow');
this.getCategory();
//
const info = uni.getSystemInfoSync()
// H5
this.statusBarHeight = info.statusBarHeight
this.windowWidth = info.windowWidth
// h5 app mp-alipay
// #ifndef H5 || APP-PLUS || MP-ALIPAY
//
const menuButtonInfo = uni.getMenuButtonBoundingClientRect()
console.log(menuButtonInfo);
// ( - ) + ( - ) =
this.navBarHeight = (menuButtonInfo.bottom - info.statusBarHeight) + (menuButtonInfo.top - info.statusBarHeight)
this.windowWidth = menuButtonInfo.left
// #endif
},
methods: {
showHandle(val){

Loading…
Cancel
Save