领取页面移动端优化,默认展开核销吗指引

This commit is contained in:
yml2213
2026-05-26 20:06:27 +08:00
parent 3b0319dfe3
commit 5377f8893d
4 changed files with 88 additions and 6 deletions
@@ -39,6 +39,7 @@ const claim = useKuaishouCloudClaim(() => props.token)
:progress-text="claim.progressText.value" :progress-text="claim.progressText.value"
:role-name="claim.roleName.value" :role-name="claim.roleName.value"
:role-id="claim.roleId.value" :role-id="claim.roleId.value"
:show-role-info="claim.currentStep.value !== 1"
/> />
<ClaimTicketStep <ClaimTicketStep
@@ -47,6 +47,7 @@ defineProps<{
.header-copy h1 { .header-copy h1 {
margin: 0; margin: 0;
color: #0f172a; color: #0f172a;
line-height: 1.3;
} }
.header-copy p { .header-copy p {
@@ -89,8 +90,53 @@ defineProps<{
@media (max-width: 720px) { @media (max-width: 720px) {
.header-card { .header-card {
max-width: 100%; max-width: 100%;
padding: 16px 18px;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
gap: 12px;
border-radius: 16px;
}
.header-copy h1 {
font-size: 28px;
line-height: 1.22;
overflow-wrap: anywhere;
}
.header-copy p {
font-size: 14px;
line-height: 1.4;
}
.eyebrow {
margin-bottom: 6px;
font-size: 12px;
}
.step-indicator {
gap: 8px;
}
.step-dot {
width: 30px;
height: 30px;
font-size: 15px;
}
}
@media (max-width: 420px) {
.header-card {
padding: 14px 16px;
}
.header-copy h1 {
font-size: 24px;
}
.step-dot {
width: 28px;
height: 28px;
font-size: 14px;
} }
} }
</style> </style>
@@ -1,22 +1,25 @@
<script setup lang="ts"> <script setup lang="ts">
defineProps<{ const props = withDefaults(defineProps<{
progressText: string progressText: string
roleName: string roleName: string
roleId: string roleId: string
}>() showRoleInfo?: boolean
}>(), {
showRoleInfo: true,
})
</script> </script>
<template> <template>
<section class="summary-card"> <section class="summary-card" :class="{ 'summary-card--progress-only': !props.showRoleInfo }">
<div class="summary-item"> <div class="summary-item">
<span>当前进度</span> <span>当前进度</span>
<strong>{{ progressText }}</strong> <strong>{{ progressText }}</strong>
</div> </div>
<div class="summary-item"> <div v-if="props.showRoleInfo" class="summary-item">
<span>当前角色</span> <span>当前角色</span>
<strong>{{ roleName || '待识别' }}</strong> <strong>{{ roleName || '待识别' }}</strong>
</div> </div>
<div class="summary-item"> <div v-if="props.showRoleInfo" class="summary-item">
<span>角色 ID</span> <span>角色 ID</span>
<strong>{{ roleId || '-' }}</strong> <strong>{{ roleId || '-' }}</strong>
</div> </div>
@@ -38,6 +41,10 @@ defineProps<{
gap: 14px; gap: 14px;
} }
.summary-card--progress-only {
grid-template-columns: 1fr;
}
.summary-item { .summary-item {
padding: 16px; padding: 16px;
border-radius: 16px; border-radius: 16px;
@@ -61,7 +68,32 @@ defineProps<{
@media (max-width: 720px) { @media (max-width: 720px) {
.summary-card { .summary-card {
max-width: 100%; max-width: 100%;
padding: 12px;
grid-template-columns: 1fr; grid-template-columns: 1fr;
gap: 8px;
border-radius: 16px;
}
.summary-item {
min-height: 44px;
padding: 10px 12px;
border-radius: 12px;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.summary-item span {
flex: 0 0 auto;
font-size: 12px;
}
.summary-item strong {
min-width: 0;
text-align: right;
font-size: 15px;
overflow-wrap: anywhere;
} }
} }
</style> </style>
@@ -1,5 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { Clock } from '@element-plus/icons-vue' import { Clock } from '@element-plus/icons-vue'
import { ref } from 'vue'
import type { ClaimKuaishouCloudFlowInfo } from '@/types/claim' import type { ClaimKuaishouCloudFlowInfo } from '@/types/claim'
@@ -15,6 +16,8 @@ defineEmits<{
'update:ticketCode': [value: string] 'update:ticketCode': [value: string]
submitTicket: [] submitTicket: []
}>() }>()
const activeGuideNames = ref(['guide'])
</script> </script>
<template> <template>
@@ -54,7 +57,7 @@ defineEmits<{
</div> </div>
<div v-if="flow.guideImages.length > 0" class="guide-section"> <div v-if="flow.guideImages.length > 0" class="guide-section">
<el-collapse> <el-collapse v-model="activeGuideNames">
<el-collapse-item title="查看核销码图文指引" name="guide"> <el-collapse-item title="查看核销码图文指引" name="guide">
<div class="guide-grid"> <div class="guide-grid">
<figure <figure