app.js 759 B

12345678910111213141516171819202122232425262728293031
  1. // app.js
  2. import { app } from "./config/index";
  3. App({
  4. onLaunch() {
  5. let info = wx.getSystemInfoSync()
  6. this.globalData.deviceInfo = info
  7. this.globalData.top = wx.getMenuButtonBoundingClientRect()
  8. wx.loadFontFace({
  9. family: 'cexwz', // 自定义名称
  10. source: 'url("https://houseoss.4dkankan.com/project/4dage-sxb/ZHS2409020-1/cexwz.TTF")', // 必须是 https 地址
  11. global: true,
  12. scopes: ['webview', 'native'],
  13. success: (res) => {
  14. console.log('字体加载成功', res)
  15. },
  16. fail: (err) => {
  17. console.error('字体加载失败', err)
  18. }
  19. })
  20. },
  21. globalData: {
  22. userInfo: null,
  23. m_file: null,
  24. scenes:[]
  25. },
  26. onHide(){
  27. app.websocket && app.send('close')
  28. }
  29. })