← Back
Editing: index-legacy392.js
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var n,r={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(n){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),u=new V(r||[]);return i(a,"_invoke",{value:k(t,n,u)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var h="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function b(){}function w(){}function _(){}var x={};f(x,c,(function(){return this}));var j=Object.getPrototypeOf,O=j&&j(j(C([])));O&&O!==o&&a.call(O,c)&&(x=O);var L=_.prototype=b.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(e,n){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&a.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):n.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(a,a):a()}})}function k(t,e,r){var o=h;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:n,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var c=P(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var l=d(t,e,r);if("normal"===l.type){if(o=r.done?y:v,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function P(t,e){var r=e.method,o=t.iterator[r];if(o===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=n,P(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=_,i(L,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},S(E.prototype),f(E.prototype,l,(function(){return this})),r.AsyncIterator=E,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new E(p(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(L),f(L,s,"Generator"),f(L,c,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},r.values=C,V.prototype={constructor:V,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(D),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;D(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}},r}function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(e,n,r){return(n=function(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(t,e,n,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){a(i,r,o,u,c,"next",t)}function c(t){a(i,r,o,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./index-legacy145.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./ssl-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./useStore-legacy10.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER"],(function(t,n){"use strict";var o,a,u,c,l,s,f,p,d,h,v,m,y,g,b,w,_,x,j,O,L,S,E,k,P,N,D,V,C,G,F,T,R,U,q,A,I,z,H,J,Q,Y;return{setters:[function(t){o=t.j,a=t.b,u=t.n,c=t.L,l=t.p,s=t.l,f=t.a_},function(t){p=t._},function(t){d=t._},function(t){h=t.c,v=t.r,m=t.ay,y=t.U,g=t.g,b=t.w,w=t.q,_=t.M,x=t.A,j=t.y,O=t.e,L=t.x,S=t.Q,E=t.v,k=t.F,P=t.a_,N=t.C,D=t.P,V=t.ai,C=t.aj,G=t.a9,F=t.S,T=t.a7,R=t.p,U=t.Z,q=t.G,A=t.H},function(t){I=t.O,z=t.P,H=t.Q,J=t.y},function(t){Q=t.u},function(t){Y=t.g},null,null],execute:function(){var M={class:"py-[16px]"},Z=h({__name:"index",props:{title:{type:String,default:"添加NDS验证"}},setup:function(t){var n=a(),u=v({dns_name:"",ps:""}),c=v(null),l=m("isShowForm",y(!1)),s=m("formParams",y([])),f=m("isRefreshDNSList",y(!1)),p=m("formRow",y({})),d=v([]),h=g((function(){return!!p.value.id})),R=function(t){var e;d.value=(null===(e=s.value.find((function(e){return e.id.toLowerCase()===t.toLowerCase()})))||void 0===e?void 0:e.params)||[],q()},U=v({dns_name:[{required:!0,message:"请选择验证类型",trigger:"change"}]}),q=function(){d.value.forEach((function(t){U.value[t]=[{required:!0,message:"请输入".concat(t),trigger:"blur"}]}))},A=function(){u.value={dns_name:"",ps:""},p.value={dns_name:"DNSPodDns"}},H=function(){var t=i(e().mark((function t(){var o,a,i,s,p;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=c.value,t.next=3,o.validate().catch((function(){return!1}));case 3:if(t.sent){t.next=6;break}return t.abrupt("return",!1);case 6:if(t.prev=6,a=r({},u.value),!u.value.id){t.next=15;break}return t.next=11,I({dns_id:a.id,ps:a.ps||"",pdata:JSON.stringify(a)});case 11:s=t.sent,i=s,t.next=19;break;case 15:return t.next=17,z({dns_name:a.dns_name,ps:a.ps||"",pdata:JSON.stringify(a)});case 17:p=t.sent,i=p;case 19:n.request(i),l.value=!1,f.value=!0,A(),t.next=29;break;case 25:return t.prev=25,t.t0=t.catch(6),n.error(t.t0),t.abrupt("return",!1);case 29:case"end":return t.stop()}}),t,null,[[6,25]])})));return function(){return t.apply(this,arguments)}}(),J=function(){var t=i(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:A();case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return b(s,(function(t){t.length&&(u.value.dns_name=t[0].id,R(t[0].id))})),b(p,(function(t){u.value=r({},t),t.dns_name&&R(t.dns_name)}),{immediate:!0}),b(l,(function(t){t&&p.value.dns_name&&(u.value=r({},p.value),R(p.value.dns_name))})),function(e,n){var r=V,a=C,i=G,f=F,p=T,v=o;return w(),_(v,{title:t.title,modelValue:L(l),"onUpdate:modelValue":n[3]||(n[3]=function(t){return D(l)?l.value=t:null}),area:["50rem"],"show-footer":"",onCancel:J,onConfirm:H},{default:x((function(){return[j("div",M,[O(p,{ref_key:"dnsformRef",ref:c,size:"small",model:L(u),rules:L(U),class:"relative w-full","label-position":"right",onSubmit:n[2]||(n[2]=S((function(){}),["prevent"]))},{default:x((function(){return[O(i,{label:"验证类型",prop:"dns_name","label-width":"100"},{default:x((function(){return[O(a,{modelValue:L(u).dns_name,"onUpdate:modelValue":n[0]||(n[0]=function(t){return L(u).dns_name=t}),class:"!w-[33rem]",size:"default",filterable:"","default-first-option":"",placeholder:"请选择验证类型",disabled:L(h),onChange:R},{default:x((function(){return[(w(!0),E(k,null,P(L(s),(function(t){return w(),_(r,{key:t.id,label:t.name,value:t.id},null,8,["label","value"])})),128))]})),_:1},8,["modelValue","disabled"])]})),_:1}),L(d).length?(w(!0),E(k,{key:0},P(L(d),(function(t,e){return w(),_(i,{key:e,label:t,prop:t,"label-width":"100"},{default:x((function(){return[O(f,{modelValue:L(u)[t],"onUpdate:modelValue":function(e){return L(u)[t]=e},class:"!w-[33rem]",placeholder:"请输入".concat(t)},null,8,["modelValue","onUpdate:modelValue","placeholder"])]})),_:2},1032,["label","prop"])})),128)):N("",!0),O(i,{prop:"ps",label:"备注","label-width":"100"},{default:x((function(){return[O(f,{modelValue:L(u).ps,"onUpdate:modelValue":n[1]||(n[1]=function(t){return L(u).ps=t}),placeholder:"请输入备注",clearable:"",class:"!w-[33rem]"},null,8,["modelValue"])]})),_:1})]})),_:1},8,["model","rules"])])]})),_:1},8,["title","modelValue"])}}}),B={class:"p-[16px]"};t("default",h({__name:"index",setup:function(t){var r=a(),o=Y().refs.isRefreshDomainList,h=v([]),m=v({}),g=v(!1),_=v(!1),j=v(!1),S=y("添加DNS接口"),k=y({}),P=[{label:"类型",prop:"dns_name"},{label:"账号备注",prop:"ps"},Q([{onClick:function(t){k.value=t,u({title:"DNS域名【".concat(t.dns_name,"】"),area:50,component:function(){return c((function(){return n.import("./index-legacy481.js?v=VERSION_NUMBER")}),void 0,n.meta.url)},compData:{row:t}})},title:"域名"},{onClick:function(t){k.value=t,S.value="编辑【".concat(t.dns_name,"】"),j.value=!0},title:"编辑"},{onClick:function(t){D(t)},title:"删除"}])],N=[{content:"添加DNS接口",active:!0,event:function(){S.value="添加DNS接口",j.value=!0}}],D=function(){var t=i(e().mark((function t(n){var a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l({title:"删除【".concat(n.dns_name,"】"),content:"删除该验证接口,是否继续操作?",icon:"warning"});case 2:return t.prev=2,t.next=5,H({dns_id:n.id});case 5:a=t.sent,r.request(a),_.value=!0,o.value=!0,t.next=14;break;case 11:t.prev=11,t.t0=t.catch(2);case 14:case"end":return t.stop()}}),t,null,[[2,11]])})));return function(e){return t.apply(this,arguments)}}(),V=function(){var t=i(e().mark((function t(){var n,r,o,a,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g.value=!0,t.next=3,J();case 3:n=t.sent,r=n.data,(o=f(r))("data")&&(a=r.data,h.value=a),o("add_data")&&(i=r.add_data,m.value=i),g.value=!1;case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return b(_,(function(t){t&&(V(),_.value=!1)}),{immediate:!0}),R((function(){_.value=!0})),U("isShowForm",j),U("formParams",m),U("isRefreshDNSList",_),U("formRow",k),function(t,e){var n=d,r=s,o=p,a=q("bt-loading");return w(),E("div",B,[O(o,null,{"header-left":x((function(){return[O(n,{options:N})]})),content:x((function(){return[A(O(r,{class:"soft-table",column:P,"max-height":"350",data:L(h),description:"列表为空"},null,8,["data"]),[[a,L(g)],[a,"正在加载NDS验证接口列表,请稍后...","title"]])]})),popup:x((function(){return[O(Z,{title:L(S)},null,8,["title"])]})),_:1})])}}}))}}}))}();
Save File
Cancel