selectediconpath什么意思
export default {
props: {
selected: { // 当前选中的tab index
type: Number,
default: 0
},
userIdentity: { // 当前⾓⾊
type: Number,
default: 0
}
},
data() {
return {
color: "#333333",
selectedColor: "#333333",
list: [{
pagePath: "/pages/patientHome/patientHome",                    iconPath: "/static/images/home.png",
selectedIconPath: "/static/images/home_s.png",                    text: "⾸页"
}, {
pagePath: "/pages/mine/mine",
iconPath: "/static/images/mine.png",
selectedIconPath: "/static/images/mine_s.png",                    text: "我的"
}]
}
},
methods: {
switchTab(item, index) {
console.log("item", item)
console.log("index", index)
let url = item.pagePath;
// 对应患者和医⽣的⾸页
if (index == 0) {
switch (this.userIdentity) {
/
/ 患者
case 0:
url = "/pages/patientHome/patientHome"                            break
// 医⽣
case 1:
url = "/pages/doctorHome/doctorHome"
break
}
}
// 对应患者和医⽣的我的页⾯
if (index == 1) {
switch (this.userIdentity) {
// 患者
case 0:
url = "/pages/mine/mine"
break
// 医⽣
case 1:
url = "/pages/doctorMine/doctorMine"
break
}
}
uni.switchTab({
url
})
}
}
}
</script>
<style lang="scss">
.tab-bar {

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。