Component({ mixins: [], data: {}, props: {}, didMount() {}, didUpdate() {}, didUnmount() {}, methods: {}, }); Page({ data: { currentTab: 0, items: [ { // "iconPath": "/image/icon_component.png", // "selectedIconPath": "/image/icon_component.png", "text": "个人信息" }, { // "iconPath": "/image/yingyong.png", // "selectedIconPath": "/image/yingyong.png", "text": "公益问答", "news": "6" }, { // "iconPath": "/image/icon_biz.png", // "selectedIconPath": "/image/icon_biz.png", "text": "收费咨询" }, { // "iconPath": "/image/icon_biz.png", // "selectedIconPath": "/image/icon_biz.png", "text": "账号密码" } ] }, 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', }); }else if(this.data.currentTab === 1){ dd.setNavigationBar({ title: '公益问答', backgroundColor: '#FFFFFF', }); } else if(this.data.currentTab === 2){ dd.setNavigationBar({ title: '收费咨询监理', backgroundColor: '#FFFFFF', }); }else if(this.data.currentTab === 3){ dd.setNavigationBar({ title: '登录密码', backgroundColor: '#FFFFFF', }); } } })