v1.10.3: 修「买完仍显示试用倒计时」与「到期时间显示永久」

根因:CardAuth 自动发卡只写 ca_cards(status=used + bind_info.machine_id),
从不写 ca_authorizations,而插件只查 /public/authorizations/query → 已购用户恒为空。

- checkLicense 增加卡密直验兜底:用本地记住的卡密调 /public/verify,
  返回 valid/expire_time/is_permanent,直接作为授权状态与到期时间
- activateCard 成功即持久化 activeCardKey + activeCardInfo(换机/过期自动清除)
- buy.js 不再用「永久」兜底到期时间(订单接口不返回 expire_time),
  改为只在服务端明确给出时显示,否则显示套餐名
- 侧边栏已授权态显示套餐名 + 真实到期时间
This commit is contained in:
jinghui committed 2026-10-20 23:32:43 +08:00
1 parent 99d1d1fe92
commit 226e4fbbf9
5 files changed
+81 -4

No files matched your search

+2 -1
View File
@@ -152,7 +152,8 @@ function refreshCustomVisibility() {
actRow.style.display = "none";
} else if (lic.authorized) {
icon.textContent = "✅";
text.textContent = "已授权" + (lic.expire ? " · 到期 " + lic.expire : "(长期)");
const planTag = (lic.cardInfo && lic.cardInfo.type) ? " · " + lic.cardInfo.type : "";
text.textContent = "已授权" + planTag + (lic.expire ? " · 到期 " + lic.expire : "(长期)");
text.style.color = "#0a7";
sub.textContent = "感谢支持!全部功能可用";
actRow.style.display = "none";