-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathapp.js
41 lines (40 loc) · 837 Bytes
/
app.js
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
import uma from './uma.min.js'
// uma.preinit({
// ENDPOINT: "https://preulogs.umeng.com"
// });
uma.init({
debug:true,
appKey: 'YOUR_APP_KEY',
useOpenid:false,
autoGetOpenid:false,
uploadUserInfo:false
})
App({
onLaunch: function () {
// ks.onAppHide(function(){
// console.log('onAppHide.....')
// })
ks.getSystemInfo({
success:function(res){
console.log(res);
}
})
},
onShow(){
ks.showToast({
title: 'onShow',
icon: 'success',
duration: 2000
})
this.globalData.showtime = this.globalData.showtime + '|' + new Date();
console.log('onShow....');
},
onHide:function(){
this.globalData.hidetime = this.globalData.hidetime +'|' + new Date() ;
console.log('onHide....');
},
globalData:{
showtime:'',
hidetime:''
}
})