fix(douyu): 按到期时间修正精英宝典状态
This commit is contained in:
@@ -11,6 +11,9 @@ from web.backend.services.douyu_account_state import refresh_douyu_account_state
|
||||
|
||||
|
||||
class FakeClient:
|
||||
def __init__(self, *, expire_time: int = 1799999999):
|
||||
self.expire_time = expire_time
|
||||
|
||||
def acf_ccn(self, *, refresh_subscribe: bool = False):
|
||||
assert refresh_subscribe is False
|
||||
return "csrf"
|
||||
@@ -19,7 +22,7 @@ class FakeClient:
|
||||
return {
|
||||
"manual_type": 1,
|
||||
"manual_score": 5200,
|
||||
"expire_time": 1799999999,
|
||||
"expire_time": self.expire_time,
|
||||
}
|
||||
|
||||
def query_points(self, **_kwargs):
|
||||
@@ -129,3 +132,42 @@ def test_invalid_ck_writes_lifecycle_without_querying_activity(db):
|
||||
assert account.ck_check_status == "invalid"
|
||||
assert account.status == "invalid"
|
||||
assert state.elite_opened is None
|
||||
|
||||
|
||||
def test_expired_elite_is_not_currently_open(db):
|
||||
account = Account(
|
||||
username="expired-elite-account",
|
||||
password="p",
|
||||
email="expired@example.com",
|
||||
email_password="ep",
|
||||
status="active",
|
||||
ck_check_status="valid",
|
||||
cookie="acf_uid=100",
|
||||
elite_opened=True,
|
||||
elite_expire_time=1,
|
||||
auto_managed=True,
|
||||
)
|
||||
db.add(account)
|
||||
db.commit()
|
||||
|
||||
state = refresh_douyu_account_state(
|
||||
db,
|
||||
account,
|
||||
manual_id="manual",
|
||||
rid="room",
|
||||
act_alias="alias",
|
||||
client=cast(DouyuActivityClient, FakeClient(expire_time=1)),
|
||||
cookie_checker=lambda _cookie: {
|
||||
"valid": True,
|
||||
"message": "有效",
|
||||
"fish_ball": 10,
|
||||
"nickname": "测试",
|
||||
"level": 5,
|
||||
"checked_at": datetime.now(UTC),
|
||||
},
|
||||
)
|
||||
|
||||
db.refresh(account)
|
||||
assert state.elite_opened is False
|
||||
assert account.elite_opened is False
|
||||
assert account.elite_expire_time == 1
|
||||
|
||||
@@ -75,7 +75,7 @@ class TestEliteHandbookOpenFlow:
|
||||
client.elite_user_info.return_value = {
|
||||
"manual_type": 1,
|
||||
"manual_score": 300,
|
||||
"expire_time": 1793462399,
|
||||
"expire_time": 1799999999,
|
||||
}
|
||||
runner._client = Mock(return_value=client)
|
||||
|
||||
@@ -89,7 +89,7 @@ class TestEliteHandbookOpenFlow:
|
||||
assert "已开通" in task.message
|
||||
assert "到期" in task.message
|
||||
assert self.account.elite_opened is True
|
||||
assert self.account.elite_expire_time == 1793462399
|
||||
assert self.account.elite_expire_time == 1799999999
|
||||
assert self.account.points == 300
|
||||
|
||||
def test_query_elite_status_marks_unopened(self):
|
||||
@@ -114,6 +114,28 @@ class TestEliteHandbookOpenFlow:
|
||||
assert self.account.elite_opened is False
|
||||
assert self.account.elite_expire_time is None
|
||||
|
||||
def test_query_elite_status_marks_expired_as_not_currently_open(self):
|
||||
task = self._task("query_elite_status")
|
||||
runner = self._runner("query_elite_status")
|
||||
client = Mock()
|
||||
client.elite_user_info.return_value = {
|
||||
"manual_type": 1,
|
||||
"manual_score": 0,
|
||||
"expire_time": 1,
|
||||
}
|
||||
runner._client = Mock(return_value=client)
|
||||
|
||||
runner._execute_query_elite_status(
|
||||
self.session, task, self.account, "acf_uid=100", self._config()
|
||||
)
|
||||
|
||||
self.session.refresh(task)
|
||||
self.session.refresh(self.account)
|
||||
assert task.status == "success"
|
||||
assert "已过期" in task.message
|
||||
assert self.account.elite_opened is False
|
||||
assert self.account.elite_expire_time == 1
|
||||
|
||||
def test_create_elite_qr_skips_payment_when_already_opened(self):
|
||||
"""已开通的账号不再生成支付码(避免二维码闪现与白付)。"""
|
||||
task = self._task("create_elite_qr")
|
||||
@@ -122,7 +144,7 @@ class TestEliteHandbookOpenFlow:
|
||||
client.elite_user_info.return_value = {
|
||||
"manual_type": 1,
|
||||
"manual_score": 300,
|
||||
"expire_time": 1793462399,
|
||||
"expire_time": 1799999999,
|
||||
}
|
||||
runner._client = Mock(return_value=client)
|
||||
|
||||
@@ -143,6 +165,33 @@ class TestEliteHandbookOpenFlow:
|
||||
assert self.account.elite_opened is True
|
||||
assert self.account.bind_status != "elite_opened"
|
||||
|
||||
def test_create_elite_qr_does_not_skip_for_expired_elite(self, monkeypatch):
|
||||
monkeypatch.setattr(douyu_runner_manual, "DOUYU_PAYMENT_POLL_SECONDS", 0.05)
|
||||
monkeypatch.setattr(douyu_runner_manual, "DOUYU_PAYMENT_POLL_INTERVAL", 0.01)
|
||||
|
||||
task = self._task("create_elite_qr")
|
||||
runner = self._runner("create_elite_qr")
|
||||
client = Mock()
|
||||
client.acf_ccn.return_value = "ctn-1"
|
||||
client.elite_user_info.return_value = {
|
||||
"manual_type": 1,
|
||||
"manual_score": 0,
|
||||
"expire_time": 1,
|
||||
}
|
||||
client.create_elite_qr.return_value = {"pay_url": "https://example.test/pay"}
|
||||
runner._client = Mock(return_value=client)
|
||||
runner._refresh_account_points = Mock(return_value={"points": 0})
|
||||
|
||||
runner._execute_create_elite_qr(
|
||||
self.session, task, self.account, "acf_uid=100", self._config()
|
||||
)
|
||||
|
||||
self.session.refresh(task)
|
||||
self.session.refresh(self.account)
|
||||
assert task.status == "failed"
|
||||
assert self.account.elite_opened is False
|
||||
client.create_elite_qr.assert_called_once()
|
||||
|
||||
def test_create_elite_qr_uses_points_baseline(self, monkeypatch):
|
||||
"""账上已有 680 积分时不能立刻判成功,必须等积分真的增长。"""
|
||||
monkeypatch.setattr(douyu_runner_manual, "DOUYU_PAYMENT_POLL_SECONDS", 0.05)
|
||||
|
||||
@@ -2069,6 +2069,38 @@ class TestBindingAndCompletion(_Base):
|
||||
assert detail["task"]["exchangeStatus"] == "points_short"
|
||||
assert detail["task"]["account"]["id"] == account.id
|
||||
|
||||
def test_expired_elite_is_not_currently_opened(self, monkeypatch):
|
||||
task = self._allocated()
|
||||
account = (
|
||||
self.session.query(Account).filter(Account.id == task.account_id).one()
|
||||
)
|
||||
task.binding_status = "bound"
|
||||
task.execution_status = "bound"
|
||||
self.session.commit()
|
||||
monkeypatch.setattr(
|
||||
service,
|
||||
"query_exchange_eligibility",
|
||||
lambda *_args, **_kwargs: DouyuEligibilityResult(
|
||||
elite_user_info={"manual_type": 1, "expire_time": 1},
|
||||
points=2000,
|
||||
points_response={"points": 2000},
|
||||
limited_goods=[],
|
||||
limited_ids=frozenset(),
|
||||
),
|
||||
)
|
||||
|
||||
detail = service.refresh_exchange_eligibility(
|
||||
self.session,
|
||||
task_id=task.id,
|
||||
current=self.admin,
|
||||
)
|
||||
|
||||
self.session.refresh(account)
|
||||
assert account.elite_opened is False
|
||||
assert account.elite_expire_time == 1
|
||||
assert detail["task"]["exchangeStatus"] == "not_opened"
|
||||
assert detail["task"]["issueCode"] == "elite_not_opened"
|
||||
|
||||
def test_expired_lease_moves_unfinished_task_to_manual(self):
|
||||
task = self._allocated()
|
||||
lease = self.session.query(AccountLease).one()
|
||||
|
||||
@@ -169,7 +169,8 @@ class Account(Base):
|
||||
role_change_available_at: Mapped[datetime | None] = mapped_column(
|
||||
UTCDateTime, nullable=True
|
||||
)
|
||||
# 精英宝典开通状态(getUserInfo 的 manualType / expireTime)。
|
||||
# 精英宝典当前有效开通状态(getUserInfo 的 manualType + expireTime)。
|
||||
# manualType 只表示开过;写入时还要按 expireTime 判断是否已过期。
|
||||
# 光看积分区分不了「开通后积分花完」和「从未开通」,必须单独落库。
|
||||
elite_opened: Mapped[bool | None] = mapped_column(Boolean, nullable=True)
|
||||
elite_expire_time: Mapped[int | None] = mapped_column(Integer, nullable=True)
|
||||
|
||||
@@ -31,6 +31,10 @@ from .douyu_activity_query import (
|
||||
query_bind_info,
|
||||
query_exchange_eligibility,
|
||||
)
|
||||
from .douyu_elite_status import (
|
||||
elite_is_currently_open,
|
||||
normalize_elite_expire_time,
|
||||
)
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -182,10 +186,16 @@ def refresh_douyu_account_state(
|
||||
except Exception as exc: # noqa: BLE001 绑定查询失败不应丢弃资产查询结果
|
||||
errors.append(f"绑定状态查询失败: {type(exc).__name__}: {exc}"[:240])
|
||||
|
||||
elite_opened = bool(eligibility.elite_user_info.get("manual_type"))
|
||||
elite_expire_time = _to_int(eligibility.elite_user_info.get("expire_time"))
|
||||
elite_expire_time = normalize_elite_expire_time(
|
||||
eligibility.elite_user_info.get("expire_time")
|
||||
)
|
||||
elite_opened = elite_is_currently_open(
|
||||
eligibility.elite_user_info.get("manual_type"),
|
||||
elite_expire_time,
|
||||
now=now,
|
||||
)
|
||||
account.elite_opened = elite_opened
|
||||
account.elite_expire_time = elite_expire_time or None
|
||||
account.elite_expire_time = elite_expire_time
|
||||
account.points = eligibility.points
|
||||
account.points_expire_at = _points_expire_at(
|
||||
eligibility.points_response,
|
||||
|
||||
@@ -57,6 +57,10 @@ from .douyu_activity_query import (
|
||||
query_exchange_records,
|
||||
query_gold_account,
|
||||
)
|
||||
from .douyu_elite_status import (
|
||||
elite_is_currently_open,
|
||||
normalize_elite_expire_time,
|
||||
)
|
||||
from .douyu_goods_service import (
|
||||
serialize_live_goods as _serialize_live_goods,
|
||||
)
|
||||
@@ -346,7 +350,7 @@ def _probe_with_client(
|
||||
|
||||
manual_type = _to_int(elite.get("manual_type"))
|
||||
manual_score = _to_int(elite.get("manual_score"))
|
||||
expire_time = _to_int(elite.get("expire_time"))
|
||||
expire_time = normalize_elite_expire_time(elite.get("expire_time"))
|
||||
user_info = elite.get("user_info") or {}
|
||||
profile = DouyuActivityClient.profile_from_cookie(str(account.cookie or ""))
|
||||
bind_role = _text(bind_snapshot["role_name"], max_length=128)
|
||||
@@ -373,7 +377,7 @@ def _probe_with_client(
|
||||
"manual_type": manual_type,
|
||||
"manual_score": manual_score,
|
||||
"expire_time": expire_time,
|
||||
"manual_opened": bool(manual_type is not None and manual_type >= 1),
|
||||
"manual_opened": elite_is_currently_open(manual_type, expire_time),
|
||||
"bind_status": bind_snapshot["bind_status"],
|
||||
"bind_phase": bind_snapshot["bind_phase"],
|
||||
"bind_game_account": bind_account,
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
"""斗鱼精英宝典当前有效状态。"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any
|
||||
|
||||
|
||||
def _to_int(value: Any) -> int | None:
|
||||
if value is None or value == "":
|
||||
return None
|
||||
try:
|
||||
return int(float(value))
|
||||
except (TypeError, ValueError):
|
||||
return None
|
||||
|
||||
|
||||
def normalize_elite_expire_time(value: Any) -> int | None:
|
||||
expire_time = _to_int(value)
|
||||
return expire_time if expire_time and expire_time > 0 else None
|
||||
|
||||
|
||||
def elite_is_expired(
|
||||
expire_time: Any,
|
||||
*,
|
||||
now: datetime | None = None,
|
||||
) -> bool:
|
||||
normalized = normalize_elite_expire_time(expire_time)
|
||||
if normalized is None:
|
||||
return False
|
||||
moment = now or datetime.now(UTC)
|
||||
if moment.tzinfo is None:
|
||||
moment = moment.replace(tzinfo=UTC)
|
||||
return normalized <= int(moment.timestamp())
|
||||
|
||||
|
||||
def elite_is_currently_open(
|
||||
manual_type: Any,
|
||||
expire_time: Any,
|
||||
*,
|
||||
now: datetime | None = None,
|
||||
) -> bool:
|
||||
opened = (_to_int(manual_type) or 0) >= 1
|
||||
return opened and not elite_is_expired(expire_time, now=now)
|
||||
|
||||
|
||||
__all__ = [
|
||||
"elite_is_currently_open",
|
||||
"elite_is_expired",
|
||||
"normalize_elite_expire_time",
|
||||
]
|
||||
@@ -13,6 +13,10 @@ from core.douyu import DouyuActivityClient, DouyuActivityError
|
||||
from ..models import Account, DouyuTask
|
||||
from .account_events_service import EVENT_ELITE_OPENED, EVENT_ESPORTS_OPENED, emit
|
||||
from .douyu_activity_query import query_csrf, query_elite_user_info, query_points
|
||||
from .douyu_elite_status import (
|
||||
elite_is_currently_open,
|
||||
normalize_elite_expire_time,
|
||||
)
|
||||
from .douyu_runner_core import DOUYU_PAYMENT_POLL_INTERVAL, DOUYU_PAYMENT_POLL_SECONDS
|
||||
from .douyu_service import account_uid, update_account_profile_from_cookie
|
||||
|
||||
@@ -77,14 +81,15 @@ class ManualMixin:
|
||||
) -> dict:
|
||||
"""查询精英宝典开通状态(manualType/expireTime)并写回账号。
|
||||
|
||||
积分区分不了「开通后积分花完」和「从未开通」,manualType 才是权威口径:
|
||||
0=未开通,>=1=已开通。
|
||||
积分区分不了「开通后积分花完」和「从未开通」。manualType >= 1
|
||||
表示开通过,expireTime 决定当前是否仍有效;已到期必须按未开通处理。
|
||||
"""
|
||||
result = query_elite_user_info(client, manual_id=manual_id, rid=rid)
|
||||
manual_type = self._to_int(result.get("manual_type")) or 0
|
||||
manual_score = self._to_int(result.get("manual_score"))
|
||||
expire_time = self._to_int(result.get("expire_time")) or 0
|
||||
opened = manual_type >= 1
|
||||
expire_time = normalize_elite_expire_time(result.get("expire_time")) or 0
|
||||
opened = elite_is_currently_open(manual_type, expire_time)
|
||||
expired = manual_type >= 1 and not opened
|
||||
account.elite_opened = opened
|
||||
account.elite_expire_time = expire_time or None
|
||||
if manual_score is not None:
|
||||
@@ -95,6 +100,7 @@ class ManualMixin:
|
||||
"elite_manual_score": manual_score,
|
||||
"elite_expire_time": expire_time,
|
||||
"elite_opened": opened,
|
||||
"elite_expired": expired,
|
||||
"elite_user_info": result,
|
||||
"points": manual_score,
|
||||
}
|
||||
@@ -115,7 +121,11 @@ class ManualMixin:
|
||||
rid=str(config.get("rid") or ""),
|
||||
)
|
||||
account.updated_at = datetime.now(UTC)
|
||||
state = "已开通" if result["elite_opened"] else "未开通"
|
||||
state = (
|
||||
"已过期"
|
||||
if result["elite_expired"]
|
||||
else ("已开通" if result["elite_opened"] else "未开通")
|
||||
)
|
||||
expire_text = self._format_expire_text(result["elite_expire_time"])
|
||||
points = result["elite_manual_score"]
|
||||
self._mark_task(
|
||||
|
||||
@@ -40,6 +40,10 @@ from ..business_events import record_account_query, record_douyu_task_started
|
||||
from ..douyu_account_state import DouyuLiveAccountState, refresh_douyu_account_state
|
||||
from ..douyu_activity_query import activity_client, query_exchange_eligibility
|
||||
from ..douyu_batch_launcher import start_douyu_batch, stop_douyu_batches
|
||||
from ..douyu_elite_status import (
|
||||
elite_is_currently_open,
|
||||
normalize_elite_expire_time,
|
||||
)
|
||||
from ..douyu_service import (
|
||||
SUPPORTED_DOUYU_TASK_TYPES,
|
||||
douyu_config_value,
|
||||
@@ -2194,7 +2198,14 @@ def refresh_exchange_eligibility(
|
||||
rid=str(douyu_config_value("rid", config.rid)),
|
||||
uid=str(account.uid or ""),
|
||||
)
|
||||
account.elite_opened = bool(eligibility.elite_user_info.get("manual_type"))
|
||||
elite_expire_time = normalize_elite_expire_time(
|
||||
eligibility.elite_user_info.get("expire_time")
|
||||
)
|
||||
account.elite_opened = elite_is_currently_open(
|
||||
eligibility.elite_user_info.get("manual_type"),
|
||||
elite_expire_time,
|
||||
)
|
||||
account.elite_expire_time = elite_expire_time
|
||||
account.points = eligibility.points
|
||||
except Exception as exc: # noqa: BLE001 外部接口错误要落成可重试的检查失败
|
||||
record_account_query(
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
} from '@ant-design/icons';
|
||||
import { accountApi, douyuApi, userApi, type AccountCommodityState, type AccountEventItem, type AccountOverview, type HighValueAssetState, type HighValueStatus, type UserInfo } from '../api/modules';
|
||||
import AccountOverviewPanel from './douyu-tasks/AccountOverviewPanel';
|
||||
import { eliteIsExpired } from '../utils/douyuElite';
|
||||
import { getErrorMessage } from '../utils/error';
|
||||
import { message } from '../utils/antdMessage';
|
||||
import { formatTime, formatUnixSeconds } from '../utils/time';
|
||||
@@ -734,18 +735,32 @@ export default function AccountDetailPage() {
|
||||
<Col span={4}>
|
||||
<Statistic
|
||||
title="精英宝典"
|
||||
value={overview?.elite_opened ? '已开通' : '未开通'}
|
||||
value={
|
||||
eliteIsExpired(overview ?? {})
|
||||
? '已过期'
|
||||
: overview?.elite_opened
|
||||
? '已开通'
|
||||
: '未开通'
|
||||
}
|
||||
valueStyle={{
|
||||
fontSize: 18,
|
||||
color: overview?.elite_opened ? '#3f8600' : undefined,
|
||||
color: eliteIsExpired(overview ?? {})
|
||||
? '#cf1322'
|
||||
: overview?.elite_opened
|
||||
? '#3f8600'
|
||||
: undefined,
|
||||
}}
|
||||
/>
|
||||
{/* 已开通才显示时间。开通时间来自事件(**上线后才有**);
|
||||
更早的历史查不到 —— 官方兑换记录里只有商品兑换,没有开通记录。 */}
|
||||
{overview?.elite_opened && (
|
||||
{(overview?.elite_opened || eliteIsExpired(overview ?? {})) && (
|
||||
<Text type="secondary" style={{ fontSize: 12 }}>
|
||||
开通 {formatTime(overview?.opened_at?.elite)}
|
||||
<br />
|
||||
{overview?.elite_opened && (
|
||||
<>
|
||||
开通 {formatTime(overview?.opened_at?.elite)}
|
||||
<br />
|
||||
</>
|
||||
)}
|
||||
到期 {formatUnixSeconds(overview?.elite_expire_time)}
|
||||
</Text>
|
||||
)}
|
||||
|
||||
@@ -46,6 +46,7 @@ import {
|
||||
resultFlag,
|
||||
taskQrUrl,
|
||||
eliteStatusText,
|
||||
eliteIsExpired,
|
||||
bindReadyForConfirm,
|
||||
hasBindQrcode,
|
||||
hasPaymentQrcode,
|
||||
@@ -1361,6 +1362,7 @@ export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind })
|
||||
render: (_: unknown, record: DouyuTaskAccountItem) => {
|
||||
const text = eliteStatusText(record);
|
||||
if (!text) return <Text type="secondary">未查</Text>;
|
||||
if (eliteIsExpired(record)) return <Tag color="error">{text}</Tag>;
|
||||
if (record.elite_opened) return <Tag color="green">{text}</Tag>;
|
||||
return <Tag color="default">未开通</Tag>;
|
||||
},
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
QrcodeOutlined, ReloadOutlined, SearchOutlined, ShoppingOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import type { DouyuGoodsItem, DouyuTaskItem } from '../../api/modules';
|
||||
export { eliteIsExpired, eliteStatusText } from '../../utils/douyuElite';
|
||||
|
||||
export type HandbookKind = 'elite' | 'esports' | 'peace';
|
||||
|
||||
@@ -159,21 +160,6 @@ export function taskQrUrl(task: DouyuTaskItem | null | undefined): string {
|
||||
return '';
|
||||
}
|
||||
|
||||
// 精英宝典开通状态展示:积分区分不了"开通后积分花完"和"从未开通",
|
||||
// 以后端落库的 manualType(elite_opened)为准。
|
||||
export function eliteStatusText(
|
||||
account: { elite_opened?: boolean | null; elite_expire_time?: number | null },
|
||||
): string {
|
||||
if (account.elite_opened == null) return '';
|
||||
if (!account.elite_opened) return '未开通';
|
||||
const expire = account.elite_expire_time;
|
||||
if (!expire || expire <= 0) return '已开通';
|
||||
const at = new Date(expire * 1000);
|
||||
if (Number.isNaN(at.getTime())) return '已开通';
|
||||
const pad = (n: number) => String(n).padStart(2, '0');
|
||||
return `已开通 ${at.getFullYear()}-${pad(at.getMonth() + 1)}-${pad(at.getDate())} 到期`;
|
||||
}
|
||||
|
||||
export function bindReadyForConfirm(task: DouyuTaskItem | null | undefined): boolean {
|
||||
if (!task) return false;
|
||||
if (task.task_type === 'get_xpd_bind_qr') {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
export interface DouyuEliteState {
|
||||
elite_opened?: boolean | null;
|
||||
elite_expire_time?: number | null;
|
||||
}
|
||||
|
||||
export function eliteExpireDate(
|
||||
account: DouyuEliteState,
|
||||
): Date | null {
|
||||
const expire = Number(account.elite_expire_time || 0);
|
||||
if (!Number.isFinite(expire) || expire <= 0) return null;
|
||||
const at = new Date(expire * 1000);
|
||||
return Number.isNaN(at.getTime()) ? null : at;
|
||||
}
|
||||
|
||||
export function eliteIsExpired(
|
||||
account: DouyuEliteState,
|
||||
now = Date.now(),
|
||||
): boolean {
|
||||
const at = eliteExpireDate(account);
|
||||
return at !== null && at.getTime() <= now;
|
||||
}
|
||||
|
||||
export function eliteStatusText(account: DouyuEliteState): string {
|
||||
if (account.elite_opened == null) return '';
|
||||
const expireAt = eliteExpireDate(account);
|
||||
const dateText = expireAt
|
||||
? `${expireAt.getFullYear()}-${String(expireAt.getMonth() + 1).padStart(2, '0')}-${String(expireAt.getDate()).padStart(2, '0')}`
|
||||
: '';
|
||||
if (eliteIsExpired(account)) {
|
||||
return dateText ? `已于 ${dateText} 到期` : '已过期';
|
||||
}
|
||||
if (!account.elite_opened) return '未开通';
|
||||
return dateText ? `已开通 ${dateText} 到期` : '已开通';
|
||||
}
|
||||
Reference in New Issue
Block a user