Files
shoot-miniprograms/src/components/AppFooter.vue

84 lines
1.5 KiB
Vue
Raw Normal View History

2025-04-10 11:11:46 +08:00
<script setup>
2025-05-01 16:17:51 +08:00
const tabs = [
2025-05-27 12:38:39 +08:00
{ image: "../static/tab-vip.png" },
2025-07-30 17:38:48 +08:00
{ image: "../static/tab-point-book.png" },
2025-05-27 12:38:39 +08:00
{ image: "../static/tab-mall.png" },
2025-05-01 16:17:51 +08:00
];
2025-05-27 12:38:39 +08:00
function handleTabClick(index) {
2025-06-19 01:55:40 +08:00
if (index === 0) {
uni.navigateTo({
url: "/pages/be-vip",
});
}
2025-05-27 12:38:39 +08:00
if (index === 1) {
uni.navigateTo({
2025-09-24 21:05:06 +08:00
url: "/pages/point-book",
2025-05-27 12:38:39 +08:00
});
}
2025-06-19 21:03:33 +08:00
if (index === 2) {
uni.navigateTo({
url: "/pages/device-intro",
});
}
2025-04-10 11:11:46 +08:00
}
</script>
<template>
2025-05-01 16:17:51 +08:00
<view class="footer">
<image class="footer-bg" src="../static/tab-bg.png" mode="widthFix" />
<view
v-for="(tab, index) in tabs"
2025-05-27 12:38:39 +08:00
:key="index"
2025-05-01 16:17:51 +08:00
class="tab-item"
2025-05-27 12:38:39 +08:00
@click="handleTabClick(index)"
2025-07-30 17:38:48 +08:00
:style="{
2025-11-12 20:40:00 +08:00
width: index === 1 ? '36%' : '20%',
2025-07-30 17:38:48 +08:00
}"
2025-05-01 16:17:51 +08:00
>
2025-07-30 17:38:48 +08:00
<image :src="tab.image" mode="widthFix" />
2025-05-01 16:17:51 +08:00
</view>
2025-04-10 11:11:46 +08:00
</view>
</template>
2025-05-01 16:17:51 +08:00
<style scoped>
.footer {
2025-08-20 16:04:17 +08:00
height: 117px;
2025-07-02 17:21:44 +08:00
width: 100vw;
2025-05-01 16:17:51 +08:00
position: relative;
display: flex;
justify-content: space-around;
align-items: center;
2025-07-02 17:21:44 +08:00
overflow-x: hidden;
2025-05-01 16:17:51 +08:00
}
.footer-bg {
width: 100%;
height: 100%;
2025-04-10 11:11:46 +08:00
position: absolute;
2025-05-01 16:17:51 +08:00
z-index: 0;
2025-04-10 11:11:46 +08:00
}
2025-05-01 16:17:51 +08:00
.tab-item {
z-index: 1;
2025-09-04 18:06:28 +08:00
display: flex;
justify-content: center;
2025-04-10 11:11:46 +08:00
}
2025-07-30 17:38:48 +08:00
.tab-item > image {
2025-11-12 20:40:00 +08:00
width: 65rpx;
}
.tab-item:last-child > image {
width: 85rpx;
2025-07-30 17:38:48 +08:00
}
2025-07-15 18:36:57 +08:00
.tab-item:nth-child(2) {
2025-11-12 20:40:00 +08:00
transform: translate(10%, 40%);
2025-07-30 17:38:48 +08:00
}
.tab-item:nth-child(3) {
2025-09-04 18:06:28 +08:00
margin-bottom: 25rpx;
}
.tab-item:nth-child(3) > image {
width: 140rpx;
2025-07-15 18:36:57 +08:00
}
.tab-item:nth-child(4) {
2025-11-12 20:40:00 +08:00
transform: translate(-10%, 44%);
2025-07-15 18:36:57 +08:00
}
2025-04-10 11:11:46 +08:00
</style>