feat: 模型回退 Avalonia 独立窗口;积分精确到 0.01;人品值/二选一接入后端计费

模型(回退 Flutter 内嵌 → Avalonia):
- 恢复 model/_sdk、5 个模型 src/、GC-DRAW/PlayerWindow、ModelHost/AvaloniaHost(源自 5b62897)
- FlutterShell 主线程承载 Avalonia 事件循环,根治 1.1.1 的 AppKit 崩溃
- /api/models/{id}/launch 由后端开独立 Avalonia 窗口
- 前端删除 Flutter 模型实现与 ModelViewPage 死代码(13 个文件)

积分:
- Points/ThemePaid int → decimal,精确到 0.01;pw.yaml 兼容旧整数格式
- 主题色退款保留 2 位小数;前端新增 formatPoints 显示

人品值/二选一计费(原前端本地免费随机 → 后端计费):
- 新增 POST /api/user/fortune、/api/user/pick,随机数与扣费都在服务端
- 人品值阶梯:当日免费 1 次 → 0.1×5 → 0.2×5 → 0.5×15 → 1.0 起
- 二选一:当日免费 1 次 → 0.5/次;计数按 UTC 日期持久化,跨天清零
- 前端两个功能需登录,扣费后提示本次消耗

附 RELEASE-1.1.2.md 更新日志。
This commit is contained in:
远影科技 committed 2026-11-21 21:51:34 +08:00
1 parent 38781c9807
commit cfd6809714
57 files changed
+8300 -1966

No files matched your search

+13
View File
@@ -729,6 +729,19 @@ class GcApi {
final r = await _send('POST', '/api/user/theme', body: {'color': color});
return r as Map<String, dynamic>;
}
/// 摇人品值。价格由后端算:当天第一次免费,之后按当日次数阶梯计费。
Future<Map<String, dynamic>> rollFortune() async {
final r = await _send('POST', '/api/user/fortune');
return r as Map<String, dynamic>;
}
/// 二选一。当天第一次免费,之后每次 0.5 积分。
Future<Map<String, dynamic>> pickOne(String optionA, String optionB) async {
final r = await _send('POST', '/api/user/pick',
body: {'optionA': optionA, 'optionB': optionB});
return r as Map<String, dynamic>;
}
}
/// 人机验证题