初始化

This commit is contained in:
2023-06-06 17:11:04 +08:00
commit 4fff04b095
113 changed files with 11291 additions and 0 deletions

48
App.vue Normal file
View File

@@ -0,0 +1,48 @@
<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>