← Back
Editing: domain-verification.js
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/change-verification.js?v=1753755607904","js/public.js?v=1753755607904","js/page_layout.js?v=1753755607904","js/vue.js?v=1753755607904","js/__commonjsHelpers__.js?v=1753755607904","js/naive.js?v=1753755607904","js/common.js?v=1753755607904","css/page_layout.css?v=1753755607904","css/public.css?v=1753755607904","js/index.vue_vue_type_script_setup_true_lang.js?v=1753755607904"])))=>i.map(i=>d[i]); import{o as e,_ as a,d as l,m as t,a as s}from"./page_layout.js?v=1753755607904";import{i as n,b as o,h as i,aA as r,f as u,_ as d,a0 as c,u as _}from"./public.js?v=1753755607904";import{_ as p}from"./index.vue_vue_type_script_setup_true_lang.js?v=1753755607904";import{cC as m,aq as f,ay as v,bZ as y,bT as h}from"./naive.js?v=1753755607904";import{k as x,a4 as C,U as b,X as w,V as k,Q as S,a2 as B,j as L,a3 as $,W as D,P as V,ad as j,e as g,r as P,c as A,n as M,a1 as N,_ as R}from"./vue.js?v=1753755607904";import"./common.js?v=1753755607904";import"./__commonjsHelpers__.js?v=1753755607904";const U={class:"text-14px mb-20px!"},H=x({__name:"dns-verification",props:{form:{}},setup:a=>(a,l)=>{const t=e,s=C("i18n-t"),o=f,i=v,r=m,u=y,d=p;return w(),b("div",null,[k("div",U,[S(s,{keypath:"SSL.Business.index_15",scope:"global"},{a:B((()=>[S(t,null,{default:B((()=>[L($(a.form.domain_name),1)])),_:1})])),b:B((()=>[L($(a.form.record_type),1)])),_:1})]),S(d,{model:a.form,"label-width":"100px"},{default:B((()=>[S(r,{label:a.$t("Mail.Domain.index_37")},{default:B((()=>[S(o,{class:"w-380px!",value:a.form.host_record,"onUpdate:value":l[0]||(l[0]=e=>a.form.host_record=e),readonly:""},null,8,["value"]),S(i,{class:"ml-10px!",type:"primary",onClick:l[1]||(l[1]=e=>D(n)(a.form.host_record))},{default:B((()=>[L($(a.$t("Public.Btn.Copy")),1)])),_:1})])),_:1},8,["label"]),S(r,{label:a.$t("Mail.Domain.index_36")},{default:B((()=>[S(o,{class:"w-380px!",value:a.form.record_type,"onUpdate:value":l[2]||(l[2]=e=>a.form.record_type=e),readonly:""},null,8,["value"])])),_:1},8,["label"]),S(r,{label:a.$t("Mail.Domain.index_38")},{default:B((()=>[S(u,null,{default:B((()=>[S(o,{type:"textarea",class:"w-380px!",value:a.form.record_value,"onUpdate:value":l[3]||(l[3]=e=>a.form.record_value=e),readonly:""},null,8,["value"]),S(i,{type:"primary",onClick:l[4]||(l[4]=e=>D(n)(a.form.record_value))},{default:B((()=>[L($(a.$t("Public.Btn.Copy")),1)])),_:1})])),_:1})])),_:1},8,["label"])])),_:1},8,["model"])])}}),F={class:"text-14px mb-20px!"},E={class:"text-primary"},T=x({__name:"http-verification",props:{form:{},paths:{}},setup(e){const{t:t}=V(),s=e,{form:d,paths:c}=j(s),{columns:_}=o([{title:"URL",key:"url",width:"50%",ellipsis:{tooltip:!0}},{title:"Verification Result",key:"status",render:e=>-1===e.status?S("span",{class:"color-error"},[L("Failed("),e.status,L(")"),S(a,{class:"ml-5px! cursor-pointer",name:"base-problem",onClick:()=>{window.open("https://www.aapanel.com/docs/Function/BusinessCertificate.html#http-and-https-file-verification-methods","_blank")}},null)]):S("span",{class:"text-primary"},[L("Success")])},i({width:150,options:e=>[{label:t("Public.Btn.Copy"),onClick:()=>{n(e.url)}},{label:t("Config.Panel.index_83_1"),onClick:()=>{window.open(e.url,"_blank")}},{label:"Re-verify",onClick:async()=>{try{const{message:a}=await r({url:e.url,content:s.form.file_content});l(a)&&(e.status=a.status)}catch(a){e.status=h(a,"message.status",-1)}}}]})]);return(e,a)=>{const l=f,t=v,s=m,o=y,i=p,r=u;return w(),b("div",null,[k("div",F,[a[6]||(a[6]=L(" Please add a verification file to the following domain name [ ")),k("span",E,$(D(d).domain_name),1),a[7]||(a[7]=L(" ], the verification information is as follows: "))]),S(i,{model:D(d),"label-width":"100px"},{default:B((()=>[S(s,{label:"File Location"},{default:B((()=>[S(l,{class:"w-380px!",value:D(d).file_path,"onUpdate:value":a[0]||(a[0]=e=>D(d).file_path=e),readonly:""},null,8,["value"]),S(t,{class:"ml-10px!",type:"primary",onClick:a[1]||(a[1]=e=>D(n)(D(d).file_path))},{default:B((()=>[L($(e.$t("Public.Btn.Copy")),1)])),_:1})])),_:1}),S(s,{label:e.$t("form.fileName")},{default:B((()=>[S(l,{class:"w-380px!",value:D(d).file_name,"onUpdate:value":a[2]||(a[2]=e=>D(d).file_name=e),readonly:""},null,8,["value"]),S(t,{class:"ml-10px!",type:"primary",onClick:a[3]||(a[3]=e=>D(n)(D(d).file_name))},{default:B((()=>[L($(e.$t("Public.Btn.Copy")),1)])),_:1})])),_:1},8,["label"]),S(s,{label:e.$t("SSL.Domain.index_13")},{default:B((()=>[S(o,null,{default:B((()=>[S(l,{type:"textarea",class:"w-380px!",value:D(d).file_content,"onUpdate:value":a[4]||(a[4]=e=>D(d).file_content=e),readonly:""},null,8,["value"]),S(t,{type:"primary",onClick:a[5]||(a[5]=e=>D(n)(D(d).file_content))},{default:B((()=>[L($(e.$t("Public.Btn.Copy")),1)])),_:1})])),_:1})])),_:1},8,["label"])])),_:1},8,["model"]),S(r,{columns:D(_),data:D(c)},null,8,["columns","data"])])}}}),q={class:"p-40px",show:!1},I=x({__name:"domain-verification",props:{uc_id:{},verify:{},paths:{},request:{type:Boolean},onRefresh:{type:Function}},emits:["close"],setup(a,{emit:n}){const{t:o}=V(),i=a,{uc_id:r,verify:u,request:p,paths:m}=j(i),f=n,h=g({host_record:"",record_type:"",record_value:"",domain_name:"",file_path:"/.well-known/pki-validation/",file_name:"",file_content:""}),x=P([]),C=P(""),U=A((()=>"CNAME_CSR_HASH"==C.value)),F=async()=>{const{message:e}=await c({uc_id:r.value});l(e)&&("PENDING"===e.certStatus?t.success(o("SSL.Business.index_23")):(i.onRefresh(),f("close")),h.host_record=e.data.DCVdnsHost,h.record_type=e.data.DCVdnsType,h.record_value=e.data.DCVdnsValue,h.domain_name=e.data.dcvList.map((e=>e.domainName)).join(","),C.value=e.data.dcvList[0].dcvMethod,h.file_name=e.data.DCVfileName,h.file_content=e.data.DCVfileContent,x.value=e.paths)},E=()=>{f("close")};M((()=>{p.value?F():I()}));const I=()=>{h.host_record=u.value.DCVdnsHost,h.record_type=u.value.DCVdnsType,h.record_value=u.value.DCVdnsValue,h.domain_name=u.value.dcvList.map((e=>e.domainName)).join(","),C.value=u.value.dcvList[0].dcvMethod,h.file_name=u.value.DCVfileName,h.file_content=u.value.DCVfileContent,x.value=(null==m?void 0:m.value)||[]},G=()=>{_({title:"Modify the verification method",width:500,minHeight:200,data:{uc_id:r.value,onRefresh:F},footer:!0,component:R((()=>s((()=>import("./change-verification.js?v=1753755607904")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))))})};return(a,l)=>{const t=e,s=d,n=v,o=y;return w(),b("div",q,[D(U)?(w(),N(H,{key:0,form:D(h)},null,8,["form"])):(w(),N(T,{key:1,form:D(h),paths:D(x)},null,8,["form","paths"])),S(s,{class:"my-20px"},{default:B((()=>[l[0]||(l[0]=k("li",null,"Check for the existence of CAA records, and if they exist, please remove the relevant CAA records.",-1)),k("li",null,$(a.$t("SSL.Business.index_16")),1),k("li",null,$(a.$t("SSL.Business.index_17")),1),k("li",null,$(a.$t("SSL.Business.index_18")),1),k("li",null,$(a.$t("SSL.Business.index_19")),1),k("li",null,[S(t,{href:"https://www.aapanel.com/docs/Function/BusinessCertificate.html",target:"_blank"},{default:B((()=>[L($(a.$t("SSL.Business.index_20")),1)])),_:1})])])),_:1,__:[0]}),S(o,null,{default:B((()=>[S(n,{type:"primary",onClick:F},{default:B((()=>[L($(a.$t("SSL.Business.index_21")),1)])),_:1}),S(n,{onClick:G},{default:B((()=>l[1]||(l[1]=[L("Modifiy verify")]))),_:1,__:[1]}),S(n,{onClick:E},{default:B((()=>[L($(a.$t("SSL.Business.index_22")),1)])),_:1})])),_:1})])}}});export{I as default};
Save File
Cancel