删除域名详情页的转入和删除域名按钮及相关代码
This commit is contained in:
parent
b218d844fd
commit
45929cee6e
@ -23,13 +23,6 @@
|
|||||||
>
|
>
|
||||||
续费
|
续费
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
@click="transferDomain"
|
|
||||||
:loading="transferLoading"
|
|
||||||
class="px-5 !bg-[#3b82f6] !hover:bg-[#2563eb] !text-white"
|
|
||||||
>
|
|
||||||
转入
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -98,14 +91,6 @@
|
|||||||
>
|
>
|
||||||
{{ $domain.pg.whois_protection ? '关闭隐私保护' : '开启隐私保护' }}
|
{{ $domain.pg.whois_protection ? '关闭隐私保护' : '开启隐私保护' }}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
@click="deleteDomain"
|
|
||||||
:loading="deleteLoading"
|
|
||||||
variant="outline"
|
|
||||||
class="bg-red-50 text-red-700 hover:bg-red-100 border-red-200"
|
|
||||||
>
|
|
||||||
删除域名
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -169,11 +154,9 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
renewLoading: false,
|
renewLoading: false,
|
||||||
transferLoading: false,
|
|
||||||
dnsLoading: false,
|
dnsLoading: false,
|
||||||
autoRenewLoading: false,
|
autoRenewLoading: false,
|
||||||
whoisProtectionLoading: false,
|
whoisProtectionLoading: false,
|
||||||
deleteLoading: false,
|
|
||||||
domainOwner: null,
|
domainOwner: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -247,15 +230,6 @@ export default {
|
|||||||
onSuccess: this.onRenewalSuccess
|
onSuccess: this.onRenewalSuccess
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
transferDomain() {
|
|
||||||
const JsiteDomainTransferDialog = defineAsyncComponent(() => import('./JsiteDomainTransferDialog.vue'));
|
|
||||||
|
|
||||||
renderDialog(h(JsiteDomainTransferDialog, {
|
|
||||||
domain: this.domain,
|
|
||||||
domainDoc: this.$domain.pg,
|
|
||||||
onSuccess: this.onTransferSuccess
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
async manageDNS() {
|
async manageDNS() {
|
||||||
if (!this.$domain.pg.domain) {
|
if (!this.$domain.pg.domain) {
|
||||||
toast.error('域名信息不存在');
|
toast.error('域名信息不存在');
|
||||||
@ -345,51 +319,10 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async deleteDomain() {
|
|
||||||
if (!this.$domain.pg.name) {
|
|
||||||
toast.error('域名记录不存在');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
confirmDialog({
|
|
||||||
title: '删除域名',
|
|
||||||
message: `确定要删除域名 "${this.$domain.pg.domain}" 吗?此操作不可逆!`,
|
|
||||||
primaryAction: {
|
|
||||||
label: '确定删除',
|
|
||||||
onClick: ({ hide }) => {
|
|
||||||
toast.success('删除域名请求已提交');
|
|
||||||
hide();
|
|
||||||
|
|
||||||
this.deleteLoading = true;
|
|
||||||
const deleteRequest = createResource({
|
|
||||||
url: 'jcloud.api.domain_west.delete_domain',
|
|
||||||
params: {
|
|
||||||
pagetype: 'Jsite Domain',
|
|
||||||
name: this.$domain.pg.name
|
|
||||||
},
|
|
||||||
onSuccess: () => {
|
|
||||||
this.deleteLoading = false;
|
|
||||||
toast.success('域名删除成功');
|
|
||||||
this.$router.push('/domains');
|
|
||||||
},
|
|
||||||
onError: (error) => {
|
|
||||||
toast.error(getToastErrorMessage(error));
|
|
||||||
this.deleteLoading = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
deleteRequest.submit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
onRenewalSuccess(data) {
|
onRenewalSuccess(data) {
|
||||||
toast.success('域名续费成功!');
|
toast.success('域名续费成功!');
|
||||||
this.$domain.reload();
|
this.$domain.reload();
|
||||||
},
|
},
|
||||||
onTransferSuccess(data) {
|
|
||||||
toast.success('域名转入成功!');
|
|
||||||
this.$domain.reload();
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 监听域名数据变化,重新获取所有者信息
|
// 监听域名数据变化,重新获取所有者信息
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user