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

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