- 这里是显示的地方
<uni-list-item title="姓名" :rightText="userInfo.name" /> <uni-list-item title="账号" :rightText="userInfo.email" /> <uni-list-item title="所属机构" :rightText="userInfo.organizationName" /> <!-- <uni-list-item title="用户类型" :rightText="accountType" /> --> <uni-list-item title="设备品牌" :rightText="deviceInfo.brand" /> <uni-list-item title="设备型号" :rightText="deviceInfo.model==='none'?'空':deviceInfo.model" /> <uni-list-item title="操作系统版本" :rightText="deviceInfo.system" /> <uni-list-item title="App版本" :rightText="deviceInfo.appVersion" /> <uni-list-item title="网络类型" :rightText="networkType" /> <!-- <uni-list-item title="IP地址" :rightText="IP" /> --> <uni-list-item title="当前时间" :rightText="currentTime" /> <uni-list-item title="屏幕像素" :rightText="pixel" />
-这是调用
···
uni.getSystemInfo({
success(info) {
console.log('infoinfoinfo', cid)
setUserDeviceInfo(info)
saveClientId(cid)
const defaultIndex = Number(getWorkDefaultSync())
const appData = {
clientId: cid,
startTime: parseTime(+new Date()),
endTime: getUserRecordTime() || '',
loginPlatform: info.platform === 'android' ? 2 : 1, // IOS android
deviceName: info.model, // 设备型号 RNE-AL00
systemVersion: info.system, // 手机系统版本号 如 Android 8.0.0
appVersion: 'V' + info.appVersion, // 当前手机的APP版本号
defaultIndexPages: defaultIndex === 0 ? '数字新航道App' : defaultIndex === 1 ? 'AMS' : 'EAS'
}
}
})
···
这是获取机型数据
const initData = (option) => {
userInfo.value = option.userInfo ? JSON.parse(option.userInfo) : {},
deviceInfo.value = getUserDeviceInfo() || {}
if (deviceInfo.value.appVersion) {
deviceInfo.value.appVersion = 'V' + deviceInfo.value.appVersion
}
}