hulai-website/components/guides/GuideClothingCard.vue
Mimingguang ee078b61bc feat: 后台管理系统完整重构 + 前后台数据联通
- 后台全面引入 Naive UI 组件库,统一 UI 规范
- 前台 usePublicApi 切换到 API 调用(GET /api/content/[key])
- 前后台数据源统一(site_content 表)
- 产品线统一管理(tour/camp/course 三套编辑器)
- 产品数据归一化(itinerary/faq/pricing 格式统一)
- 表单提交 API 改写入 submissions 表
- 新增 submissions 标记已读 API
- site-content PUT 支持 upsert
- 修复前台 bug(stories 路由冲突、占位符警告、selector breadcrumb)
- 消除 PageHero 类型警告(useSEO reactive 修复)
- 25 个前台页面全部 HTTP 200,展示效果不变

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:48:02 +08:00

108 行
2.4 KiB
Vue

<template>
<div class="clothing-card" :class="{ 'clothing-card--highlight': month.highlight }">
<div class="clothing-header">
<h4 class="clothing-month">{{ month.name }}</h4>
<span v-if="month.highlight" class="clothing-tag">大多数家庭选这个月</span>
</div>
<p class="clothing-desc">{{ month.desc }}</p>
<div class="clothing-temps">
<span class="temp-badge"><strong>白天</strong> {{ month.tempDay }}</span>
<span class="temp-badge"><strong>夜间</strong> {{ month.tempNight }}</span>
</div>
<div class="clothing-wear">
<p class="wear-line"><span class="wear-label">大人</span>{{ month.adultWear }}</p>
<p class="wear-line"><span class="wear-label">小朋友</span>{{ month.kidsWear }}</p>
</div>
<p v-if="month.note" class="clothing-note">{{ month.note }}</p>
</div>
</template>
<script setup>
defineProps({
month: { type: Object, required: true },
})
</script>
<style lang="less" scoped>
.clothing-card {
background: @color-bg-white;
border: 1px solid @color-border;
border-radius: @border-radius-md;
padding: @space-lg;
&--highlight {
border-color: @color-primary-lighter;
box-shadow: 0 2px 12px rgba(45, 106, 79, 0.08);
}
}
.clothing-header {
display: flex;
align-items: center;
gap: @space-sm;
margin-bottom: @space-xs;
}
.clothing-month {
font-size: @font-size-base;
font-weight: @font-weight-bold;
color: @color-primary;
margin: 0;
}
.clothing-tag {
font-size: @font-size-xs;
color: @color-accent;
font-weight: @font-weight-medium;
}
.clothing-desc {
font-size: @font-size-sm;
color: @color-text-muted;
margin-bottom: @space-sm;
}
.clothing-temps {
display: flex;
gap: @space-lg;
margin-bottom: @space-md;
font-size: @font-size-sm;
color: @color-text-secondary;
strong {
color: @color-primary;
}
}
.clothing-wear {
display: flex;
flex-direction: column;
gap: @space-xs;
}
.wear-line {
font-size: @font-size-sm;
color: @color-text-secondary;
line-height: @line-height-base;
margin: 0;
}
.wear-label {
display: inline-block;
font-weight: @font-weight-medium;
color: @color-primary;
margin-right: @space-sm;
min-width: 48px;
}
.clothing-note {
margin-top: @space-md;
padding: @space-sm @space-md;
background: @color-bg-warm;
border-radius: @border-radius-sm;
font-size: @font-size-sm;
color: @color-accent;
line-height: @line-height-base;
}
</style>