llms.txt · xianyan.cc
内容与工具 更新于 2026-08-15

每日运势

职责:基于公历日期 + 用户输入(生肖/星座/八字)输出今日运势(综合/事业/爱情/财运/健康/幸运色/吉祥物等)。

每日运势 API(v12 整合 8 模块)

基础URL: https://tools.wktyl.com/api/fortune/
维护: Xianyan 团队 | 更新时间: 2026-08-15

职责:基于公历日期 + 用户输入(生肖/星座/八字)输出今日运势(综合/事业/爱情/财运/健康/幸运色/吉祥物等)。

1. 通用约定

  • 无需登录
  • 频率限制 30/60s(每日同 IP 同用户只算一次)
  • 响应 {code, msg, time, data}

2. 接口清单

接口 方法 说明
/api/fortune/today GET 今日运势(默认综合)
/api/fortune/detail GET 详情(事业/爱情/财运/健康 4 个维度)
/api/fortune/calendar GET 月度运势日历
/api/fortune/love GET 爱情配对(输入双方生日)
/api/fortune/zodiac GET 生肖运势(按生肖/年)
/api/fortune/constellation GET 星座运势(按星座)
/api/fortune/share POST 生成分享卡片(图片)
/api/fortune/history GET 我的历史运势(需登录)

3. 输入参数

参数 类型 必填 说明
birthday string 1990-01-01(八字)
zodiac string 生肖(自动从出生年推断)
constellation string 星座名
date string 查询日期(默认今天)

4. 核心示例

GET /api/fortune/today?birthday=1990-05-20&constellation=taurus

# 响应
{
  "code": 1,
  "data": {
    "date": "2026-08-15",
    "overall": 4,                       // 1-5     "career": { "score": 4, "text": "今日宜整理思路" },
    "love":   { "score": 3, "text": "保持耐心" },
    "wealth": { "score": 4, "text": "有意外收获" },
    "health": { "score": 3, "text": "注意休息" },
    "lucky_color": "金色",
    "lucky_number": 7,
    "lucky_talisman": "翡翠",
    "avoid_color": "黑色",
    "suggestion": "少喝咖啡"
  }
}

5. 设计要点

  • 算法 + 文案库:运势分数走算法(日期 + 八字 → seed),文案从 1000+ 候选随机选
  • 同 IP 同日缓存:每天同 IP 拿同结果,节省计算
  • 分享卡片自动渲染:服务端生成 PNG,无需前端组装
  • 星座/生肖自动推断:从 birthday 自动计算,无需同时传

6. 关联文档