ypzycp/components/tabBar/tabBar.js

71 lines
1.6 KiB
JavaScript
Raw Normal View History

2022-01-17 18:27:44 +08:00
Component({
mixins: [],
2022-01-18 14:47:20 +08:00
data: {
},
2022-01-17 18:27:44 +08:00
props: {},
didMount() {},
didUpdate() {},
didUnmount() {},
methods: {},
});
Page({
data: {
currentTab: 0,
items: [
{
// "iconPath": "/image/icon_component.png",
// "selectedIconPath": "/image/icon_component.png",
"text": "专家列表"
},
2022-01-21 18:30:06 +08:00
// {
// // "iconPath": "/image/yingyong.png",
// // "selectedIconPath": "/image/yingyong.png",
// "text": "免费咨询"
// },
2022-01-17 18:27:44 +08:00
{
// "iconPath": "/image/icon_biz.png",
// "selectedIconPath": "/image/icon_biz.png",
"text": "咨询监理"
},
{
// "iconPath": "/image/icon_biz.png",
// "selectedIconPath": "/image/icon_biz.png",
2022-01-24 17:53:50 +08:00
"text": "个人中心"
2022-01-17 18:27:44 +08:00
}
2022-01-18 14:47:20 +08:00
],
2022-01-17 18:27:44 +08:00
},
onLoad() {
dd.setNavigationBar({
title: '阿里云・有谱志愿咨询(公益)',
backgroundColor: '#FFFFFF',
});
},
swichNav: function (e) {
let that = this;
if (this.data.currentTab === e.target.dataset.current) {
return false;
} else {
that.setData({
currentTab: e.target.dataset.current
});
}
if (this.data.currentTab === 0){
dd.setNavigationBar({
title: '阿里云・有谱志愿咨询(公益)',
backgroundColor: '#FFFFFF',
});
}
2022-01-21 18:30:06 +08:00
else if(this.data.currentTab === 1){
2022-01-17 18:27:44 +08:00
dd.setNavigationBar({
title: '咨询监理',
backgroundColor: '#FFFFFF',
});
2022-01-21 18:30:06 +08:00
}else if(this.data.currentTab === 2){
2022-01-17 18:27:44 +08:00
dd.setNavigationBar({
title: '考生信息',
backgroundColor: '#FFFFFF',
});
}
}
})