You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.5 KiB
53 lines
1.5 KiB
// app.js
|
|
App({
|
|
globalData: {
|
|
id: 0
|
|
},
|
|
onLaunch() {
|
|
// 展示本地存储能力
|
|
/* const logs = wx.getStorageSync('logs') || []
|
|
logs.unshift(Date.now())
|
|
wx.setStorageSync('logs', logs) */
|
|
this.globalData.userInfo = wx.getStorageSync('userInfo') || ''
|
|
|
|
wx.getSystemInfo({
|
|
success: res => {
|
|
this.globalData.brand = res.model
|
|
},
|
|
})
|
|
|
|
|
|
let menuButtonObject = wx.getMenuButtonBoundingClientRect();
|
|
wx.getSystemInfo({
|
|
success: res => {
|
|
|
|
//导航高度
|
|
let statusBarHeight = res.statusBarHeight,
|
|
navTop = menuButtonObject.top,
|
|
navHeight = statusBarHeight + menuButtonObject.height + (menuButtonObject.top - statusBarHeight)*2;
|
|
this.globalData.navHeight = navHeight;
|
|
this.globalData.navTop = navTop;
|
|
this.globalData.windowHeight = res.windowHeight;
|
|
},
|
|
fail(err) {
|
|
console.log(err);
|
|
}
|
|
})
|
|
},
|
|
globalData: {
|
|
baseurl: 'https://api.junfei.iiixo.com/api/Content/',
|
|
userInfo: '',
|
|
version: '1.0', // 版本号 常量
|
|
loginClient: 3, // 客户端类型 0:web 1:安卓 2:iOS 3:小程序
|
|
brand: null, // 设备型号
|
|
themeVars: {
|
|
rateIconFullColor: '#07c160',
|
|
sliderBarHeight: '4px',
|
|
sliderButtonWidth: '20px',
|
|
sliderButtonHeight: '20px',
|
|
sliderActiveBackgroundColor: '#07c160',
|
|
buttonPrimaryBorderColor: '#07c160',
|
|
buttonPrimaryBackgroundColor: '#07c160',
|
|
},
|
|
}
|
|
})
|
|
|