feat(宏观): ifinance 分类动态挂载为宏观 tab, 报警迁入监控, 下线油价/本地经济数据/策略研究
Docker Build and Push / build-image (push) Successful in 2m37s

- 宏观只保留本地 新闻/经济文章, 外接 ifinance categories[] 动态成为 tab (纯前端直连, CORS/_headers, https)
- 报警从宏观迁到监控第 4 个 tab (保留 Alert 模块, 供未来新增报警源)
- 彻底删除油价/经济数据/策略研究: 前端组件+api、后端 apizero/data 路由、cron、fetchers、种子数据
- 新增迁移 DROP Indicator/IndicatorPoint/Strategy/OilPriceHistory; 重新生成 Prisma Client
- CSP 放开 *.honor3.com (含端口通配), 避免新增子域反复重装外壳
This commit is contained in:
jif2.zhang
2026-10-30 17:17:10 +08:00
parent 82c4ae8a84
commit afbb9bc603
66 changed files with 995 additions and 9916 deletions
-32
View File
@@ -1,32 +0,0 @@
// 前端油价 API: 一律走后端 /api/apizero/oil/*, 不直接调 apizero (key 不外泄)
import { api, getApiBase } from './client.js'
// 实时: 油价 + 国际原油 + 下次调价预测
export async function getOilForecast() {
return api('/apizero/oil/forecast')
}
// 32 省油价 (可暂未在 UI 用, 留作 API 暴露)
export async function getOilPriceAll() {
return api('/apizero/oil/price-all')
}
// 单省油价
export async function getOilPrice(province) {
return api('/apizero/oil/price?province=' + encodeURIComponent(province))
}
// 某年调价日历 (后端按年缓存, 同年份不会重复调 apizero)
export async function getOilSchedule(year) {
return api('/apizero/oil/schedule?year=' + encodeURIComponent(year))
}
// 浙江省油价历史 (走 DB, 由 cron 每天 04:00 抓取并落库)
// fuel: '92' | '95' | '0' | undefined (留空 = 3 个油品)
// days: 默认 180 (半年)
export async function getOilHistory({ fuel, days = 180 } = {}) {
const qs = new URLSearchParams()
if (fuel) qs.set('fuel', fuel)
qs.set('days', String(days))
return api('/apizero/oil/history?' + qs.toString())
}