|
@@ -4,12 +4,15 @@ export default {
|
|
|
// 用户信息
|
|
|
userInfo: {},
|
|
|
// 状态栏
|
|
|
- statusBarHeight: 20
|
|
|
+ statusBarHeight: 20,
|
|
|
+ // 设备信息
|
|
|
+ deviceInfo: {}
|
|
|
},
|
|
|
onLaunch() {
|
|
|
// 获取App方法
|
|
|
getUserInfo.postMessage('获取用户信息')
|
|
|
getDeviceInfo.postMessage('获取设备信息')
|
|
|
+ getMWDeviceInfo.postMessage('获取音响信息')
|
|
|
// 暴露setUserInfo方法给APP
|
|
|
window['setUserInfo'] = res => {
|
|
|
this.globalData.userInfo = JSON.parse(res)
|
|
@@ -17,6 +20,9 @@ export default {
|
|
|
window['setDeviceInfo'] = res => {
|
|
|
this.globalData.statusBarHeight = JSON.parse(res).statusHeight
|
|
|
}
|
|
|
+ window['setMWDeviceInfo'] = res => {
|
|
|
+ this.globalData.deviceInfo = JSON.parse(res)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|