refactor: 重构供应商操作基类为抽象类并支持 New API Cookie 认证

主要更改:
- 重构 BalanceAction/CheckinAction 为抽象基类,子类实现具体查询逻辑
- 重构 ProviderArchitecture 认证相关方法为抽象方法
- New API 支持 Cookie 认证(与 api_key+user_id 二选一)
- 添加 NewApiBalanceAction,支持查询余额前自动签到
- 修复 session cookie gob 编码解析逻辑
- 前端认证表单支持 inline 布局、字段联动和 onFieldChange 回调
This commit is contained in:
fawney19
2026-01-20 00:55:52 +08:00
parent c24f3d47f7
commit edf8c663f1
19 changed files with 1159 additions and 676 deletions

View File

@@ -190,12 +190,12 @@
class="flex items-center gap-1.5"
>
<span
v-if="getProviderCheckin(provider.id)?.success === true"
v-if="getProviderCheckin(provider.id)?.success !== false"
class="text-[10px] text-muted-foreground/60"
:title="getProviderCheckin(provider.id)?.message"
>已签到</span>
<span
v-else-if="getProviderCheckin(provider.id)?.success === false"
v-else
class="text-[10px] text-destructive/70"
:title="getProviderCheckin(provider.id)?.message"
>签到失败</span>
@@ -431,7 +431,7 @@
余额 <span class="font-semibold text-foreground/90">{{ formatBalanceDisplay(getProviderBalance(provider.id)) }}</span>
<!-- 签到状态显示 -->
<span
v-if="getProviderCheckin(provider.id)?.success === true"
v-if="getProviderCheckin(provider.id) && getProviderCheckin(provider.id)?.success !== false"
class="ml-1 text-muted-foreground"
:title="getProviderCheckin(provider.id)?.message"
>已签到</span>