feat(algorithm): 丰富运势分析内容,新增10个分析维度

新增维度(A):
- 情绪/心态运势:基于命宫+福德宫,含情绪指数、压力水平、放松方式
- 家庭运势:基于父母宫+子女宫,含家庭和谐度、亲子关系建议
- 财运详情:正财/偏财区分、消费倾向、投资时机
- 事业详情:同事关系、领导看法、项目决策、晋升机会
- 健康详情:饮食、运动、作息建议、重点关注部位

现有维度增强(B):
- 每日金句:基于命宫主星生成个性化金句,14主星各有不同
- 宜忌:6维度×7等级的宜/忌建议
- 冲突预警:基于煞星分布检测感情/事业/人际冲突

交互体验增强(D):
- 分时段运势:上午/下午/晚上三段式文字描述
- 星级评定:10维度统一1-5星评级

测试:685 tests passed
This commit is contained in:
2026-08-13 07:57:07 +08:00
parent 69da92b58b
commit 7f0ef622e7
10 changed files with 5632 additions and 0 deletions
+88
View File
@@ -0,0 +1,88 @@
// @everything-suitable/algorithm 入口
// 导出所有纯函数算法,供小程序和云函数共用
// 类型导出
export type {
ZiweiChart,
Palace,
StarInfo,
PalaceFortune,
DailyFortune,
MonthlyFortune,
YearlyFortune,
LoveFortuneDetail,
StudyFortuneDetail,
SocialFortuneDetail,
TravelFortuneDetail,
EmotionalFortuneDetail,
FamilyFortuneDetail,
WealthFortuneDetail,
CareerFortuneDetail,
HealthFortuneDetail,
SuitableAvoidItem,
DailyQuote,
ConflictWarning,
TimeSlotFortune,
StarRating,
BirthInfoInput,
BirthInfo,
SanFangSiZheng,
Pattern,
} from './types'
// 枚举导出
export {
HeavenlyStem,
EarthlyBranch,
StarNature,
TransformationType,
MajorStar,
PalaceType,
MinorStar,
MinorStarType,
FortuneType,
} from './enums'
// 紫微算法基础
export {
calculatePalaceScore,
calculateLuckyColor,
calculateLuckyNumber,
calculateLuckyDirection,
determineLuckLevel,
calculateStarScore,
getStarNature,
} from './ziweiAlgorithm'
// 运势策略
export {
generateDailyFortune,
generateMonthlyFortune,
generateYearlyFortune,
analyzePalaceFortune,
calculateDailyAdjustment,
calculateMonthlyAdjustment,
calculateYearlyAdjustment,
calculateOverallScore,
} from './fortuneStrategy'
// 综合运势
export {
generateComprehensiveFortune,
generateComprehensiveMonthlyFortune,
generateComprehensiveYearlyFortune,
analyzeLoveFortune,
analyzeStudyFortune,
analyzeSocialFortune,
analyzeTravelFortune,
analyzeEmotionalFortune,
analyzeFamilyFortune,
analyzeWealthFortune,
analyzeCareerFortune,
analyzeHealthFortune,
generateDailyQuote,
generateSuitableAvoid,
generateConflictWarning,
generateTimeSlotFortune,
generateStarRating,
} from './fortune'