fix 修复bug

This commit is contained in:
Daniel
2026-04-28 19:40:02 +08:00
parent c234fe64d6
commit 0134a5ef64
11 changed files with 720 additions and 14 deletions

View File

@@ -17,7 +17,18 @@
const now = Math.floor(Date.now() / 1000);
const enabled = Boolean(vip.vip_enabled);
const hasActiveSubscription = Number(vip.cycle_started_at || 0) > 0 && Number(vip.cycle_expires_at || 0) > now;
setText(enabled && hasActiveSubscription ? "当前模型模式:平台模型" : "当前模型模式:自由模型");
const activeModel = data.active_ai_model || {};
const hasSelfModel =
Boolean(String(activeModel.api_key || "").trim()) &&
Boolean(String(activeModel.model || "").trim());
const hasTrialCredits = Number(vip.total_available_credits || 0) > 0;
if (enabled && hasActiveSubscription) {
setText("当前模型模式:平台模型");
} else if (enabled && !hasSelfModel && hasTrialCredits) {
setText("当前模型模式:平台模型(体验版)");
} else {
setText("当前模型模式:自由模型");
}
} catch {
// ignore
}