mirror of https://github.com/certd/certd
chore:
parent
54c8d62243
commit
6f84ebb323
|
@ -17,7 +17,7 @@
|
||||||
<fs-icon class="ml-5 color-red" icon="ion:warning-outline"></fs-icon>
|
<fs-icon class="ml-5 color-red" icon="ion:warning-outline"></fs-icon>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip v-if="cnameRecord.status === 'valid'" title="重置校验状态,重新校验">
|
<a-tooltip v-if="cnameRecord.status === 'valid'" title="重置校验状态,重新校验">
|
||||||
<fs-icon class="ml-5 color-red" icon="solar:undo-left-square-bold" @click="resetStatus"></fs-icon>
|
<fs-icon class="ml-2 color-yellow text-md point" icon="solar:undo-left-square-bold" @click="resetStatus"></fs-icon>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</td>
|
</td>
|
||||||
<td class="center">
|
<td class="center">
|
||||||
|
@ -38,6 +38,7 @@ import { ref, watch } from "vue";
|
||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
import * as api from "./api.js";
|
import * as api from "./api.js";
|
||||||
import CnameTip from "./cname-tip.vue";
|
import CnameTip from "./cname-tip.vue";
|
||||||
|
import { Modal } from "ant-design-vue";
|
||||||
const statusDict = dict({
|
const statusDict = dict({
|
||||||
data: [
|
data: [
|
||||||
{ label: "待设置CNAME", value: "cname", color: "warning" },
|
{ label: "待设置CNAME", value: "cname", color: "warning" },
|
||||||
|
@ -122,8 +123,14 @@ async function doVerify() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function resetStatus() {
|
async function resetStatus() {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "重置状态",
|
||||||
|
content: "确定要重置校验状态吗?",
|
||||||
|
onOk: async () => {
|
||||||
await api.ResetStatus(cnameRecord.value.id);
|
await api.ResetStatus(cnameRecord.value.id);
|
||||||
await loadRecord();
|
await loadRecord();
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -139,10 +139,10 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
|
||||||
if (!old) {
|
if (!old) {
|
||||||
throw new ValidateException('数据不存在');
|
throw new ValidateException('数据不存在');
|
||||||
}
|
}
|
||||||
if (old.domain !== param.domain) {
|
if (param.domain && old.domain !== param.domain) {
|
||||||
throw new ValidateException('域名不允许修改');
|
throw new ValidateException('域名不允许修改');
|
||||||
}
|
}
|
||||||
if (old.cnameProviderId !== param.cnameProviderId) {
|
if (param.cnameProviderId && old.cnameProviderId !== param.cnameProviderId) {
|
||||||
const cnameProvider = await this.cnameProviderService.info(param.cnameProviderId);
|
const cnameProvider = await this.cnameProviderService.info(param.cnameProviderId);
|
||||||
await this.cnameProviderChanged(old.userId, param, cnameProvider);
|
await this.cnameProviderChanged(old.userId, param, cnameProvider);
|
||||||
param.status = 'cname';
|
param.status = 'cname';
|
||||||
|
@ -201,7 +201,7 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
|
||||||
record.mainDomain = record.domain.replace(domainPrefix, "");
|
record.mainDomain = record.domain.replace(domainPrefix, "");
|
||||||
await this.update({
|
await this.update({
|
||||||
id: record.id,
|
id: record.id,
|
||||||
mainDomain: domainPrefix,
|
mainDomain: record.mainDomain,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue