forked from infinityu/mina-wear-mask
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.vue
56 lines (52 loc) · 1.3 KB
/
App.vue
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
<script>
import Vue from 'vue'
let sysInfo = uni.getSystemInfoSync();
let WINDOW_HEIGHT = sysInfo.windowHeight;
let IS_ANDROID = !sysInfo.model.includes('iPhone');
let envId = 'ncov-production-wwomb';
let collectionName = 'mp_launch_config';
let docId = 'mp_launch_config_doc';
export default {
globalData: {
WINDOW_HEIGHT: WINDOW_HEIGHT,
IS_ANDROID: IS_ANDROID,
cropImageFilePath: '',
rapaintAfterCrop: false,
PAGE_BG_COLOR: '#C12928',
enableSecurityCheck: true,
userAvatarUrl: null,
userAvatarFilePath: null
},
onLaunch: function() {
console.log('App Launch');
if (!wx.cloud) {
console.error('请使用 2.2.3 或以上的基础库以使用云能力');
} else {
wx.cloud.init({
traceUser: true
});
}
const db = wx.cloud.database({
env: envId,
traceUser: true
});
db.collection(collectionName).doc(docId).get().then(res => {
getApp().globalData.enableSecurityCheck = res.data.enableSecurityCheck;
})
},
onShow: function() {
console.log('App Show');
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
@import './common/uni.css';
@import "colorui/animation.css";
@import "colorui/main.css";
@import "colorui/icon.css";
@import "app.css";
</style>