1 Star 0 Fork 119

gyc789123/物资管理系统

forked from DCloud/物资管理系统 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
App.vue 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
陈默 提交于 2020-02-06 21:12 . 'bug'
<script>
import Vue from 'vue'
export default {
onLaunch: function() {
console.log('App Launch')
// Sync storage info
this.$store.commit('GET_APP_STORAGE')
uni.getSystemInfo({
success: function(e) {
// #ifndef MP
Vue.prototype.StatusBar = e.statusBarHeight;
if (e.platform == 'android') {
Vue.prototype.CustomBar = e.statusBarHeight + 50;
} else {
Vue.prototype.CustomBar = e.statusBarHeight + 45;
};
// #endif
// #ifdef MP-WEIXIN || MP-QQ
Vue.prototype.StatusBar = 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;
Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
// #endif
}
})
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
@import './common/common.css';
</style>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/gyc789123/material_management.git
git@gitee.com:gyc789123/material_management.git
gyc789123
material_management
物资管理系统
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385