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.

45 lines
757 B

// monitor/pages/components/tabBar/tabBar.js
Component({
/**
* 组件的属性列表
*/
properties: {
url: String,
active: {
type:Number,
value:0
}
},
/**
* 组件的初始数据
*/
data: {
// active: 0
},
/**
* 组件的方法列表
*/
methods: {
onChange(e){
this.setData({ active: e.detail });
if (e.detail == '0') {//首页
wx.reLaunch({
url: '/monitor/pages/home/home',
})
}else if(e.detail == '1'){//电站
wx.reLaunch({
url: '/monitor/pages/station/station',
})
}else if(e.detail == '2'){//我的
wx.reLaunch({
url: '/monitor/pages/center/center',
})
}
}
}
})