mirror of https://github.com/certd/certd
perf: 专业版7天试用
parent
3f5499be90
commit
c58250e1f0
|
@ -91,24 +91,6 @@ const formState = reactive({
|
|||
code: ""
|
||||
});
|
||||
|
||||
const vipTypeDefine = {
|
||||
free: {
|
||||
title: "基础版",
|
||||
type: "free",
|
||||
privilege: ["证书申请功能无限制", "证书流水线数量10条", "常用的主机、cdn等部署插件"]
|
||||
},
|
||||
plus: {
|
||||
title: "专业版",
|
||||
type: "plus",
|
||||
privilege: ["可加VIP群,需求优先实现", "证书流水线数量无限制", "免配置发邮件功能", "支持宝塔、易盾、群晖、1Panel、cdnfly等部署插件"]
|
||||
},
|
||||
comm: {
|
||||
title: "商业版",
|
||||
type: "comm",
|
||||
privilege: ["拥有专业版所有特权", "允许商用,可修改logo、标题", "数据统计", "插件管理", "多用户无限制", "支持用户支付(敬请期待)"]
|
||||
}
|
||||
};
|
||||
|
||||
const router = useRouter();
|
||||
async function doActive() {
|
||||
if (!formState.code) {
|
||||
|
@ -155,6 +137,36 @@ function openUpgrade() {
|
|||
title = "续期专业版/升级商业版";
|
||||
}
|
||||
|
||||
const vipTypeDefine = {
|
||||
free: {
|
||||
title: "基础版",
|
||||
type: "free",
|
||||
privilege: ["证书申请功能无限制", "证书流水线数量10条", "常用的主机、cdn等部署插件"]
|
||||
},
|
||||
plus: {
|
||||
title: "专业版",
|
||||
type: "plus",
|
||||
privilege: ["可加VIP群,需求优先实现", "证书流水线数量无限制", "免配置发邮件功能", "支持宝塔、易盾、群晖、1Panel、cdnfly等部署插件"],
|
||||
trial: {
|
||||
title: "7天试用",
|
||||
message: "绑定账号即可获得7天专业版试用,点击立即前往绑定账号",
|
||||
click: () => {
|
||||
goAccount();
|
||||
}
|
||||
}
|
||||
},
|
||||
comm: {
|
||||
title: "商业版",
|
||||
type: "comm",
|
||||
privilege: ["拥有专业版所有特权", "允许商用,可修改logo、标题", "数据统计", "插件管理", "多用户无限制", "支持用户支付(敬请期待)"]
|
||||
}
|
||||
};
|
||||
|
||||
function goAccount() {
|
||||
router.push("/sys/account");
|
||||
modalRef.destroy();
|
||||
}
|
||||
|
||||
const modalRef = modal.confirm({
|
||||
title,
|
||||
async onOk() {
|
||||
|
@ -193,7 +205,16 @@ function openUpgrade() {
|
|||
slots.push(
|
||||
<a-col span={8}>
|
||||
<div class={vipBlockClass}>
|
||||
<h3 class="block-header">{item.title}</h3>
|
||||
<h3 class="block-header">
|
||||
<span>{item.title}</span>
|
||||
{item.trial && (
|
||||
<span class="trial">
|
||||
<a-tooltip title={item.trial.message}>
|
||||
<a onClick={item.trial.click}>{item.trial.title}</a>
|
||||
</a-tooltip>
|
||||
</span>
|
||||
)}
|
||||
</h3>
|
||||
<ul>
|
||||
{item.privilege.map((p: string) => (
|
||||
<li>
|
||||
|
@ -206,10 +227,6 @@ function openUpgrade() {
|
|||
</a-col>
|
||||
);
|
||||
}
|
||||
function goAccount() {
|
||||
router.push("/sys/account");
|
||||
modalRef.destroy();
|
||||
}
|
||||
return (
|
||||
<div class="mt-10 mb-10 vip-active-modal">
|
||||
<div class="vip-type-vs">
|
||||
|
@ -270,6 +287,12 @@ function openUpgrade() {
|
|||
}
|
||||
.block-header {
|
||||
padding: 0px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.trial {
|
||||
font-size: 12px;
|
||||
font-wight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ const iframeSrcRef = computed(() => {
|
|||
|
||||
type SubjectInfo = {
|
||||
subjectId: string;
|
||||
installTime?: number;
|
||||
installAt?: number;
|
||||
vipType?: string;
|
||||
expiresTime?: number;
|
||||
expiresAt?: number;
|
||||
};
|
||||
onMounted(() => {
|
||||
const iframeClient = new IframeClient(iframeRef.value, (e: any) => {
|
||||
|
@ -50,9 +50,9 @@ onMounted(() => {
|
|||
iframeClient.register("getSubjectInfo", async (req: any) => {
|
||||
const subjectInfo: SubjectInfo = {
|
||||
subjectId: settingStore.installInfo.siteId,
|
||||
installTime: settingStore.installInfo.installTime,
|
||||
installAt: settingStore.installInfo.installTime,
|
||||
vipType: settingStore.plusInfo.vipType || "free",
|
||||
expiresTime: settingStore.plusInfo.expireTime
|
||||
expiresAt: settingStore.plusInfo.expireTime
|
||||
};
|
||||
return subjectInfo;
|
||||
});
|
||||
|
|
|
@ -22,13 +22,6 @@ typeorm:
|
|||
default:
|
||||
database: './data/db-comm-pro.sqlite'
|
||||
|
||||
plus:
|
||||
server:
|
||||
baseUrls: ['https://api.ai.handsfree.work', 'https://api.ai.docmirror.cn']
|
||||
|
||||
account:
|
||||
server:
|
||||
baseUrl: 'https://ai.handsfree.work/subject'
|
||||
|
||||
#
|
||||
#plus:
|
||||
|
|
|
@ -9,19 +9,9 @@
|
|||
# dataSource:
|
||||
# default:
|
||||
# database: './data/db.sqlite'
|
||||
plus:
|
||||
server:
|
||||
baseUrls: ['https://api.ai.handsfree.work', 'https://api.ai.docmirror.cn']
|
||||
|
||||
account:
|
||||
server:
|
||||
baseUrl: 'https://ai.handsfree.work/subject'
|
||||
baseUrl: 'https://app.handfree.work/subject'
|
||||
|
||||
|
||||
#plus:
|
||||
# server:
|
||||
# baseUrls: ['http://127.0.0.1:11007']
|
||||
#
|
||||
#account:
|
||||
# server:
|
||||
# baseUrl: 'http://127.0.0.1:1017/subject'
|
||||
|
|
|
@ -9,13 +9,6 @@ typeorm:
|
|||
dataSource:
|
||||
default:
|
||||
database: './data/db-new.sqlite'
|
||||
plus:
|
||||
server:
|
||||
baseUrls: ['https://api.ai.handsfree.work', 'https://api.ai.docmirror.cn']
|
||||
|
||||
account:
|
||||
server:
|
||||
baseUrl: 'https://ai.handsfree.work/subject'
|
||||
|
||||
|
||||
#plus:
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
typeorm:
|
||||
dataSource:
|
||||
default:
|
||||
database: './data/db-plus-dev.sqlite'
|
||||
database: './data/db-plus-dev-1.sqlite'
|
||||
|
||||
# plus server: 'http://127.0.0.1:11007'
|
||||
|
||||
|
|
|
@ -7,9 +7,6 @@ typeorm:
|
|||
logging: false
|
||||
|
||||
|
||||
plus:
|
||||
server:
|
||||
baseUrls: ['https://api.ai.handsfree.work', 'https://api.ai.docmirror.cn']
|
||||
account:
|
||||
server:
|
||||
baseUrl: 'https://ai.handsfree.work/subject'
|
||||
baseUrl: 'https://app.handfree.work/subject'
|
||||
|
|
Loading…
Reference in New Issue