feat(license): 试用浮条改为价值+安全感导向,临近耗尽给具体重置时刻

- 浮条文案:'免费试用 X 剩余 MM:SS' → '今日免费 MM:SS(每天重置)',显性化安全网消除永久失去恐惧
- 临近耗尽(≤5min)自动切为具体时刻'(明天 HH:MM 重置)',焦虑时给出明确出口
- CTA '购买授权' → '永久解锁 15 个功能'(利益非动作),title 挂完整卖点
- nextTrialResetAt 计时中也返回;修正 Pricing '6个高级功能'→实测15个
This commit is contained in:
personal82555 committed 2026-10-14 21:58:08 +08:00
1 parent 1c53e2b188
commit fddfecf415
4 files changed
+26 -6

No files matched your search

+15 -3
View File
@@ -48,6 +48,12 @@ const urgency = computed(() => {
/** 本轮已用完时的下一轮重置时刻提示(如「明天 14:23」) */
const resetHint = computed(() => (protectedTool.value ? trialResetHint(props.path, now.value) : ''));
/** 浮条上的重置提示:临近耗尽时给出具体时刻(给出口、消除"永久失去"恐惧),平时只说每天重置 */
const resetTag = computed(() => {
if (remaining.value <= 5 * 60 * 1000 && resetHint.value) return `${resetHint.value} 重置`;
return '每天重置';
});
async function submitCard() {
if (licenseState.authorized
&& !window.confirm('将撤销本机当前授权并用新卡密激活,确定换卡?')) {
@@ -146,14 +152,20 @@ onUnmounted(() => {
</a>
</template>
<template v-else-if="trialUsed">
免费试用 {{ displayName }} 剩余 <b>{{ mmss }}</b>
{{ displayName }} · 今日免费 <b>{{ mmss }}</b>({{ resetTag }})
</template>
<template v-else>
{{ displayName }} · 今日免费试用 30 分钟
{{ displayName }} · 今日免费 30 分钟({{ resetTag }})
</template>
<template v-if="!licenseState.authorized">
<a :href="BUY_URL" target="_blank" rel="noopener" class="lg-buy">购买授权</a>
<a
:href="BUY_URL"
target="_blank"
rel="noopener"
class="lg-buy"
title="买断制授权,不按次不按月;一次激活,15 个高级功能全部解锁,授权跟随账号、换电脑可恢复"
>永久解锁 15 个功能</a>
<a href="javascript:;" class="lg-link" @click="showCardInput = !showCardInput">卡密</a>
</template>
</div>
+1 -2
View File
@@ -84,11 +84,10 @@ export function remainingMs(path: string, now: number): number {
return Math.max(0, TRIAL_MS - (now - cycleStartOf(start, now)));
}
/** 本轮已用完时,下一轮免费试用的重置时刻(ms 时间戳);未开始计时返回 null */
/** 本轮的下一次重置时刻(ms 时间戳);未开始计时返回 null。无论本轮是否还有剩余都返回 */
export function nextTrialResetAt(path: string, now: number): number | null {
const start = getTrialStart(path);
if (start === null) return null;
if (remainingMs(path, now) > 0) return null; // 本轮还有剩余,无需提示重置
return cycleStartOf(start, now) + TRIAL_CYCLE_MS;
}