feat: 用户套餐,用户支付功能

This commit is contained in:
xiaojunnuo
2024-12-22 14:00:46 +08:00
parent d70e2b66a3
commit a019956698
69 changed files with 2071 additions and 738 deletions
@@ -0,0 +1,33 @@
<template>
<span class="cd-expires-time-text">
<template v-if="label != null">
{{ label }}
</template>
<template v-else>
<FsTimeHumanize :model-value="value" :use-format-greater="1000000000000" :options="{ units: ['d'] }"></FsTimeHumanize>
</template>
</span>
</template>
<script lang="ts" setup>
import dayjs from "dayjs";
import { computed } from "vue";
defineOptions({
name: "ExpiresTimeText"
});
const props = defineProps<{
value?: number;
}>();
const label = computed(() => {
if (props.value == null) {
return "";
}
if (props.value === -1) {
return "永久";
}
return null;
});
</script>
@@ -9,6 +9,7 @@ import "@vue-js-cron/light/dist/light.css";
import Plugins from "./plugins/index";
import LoadingButton from "./loading-button.vue";
import IconSelect from "./icon-select.vue";
import ExpiresTimeText from "./expires-time-text.vue";
export default {
install(app: any) {
app.component("PiContainer", PiContainer);
@@ -25,7 +26,7 @@ export default {
app.component("LoadingButton", LoadingButton);
app.component("IconSelect", IconSelect);
app.component("ExpiresTimeText", ExpiresTimeText);
app.use(vip);
app.use(Plugins);
}
@@ -231,13 +231,13 @@ function openUpgrade() {
title: "基础版",
desc: "免费使用",
type: "free",
privilege: ["证书申请功能无限制", "证书流水线数量10条", "常用的主机、cdn等部署插件"]
privilege: ["证书申请功能无限制", "证书流水线数量无限制", "常用的主机、云平台、cdn等部署插件"]
},
plus: {
title: "专业版",
desc: "功能增强,适用于个人企业内部使用",
type: "plus",
privilege: ["可加VIP群,需求优先实现", "证书流水线数量无限制", "免配置发邮件功能", "支持宝塔、易盾、群晖、1Panel、cdnfly等部署插件"],
privilege: ["可加VIP群,需求优先实现", "宝塔、群晖、1Panel、易盾等部署插件", "站点证书监控", "更多通知种类"],
trial: {
title: "7天试用",
click: () => {