feat(ECR-011): 昵称、首页贴士与档案 Self 唯一/合盘交叉校验
ci / h5 (push) Canceled after 0s
ci / api (push) Canceled after 0s
ci / ess-docs (push) Canceled after 0s

每账号仅一条 self(migration 40902);合盘只选 TA;账号昵称可改;首页穿衣/颜色/养生贴士。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-12 22:05:00 +08:00
co-authored by Cursor
parent 5ceb3ce749
commit 13860bf1ef
67 changed files with 1936 additions and 275 deletions
+4
View File
@@ -12,6 +12,7 @@ import type {
GrowthCheckin,
GrowthPlan,
GrowthReport,
HomeDailyTips,
ImageCardDrawn,
ImageCardQuota,
ImageCardScene,
@@ -89,6 +90,8 @@ export function createClient(opts: CreateClientOptions) {
call<AuthSession>('/api/v1/auth/login', { method: 'POST', body }),
authLogout: () => call<{ ok: boolean }>('/api/v1/auth/logout', { method: 'POST' }),
authMe: () => call<AuthUser>('/api/v1/auth/me'),
authUpdateMe: (body: { nickname: string }) =>
call<AuthUser>('/api/v1/auth/me', { method: 'PATCH', body }),
listProfiles: () => call<{ items: Profile[] }>('/api/v1/profiles'),
createProfile: (body: CreateProfileBody) =>
call<Profile>('/api/v1/profiles', { method: 'POST', body }),
@@ -222,6 +225,7 @@ export function createClient(opts: CreateClientOptions) {
enabled?: boolean
}>
}>('/api/v1/home/tools'),
getHomeDailyTips: () => call<HomeDailyTips>('/api/v1/home/daily-tips'),
}
}
+13
View File
@@ -187,6 +187,19 @@ export interface SolarTermToday {
date: string
}
/** 首页「自己」卡片:穿衣 / 颜色 / 养生 */
export interface HomeDailyTips {
clothing_index: number
clothing: string
color_note: string
palette: { name: string; hex: string }[]
wellness: string
source: 'llm' | 'fallback' | string
gua_name?: string
day_part?: string
need_birth?: boolean
}
export interface MoodEntry {
id: string
day: string