- 前端 license.ts 移除 /ai-chat(14->13);服务端 PROTECTED_TOOLS 移除(16->15) - 同步移除 _handle_aichat 的 check() 闸门(check对清单外工具返回403,只删清单会弄坏功能) - log_usage 保留;移出后自然归入文本组 - 验证:无授权无试用下 POST /ai/chat 返回200并给出真实回复;在线翻译试用耗尽仍403; /ai-chat 页无浮条无弹窗;受控工具CTA=13 - 成本提示:AI客服走NewAPI计费,去授权后任何人可消耗token,建议必要时加频控
420 lines
11 KiB
Vue
420 lines
11 KiB
Vue
<script setup lang="ts">
|
||
import { useHead } from '@vueuse/head';
|
||
import { BUY_URL, PROTECTED_TOOLS, getMachineId } from '@/tools/license/license';
|
||
|
||
useHead({ title: '授权应用 - IT-TOOLS-PRO' });
|
||
|
||
interface Feature {
|
||
path: string;
|
||
name: string;
|
||
icon: string;
|
||
points: string[];
|
||
}
|
||
|
||
const FEATURES: Feature[] = [
|
||
{
|
||
path: '/translator',
|
||
name: '在线翻译',
|
||
icon: '🌐',
|
||
points: ['支持中英日韩等 16 种语言互译', '谷歌翻译主线 + MyMemory 备用双线路', '粘贴即译,自动识别源语言'],
|
||
},
|
||
{
|
||
path: '/image-ocr',
|
||
name: '图片OCR文字识别',
|
||
icon: '📷',
|
||
points: ['本地 OCR 引擎,中文识别准确率 99%+', '截图、扫描件、照片文字一键提取', '逐行输出带置信度,支持粘贴图片'],
|
||
},
|
||
{
|
||
path: '/pdf-ocr',
|
||
name: 'PDF文字识别',
|
||
icon: '📄',
|
||
points: ['逐页 OCR 中英文 PDF(最多 50 页)', '每页预览、翻页查看识别结果', '一键复制全部或下载 TXT'],
|
||
},
|
||
{
|
||
path: '/ai-retouch',
|
||
name: 'AI修图',
|
||
icon: '🎨',
|
||
points: ['去水印/修复:涂抹区域智能填充', '抠图去背景、4x 超分辨率、人脸修复', '本地 AI 模型推理,单张 10 秒级出图'],
|
||
},
|
||
{
|
||
path: '/pdf-tools',
|
||
name: 'PDF工具',
|
||
icon: '📑',
|
||
points: ['合并/拆分/旋转/重排/压缩等 11 种常用处理', '加密/解密/加水印/提取文本/加页码/转图片', '全程浏览器本地处理,文件不上传服务器'],
|
||
},
|
||
{
|
||
path: '/image-tools',
|
||
name: '图片工具',
|
||
icon: '🖼️',
|
||
points: ['压缩/转换/尺寸/裁剪/旋转/滤镜等 12 种常用处理', '打码、加水印、拼接、EXIF 查看编辑', '全程浏览器本地处理,图片不上传服务器'],
|
||
},
|
||
{
|
||
path: '/video-tools',
|
||
name: '视频工具',
|
||
icon: '🎥',
|
||
points: ['格式转换/压缩/裁剪/旋转/变速/消音/提取音频/截图/GIF互转等 11 个工具', '服务端 ffmpeg 高速转码,最大支持 2GB 视频', '处理完在线预览,一键下载结果'],
|
||
},
|
||
{
|
||
path: '/audio-tools',
|
||
name: '音频工具',
|
||
icon: '🎙️',
|
||
points: ['文字转音频:本地神经 TTS,离线可用速度快', '音频转文字:Whisper 引擎,中英日粤自动检测带时间轴', '声音克隆:5 秒样本克隆音色(即将上线)'],
|
||
},
|
||
{
|
||
path: '/doc-convert',
|
||
name: '文档格式转换',
|
||
icon: '🔄',
|
||
points: ['Word/PDF/TXT/RTF/ODT/EPUB/MOBI/AZW3/HTML 九种格式互转', '自建转换引擎,批量转换打包下载', '单文件最快几秒完成'],
|
||
},
|
||
];
|
||
|
||
// only show tools that are actually in the protected list
|
||
const paidFeatures = FEATURES.filter(f => f.path in PROTECTED_TOOLS);
|
||
|
||
const machineId = getMachineId();
|
||
const copied = ref(false);
|
||
const wechatCopied = ref(false);
|
||
const WECHAT_ID = 'q3970260761';
|
||
|
||
async function copyWechat() {
|
||
try {
|
||
await navigator.clipboard.writeText(WECHAT_ID);
|
||
wechatCopied.value = true;
|
||
setTimeout(() => (wechatCopied.value = false), 1500);
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
|
||
async function copyMachine() {
|
||
try {
|
||
await navigator.clipboard.writeText(machineId);
|
||
copied.value = true;
|
||
setTimeout(() => (copied.value = false), 1500);
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
</script>
|
||
|
||
<template>
|
||
<div class="pricing-root">
|
||
<!-- hero -->
|
||
<div class="hero">
|
||
<div class="hero-title">🚀 授权解锁全部高级功能</div>
|
||
<div class="hero-sub">
|
||
IT-TOOLS-PRO 的 20+ 基础工具永久免费(含面单设计),下面 9 个算力型高级功能需要授权。一次激活,全部通用。
|
||
</div>
|
||
</div>
|
||
|
||
<!-- feature grid -->
|
||
<div class="section">
|
||
<h3 class="section-title">
|
||
授权可用的高级功能
|
||
</h3>
|
||
<div class="feat-grid">
|
||
<div v-for="f in paidFeatures" :key="f.path" class="feat-card">
|
||
<div class="feat-head">
|
||
<span class="feat-icon">{{ f.icon }}</span>
|
||
<RouterLink class="feat-name" :to="f.path">
|
||
{{ f.name }}
|
||
</RouterLink>
|
||
<span class="feat-tag">授权功能</span>
|
||
</div>
|
||
<ul class="feat-points">
|
||
<li v-for="(p, i) in f.points" :key="i">
|
||
{{ p }}
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- advantages -->
|
||
<div class="section">
|
||
<h3 class="section-title">
|
||
为什么值得购买
|
||
</h3>
|
||
<div class="adv-grid">
|
||
<div class="adv-card">
|
||
<div class="adv-icon">🔑</div>
|
||
<div class="adv-title">一次激活,全站通用</div>
|
||
<div class="adv-desc">输入一次卡密,13 个高级功能全部解锁,无需逐个购买</div>
|
||
</div>
|
||
<div class="adv-card">
|
||
<div class="adv-icon">♾️</div>
|
||
<div class="adv-title">永久套餐</div>
|
||
<div class="adv-desc">买断制授权,不按次、不按月,长期使用无后顾之忧</div>
|
||
</div>
|
||
<div class="adv-card">
|
||
<div class="adv-icon">🎁</div>
|
||
<div class="adv-title">先用后买</div>
|
||
<div class="adv-desc">每个高级功能每天免费试用 30 分钟,觉得好用再付费</div>
|
||
</div>
|
||
<div class="adv-card">
|
||
<div class="adv-icon">🔒</div>
|
||
<div class="adv-title">隐私友好</div>
|
||
<div class="adv-desc">PDF/图片工具全程浏览器本地处理,文件不上传服务器</div>
|
||
</div>
|
||
<div class="adv-card">
|
||
<div class="adv-icon">⚡</div>
|
||
<div class="adv-title">自建服务稳定</div>
|
||
<div class="adv-desc">翻译、OCR、AI 修图、格式转换均为自建服务,不依赖第三方接口</div>
|
||
</div>
|
||
<div class="adv-card">
|
||
<div class="adv-icon">🧊</div>
|
||
<div class="adv-title">免费工具持续更新</div>
|
||
<div class="adv-desc">面单设计、条码、JSON、二维码、IT 网站收藏等 20+ 工具永久免费,还会不断增加</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- CTA -->
|
||
<div class="section">
|
||
<div class="cta-box">
|
||
<div class="cta-left">
|
||
<div class="cta-title">
|
||
立即购买授权
|
||
</div>
|
||
<div class="cta-sub">
|
||
购买后你会得到一个卡密,在任意高级功能页右上角「卡密」入口输入即可激活本设备。
|
||
</div>
|
||
<div class="cta-machine">
|
||
本设备机器码:<code>{{ machineId }}</code>
|
||
<a href="javascript:;" class="copy-link" @click="copyMachine">{{ copied ? '已复制 ✓' : '复制' }}</a>
|
||
<span class="cta-machine-hint">(购买或激活遇到问题时提供给客服)</span>
|
||
</div>
|
||
<div class="cta-machine">
|
||
售后客服微信:<code>q3970260761</code>
|
||
<a href="javascript:;" class="copy-link" @click="copyWechat">{{ wechatCopied ? '已复制 ✓' : '复制' }}</a>
|
||
<span class="cta-machine-hint">(购买不到、激活失败、换设备等问题均可咨询)</span>
|
||
</div>
|
||
</div>
|
||
<div class="cta-right">
|
||
<c-button type="primary" class="cta-btn" tag="a" :href="BUY_URL" target="_blank" rel="noopener">
|
||
💳 前往购买卡密
|
||
</c-button>
|
||
<div class="cta-hint">
|
||
支付后自动发卡,卡密即时可用
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="foot-note">
|
||
已购买用户切换设备使用?在旧设备的功能页点「撤销」,新设备重新输入卡密即可。
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<style lang="less" scoped>
|
||
.pricing-root {
|
||
max-width: 1100px;
|
||
margin: 0 auto;
|
||
padding: 40px 20px 80px;
|
||
}
|
||
|
||
.hero {
|
||
text-align: center;
|
||
margin-bottom: 36px;
|
||
|
||
.hero-title {
|
||
font-size: 30px;
|
||
font-weight: 800;
|
||
background: linear-gradient(48deg, rgba(37, 99, 108, 1) 0%, rgba(59, 149, 111, 1) 55%, rgba(20, 160, 88, 1) 100%);
|
||
-webkit-background-clip: text;
|
||
background-clip: text;
|
||
color: transparent;
|
||
}
|
||
|
||
.hero-sub {
|
||
margin-top: 10px;
|
||
font-size: 14.5px;
|
||
opacity: 0.65;
|
||
}
|
||
}
|
||
|
||
.section {
|
||
margin-bottom: 34px;
|
||
|
||
.section-title {
|
||
font-size: 17px;
|
||
font-weight: 700;
|
||
margin-bottom: 14px;
|
||
}
|
||
}
|
||
|
||
// ---- feature grid ----
|
||
.feat-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||
gap: 12px;
|
||
}
|
||
|
||
.feat-card {
|
||
border: 1px solid rgba(128, 128, 128, 0.25);
|
||
border-radius: 12px;
|
||
padding: 14px 16px;
|
||
transition: border-color 0.15s, box-shadow 0.15s;
|
||
|
||
&:hover {
|
||
border-color: rgba(24, 160, 88, 0.6);
|
||
box-shadow: 0 4px 16px rgba(24, 160, 88, 0.08);
|
||
}
|
||
|
||
.feat-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
margin-bottom: 8px;
|
||
|
||
.feat-icon {
|
||
font-size: 20px;
|
||
}
|
||
|
||
.feat-name {
|
||
font-size: 15px;
|
||
font-weight: 700;
|
||
color: #333;
|
||
text-decoration: none;
|
||
|
||
&:hover {
|
||
color: #18a058;
|
||
}
|
||
}
|
||
|
||
.feat-tag {
|
||
margin-left: auto;
|
||
font-size: 11px;
|
||
color: #18a058;
|
||
background: rgba(24, 160, 88, 0.1);
|
||
border-radius: 999px;
|
||
padding: 2px 10px;
|
||
flex-shrink: 0;
|
||
}
|
||
}
|
||
|
||
.feat-points {
|
||
margin: 0;
|
||
padding-left: 18px;
|
||
font-size: 12.5px;
|
||
line-height: 1.9;
|
||
opacity: 0.75;
|
||
}
|
||
}
|
||
|
||
// ---- advantages ----
|
||
.adv-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||
gap: 12px;
|
||
}
|
||
|
||
.adv-card {
|
||
border: 1px solid rgba(128, 128, 128, 0.2);
|
||
border-radius: 12px;
|
||
padding: 16px;
|
||
background: rgba(24, 160, 88, 0.03);
|
||
|
||
.adv-icon {
|
||
font-size: 24px;
|
||
margin-bottom: 6px;
|
||
}
|
||
|
||
.adv-title {
|
||
font-size: 14.5px;
|
||
font-weight: 700;
|
||
margin-bottom: 4px;
|
||
}
|
||
|
||
.adv-desc {
|
||
font-size: 12.5px;
|
||
opacity: 0.65;
|
||
line-height: 1.7;
|
||
}
|
||
}
|
||
|
||
// ---- CTA ----
|
||
.cta-box {
|
||
display: flex;
|
||
gap: 20px;
|
||
align-items: center;
|
||
border: 2px solid rgba(24, 160, 88, 0.45);
|
||
border-radius: 14px;
|
||
padding: 22px 26px;
|
||
background: linear-gradient(120deg, rgba(24, 160, 88, 0.06), rgba(24, 160, 88, 0.02));
|
||
flex-wrap: wrap;
|
||
|
||
.cta-left {
|
||
flex: 1;
|
||
min-width: 260px;
|
||
|
||
.cta-title {
|
||
font-size: 19px;
|
||
font-weight: 800;
|
||
}
|
||
|
||
.cta-sub {
|
||
font-size: 13px;
|
||
opacity: 0.7;
|
||
margin-top: 6px;
|
||
line-height: 1.7;
|
||
}
|
||
|
||
.cta-machine {
|
||
margin-top: 10px;
|
||
font-size: 12.5px;
|
||
opacity: 0.85;
|
||
|
||
code {
|
||
background: rgba(128, 128, 128, 0.1);
|
||
padding: 2px 8px;
|
||
border-radius: 5px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.copy-link {
|
||
color: #18a058;
|
||
margin-left: 8px;
|
||
text-decoration: none;
|
||
|
||
&:hover {
|
||
text-decoration: underline;
|
||
}
|
||
}
|
||
|
||
.cta-machine-hint {
|
||
opacity: 0.5;
|
||
font-size: 11.5px;
|
||
margin-left: 6px;
|
||
}
|
||
}
|
||
}
|
||
|
||
.cta-right {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 8px;
|
||
|
||
.cta-btn {
|
||
background: #18a058 !important;
|
||
color: #fff !important;
|
||
font-size: 16px !important;
|
||
font-weight: 700;
|
||
padding: 10px 30px !important;
|
||
text-decoration: none;
|
||
}
|
||
|
||
.cta-hint {
|
||
font-size: 11.5px;
|
||
opacity: 0.55;
|
||
}
|
||
}
|
||
}
|
||
|
||
.foot-note {
|
||
text-align: center;
|
||
font-size: 12px;
|
||
opacity: 0.5;
|
||
}
|
||
</style>
|