feat(bazi): 八字页重构——空态示例排盘+字段术语表+文化声明,生辰档案绑定
- 八字页:未绑定生辰时展示虚构示例排盘(1990-08-08 10:30男)与15条字段说明, 附传统文化声明文案;已绑定时支持多档案切换,排盘增强(十神/藏干/纳音/五行配色/命盘概览) - 个人中心:新增生辰管理卡片,每用户免费绑定3个出生年月;登录改为真实微信登录 - 服务端:新增 BirthProfile 模型与 /api/user/birth-profiles 增删查接口,AutoMigrate 建表 - 前端:新增 birth-profile.js 本地存储优先+登录后云端双向同步 - 修复:个人中心 tabBar 页面入口误用 navigateTo 改为 switchTab
This commit is contained in:
@@ -32,3 +32,18 @@ type UserProfile struct {
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// MaxFreeBirthProfiles 每个用户可免费绑定的生辰数量上限
|
||||
const MaxFreeBirthProfiles = 3
|
||||
|
||||
// BirthProfile 用户生辰档案(八字绑定),每个用户最多免费绑定 MaxFreeBirthProfiles 个
|
||||
type BirthProfile struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
UserID uint `gorm:"index" json:"userId"`
|
||||
Name string `gorm:"size:32" json:"name"` // 备注名(如本人、家人等)
|
||||
Gender int `gorm:"default:1" json:"gender"` // 1:男 2:女
|
||||
Birthday string `gorm:"size:10" json:"birthday"` // YYYY-MM-DD
|
||||
BirthTime string `gorm:"size:8" json:"birthTime"` // HH:mm
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user