haomingming 959bfc61b1 优化
2023-03-14 14:09:21 +08:00

31 lines
756 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.

// Pages/my/my.js
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '个人中心', //导航栏 中间的标题
},
// 此页面 页面内容距最顶部的距离
height: app.globalData.height,
},
onLoad() {
console.log(this.data.height)
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
this.getTabBar().setData({
active: 1, //数字是当前页面在tabbar的索引,如我的查询页索引是2因此这边为2同理首页就为0审批页面为1
})
}
}
})