Files
hhrs/components/hhrs-tabbar/hhrs-tabbar.vue
T
jacobxu666andClaude Fable 5 6747501963 feat:首页按设计稿改版 + 新增「查询我的中奖结果」半屏弹层
- 首页重构:KV 头图/金刚区/可领权益包/折扣商户分类宫格,暖米底色与切图规范统一
- 查询弹层 hhrs-winner-sheet:登录→资格→证件两段式查询,六态文案与 CTA;未中奖引导看权益包明细(参加指南内容待运营)
- 底部导航改自定义组件单条呈现,移除 pages.json 原生 tabBar(H5 下双导航叠加问题);我的页换肤对齐首页主色
- 修复内容不足一屏时露 html 白底(html 兜底色 + 我的页撑满屏高);App.vue 修复微信 WebView 导航栏高度误报
- 删除原生 tabBar 遗留的 4 张旧图标,新增 12 张 hhrs2_ 切图

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-10-23 11:04:52 +08:00

57 lines
1.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<!-- xuchao: 首页改版自定义底部导航 —— tab 切图含图标+文字(原生 tabBar 会再叠一层文字),
仅在 活动首页/我的 两页复用,reLaunch 模拟 tab 切换语义 -->
<view class="tabbar">
<view class="tab" @click="go('home')">
<image class="tab-ico" :src="current === 'home' ? '/static/hhrs2_tab_home_on.png' : '/static/hhrs2_tab_home_off.png'" mode="aspectFit"></image>
</view>
<view class="tab" @click="go('mine')">
<image class="tab-ico" :src="current === 'mine' ? '/static/hhrs2_tab_mine_on.png' : '/static/hhrs2_tab_mine_off.png'" mode="aspectFit"></image>
</view>
</view>
</template>
<script>
export default {
name: 'HhrsTabbar',
props: {
// xuchao: 当前高亮 tab,home | mine
current: { type: String, default: 'home' }
},
methods: {
go(tab) {
if (tab === this.current) return
const url = tab === 'home' ? '/pages/index/index' : '/pages/mine/mine'
uni.reLaunch({ url })
}
}
}
</script>
<style>
/* xuchao: 条高 128、图标 80 —— 上下各留 24rpx 等距边(tab 切图内容本身贴画布边缘,
必须靠容器留白撑出呼吸空间);iPhone 底部安全区由 padding-bottom 追加,不影响内容区等距 */
.tabbar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 99;
height: 128rpx;
background: #FFFFFF;
border-top: 1px solid #F3E5D8;
display: flex;
padding-bottom: env(safe-area-inset-bottom);
}
.tab {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
}
.tab-ico {
width: 80rpx;
height: 80rpx;
}
</style>