74 lines
1.8 KiB
Vue
74 lines
1.8 KiB
Vue
<template>
|
|
<view class="bottom-nav">
|
|
<view class="nav-item" @click="navigateTo('index')">
|
|
<image src="/static/imgs/footer/home.png" mode="aspectFit"></image>
|
|
<text>首页</text>
|
|
</view>
|
|
<view class="nav-item" @click="navigateTo('service')">
|
|
<image src="/static/imgs/footer/service.png" mode="aspectFit" style="width: 60rpx;height: 60rpx;"></image>
|
|
<text>服务中心</text>
|
|
</view>
|
|
<view class="nav-item" @click="navigateTo('chat')">
|
|
<image src="/static/imgs/footer/ai.png" mode="aspectFit" ></image>
|
|
<text>AI助手</text>
|
|
</view>
|
|
<view class="nav-item" @click="navigateTo('neighbor')">
|
|
<image src="/static/imgs/footer/chat.png" mode="aspectFit"></image>
|
|
<text>邻里圈</text>
|
|
</view>
|
|
<view class="nav-item" @click="navigateTo('mine')">
|
|
<image src="/static/imgs/footer/mine.png" mode="aspectFit"></image>
|
|
<text>我的</text>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
methods: {
|
|
navigateTo(page) {
|
|
uni.redirectTo({
|
|
url: `/pages/${page}/index`,
|
|
success: () => {},
|
|
fail: () => {},
|
|
complete: () => {}
|
|
});
|
|
console.log(page)
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.bottom-nav {
|
|
display: flex;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
background-color: #f8f8f8;
|
|
position: fixed;
|
|
// padding-bottom: calc(0rpx + env(safe-area-inset-bottom));
|
|
bottom: 0;
|
|
padding-bottom:40rpx;
|
|
left: 0;
|
|
right: 0;
|
|
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
|
|
z-index: 999;
|
|
|
|
.nav-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex: 1;
|
|
text-align: center;
|
|
color: #4F4F4F;
|
|
font-size: 24rpx;
|
|
|
|
image {
|
|
width: 46rpx;
|
|
height: 46rpx;
|
|
margin: 12rpx 0 6rpx 0;
|
|
}
|
|
}
|
|
}
|
|
</style> |