mirror of https://github.com/certd/certd
chore:
parent
490141a920
commit
330f91e15b
|
@ -1,9 +1,12 @@
|
||||||
<template>
|
<template>
|
||||||
<fs-page>
|
<fs-page>
|
||||||
<template #header>
|
<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>
|
||||||
<div class="more">
|
<div class="more">
|
||||||
<a-button type="primary" @click="checkAll">检查全部</a-button>
|
<a-button type="primary" @click="checkAll">检查全部</a-button>
|
||||||
|
@ -19,11 +22,12 @@ import { useFs } from "@fast-crud/fast-crud";
|
||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { siteInfoApi } from "./api";
|
import { siteInfoApi } from "./api";
|
||||||
import { Modal, notification } from "ant-design-vue";
|
import { Modal, notification } from "ant-design-vue";
|
||||||
|
import { useSettingStore } from "/@/store/modules/settings";
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "SiteCertMonitor"
|
name: "SiteCertMonitor"
|
||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||||
|
const settingStore = useSettingStore();
|
||||||
function checkAll() {
|
function checkAll() {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: "确认",
|
title: "确认",
|
||||||
|
|
|
@ -36,12 +36,6 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||||
throw new Error('userId is required');
|
throw new Error('userId is required');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isPlus()) {
|
|
||||||
const count = await this.getUserMonitorCount(data.userId);
|
|
||||||
if (count >= 1) {
|
|
||||||
throw new NeedVIPException('站点监控数量已达上限,请升级专业版');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isComm()) {
|
if (isComm()) {
|
||||||
const suiteSetting = await this.userSuiteService.getSuiteSetting();
|
const suiteSetting = await this.userSuiteService.getSuiteSetting();
|
||||||
if (suiteSetting.enabled) {
|
if (suiteSetting.enabled) {
|
||||||
|
@ -50,8 +44,15 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
||||||
throw new NeedSuiteException('站点监控数量已达上限,请购买或升级套餐');
|
throw new NeedSuiteException('站点监控数量已达上限,请购买或升级套餐');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}else if (!isPlus()) {
|
||||||
|
const count = await this.getUserMonitorCount(data.userId);
|
||||||
|
if (count >= 1) {
|
||||||
|
throw new NeedVIPException('站点监控数量已达上限,请升级专业版');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
data.disabled = false;
|
data.disabled = false;
|
||||||
return await super.add(data);
|
return await super.add(data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue