|
|
App({
|
|
|
globalData: {
|
|
|
globalData: {
|
|
|
selectedChannel: 'boy',
|
|
|
userInfo: {},
|
|
|
systemInfo: null,
|
|
|
WXThird_session: '',
|
|
|
WXUnion_ID: '',
|
|
|
openID: '',
|
|
|
verifyKey: '',
|
|
|
sessionkey: '',
|
|
|
sid: '',
|
|
|
udid: '',
|
|
|
cid: '1',
|
|
|
mobileRegisterState: '',
|
|
|
hasReportAwakeAction: 'false',
|
|
|
defraudurl: 'https://activity.yoho.cn/feature/45.html?title=防诈骗提醒',
|
|
|
union_type: '', // 渠道号,大数据上传用
|
|
|
union_type_time: '',
|
|
|
ch: '',
|
|
|
networkType: '0',
|
|
|
deviceInfo: {},
|
|
|
currentScene: 1001,
|
|
|
user_union_type: '', // 用户相关unionType 要与union_type区分开
|
|
|
user_union_type_imageUrl: '', // 联盟图片
|
|
|
user_nounion_type_imageUrl: '', // 非联盟用户分享banner图片
|
|
|
shareId: '',
|
|
|
shareInfo: {}
|
|
|
},
|
|
|
selectedChannel: 'boy',
|
|
|
userInfo: {},
|
|
|
systemInfo: null,
|
|
|
WXThird_session: '',
|
|
|
WXUnion_ID: '',
|
|
|
openID: '',
|
|
|
verifyKey: '',
|
|
|
sessionkey: '',
|
|
|
sid: '',
|
|
|
udid: '',
|
|
|
cid: '1',
|
|
|
mobileRegisterState: '',
|
|
|
hasReportAwakeAction: 'false',
|
|
|
defraudurl: 'https://activity.yoho.cn/feature/45.html?title=防诈骗提醒',
|
|
|
union_type: '', // 渠道号,大数据上传用
|
|
|
union_type_time: '',
|
|
|
ch: '',
|
|
|
networkType: '0',
|
|
|
deviceInfo: {},
|
|
|
currentScene: 1001,
|
|
|
user_union_type: '', // 用户相关unionType 要与union_type区分开
|
|
|
user_union_type_imageUrl: '', // 联盟图片
|
|
|
user_nounion_type_imageUrl: '', // 非联盟用户分享banner图片
|
|
|
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() {
|
...
|
...
|
|