zycp-ddxcx/components/tabBar/tabBar.js

41 lines
724 B
JavaScript

Component({
mixins: [],
data: {
currentTab: 1
},
props: {
currentTab: String
},
didMount() {
this.setData({
currentTab: this.props.currentTab
})
},
didUpdate() {},
didUnmount() {},
methods: {
toConsultant(){
dd.reLaunch({
url: '/pages/consultant/list/list'
})
},
toSupervisor(){
dd.reLaunch({
url: '/pages/supervisor/index/index'
})
},
toExaminee(){
if(dd.$toolAll.getCache('roleType')){
// 前往咨询师资料页
dd.reLaunch({
url: '/pages/consultant/user/user'
})
} else {
dd.reLaunch({
url: '/pages/examinee/user/user'
})
}
}
},
});