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.
60 lines
1.5 KiB
60 lines
1.5 KiB
// index.js
|
|
const app = getApp();
|
|
Page({
|
|
data: {
|
|
value: "",
|
|
tabActive: 0,
|
|
active: 1,
|
|
height:app.globalData.navBarHeight + app.globalData.statusBarHeight,
|
|
statusBarHeight:app.globalData.statusBarHeight,
|
|
navBarHeight:app.globalData.navBarHeight,
|
|
navData: [
|
|
{
|
|
img: "./cars/audi.jpg",
|
|
title: "奥迪"
|
|
},
|
|
{
|
|
img: "./cars/audi.jpg",
|
|
title: "奥迪"
|
|
},
|
|
{
|
|
img: "./cars/audi.jpg",
|
|
title: "奥迪"
|
|
},
|
|
{
|
|
img: "./cars/audi.jpg",
|
|
title: "奥迪"
|
|
},
|
|
{
|
|
img: "./cars/audi.jpg",
|
|
title: "奥迪"
|
|
},
|
|
{
|
|
img: "./cars/audi.jpg",
|
|
title: "奥迪"
|
|
},
|
|
{
|
|
img: "./cars/audi.jpg",
|
|
title: "奥迪"
|
|
}
|
|
]
|
|
},
|
|
onLaunch() {
|
|
wx.getSystemInfo({
|
|
success: (res) => {
|
|
const ratio = 750 / res.windowWidth
|
|
const menuInfo = wx.getMenuButtonBoundingClientRect();
|
|
this.setData({
|
|
top: menuInfo.top * ratio ,
|
|
left: menuInfo.left * ratio ,
|
|
height: menuInfo.height * ratio ,
|
|
})
|
|
}
|
|
})
|
|
},
|
|
onShow() {
|
|
this.getTabBar().init();
|
|
},
|
|
|
|
});
|