// app.js
import { app } from "./config/index";

App({
  onLaunch() {
    let info = wx.getSystemInfoSync()
    this.globalData.deviceInfo = info
    this.globalData.top = wx.getMenuButtonBoundingClientRect()
    wx.loadFontFace({
      family: 'cexwz',  // 自定义名称
      source: 'url("https://houseoss.4dkankan.com/project/4dage-sxb/ZHS2409020-1/cexwz.TTF")',  // 必须是 https 地址
      global: true,
      scopes: ['webview', 'native'],
      success: (res) => {
        console.log('字体加载成功', res)
      },
      fail: (err) => {
        console.error('字体加载失败', err)
      }
    })
  },
  globalData: {
    userInfo: null,
    m_file: null,
    scenes:[]
  },

  onHide(){
    app.websocket && app.send('close')
  }
})
