mirror of https://github.com/certd/certd
chore:
parent
490141a920
commit
330f91e15b
|
@ -1,9 +1,12 @@
|
|||
<template>
|
||||
<fs-page>
|
||||
<template #header>
|
||||
<div class="title">
|
||||
<div class="title flex items-center">
|
||||
站点证书监控
|
||||
<span class="sub">每天0点,检查网站证书的过期时间,并发出提醒</span>
|
||||
<div class="sub flex-1">
|
||||
<div>每天0点,检查网站证书的过期时间,并发出提醒;</div>
|
||||
<div class="flex items-center">基础版限制1条,专业版无限制,当前<vip-button class="ml-5" mode="nav"></vip-button>,点击升级</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="more">
|
||||
<a-button type="primary" @click="checkAll">检查全部</a-button>
|
||||
|
@ -19,11 +22,12 @@ import { useFs } from "@fast-crud/fast-crud";
|
|||
import createCrudOptions from "./crud";
|
||||
import { siteInfoApi } from "./api";
|
||||
import { Modal, notification } from "ant-design-vue";
|
||||
import { useSettingStore } from "/@/store/modules/settings";
|
||||
defineOptions({
|
||||
name: "SiteCertMonitor"
|
||||
});
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||
|
||||
const settingStore = useSettingStore();
|
||||
function checkAll() {
|
||||
Modal.confirm({
|
||||
title: "确认",
|
||||
|
|
|
@ -36,12 +36,6 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
throw new Error('userId is required');
|
||||
}
|
||||
|
||||
if (!isPlus()) {
|
||||
const count = await this.getUserMonitorCount(data.userId);
|
||||
if (count >= 1) {
|
||||
throw new NeedVIPException('站点监控数量已达上限,请升级专业版');
|
||||
}
|
||||
}
|
||||
if (isComm()) {
|
||||
const suiteSetting = await this.userSuiteService.getSuiteSetting();
|
||||
if (suiteSetting.enabled) {
|
||||
|
@ -50,7 +44,14 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
throw new NeedSuiteException('站点监控数量已达上限,请购买或升级套餐');
|
||||
}
|
||||
}
|
||||
}else if (!isPlus()) {
|
||||
const count = await this.getUserMonitorCount(data.userId);
|
||||
if (count >= 1) {
|
||||
throw new NeedVIPException('站点监控数量已达上限,请升级专业版');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
data.disabled = false;
|
||||
return await super.add(data);
|
||||
|
|
Loading…
Reference in New Issue