feat(hhrs): 新增权益包、门店详情、权益详情、我的四个H5页面

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

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
jacobxu666
2026-07-14 13:57:51 +08:00
co-authored by Claude Sonnet 5
parent b37aa6bf81
commit 073dfa5c00
7 changed files with 1432 additions and 38 deletions
+386
View File
@@ -0,0 +1,386 @@
<template>
<view class="page">
<!-- 自定义导航栏 -->
<view class="nav-bar" :style="{ paddingTop: statusBarHeight + 'px' }">
<view class="nav-header">
<view class="nav-back" @click="goBack">
<text class="back-icon">&#xe600;</text>
</view>
<text class="nav-title">权益详情</text>
</view>
</view>
<!-- 门店信息卡片 -->
<view class="store-card">
<image class="store-img" :src="store.image" mode="aspectFill" />
<view class="store-info">
<text class="store-name">{{ store.name }}</text>
<text class="store-category">{{ store.category }}</text>
<text class="store-hours">营业时间:{{ store.hours }}</text>
</view>
</view>
<!-- 地址行 -->
<view class="address-row">
<text class="address-text">{{ store.address }}</text>
<view class="distance-row">
<text class="distance-icon">&#xe609;</text>
<text class="distance-text">{{ store.distance }}km</text>
</view>
</view>
<!-- 选择预约日期 -->
<view class="date-section">
<view class="section-title">
<text class="section-icon">!</text>
<text class="section-title-text">选择预约日期</text>
</view>
<view class="date-list">
<view
v-for="(item, index) in dateList"
:key="index"
class="date-card"
:class="{ active: selectedDate === index }"
@click="selectDate(index)"
>
<text class="date-weekday">{{ item.weekday }}</text>
<text class="date-day">{{ item.day }}</text>
<text class="date-stock">{{ item.stock }}</text>
</view>
</view>
<text class="date-tip">该日期无需选择场次,直接预约即可!仅可预约近 3 日内时段</text>
</view>
<!-- 商户优惠 -->
<view class="discount-section">
<view class="section-title">
<text class="discount-tag-icon">&#xe60d;</text>
<text class="discount-title">商户优惠</text>
</view>
<view class="discount-list">
<text class="discount-item" v-for="(item, index) in store.discounts" :key="index">{{ item }}</text>
</view>
</view>
<!-- 底部预约按钮 -->
<view class="bottom-bar">
<view class="book-btn" @click="onBook">立即预约</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
statusBarHeight: 44,
selectedDate: 0,
store: {
id: 1,
name: '怀化黄岩白马风景区',
category: '景区',
hours: '08:00~12:00',
address: '怀化市鹤城区万达广场 C 区501',
distance: '1.4',
image: 'https://aliyunoss.hn12301.net/hhrs/hhrs_venue1.png',
discounts: [
'用本人 62 开头社保卡凭电子社保码,可享景区免费入园权益',
'仅限社保卡持卡人本人使用,非持卡人核销后会扣除使用次数且无法入园',
'电子社保码截图无效,需在核销时打开电子社保卡页面。电子社保卡可在云闪付-湖南社保卡,或者微信-湖南智慧人社公众号'
]
},
dateList: [
{ weekday: '明天', day: '7月14日', stock: '无限库存' },
{ weekday: '周三', day: '7月15日', stock: '无限库存' },
{ weekday: '周四', day: '7月16日', stock: '无限库存' }
]
}
},
onLoad(options) {
const sysInfo = uni.getSystemInfoSync()
this.statusBarHeight = sysInfo.statusBarHeight || 44
if (options.id) {
this.loadDetail(options.id)
}
},
methods: {
goBack() {
uni.navigateBack()
},
selectDate(index) {
this.selectedDate = index
},
onBook() {
// TODO: 调用预约接口
uni.showToast({ title: '预约成功', icon: 'success' })
},
loadDetail(id) {
// TODO: 调用接口
}
}
}
</script>
<style>
.page {
min-height: 100vh;
background-color: #f2f2f7;
padding-bottom: 80px;
}
.nav-bar {
background-color: #ffffff;
position: sticky;
top: 0;
z-index: 100;
}
.nav-header {
height: 44px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.nav-back {
position: absolute;
left: 14px;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
}
.back-icon {
font-size: 20px;
color: #1a1818;
}
.nav-title {
font-size: 16px;
font-weight: 500;
color: #1a1818;
}
/* 门店卡片 */
.store-card {
display: flex;
background-color: #ffffff;
margin: 12px;
border-radius: 8px;
padding: 12px;
gap: 12px;
}
.store-img {
width: 100px;
height: 100px;
border-radius: 6px;
flex-shrink: 0;
}
.store-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
gap: 6px;
}
.store-name {
font-size: 16px;
font-weight: 500;
color: #1a1818;
}
.store-category {
font-size: 13px;
color: #999999;
}
.store-hours {
font-size: 13px;
color: #666666;
}
/* 地址行 */
.address-row {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #ffffff;
padding: 12px 16px;
}
.address-text {
font-size: 13px;
color: #999999;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.distance-row {
display: flex;
align-items: center;
gap: 2px;
flex-shrink: 0;
margin-left: 8px;
}
.distance-icon {
font-size: 12px;
color: #999999;
}
.distance-text {
font-size: 12px;
color: #999999;
}
/* 选择预约日期 */
.date-section {
background-color: #ffffff;
margin: 12px;
border-radius: 8px;
padding: 16px;
}
.section-title {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 16px;
}
.section-icon {
width: 18px;
height: 18px;
background-color: #0088ff;
color: #ffffff;
border-radius: 50%;
text-align: center;
line-height: 18px;
font-size: 12px;
font-weight: 700;
}
.section-title-text {
font-size: 15px;
font-weight: 600;
color: #1a1818;
}
.date-list {
display: flex;
gap: 12px;
}
.date-card {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
padding: 12px 8px;
border: 1px solid #e8e8e8;
border-radius: 8px;
gap: 4px;
}
.date-card.active {
background-color: #0088ff;
border-color: #0088ff;
}
.date-weekday {
font-size: 12px;
color: #999999;
}
.date-card.active .date-weekday {
color: rgba(255,255,255,0.8);
}
.date-day {
font-size: 15px;
font-weight: 600;
color: #1a1818;
}
.date-card.active .date-day {
color: #ffffff;
}
.date-stock {
font-size: 11px;
color: #999999;
}
.date-card.active .date-stock {
color: rgba(255,255,255,0.8);
}
.date-tip {
font-size: 12px;
color: #999999;
margin-top: 12px;
display: block;
}
/* 商户优惠 */
.discount-section {
background-color: #ffffff;
margin: 12px;
border-radius: 8px;
padding: 16px;
}
.discount-tag-icon {
font-size: 16px;
color: #0088ff;
}
.discount-title {
font-size: 15px;
font-weight: 600;
color: #1a1818;
}
.discount-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.discount-item {
font-size: 13px;
color: #666666;
line-height: 1.6;
}
/* 底部预约按钮 */
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #ffffff;
padding: 12px 16px;
padding-bottom: calc(12px + env(safe-area-inset-bottom));
z-index: 100;
}
.book-btn {
background-color: #0088ff;
color: #ffffff;
text-align: center;
font-size: 16px;
font-weight: 500;
height: 44px;
line-height: 44px;
border-radius: 22px;
}
</style>