//初始化对象
var model = {};
//客户端类型
model.detectInfo = hdevice.detectOS();
//设备类型
model.deviceType = hdevice.getDeviceType();
//获取客户端浏览器信息
model.browserInfo = hdevice.getExplore();
//获取客户端ip
hdevice.getIPAsync().then(ipResult => {
var success = null;
//打印
console.log('ipResult', ipResult);
}).catch(ipResult => {
debugger;
var error = null;
});
//系统版本
model.osVersion = hdevice.getOSVersion();
//获取客户端信息
model.clientInfo = hdevice.getResult();
//异步获取客户端信息
hdevice.getResultAsync().then(clientResult => {
var success = null;
//打印
console.log('clientResult', clientResult);
}).catch(clientResult => {
debugger;
var error = null;
});
//是否钉钉
model.isDingTalk = hdevice.isDingTalk;
//是否移动端
model.isMobile = hdevice.isMobile();
//是否微信
model.isWx = hdevice.is_weixn();
//异步ip和地理位置
homeIndexService.getLocation().then(locationInfo => {
var success = null;
//打印
console.log('locationInfo', locationInfo);
}).catch(locationInfo => {
debugger;
var error = null;
});
//打印
console.log('model', model);