import{_ as a,b as o,aI as e,d as l,e as d,f as t,w as s,aP as u,aQ as n,i as p,aR as i,aS as r,H as c,aT as m,aU as f,o as h,h as F,j as g,N as _,O as b}from"./index-B7MXcqD8.js";import{_ as k}from"./file-upload.DvydkfWX.js";const U=a({data:()=>({updateForm:{version:null,downloadUrl:"",updateLog:""},uploadLoading:!1}),created(){},mounted(){},methods:{onUploadFileBefore(a){this.uploadLoading=!0,console.log(a,"文件上传前")},onUploadFileSuccess(a,e){console.log(a),200===e.code&&(this.uploadLoading=!1,this.updateForm.downloadUrl=e.data,o({title:"apk上传成功！",icon:"none"}))},onUploadFileFail(a,o){console.log(a,o,"文件上传失败")},async handleSubmit(){if(this.updateForm.downloadUrl){const a=await this.$http({url:"/appVersion",method:"POST",data:this.updateForm});200===a.code&&o({title:"提交成功！",icon:"success"}),console.log(a)}else o({title:"请检查输入内容",icon:"error"})},handleBack(){this.updateForm.downloadUrl=null,this.updateForm.updateLog=null,this.updateForm.version=null,e()}}},[["render",function(a,o,e,U,w,x){const L=l(d("up-input"),u),S=l(d("up-form-item"),n),y=_,V=p,B=l(d("up-loading-icon"),i),v=l(d("file-upload"),k),j=b,C=l(d("up-form"),r),P=l(d("up-button"),c),E=l(d("up-col"),m),H=l(d("up-row"),f);return h(),t(V,{class:"update-page"},{default:s((()=>[F(C,{model:w.updateForm,"label-width":100},{default:s((()=>[F(S,{label:"版本号"},{default:s((()=>[F(L,{modelValue:w.updateForm.version,"onUpdate:modelValue":o[0]||(o[0]=a=>w.updateForm.version=a),placeholder:"请输入版本号,格式:3.2.9",border:"bottom",clearable:""},null,8,["modelValue"])])),_:1}),F(S,{label:"上传apk"},{default:s((()=>[F(v,{"max-size":60,"suffix-path":"/file/uploadNewApk",onBefore:x.onUploadFileBefore,onSuccess:x.onUploadFileSuccess,onError:x.onUploadFileFail},{default:s((()=>[w.uploadLoading?(h(),t(V,{key:1,class:"upload-box"},{default:s((()=>[F(B)])),_:1})):(h(),t(V,{key:0,class:"upload-box"},{default:s((()=>[F(y,{src:"/h5/assets/upload-icon-DMqiP0gl.png",class:"upload-icon",mode:"aspectFit"})])),_:1}))])),_:1},8,["onBefore","onSuccess","onError"])])),_:1}),F(S,{label:"更新内容"},{default:s((()=>[F(j,{modelValue:w.updateForm.updateLog,"onUpdate:modelValue":o[1]||(o[1]=a=>w.updateForm.updateLog=a),class:"update-textarea",placeholder:"请输入更新内容，每行限制13个字符","auto-height":""},null,8,["modelValue"])])),_:1})])),_:1},8,["model"]),F(H,{justify:"around",style:{"margin-top":"10px"}},{default:s((()=>[F(E,{span:4},{default:s((()=>[F(P,{type:"primary",icon:"checkbox-mark",onClick:x.handleSubmit},{default:s((()=>[g("提交")])),_:1},8,["onClick"])])),_:1}),F(E,{span:4},{default:s((()=>[F(P,{icon:"arrow-left",onClick:x.handleBack},{default:s((()=>[g("返回")])),_:1},8,["onClick"])])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-26c75c9f"]]);export{U as default};
