Files
digital-psychology/apps/user-h5/src/pages/RelationPage.vue
T
jackyu66gitandCursor 89756f65b4 feat(ECR-012–016): 合规、题库、时辰刷新、头像、MBTI OEJTS 与埋点
落地输入合规、探索题库、报告日/时辰刷新、账号头像、OEJTS 量表,并补齐 H5 埋点与 Admin 漏斗;同步 ESS 工件、切至自建 Git、清理 GitHub Actions。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-13 01:27:58 +08:00

130 lines
2.8 KiB
Vue

<template>
<PageShell>
<template #hero>
<div class="head">
<HomeToolIcon name="relation" :size="48" />
<div class="head-text">
<h1 class="title">人格匹配</h1>
<p class="sub">双人风格对照 · 相处说明书</p>
</div>
<button v-if="report" type="button" class="share-ico" aria-label="分享" @click="shareOpen = true"></button>
</div>
</template>
<div class="body">
<RelationLanding
v-if="!report"
v-model:focus="focus"
v-model:relation-type="relationType"
v-model:other-name="otherName"
v-model:oy="oy"
v-model:om="om"
v-model:od="od"
:focus-hint="focusHint"
:loading="loading"
:error="error"
:need-self="needSelf"
@run="run"
/>
<RelationResult
v-else
v-model:tab="tab"
:diff="diff"
:me-style="meStyle"
:other-style="otherStyle"
:fit-label="fitLabel"
:harmony="harmony"
:love-index="loveIndex"
:friend-index="friendIndex"
:marriage-index="marriageIndex"
:star-compare="starCompare"
:dim-compare="dimCompare"
:summary="summary"
:detail="detail"
:report="report"
:paying="paying"
@buy-deep="buyDeep"
@share="shareOpen = true"
/>
</div>
<ShareSheet :open="shareOpen" :payload="sharePayload" @close="shareOpen = false" />
</PageShell>
</template>
<script setup lang="ts">
import PageShell from '../components/PageShell.vue'
import HomeToolIcon from '../components/HomeToolIcon.vue'
import RelationLanding from '../components/relation/RelationLanding.vue'
import RelationResult from '../components/relation/RelationResult.vue'
import ShareSheet from '../components/ShareSheet.vue'
import { useRelationPage } from '../composables/useRelationPage'
const {
otherName,
relationType,
oy,
om,
od,
loading,
paying,
error,
report,
shareOpen,
needSelf,
focus,
tab,
focusHint,
summary,
detail,
meStyle,
otherStyle,
diff,
fitLabel,
harmony,
loveIndex,
friendIndex,
marriageIndex,
starCompare,
dimCompare,
sharePayload,
run,
buyDeep,
} = useRelationPage()
</script>
<style scoped>
.head {
display: flex;
align-items: center;
gap: 12px;
margin-top: 8px;
padding-bottom: 8px;
}
.head-text {
flex: 1;
min-width: 0;
}
.title {
font-family: var(--font-display);
font-size: 22px;
font-weight: 700;
letter-spacing: 0.06em;
}
.sub {
font-size: 12px;
color: rgba(0, 0, 0, 0.38);
margin-top: 2px;
}
.share-ico {
width: 36px;
height: 36px;
border: none;
border-radius: 12px;
background: rgba(255, 255, 255, 0.8);
font-size: 16px;
flex-shrink: 0;
}
.body { padding: 8px 16px 88px; }
</style>