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