ts_aimz/pages/index/index.js
itgaojian163 7c7d85373d 页面
2025-03-21 18:05:54 +08:00

27 lines
970 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// index.js
const app = getApp()
const systemInfo = wx.getWindowInfo();
const statusBarHeight = systemInfo.statusBarHeight; // 状态栏高度
const navBarHeight = 44; // 导航栏高度iOS 为 44pxAndroid 为 48px
const windowHeight = systemInfo.windowHeight - navBarHeight - statusBarHeight; //可用内容高度
Page({
data: {
statusBarHeight: statusBarHeight,
navBarHeight: navBarHeight,
totalHeight: navBarHeight, // 导航栏总高度
contentHeight: windowHeight,
tabList: ["写材料", "全托管", "安装包", "演示视频", "加急", "提交版权中心", "已经下证"],
currentTab: "写材料"
},
onLoad(e) {
const info = wx.getWindowInfo()
const h = info.windowHeight - navBarHeight - statusBarHeight
console.log(h)
},
printInfo() {},
createCopy() {
wx.navigateTo({
url: '/pages/copyright/createBuy/createBuy',
})
}
})