Files
hhrs/pages/mine/mine.vue
T
jacobxu666andClaude Sonnet 5 073dfa5c00 feat(hhrs): 新增权益包、门店详情、权益详情、我的四个H5页面
- 权益包页面支持3种状态切换:认证表单、未中奖空状态、权益信息(统计卡片+Tab+列表)
- 门店详情页展示场馆信息、营业时间、商户优惠说明
- 权益详情页含日期选择卡片和底部预约按钮
- 我的页面含用户信息、菜单列表和底部TabBar
- 新增权益相关API接口定义(getRightsInfo/getRightsDetail/doRightsAuth/doRightsBook)
- 商户折扣列表跳转统一至门店详情页

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 13:57:51 +08:00

194 lines
3.5 KiB
Vue

<template>
<view class="page">
<!-- 自定义导航栏 -->
<view class="nav-bar" :style="{ paddingTop: statusBarHeight + 'px' }">
<view class="nav-header">
<text class="nav-title">我的</text>
</view>
</view>
<!-- 用户信息 -->
<view class="user-section">
<view class="user-info">
<image class="user-avatar" src="https://aliyunoss.hn12301.net/hhrs/hhrs_avatar.png" mode="aspectFill" />
<view class="user-detail">
<text class="user-name">王东林</text>
<text class="user-phone">186****9010</text>
</view>
</view>
<view class="logout-btn" @click="onLogout">退出登录</view>
</view>
<!-- 菜单列表 -->
<view class="menu-list">
<view class="menu-item" @click="goWinners">
<text class="menu-icon icon-ticket">&#xe60a;</text>
<text class="menu-label">用户中奖查询</text>
<text class="menu-arrow">&#xe602;</text>
</view>
<view class="menu-item" @click="goGuide">
<text class="menu-icon icon-book">&#xe60b;</text>
<text class="menu-label">使用指南</text>
<text class="menu-arrow">&#xe602;</text>
</view>
<view class="menu-item" @click="goService">
<text class="menu-icon icon-headset">&#xe60c;</text>
<text class="menu-label">联系客服</text>
<text class="menu-arrow">&#xe602;</text>
</view>
</view>
<!-- 底部 TabBar -->
<tab-bar :current="1" />
</view>
</template>
<script>
import tabBar from '@/components/TabBar/TabBar.vue'
export default {
components: { tabBar },
data() {
return {
statusBarHeight: 44
}
},
onLoad() {
const sysInfo = uni.getSystemInfoSync()
this.statusBarHeight = sysInfo.statusBarHeight || 44
},
methods: {
onLogout() {
uni.showModal({
title: '提示',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
uni.removeStorageSync('token')
uni.showToast({ title: '已退出登录', icon: 'success' })
}
}
})
},
goWinners() {
uni.navigateTo({ url: '/pages/winners/winners' })
},
goGuide() {
uni.navigateTo({ url: '/pages/guide/use' })
},
goService() {
// TODO: 联系客服
}
}
}
</script>
<style>
.page {
min-height: 100vh;
background-color: #f2f2f7;
}
.nav-bar {
background-color: #ffffff;
position: sticky;
top: 0;
z-index: 100;
}
.nav-header {
height: 44px;
display: flex;
align-items: center;
justify-content: center;
}
.nav-title {
font-size: 16px;
font-weight: 500;
color: #1a1818;
}
/* 用户信息 */
.user-section {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ffffff;
padding: 20px 16px;
}
.user-info {
display: flex;
align-items: center;
gap: 12px;
}
.user-avatar {
width: 48px;
height: 48px;
border-radius: 50%;
}
.user-detail {
display: flex;
flex-direction: column;
gap: 4px;
}
.user-name {
font-size: 16px;
font-weight: 500;
color: #1a1818;
}
.user-phone {
font-size: 14px;
color: #666666;
}
.logout-btn {
background-color: #e8e8e8;
color: #666666;
font-size: 13px;
padding: 6px 16px;
border-radius: 4px;
}
/* 菜单列表 */
.menu-list {
margin-top: 12px;
background-color: #ffffff;
}
.menu-item {
display: flex;
align-items: center;
padding: 16px;
border-bottom: 1px solid #f5f5f5;
}
.menu-item:last-child {
border-bottom: none;
}
.menu-icon {
font-size: 18px;
color: #0088ff;
width: 24px;
text-align: center;
}
.menu-label {
flex: 1;
font-size: 15px;
color: #333333;
margin-left: 12px;
}
.menu-arrow {
font-size: 14px;
color: #cccccc;
}
</style>