Files
digital-psychology/apps/user-h5/src/pages/LifeRhythmPage.vue
T
jackyu66gitandCursor e735aa43e3 refactor(ECR-001): Phase F types/sdk 对齐并拆分超标 H5 页
抽出 OpenAPI DTO;将 Ask/Report/Profile/Star 等 8 页拆到 ≤400 行,并修 ScaleSummary、fortuneKey、Scale 选答与单测。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:19:34 +08:00

101 lines
2.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<PageShell>
<template #hero>
<div class="top-row">
<BackButton />
<span class="who-static">身心节律</span>
<span class="spacer" />
</div>
</template>
<div class="body">
<RhythmIntro
v-if="needBirth && !report"
v-model:year="year"
v-model:month="month"
v-model:day="day"
:loading="loading"
:error="error"
@start="start"
/>
<p v-else-if="loading" class="yxg-hint">正在生成节律</p>
<p v-else-if="error && !report" class="yxg-err">
{{ error }}
<button type="button" class="yxg-link" @click="load">重试</button>
</p>
<RhythmResult
v-else-if="report"
v-model:tab="tab"
:headline="headline"
:one-liner="oneLiner"
:style-label="styleLabel"
:overview-text="overviewText"
:week-focus="weekFocus"
:keywords="keywords"
:solar-tip="solarTip"
:wuxing-bars="wuxingBars"
:summary="summary"
:detail="detail"
:report="report"
:paying="paying"
@buy-deep="buyDeep"
/>
<p class="yxg-disc">本内容为自我探索与生活方式参考不构成医疗建议亦非占卜预测</p>
</div>
</PageShell>
</template>
<script setup lang="ts">
import BackButton from '../components/BackButton.vue'
import PageShell from '../components/PageShell.vue'
import RhythmIntro from '../components/rhythm/RhythmIntro.vue'
import RhythmResult from '../components/rhythm/RhythmResult.vue'
import { useLifeRhythmPage } from '../composables/useLifeRhythmPage'
const {
loading,
needBirth,
error,
report,
paying,
tab,
year,
month,
day,
summary,
detail,
headline,
oneLiner,
styleLabel,
overviewText,
weekFocus,
keywords,
solarTip,
wuxingBars,
start,
load,
buyDeep,
} = useLifeRhythmPage()
</script>
<style scoped>
.top-row {
display: flex;
align-items: center;
gap: 10px;
padding-bottom: 4px;
}
.who-static {
flex: 1;
font-size: 16px;
font-weight: 700;
text-align: center;
color: var(--color-text-primary);
}
.spacer { width: 36px; }
.body { padding: 8px 16px 88px; }
</style>