52 lines
906 B
JavaScript
52 lines
906 B
JavaScript
let _this ;
|
|
import tabbarList from '@/common/js/tabbarList.js'
|
|
export default {
|
|
data() {
|
|
return {
|
|
tabbarList:tabbarList.list,
|
|
bottom:100,
|
|
}
|
|
},
|
|
onLoad(opt) {
|
|
const query = uni.createSelectorQuery().in(this);
|
|
setTimeout(() => {
|
|
query
|
|
.select(".tabbar-box")
|
|
.boundingClientRect((data) => {
|
|
this.bottom = data.height * 2;
|
|
})
|
|
.exec();
|
|
}, 0)
|
|
},
|
|
onReady() {
|
|
|
|
},
|
|
methods: {
|
|
tabbarChange(e){
|
|
// console.log("当前点击tabbar",this.tabbarList[e])
|
|
if(e!==this.tabbarIndex){
|
|
if(e === 2){
|
|
uni.navigateTo({
|
|
url:this.tabbarList[e].pagePath
|
|
})
|
|
}
|
|
// else if(e === 3){
|
|
// uni.navigateTo({
|
|
// url:this.tabbarList[e].pagePath
|
|
// })
|
|
// // this.$u.toast('功能未完成')
|
|
// }
|
|
else{
|
|
uni.redirectTo({
|
|
url:this.tabbarList[e].pagePath
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
},
|
|
computed: {},
|
|
components: {}
|
|
}
|