(function(e,a){typeof exports=="object"&&typeof module<"u"?module.exports=a(require("vue")):typeof define=="function"&&define.amd?define(["vue"],a):(e=typeof globalThis<"u"?globalThis:e||self,e.domain_check=a(e.Vue))})(this,function(e){"use strict";function a(t){return App.request({url:"addons/domain_check/Domain/getCheckFile",method:"post",data:t})}function p(t){return App.request({url:"addons/domain_check/Domain/uploadCheckFile",method:"post",data:t})}const h=(t,n)=>{const o=t.__vccOpts||t;for(const[c,l]of n)o[c]=l;return o},m={name:"DomainCheckIndex",data(){return{fileList:[],content:"",fileName:""}},created(){a().then(t=>{this.content=t.data.info.file_content,window.App.util.EventBus.emit("App-Page-Show")})},methods:{uploadFile(){let t=new FormData;var n="";this.fileList.forEach(o=>{t.append("domain_check_file",o.raw),console.log(o),console.log(333),this.fileName=o.raw.name,n=o.raw.type}),console.log(22222222),console.log(n),console.log(this.fileList),console.log(4444),n!=="text/plain"&&(this.fileName="",this.fileList=[],this.$baseMessage("上传文件格式不正确","error"))},handleChange(t,n){n.length>0&&(this.fileList=[n[n.length-1]])},see(t){this.$baseAlert(t,"信息").then(n=>{})},onSubmit(){if(console.log(this.fileList.length),console.log(3333333),this.fileList.length!==0){let t=new FormData;this.fileList.forEach(n=>{t.append("domain_check_file",n.raw)}),p(t).then(n=>{this.$baseMessage("上传成功")})}else this.$baseMessage("请选择上传文件","error")}}},f={class:"userManagement-container"},_={key:0};function g(t,n,o,c,l,i){const s=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-button"),k=e.resolveComponent("el-upload"),w=e.resolveComponent("el-form"),y=e.resolveComponent("el-tab-pane"),N=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",f,[e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(y,{label:t.translateI18n("域名校验")},{default:e.withCtx(()=>[e.createVNode(w,{ref:"form","label-width":"120px"},{default:e.withCtx(()=>[e.createVNode(s,{style:{color:"#999"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.translateI18n("若文件上传后，校验仍不通过，请确认服务器上该文件是否存在，请以服务器为准。")),1)]),_:1}),e.createVNode(s,{label:t.translateI18n("域名校验文件")},{default:e.withCtx(()=>[e.createVNode(k,{"show-file-list":!1,action:"#","on-change":i.handleChange,"http-request":i.uploadFile,"file-list":l.fileList,accept:".txt",style:{display:"flex","align-items":"center",border:"1px solid #d2d6de"}},{default:e.withCtx(()=>[e.createVNode(d,{size:"small",type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.translateI18n("选择文件")),1)]),_:1}),e.createElementVNode("span",null,e.toDisplayString(l.fileName),1)]),_:1},8,["on-change","http-request","file-list"]),l.content!==""?(e.openBlock(),e.createElementBlock("div",_,[e.createTextVNode(e.toDisplayString(t.translateI18n("已上传"))+" ",1),e.createElementVNode("span",{style:{"margin-left":"10px"},onClick:n[0]||(n[0]=b=>i.see(l.content))},e.toDisplayString(t.translateI18n("查看")),1)])):e.createCommentVNode("v-if",!0)]),_:1},8,["label"]),e.createVNode(s,null,{default:e.withCtx(()=>[e.createVNode(d,{type:"primary",onClick:i.onSubmit},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.translateI18n("确定")),1)]),_:1},8,["onClick"])]),_:1})]),_:1},512)]),_:1},8,["label"])]),_:1})])}const C=h(m,[["render",g],["__scopeId","data-v-05f6fb4a"]]);function r(t){const n=[{path:"/domain_check",name:"domain_check",component:t.Layout,meta:{title:"域名校验"},children:[{path:"domain_check_index",component:C,meta:{title:"域名校验"}}]}];t.registerPlugin("domain_check",{routes:n})}return window.App&&r(window.App),r});
window.Yibai.pluginManage && window.Yibai.pluginManage.importCss && window.Yibai.pluginManage.importCss('domain_check', '["style.CbsJ95fy.css"]');