1 Star 0 Fork 3

安安仔 / xiaolive

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
App.vue 747 Bytes
一键复制 编辑 Web IDE 原始数据 按行查看 历史
4705552975 提交于 2020-01-14 11:15 . 1
<script>
import Vue from 'vue'
export default {
onLaunch: function() {
// console.log('App Launch')
uni.getSystemInfo({
success:function(e){
Vue.prototype.statusBar = e.statusBarHeight
// #ifndef MP
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.customBar = custom.bottom + custom.top - e.statusBarHeight
// #endif
// #ifdef MP-ALIPAY
Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
// #endif
}
})
},
}
</script>
<style>
/*每个页面公共css */
</style>
NodeJS
1
https://gitee.com/web-an/xiaolive.git
git@gitee.com:web-an/xiaolive.git
web-an
xiaolive
xiaolive
master

搜索帮助

14c37bed 8189591 565d56ea 8189591