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>
|
||||
</a-tooltip>
|
||||
<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>
|
||||
</td>
|
||||
<td class="center">
|
||||
|
@ -38,6 +38,7 @@ import { ref, watch } from "vue";
|
|||
import { dict } from "@fast-crud/fast-crud";
|
||||
import * as api from "./api.js";
|
||||
import CnameTip from "./cname-tip.vue";
|
||||
import { Modal } from "ant-design-vue";
|
||||
const statusDict = dict({
|
||||
data: [
|
||||
{ label: "待设置CNAME", value: "cname", color: "warning" },
|
||||
|
@ -122,8 +123,14 @@ async function doVerify() {
|
|||
}
|
||||
|
||||
async function resetStatus() {
|
||||
await api.ResetStatus(cnameRecord.value.id);
|
||||
await loadRecord();
|
||||
Modal.confirm({
|
||||
title: "重置状态",
|
||||
content: "确定要重置校验状态吗?",
|
||||
onOk: async () => {
|
||||
await api.ResetStatus(cnameRecord.value.id);
|
||||
await loadRecord();
|
||||
},
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -139,10 +139,10 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
|
|||
if (!old) {
|
||||
throw new ValidateException('数据不存在');
|
||||
}
|
||||
if (old.domain !== param.domain) {
|
||||
if (param.domain && old.domain !== param.domain) {
|
||||
throw new ValidateException('域名不允许修改');
|
||||
}
|
||||
if (old.cnameProviderId !== param.cnameProviderId) {
|
||||
if (param.cnameProviderId && old.cnameProviderId !== param.cnameProviderId) {
|
||||
const cnameProvider = await this.cnameProviderService.info(param.cnameProviderId);
|
||||
await this.cnameProviderChanged(old.userId, param, cnameProvider);
|
||||
param.status = 'cname';
|
||||
|
@ -201,7 +201,7 @@ export class CnameRecordService extends BaseService<CnameRecordEntity> {
|
|||
record.mainDomain = record.domain.replace(domainPrefix, "");
|
||||
await this.update({
|
||||
id: record.id,
|
||||
mainDomain: domainPrefix,
|
||||
mainDomain: record.mainDomain,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue