Commit Graph
81 Commits
Author SHA1 Message Date
abingyyds b850a5d709 Separate distributor banner and notifications 2026-04-25 11:38:14 +08:00
abingyyds 7a142e4845 Add distributor announcement feed 2026-04-24 18:05:00 +08:00
abingyyds 0cc3b941c5 Add Hermes config export 2026-04-24 18:04:22 +08:00
abingyyds 2d03e2536f Move cache discount UI to main site only 2026-04-22 12:44:01 +08:00
abingyyds 122060661a Add cache discount validation and pricing badges 2026-04-22 11:27:42 +08:00
abingyyds bd787f0bc7 Add distributor group reference pricing 2026-04-19 03:47:28 +08:00
abingyyds 3e2585e241 Fix dist-site config exporter presets 2026-04-19 03:34:19 +08:00
abingyyds 7312e62e91 Fix distributor package settlement visibility 2026-04-18 20:47:24 +08:00
abingyyds 91f7fb6cac fix: clarify dist-site crypto topup flow 2026-04-17 16:32:45 +08:00
abingyydsandClaude Sonnet 4.6 e5ad9ac438 feat: add per-distributor currency display setting (USD/CNY)
Distributors can now choose between USD ($) and CNY (¥) for frontend
price and balance display. Only affects presentation — backend amounts
remain in USD internally.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 14:04:56 +08:00
abingyydsandClaude Sonnet 4.6 ea006f6202 fix: rename dist-site log label from 分站定价 to 定价方式
Prevents end users from seeing the word "分站" in log details.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-17 13:51:34 +08:00
abingyyds 656d39c03c fix: sync claude opus 4.7 pricing and effort mapping 2026-04-17 05:14:56 +08:00
abingyyds 711fd338fd fix: theme dist-site config exporter selects 2026-04-17 01:36:45 +08:00
abingyyds 4b4f4d3b3c Fix dist-site API URL hints and package subscribe UX 2026-04-15 20:14:06 +08:00
abingyyds e6e1a0e45a Restore dist-site config exporter on tokens page 2026-04-15 17:23:04 +08:00
abingyyds e10598762e Improve dist log pricing transparency 2026-04-13 23:44:47 +08:00
abingyyds 22ac136e8a Show cache pricing on the main model pricing page 2026-04-13 20:55:50 +08:00
abingyyds bba7e560ec Add distributor token supported models view 2026-04-13 19:46:06 +08:00
abingyyds 52ee0df229 Add distributor model exclusions and fix Stripe return URLs 2026-04-13 18:43:31 +08:00
abingyyds 8a09b68ae7 Fix dist log pricing display 2026-04-13 18:26:55 +08:00
abingyyds b08dac374e Add provider cache pricing overrides 2026-04-13 18:00:51 +08:00
abingyyds 32af051953 White-label sub-site customer copy 2026-04-13 17:25:04 +08:00
abingyyds 2d411cf309 Show provider pricing details in usage logs 2026-04-12 13:29:44 +08:00
abingyyds d6b0d65ce2 Fix dist-site pricing topup and review UX 2026-04-11 09:25:55 +08:00
abingyydsandCodex 58a18a2991 Add subsite commission applications and default rebate rates
Co-authored-by: Codex <noreply@openai.com>
2026-04-10 19:58:23 +08:00
abingyyds 1651d1ad66 Limit official equivalence display to GPT Claude and Gemini 2026-04-10 14:59:21 +08:00
abingyyds 898d20c89c Hide sub-site pricing internals before payment 2026-04-08 15:40:36 +08:00
abingyyds da082121b4 Publish dist-site build assets 2026-04-08 14:17:09 +08:00
abingyyds 75e8062226 chore: sync pending distributor workspace changes 2026-04-08 14:17:09 +08:00
abingyyds f95687bc2d feat: add dist-site commission withdraw 2026-04-08 14:17:08 +08:00
abingyyds de5d047371 Add nested distributor pricing and profit split 2026-04-08 14:17:07 +08:00
abingyydsandClaude Sonnet 4.6 1138015cc4 feat: 分站控制台增加邀请面板 + 充值快捷入口 + 完善i18n翻译
- 将邀请返佣面板从充值页移至控制台首页(Dashboard)
- Dashboard 快捷入口新增充值链接
- 添加邀请相关中英文翻译(16个key)
- 清理 Topup.jsx 中已移除的 aff 代码

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 01:57:02 +08:00
abingyydsandClaude Sonnet 4.6 d8eac39f9a fix: 分站弹窗透明背景改为不透明 + 删除配置文件生成器
- 新增 .modal-overlay CSS 类,为暗色/亮色/claude 主题提供不透明弹窗背景
- 所有弹窗(Topup/Tokens/Packages)添加 modal-overlay 类
- 从 Tokens 页面移除 ConfigExporter 组件及其源文件

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 00:48:19 +08:00
abingyydsandClaude Sonnet 4.6 dca8f9b6e2 feat: 分站充值入口 + 邀请返佣 + 充值金额显示人民币
- 分站控制台新增充值 tab,复用主站 TopUp 组件
- 分站注册支持 aff_code 邀请码,走主站反佣逻辑
- 分站充值页新增邀请返佣卡片(邀请链接、佣金统计、划转、收入明细)
- 分站充值快捷按钮和输入框按汇率显示人民币
- 后端新增 5 个分站 aff API 路由,复用主站 controller

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 23:45:33 +08:00
abingyydsandClaude Opus 4.6 2e8356b6e3 fix: 添加 lucide-react 依赖到 dist-site
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 18:05:45 +08:00
abingyydsandClaude Opus 4.6 fda9cd4229 feat: 分站使用日志增加可展开详情(缓存命中、流式、首字时间等)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 17:46:42 +08:00
abingyydsandClaude Opus 4.6 179ee855be fix: 优化分站 API Key 页面显示细节
- 移除空状态冗余创建按钮,改为提示点击上方卡片
- 移除 My API Keys 标题栏多余的新建按钮
- ConfigExporter 无 key 时提示改为"请先创建 API Key"
- 修复 KeyGroupCard 推荐/折扣标签颜色适配所有主题

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 23:51:38 +09:00
abingyydsandClaude Opus 4.6 3aeff2ede6 fix: 分站日志耗时显示修复
use_time 字段已经是秒,不需要再除以1000

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 23:41:56 +09:00
abingyydsandClaude Sonnet 4.6 c1fbcf2b00 feat: provider list page availability sort and display
- Add FillProviderAvailability() to batch-fill provider availability data
- Provider list defaults to sort by availability (desc, no-data last)
- Provider cards show availability % with color indicators
- Model rankings default sort back to token usage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 23:12:09 +09:00
abingyydsandClaude Sonnet 4.6 6b77f00396 fix: 分站套餐页额度显示改为人民币,优化文案
- 套餐卡片的每日额度从 $2.20 改为 ¥16.06 显示
- 确认弹窗的额度也改为人民币
- 翻译 key 里 $ 符号改为 ¥

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 00:36:44 +09:00
abingyydsandClaude Opus 4.6 91e673aabd fix: 分站加载动画跟随主题色
- 添加 --page-bg/--page-spinner CSS 变量,各主题定义自己的颜色
- body 背景改用 CSS 变量,不再硬编码黑色
- SiteContext 获取站点信息后立即应用主题类到 body
- localStorage 缓存主题类,刷新时在 React 加载前恢复,防止闪烁
- 浅色主题(clean/corporate/claude)加载时显示白色/米色背景+对应色 spinner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 21:29:53 +09:00
abingyydsandClaude Sonnet 4.6 16c42412bc feat: 分站套餐价格改为人民币存储,额度输入简化为人民币金额
- 后端: DistributorPackage.Price/OriginalPrice 改为存 CNY
- 后端: SubscribePackage 购买时自动 CNY→USD 转换再算 quota
- 前端: 套餐表单额度从 quota 单位改为人民币金额输入
- dist-site: 7个主题 + Packages页面去掉 price*rate 转换

