import{g as B,u as v}from"./index.bbd45d05.js";import{d as g,aX as w,b as y,c as p,e as A,f as C,h as o,i as n,u as t,m as c,E as r,_ as D}from"./index.0308b213.js";const h={class:"form"},x=c("\u66F4\u65B0"),k=c("\u4E0B\u8F7D\u66F4\u65B0\u5305"),U=g({setup(N){const b=w.get("uniacid"),i=window.location.protocol;console.log("protocol",i);const m=i+"//"+window.location.host+"/";console.log("domain",m);const e=y({version:"",web_path:"",last_version:"",last_time:"",type:"",domain:"",runtime_path:""});(()=>{B({uniacid:b,domain:m}).then(d=>{console.log("res",d),e.last_version=d.version,e.last_time=d.update_time,e.web_path=d.web_path,e.domain=d.domain})})();const _=(d,u)=>{if(!e.version){r.error("\u8BF7\u8F93\u5165\u7248\u672C\u53F7");return}if(!e.web_path){r.error("\u8BF7\u8F93\u5165\u7F51\u7AD9\u76EE\u5F55\u6587\u4EF6");return}e.type="back",e.download=u,v(e).then(a=>{if(console.log("res",a),u==1){window.open(a.data);return}a.code==1?r.success(a.msg):r.error(a.msg)})};return(d,u)=>{const a=p("el-input"),s=p("el-form-item"),F=p("el-button"),f=p("el-tab-pane"),E=p("el-tabs"),V=p("el-form");return A(),C("view",h,[o(V,{model:t(e),"label-position":"left"},{default:n(()=>[o(E,{type:"border-card"},{default:n(()=>[o(f,{label:"\u66F4\u65B0\u540E\u53F0"},{default:n(()=>[o(s,{label:"\u7248\u672C\u53F7",prop:"version"},{default:n(()=>[o(a,{modelValue:t(e).version,"onUpdate:modelValue":u[0]||(u[0]=l=>t(e).version=l),placeholder:"\u8BF7\u8F93\u5165\u7248\u672C\u53F7",clearable:""},null,8,["modelValue"])]),_:1}),o(s,{label:"\u7F51\u7AD9\u76EE\u5F55\u6587\u4EF6(\u7528\u4E8E\u81EA\u52A8\u66FF\u6362)",prop:"web_path"},{default:n(()=>[o(a,{modelValue:t(e).web_path,"onUpdate:modelValue":u[1]||(u[1]=l=>t(e).web_path=l),placeholder:"\u7F51\u7AD9\u76EE\u5F55\u6587\u4EF6(\u7528\u4E8E\u81EA\u52A8\u66FF\u6362)",clearable:""},null,8,["modelValue"])]),_:1}),o(s,{label:"\u7F51\u7AD9\u7F13\u5B58\u76EE\u5F55(\u66F4\u65B0\u540E\u5220\u9664)",prop:"runtime_path"},{default:n(()=>[o(a,{modelValue:t(e).runtime_path,"onUpdate:modelValue":u[2]||(u[2]=l=>t(e).runtime_path=l),placeholder:"\u7F51\u7AD9\u7F13\u5B58\u76EE\u5F55",clearable:""},null,8,["modelValue"])]),_:1}),o(s,{label:"\u8BF7\u6C42\u57DF\u540D",prop:"domain"},{default:n(()=>[o(a,{modelValue:t(e).domain,"onUpdate:modelValue":u[3]||(u[3]=l=>t(e).domain=l),placeholder:"\u8BF7\u6C42\u57DF\u540D",disabled:""},null,8,["modelValue"])]),_:1}),o(s,{label:"\u4E0A\u6B21\u66F4\u65B0\u7684\u7248\u672C\u53F7",prop:"last_version"},{default:n(()=>[o(a,{modelValue:t(e).last_version,"onUpdate:modelValue":u[4]||(u[4]=l=>t(e).last_version=l),placeholder:"\u4E0A\u6B21\u66F4\u65B0\u7684\u7248\u672C\u53F7"},null,8,["modelValue"])]),_:1}),o(s,{label:"\u4E0A\u6B21\u66F4\u65B0\u7684\u65F6\u95F4",prop:"last_version"},{default:n(()=>[o(a,{modelValue:t(e).last_time,"onUpdate:modelValue":u[5]||(u[5]=l=>t(e).last_time=l),placeholder:"\u4E0A\u6B21\u66F4\u65B0\u7684\u65F6\u95F4",disabled:""},null,8,["modelValue"])]),_:1}),o(a,{modelValue:t(e).type,"onUpdate:modelValue":u[6]||(u[6]=l=>t(e).type=l),type:"hidden",value:""},null,8,["modelValue"]),o(F,{type:"primary",style:{"margin-top":"20px"},onClick:u[7]||(u[7]=l=>_("back",0))},{default:n(()=>[x]),_:1}),o(F,{type:"primary",style:{"margin-top":"20px"},onClick:u[8]||(u[8]=l=>_("back",1))},{default:n(()=>[k]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])])}}});const T=D(U,[["__scopeId","data-v-669990d5"]]);export{T as default};
