nantai-erp-wechat-mobile/app.js

34 lines
770 B
JavaScript
Raw Permalink Normal View History

2024-10-31 21:29:57 +08:00
//app.js
import AppService from './utils/appService.js'
App({
AppService: AppService,
globalData: {
isIPX: false,
pageLen: 15, // 统一单页条数
loginUserInfo: null
},
onLaunch: function (options) {
const scene = options.scene
this.getSystemInfo()
},
onShow: function (options) {
wx.hideTabBar()
},
onHide: function () {
},
onUnload: function () {
},
// 获取手机系统相关信息
getSystemInfo: function () {
const res = wx.getSystemInfoSync()
const model = res.model
this.globalData.system = res.platform
this.globalData.systemHeight = res.windowHeight
this.globalData.systemWidth = res.windowWidth
if (/iPhone X/.test(model)) {
this.globalData.isIPX = true
}
}
})