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
@@ -0,0 +1,48 @@
import { computed, ref } from 'vue'
import { useRouter } from 'vue-router'
import { AnalyticsEvent, track } from '../lib/analytics'
import { homeFeeds, homeGridRow1, homeGridRow2, homeSearchHints } from '../lib/homeCatalog'
import { useHomeMood } from './useHomeMood'
export function useHomePage() {
const router = useRouter()
const profileLabel = ref('自己')
const plusOpen = ref(false)
const mood = useHomeMood()
const searchHint = computed(() => {
const i = new Date().getHours() % homeSearchHints.length
return homeSearchHints[i]
})
function goPlus(kind: 'inviteFill' | 'add' | 'synastry') {
plusOpen.value = false
track(AnalyticsEvent.HomeCtaPortrait, { source: 'home_plus', kind })
if (kind === 'inviteFill') {
router.push({ path: '/profile', query: { inviteFill: '1' } })
return
}
if (kind === 'add') {
router.push({ path: '/profile', query: { add: '1' } })
return
}
router.push({ path: '/synastry', query: { invite: '1' } })
}
function trackGrid(label: string) {
track(AnalyticsEvent.HomeCtaPortrait, { source: 'home_grid', label })
}
return {
router,
profileLabel,
plusOpen,
mood,
searchHint,
gridRow1: homeGridRow1,
gridRow2: homeGridRow2,
feeds: homeFeeds,
goPlus,
trackGrid,
}
}