Files
tripellet-merchant/App.vue
2023-06-06 17:11:04 +08:00

49 lines
1.2 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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>