51 lines
886 B
Vue
51 lines
886 B
Vue
<template>
|
|
<view class="vh100 flex column">
|
|
<!-- tabbar -->
|
|
<view>
|
|
<tabbar menuCurrent=2></tabbar>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
avatarSrc: "", //头像地址
|
|
}
|
|
},
|
|
onShow() {
|
|
// 当页面显示时,设置 current 为首页索引
|
|
this.current = 2;
|
|
},
|
|
methods: {
|
|
handleTabChange(name) {
|
|
// 更新当前选中的 tab 索引
|
|
if (this.current === name) {
|
|
return
|
|
}
|
|
if (name === 0) {
|
|
uni.redirectTo({
|
|
url: '/pages/index/index'
|
|
});
|
|
} else if (name === 1) {
|
|
uni.navigateTo({
|
|
url: '/pages/shop/list'
|
|
});
|
|
} else if (name === 2) {
|
|
uni.redirectTo({
|
|
url: '/pages/main/index'
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.topbar {
|
|
background-color: $uni-color-error;
|
|
height: 176rpx;
|
|
}
|
|
.topTit{margin-right: 104rpx;}
|
|
</style> |