refactor(ECR-001): 接入 ESS 并完成结构对齐 Phase A–E

绑定 ESS 双轨治理,拆分超大 H5 页与 Go 引擎,抽出 membership 服务,
并将 star/fortune 重命名为 outlook(JSON 双写兼容);同时修复 /psy API 代理与首页 + 菜单层级。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-05 17:51:40 +08:00
co-authored by Cursor
parent 583133dd09
commit 19d3cd5945
75 changed files with 4199 additions and 2505 deletions
+17
View File
@@ -0,0 +1,17 @@
import { describe, expect, it } from 'vitest'
import { homeFeeds, homeGridRow1, homeGridRow2 } from '../lib/homeCatalog'
describe('homeCatalog', () => {
it('keeps 12-grid rows', () => {
expect(homeGridRow1).toHaveLength(6)
expect(homeGridRow2).toHaveLength(6)
})
it('keeps feed entries with routes', () => {
expect(homeFeeds.length).toBeGreaterThanOrEqual(4)
for (const f of homeFeeds) {
expect(f.to.startsWith('/')).toBe(true)
expect(f.title.length).toBeGreaterThan(0)
}
})
})
+94
View File
@@ -0,0 +1,94 @@
import type { HomeToolIconName } from '../components/HomeToolIcon.vue'
export type HomeTool = {
to: string
icon: HomeToolIconName
label: string
badge?: string
badgeTone?: 'hot' | 'new'
}
export type HomeFeed = {
to: string
icon: HomeToolIconName
title: string
meta: string
stat: string
tone: string
tag?: string
}
/** 对标测测 12 宫格 · 软立体图标 */
export const homeGridRow1: HomeTool[] = [
{ to: '/scales/mbti-lite', icon: 'mbti', label: '人格测试' },
{ to: '/star', icon: 'star', label: '星座' },
{ to: '/portrait', icon: 'portrait', label: '愈心解码', badge: '热', badgeTone: 'hot' },
{ to: '/rhythm', icon: 'rhythm', label: '身心节律' },
{ to: '/synastry', icon: 'synastry', label: '合盘', badge: '新', badgeTone: 'new' },
{ to: '/star', icon: 'astro', label: '星象性格' },
]
export const homeGridRow2: HomeTool[] = [
{ to: '/companion', icon: 'companion', label: '节气陪伴' },
{ to: '/ask', icon: 'ask', label: 'AI问答' },
{ to: '/cards', icon: 'cards', label: '意象卡片' },
{ to: '/reports', icon: 'reports', label: '成长报告', badge: '新', badgeTone: 'new' },
{ to: '/growth-plan', icon: 'growth', label: '成长计划' },
{ to: '/relation', icon: 'relation', label: '人格匹配' },
]
export const homeFeeds: HomeFeed[] = [
{
to: '/portrait',
icon: 'portrait',
title: '愈心解码',
meta: '一个生日,读懂性格与身心节奏',
stat: '核心入口',
tone: 'fc-e',
tag: '热',
},
{
to: '/ask',
icon: 'ask',
title: 'AI 成长助手',
meta: '结合档案聊聊卡住的事',
stat: '随时可问',
tone: 'fc-a',
tag: 'AI',
},
{
to: '/star',
icon: 'star',
title: '星座排盘',
meta: '本命盘 · 相位 · 日周月运势',
stat: '本周热门',
tone: 'fc-b',
tag: '新',
},
{
to: '/synastry',
icon: 'synastry',
title: '合盘',
meta: '恋爱 / 友情 / 婚姻指数',
stat: '了解彼此',
tone: 'fc-c',
},
{
to: '/scales/mbti-lite',
icon: 'mbti',
title: '人格测试',
meta: '16 型人格,看见自己的相处模式',
stat: '热门测评',
tone: 'fc-a',
},
{
to: '/membership',
icon: 'growth',
title: '成长会员',
meta: '深度报告与全年节气陪伴',
stat: '解锁更多',
tone: 'fc-e',
},
]
export const homeSearchHints = ['探索今日心情', '愈心解码', '合盘了解彼此', 'AI 成长助手']