App.vue
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<script>
import common from '@/utils/common.js'
export default {
data() {
return {
common
}
},
onLaunch: function() {
console.log('App Launch')
//获取导航栏高度
uni.getSystemInfo({
success: (e) => {
// #ifdef APP-PLUS
if (e.statusBarHeight === 0) {
common.statusBarH = 33
} else {
common.statusBarH = e.statusBarHeight
}
// #endif
// #ifdef H5
common.statusBarH = 10
// #endif
// #ifdef MP-WEIXIN
common.statusBarH = e.statusBarHeight + 20
// #endif
}
})
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
.gloabal-root-content-c {
min-height: 100vh;
background-color: #FFE5E5;
}
.gloabal-empty-image-c {
width: 200rpx;
height: 200rpx;
}
.gloabal-empty-content-c {
width: 100vw;
height: 100%;
align-items: center;
flex: 1;
display: flex;
justify-content: center;
flex-direction: column;
}
</style>