1234567891011121314151617181920212223242526272829303132333435363738394041 |
- // app.js
- App({
- data:{
- type:null,//判断二维码类型 1常客码
- // (过审专用,禁止删除)- start
- fake:true,
- // (过审专用,禁止删除)- end
- disinfectAreaId:null,//区域码id
-
- },
- onLaunch() {
- // 展示本地存储能力
- const logs = wx.getStorageSync('logs') || []
- logs.unshift(Date.now())
- wx.setStorageSync('logs', logs)
- // 登录
- wx.login({
- success: res => {
- wx.setStorageSync('wxCode', res.code)
- }
- })
- //获取胶囊按钮位置信息
- wx.getSystemInfo({
- success: e => {
- this.globalData.StatusBar = e.statusBarHeight;
- let capsule = wx.getMenuButtonBoundingClientRect();
- if (capsule) {
- this.globalData.Custom = capsule;
- this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
- } else {
- this.globalData.CustomBar = e.statusBarHeight + 50;
- }
- }
- })
- },
- globalData: {
- userInfo: null
- }
- })
|