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

<style>
/*每个页面公共css */
@import url('@/common/main.scss');
@import url('@/common/button.scss');
</style>
