import{P as m}from"./app-CyTk3GnO.js";import{i as f,c as p}from"./app-DckefXYL.js";import{_ as g}from"./app-MnSDCF4P.js";import{T as x}from"./app-B8VsrFxM.js";import{_ as y}from"./app-DFy7dJHP.js";import{C as k}from"./app-Do8DhyKT.js";import{_ as T}from"./app-COct4tsy.js";import{D as w}from"./app-Cx7ENVlu.js";import{o,c as d,w as a,b as u,a as s,u as e,t as l,g as n,F as M,D as b,f as i,h as r}from"./app-DnroACXc.js";import"./app-CUqfl6on.js";import"./app-B09rlSqG.js";import"./app-yF7sElvF.js";import"./app-CqkleIqs.js";import"./app-LqsmzyUT.js";function D(){const{utils:_,Tea:t}=f(this);this.isOk=!1,this.errorMessage="",this.rawErrorMessage="",this.isVerifying=!1,this.before=function(){this.isOk=!1,this.errorMessage="",this.rawErrorMessage="",this.isVerifying=!0},this.submitSuccess=function(c){this.isOk=c.data.isOk,this.errorMessage=c.data.message,this.rawErrorMessage=c.data.rawErrorMessage,this.isOk&&_.success("验证完成",function(){window.parent.location.reload()})},this.done=function(){this.isVerifying=!1}}const E=s("header",null,"验证域名",-1),S=s("p",{class:"comment"},"当前域名验证后，其下的域名解析才会生效。",-1),V=["value"],N=s("td",{class:"title"},"域名",-1),v=s("td",null,"DNS主机地址",-1),B={key:0,class:"label-group"},C={key:1,class:"red"},O={key:2,class:"comment"},L={key:0},X=s("td",null,"TXT记录",-1),$={key:0,id:"txt-text"},P={class:"comment"},q=s("div",{class:"margin"},null,-1),F={key:0,class:"red"},z={key:1,class:"red"},I={key:0},ot={__name:"verifyPopup",setup(_){const t=p(new D);return(c,R)=>(o(),d(m,null,{default:a(()=>[E,S,u(g,{action:"$",onBefore:e(t).before,onSuccess:e(t).submitSuccess,onDone:e(t).done},{default:a(()=>[s("input",{type:"hidden",name:"domainId",value:e(t).domain.id},null,8,V),u(w,null,{default:a(()=>[s("tbody",null,[s("tr",null,[N,s("td",null,l(e(t).domain.name),1)]),s("tr",null,[v,s("td",null,[e(t).hosts.length>0?(o(),n("div",B,[(o(!0),n(M,null,b(e(t).hosts,h=>(o(),d(x,{outlined:""},{default:a(()=>[i(l(h),1)]),_:2},1024))),256))])):r("",!0),e(t).hosts.length==0?(o(),n("span",C,"管理员没有设置可用的DNS主机域名，请联系客服。")):r("",!0),e(t).hosts.length>0?(o(),n("p",O,"请修改域名的DNS主机地址为以上地址。")):r("",!0)])]),e(t).requireTXT&&e(t).txt.length>0?(o(),n("tr",L,[X,s("td",null,[e(t).txt.length>0?(o(),n("span",$,l(e(t).txt),1)):r("",!0),i("  "),u(y,{text:e(t).txt},null,8,["text"]),s("p",P,[i("由于当前域名已被别的用户添加并验证，所以需要重新验证所有权。请在域名中加入以上TXT记录，子域名为 "),u(k,null,{default:a(()=>[i("yanzheng")]),_:1}),i(" ，需要在"+l(e(t).txtExpiresTime)+"之前完成验证。 ",1)])])])):r("",!0)])]),_:1}),e(t).domain.status=="none"&&e(t).hosts.length>0&&(!e(t).requireTXT||e(t).txt.length>0)?(o(),d(T,{key:0},{default:a(()=>[i("验证")]),_:1})):r("",!0),q,s("div",null,[e(t).isVerifying?(o(),n("span",F,"验证中，请稍候...")):r("",!0),!e(t).isOk&&e(t).errorMessage.length>0?(o(),n("span",z,[i("验证失败："+l(e(t).errorMessage)+" ",1),e(t).rawErrorMessage.length>0?(o(),n("span",I,"("+l(e(t).rawErrorMessage)+")",1)):r("",!0)])):r("",!0)])]),_:1},8,["onBefore","onSuccess","onDone"])]),_:1}))}};export{ot as default};