计费逻辑不变:CNY/汇率=USD,USD*QuotaPerUnit=quota

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 21:02:31 +09:00
abingyydsandClaude Opus 4.6 f087c0f978 feat: 分站用户调用日志页面
- 新增 DistUserGetLogs 后端接口,支持按模型/令牌筛选和分页
- 新增 dist-site Logs 页面,desktop 表格 + mobile 卡片布局
- 所有 7 个主题 Layout 添加日志导航项
- Dashboard 快捷入口替换为调用日志链接
- 添加中英文 i18n 翻译

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 21:34:56 +09:00
abingyydsandClaude Opus 4.6 23920eb635 fix: 自定义价格真正参与计费 + 修复价格显示翻倍
1. 计费核心改动 (relay/helper/price.go):
   - applyDistributorMarkup 新增自定义价格支持
   - 自定义价格转 USD 后与平台底价对比,计算等效加价倍率
   - 保底机制:自定义价格不得低于平台底价,防止平台亏损
   - 优先级:全站加价 > 自定义价格 > 单模型加价比例

2. 分站价格显示修复 (controller/dist_site.go):
   - 自定义价格跟随商家币种(CNY),发送前需转 USD
   - 修复 ¥6.8 显示为 ¥46.24 的翻倍问题

3. 管理页面改进 (DistributorModels.jsx):
   - 全站加价模式下展示含加价的价格
   - 自定义价格输入框显示正确的币种单位

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 17:53:22 +09:00
abingyydsandClaude Sonnet 4.6 1e146f6d7b fix: Dashboard 余额/已使用金额保留两位小数
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 17:36:47 +09:00
abingyydsandClaude Opus 4.6 c9c711e4f6 feat: 分站前端默认使用人民币显示价格和余额
- 后端 GetDistSiteInfo 返回 currency 配置(符号/汇率/代码)
- SiteContext 新增 useCurrency() hook 提供 symbol/rate/fmt
- Pricing/Dashboard/Topup/Packages 所有价格从 $ 改为 ¥ 并乘以汇率
- 7 个主题的 Home.jsx 套餐价格同步更新

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 17:16:53 +09:00
abingyydsandClaude Sonnet 4.6 31e4bd22e4 fix: 周期性套餐等价计算使用整个有效期的总额度
之前只用了单次周期的 quota 计算等价,导致每日重置套餐(如 $1/天 × 30天)
只显示 $45 等价,实际应该是 $30 总额度 × 45倍 = $1359 等价

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 20:34:15 +09:00
abingyydsandClaude Sonnet 4.6 b27fa4df53 fix: 修复官方等价对比 pattern 无法匹配后端 model_name 的问题
- Pattern 改为匹配后端实际格式(如 claude-opus-4-5 而非 claude-4.5-opus)
- 确保更具体的 pattern 排在前面,避免 Opus 4.5 误匹配到 Opus 4 的 $15 官方价
- 补充更多模型:GPT-4.1 Mini/Nano、Gemini Flash Lite、DeepSeek R1/V3 等

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 17:41:01 +09:00
abingyydsandClaude Sonnet 4.6 2109f2a7a0 fix: 官方等价轮播限制最多展示前 3 个模型
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 17:16:48 +09:00
abingyydsandClaude Sonnet 4.6 a6b962084d feat: 官方等价对比改为轮播动效,展示所有匹配模型
- 新增 RotatingEquiv 组件,3秒间隔淡入淡出切换
- calcOfficialEquivList 返回所有匹配模型(含 Gemini 系列)
- Packages 页面和 7 个 Home 模板全部适配轮播

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 17:10:31 +09:00