|
|
App({
|
|
|
globalData: {
|
|
|
globalData: {
|
|
|
selectedChannel: 'boy',
|
|
|
userInfo: {},
|
|
|
systemInfo: null,
|
...
|
...
|
@@ -27,8 +26,29 @@ App({ |
|
|
shareId: '',
|
|
|
shareInfo: {}
|
|
|
},
|
|
|
},
|
|
|
onLaunch: function () {
|
|
|
this.getSystemInfo();
|
|
|
|
|
|
},
|
|
|
/**
|
|
|
* 获取系统信息
|
|
|
*/
|
|
|
getSystemInfo: function (){
|
|
|
let that = this;
|
|
|
let systemInfo = this.globalData.systemInfo;
|
|
|
|
|
|
if(!systemInfo || systemInfo === null){
|
|
|
try{
|
|
|
systemInfo = tt.getSystemInfoSync();
|
|
|
|
|
|
if (systemInfo) {
|
|
|
this.globalData.systemInfo = systemInfo;
|
|
|
}
|
|
|
}catch(e){
|
|
|
|
|
|
}
|
|
|
}
|
|
|
return systemInfo;
|
|
|
|
|
|
},
|
|
|
getUid: function() {
|
...
|
...
|
|