49 lines
1.2 KiB
Vue
49 lines
1.2 KiB
Vue
<script>
|
||
import Vue from 'vue';
|
||
export default {
|
||
onLaunch: function() {
|
||
uni.getSystemInfo({
|
||
success: function(e) {
|
||
Vue.prototype.StatusBar = e.statusBarHeight;
|
||
Vue.prototype.CustomBar = e.statusBarHeight + 44;
|
||
//用来判断是否iphoneX类型的全面屏设备
|
||
if (e.model.indexOf('iPhoneX') == 0) {
|
||
Vue.prototype.isIphoneX = 68;
|
||
} else {
|
||
Vue.prototype.isIphoneX = 0;
|
||
}
|
||
if (e.platform == "android") {
|
||
// this.AndroidCheckUpdate()
|
||
}
|
||
}
|
||
})
|
||
console.log('App Launch asd')
|
||
},
|
||
onShow: function() {
|
||
console.log('App Show')
|
||
// 每次展现在前台判断是否登录,未登录则去登录页
|
||
// if (!this.$store.getters.hasLogin){
|
||
// uni.redirectTo({url: '/pages/login/login'});
|
||
// }
|
||
},
|
||
onHide: function() {
|
||
console.log('App Hide')
|
||
}
|
||
}
|
||
</script>
|
||
|
||
<style>
|
||
/*每个页面公共css */
|
||
|
||
/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
|
||
@import './common/uni.css';
|
||
/* 引入图标字体 */
|
||
@import './static/icon/iconfont.css';
|
||
/* H5 兼容 pc 所需 */
|
||
@media screen and (min-width: 768px) {
|
||
body{
|
||
overflow-y: scroll;
|
||
}
|
||
}
|
||
</style>
|