代码拉取完成,页面将自动刷新
同步操作将从 susuhhhhhh/susu-mini-tem 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
// app.js
App({
onLaunch() {
// 展示本地存储能力
wx.getSystemInfo({
success: res => {
let Height = res.windowHeight;
this.globalData.Height = Height;
},
})
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
// 自定义头部
let menuButtonObject = wx.getMenuButtonBoundingClientRect();
wx.getSystemInfo({
success: res => {
//导航高度
let statusBarHeight = res.statusBarHeight,
navTop = menuButtonObject.top,
navObjWid = res.windowWidth - menuButtonObject.right + menuButtonObject.width, // 胶囊按钮与右侧的距离 = windowWidth - right+胶囊宽度
navHeight = statusBarHeight + menuButtonObject.height + (menuButtonObject.top - statusBarHeight) * 2;
this.globalData.navHeight = navHeight; //导航栏总体高度
this.globalData.navTop = navTop; //胶囊距离顶部距离
this.globalData.navObj = menuButtonObject.height; //胶囊高度
this.globalData.navObjWid = navObjWid; //胶囊宽度(包括右边距离)
this.globalData.windowHeight = res.windowHeight;
this.globalData.windowWidth = res.windowWidth;
// console.log(navHeight,navTop,menuButtonObject.height,navObjWid)
},
fail(err) {
console.log(err);
}
})
},
globalData: {
userInfo: null
}
})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。