feat: 旅游卡页面功能入口改为SVG图标 + 图标资源优化
- 旅游卡页面(qrcode/index)功能入口:我要入园/我要预约/使用记录/景区权益 - 卡片详情页(detail)新增4宫格功能入口 - SVG图标(4.3MB)转为PNG(99KB)解决主包4MB限制 - tabBar图标从1024x1024缩至81x81修复模拟器启动失败 - 统一各页面区域间距为24rpx Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,18 @@
|
||||
</view>
|
||||
<text class="card-desc">{{ card.description }}</text>
|
||||
</view>
|
||||
<!-- 功能入口 -->
|
||||
<view class="quick-grid">
|
||||
<view
|
||||
v-for="item in quickActions"
|
||||
:key="item.label"
|
||||
class="quick-item"
|
||||
@click="onQuickAction(item)"
|
||||
>
|
||||
<image class="quick-icon-img" :src="item.icon" mode="aspectFit" />
|
||||
<text class="quick-label">{{ item.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 权益说明 -->
|
||||
<view class="section" v-if="card.benefits?.length">
|
||||
<text class="section-title">权益说明</text>
|
||||
@@ -59,6 +71,17 @@ import type { CardDetail } from '../../../../api/types'
|
||||
|
||||
const card = ref<CardDetail | null>(null)
|
||||
|
||||
const quickActions = [
|
||||
{ label: '我要入园', icon: '/static/icon/check.png' },
|
||||
{ label: '我要预约', icon: '/static/icon/reserve.png' },
|
||||
{ label: '使用记录', icon: '/static/icon/record.png' },
|
||||
{ label: '景区权益', icon: '/static/icon/scenic.png' },
|
||||
]
|
||||
|
||||
function onQuickAction(item: { label: string }) {
|
||||
uni.showToast({ title: `${item.label}功能开发中`, icon: 'none' })
|
||||
}
|
||||
|
||||
/** 页面加载时获取年卡详情 */
|
||||
onLoad((options) => {
|
||||
if (options?.id) {
|
||||
@@ -84,8 +107,8 @@ function handleBuy() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page { min-height: 100vh; background: #f5f5f5; padding-bottom: 120rpx; }
|
||||
<style lang="scss" scoped>
|
||||
.page { min-height: 100vh; background: $uv-bg-color; padding-bottom: 120rpx; }
|
||||
.cover { width: 100%; height: 400rpx; background: #ddd; }
|
||||
.info-card { background: #fff; padding: 24rpx 30rpx; margin-bottom: 16rpx; }
|
||||
.card-name { font-size: 36rpx; font-weight: bold; color: #333; display: block; }
|
||||
@@ -110,4 +133,34 @@ function handleBuy() {
|
||||
.bottom-price .value { font-size: 36rpx; color: #E74C3C; font-weight: bold; }
|
||||
.btn-buy { background: #E74C3C; color: #fff; font-size: 30rpx; padding: 20rpx 60rpx; border-radius: 44rpx; border: none; }
|
||||
.loading-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; color: #999; }
|
||||
|
||||
/* Quick actions — 功能入口 */
|
||||
.quick-grid {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 0 $spacing-3 $spacing-3;
|
||||
padding: $spacing-3 0;
|
||||
background: $color-card;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: $shadow-sm;
|
||||
}
|
||||
|
||||
.quick-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
transition: transform $transition-fast;
|
||||
|
||||
&:active { transform: scale(0.92); }
|
||||
}
|
||||
|
||||
.quick-icon-img { width: 88rpx; height: 88rpx; }
|
||||
|
||||
.quick-label {
|
||||
font-size: 24rpx;
|
||||
color: $uv-main-color;
|
||||
font-weight: $font-weight-medium;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user