抽出 OpenAPI DTO;将 Ask/Report/Profile/Star 等 8 页拆到 ≤400 行,并修 ScaleSummary、fortuneKey、Scale 选答与单测。 Co-authored-by: Cursor <cursoragent@cursor.com>
101 lines
2.2 KiB
Vue
101 lines
2.2 KiB
Vue
<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>
|