index-ea661ce6-1715840129614.js 20 KB

1
  1. import{d as x,u as P,a as W,r as l,b as D,P as J,c as O,e as R,s as k,f as e,N,g as d,h as F,i as z,j as E,k as B,l as L,m as Y,n as X,o as Q,p as H,q,t as U,v as $,w as ee,x as se}from"./index-27f38392-1715840129614.js";import{S as oe,u as ae,s as te,c as le,m as ne}from"./sendSms-31725b91-1715840129614.js";import{o as S,c as T}from"./closeEye-b6c1caaa-1715840129614.js";import{d as ue,m as re}from"./ding-8e9054d5-1715840129614.js";import{s as ce}from"./state-bac02a99-1715840129614.js";import{T as ie}from"./index-f8f9e2e7-1715840129614.js";import"./Scrollbar-b72aeac2-1715840129614.js";const pe=""+new URL("login_styles-ceba7cd4.png",import.meta.url).href,de=""+new URL("login-left-588cef70.png",import.meta.url).href,fe=""+new URL("loginright-bff46f2c.png",import.meta.url).href,Ae=""+new URL("colLogo-1855284b.png",import.meta.url).href,me="_stylesWrap_kplv4_29",ge="_loginLeft_kplv4_36",ve="_loginRight_kplv4_43",we="_colLogo_kplv4_56",he="_prefixIcon_kplv4_69",Ce="_pwdIcon_kplv4_74",Be="_formTitle_kplv4_79",Ie="_dot_kplv4_89",ye="_submitBtm_kplv4_96",be="_forgetBtm_kplv4_108",Fe="_sendInput_kplv4_115",Ee="_sendMsg_kplv4_118",ke="_loginTabs_kplv4_147",Me="_loginForgot_kplv4_147",Re="_showModalTone_kplv4_182",xe="_studentRemove_kplv4_185",Ue="_submitAppBtn_kplv4_197",Le="_downMove_kplv4_200",Se="_downMoveBg_kplv4_207",Te="_dingPng_kplv4_214",_e="_closeAble_kplv4_223",Pe="_alertWrap_kplv4_263",De="_alertInfo_kplv4_278",Oe="_infoIcon_kplv4_287",Ne="_down_kplv4_200",s={"no-pwd":"_no-pwd_kplv4_1","n-input__input-el":"_n-input__input-el_kplv4_4","view-account-form":"_view-account-form_kplv4_8","view-account":"_view-account_kplv4_8","view-account-container":"_view-account-container_kplv4_20",stylesWrap:me,loginLeft:ge,loginRight:ve,colLogo:we,"view-account-form-wrap":"_view-account-form-wrap_kplv4_60",prefixIcon:he,pwdIcon:Ce,formTitle:Be,dot:Ie,submitBtm:ye,forgetBtm:be,sendInput:Fe,sendMsg:Ee,"view-account-form-top":"_view-account-form-top_kplv4_129","view-account-form-top-desc":"_view-account-form-top-desc_kplv4_133","view-account-form-other":"_view-account-form-other_kplv4_137","default-color":"_default-color_kplv4_140","ant-checkbox-wrapper":"_ant-checkbox-wrapper_kplv4_144",loginTabs:ke,loginForgot:Me,showModalTone:Re,studentRemove:xe,submitAppBtn:Ue,downMove:Le,downMoveBg:Se,dingPng:Te,closeAble:_e,alertWrap:Pe,alertInfo:De,infoIcon:Oe,down:Ne},V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAA0pJREFUWEftmVtIFFEYx//fjKaZdoOFeigJwkh6CGdmZV/EICTBfVPEULALRD0EGYRg6BYhRU9C0eWhC90Iix4MjF7aCMOdnX0QIovCp+iykL1Ym7ieL07swjZNuzurq2zsPO75zv/7zf985+w5ZwgF9lCB8aIInO8RKzq8JA43NzeXRaPRASLyM3MtACXfibPRJ6I4gFcAHlRWVp4LBoNxSsC+BFCXjcgyxjzz+/27SdO0UwD6lxHETeqjEvg1gO1uei1j7AsJPO9Us4n6GWhpaTkbCATEUkHqur4DwC1m3umQ85sE5nQwRBRUVbUrFAp9yCc0M5Ou68cADAIoc8pFRLE/gKWrzFxiDyaiaUVRDpqm+Sgf0JqmbQZwA8CuDOb9BRxj5jYA1wF4HMCvMHNPJBL5sVjghmF0CiEuAFhj12Tm+0TUnvzdyeGYZVkVhmFsEELcBNDkADapqmqHaZoTC4H2+Xzr5+bmpAGtTiNKRIeFEI8BfM8ILAMSNdWTqKkVNtFZIuoNh8NDRJR2Dji9lGEYe4QQ1wBsdGh/Wl5evm9sbOyjpmkVWQMnhTRNqyOiu8y8zcGJJ6qqdodCoS/ZuJ0AOA/giINWDMCJcDh8MWlCTs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TR5EHEMAKfMbB4s/kD+Fw0T0fs8rHEuN2bmrbSlp8BFFl3tJFFll7bUc4naHWjXrmVQu6bMTF+1ansZC6I+jcUEepVat988fMRLRmtCKgAAAABJRU5ErkJggg==",Ze=x({name:"codeLogin",props:{phone:{type:String,default:""}},emits:["update:phone"],setup(i,{emit:f}){const b=P(),w=W(),p=l(),u=D(),n=l(!1),r=l(!0),o=l(!1),m=J.BASE_LOGIN_NAME,g=O(),a=R({username:"",password:"",isCaptcha:!0}),h=l(!1),t=l(60),I="发送短信",C=k.get("userInfo-teacher");C&&(a.username=JSON.parse(C).username),a.username?a.username!==i.phone&&i.phone?a.username=i.phone:f("update:phone",a.username):i.phone&&(a.username=i.phone);const c=async()=>{p.value.validate(async A=>{if(!A){const{username:Z,password:G}=a;u.loading("登录中..."),n.value=!0,k.set("userInfo-teacher",JSON.stringify({username:Z}));const K={username:Z,password:G,loginType:"SMS",grant_type:"password",client_id:"cooleshow-teacher",client_secret:"cooleshow-teacher"};try{await g.login(K),u.destroyAll(),r.value?k.set("userInfo",JSON.stringify(a)):k.remove("userInfo");const M=decodeURIComponent("/");u.success("登录成功,即将进入系统"),w.name===m?b.replace("/"):b.replace(M)}catch(M){u.destroyAll(),n.value=!1,u.error(M.msg),console.log(M)}finally{n.value=!1}}})},v=async()=>{o.value=!0},y=()=>{if(h.value)return;h.value=!0;const A=setInterval(()=>{t.value--,t.value<=0&&(h.value=!1,clearInterval(A))},1e3)};return()=>e("div",{class:s["view-account-form-wrap"]},[e(N,{ref:p,"label-placement":"left",size:"large",model:a},{default:()=>[e(d,{path:"username",rule:[{required:!0,message:"请输入手机号",trigger:"blur"}]},{default:()=>[e(F,{maxlength:11,value:a.username,"onUpdate:value":A=>a.username=A,placeholder:"请输入手机号",onInput:A=>{f("update:phone",A)}},{prefix:()=>e("img",{src:j,class:s.prefixIcon,alt:""},null)})]}),e(d,{path:"password",rule:[{required:!0,message:"请输入验证码",trigger:"blur"}]},{default:()=>[e(z,null,{default:()=>[e(F,{value:a.password,"onUpdate:value":A=>a.password=A,type:"text",showPasswordOn:"click",placeholder:"请输入验证码",inputProps:{autocomplete:"off"},class:s.sendInput,maxlength:6,onKeydown:A=>{(A.code==="Enter"||A.code==="NumpadEnter")&&c()}},{prefix:()=>e("img",{src:V,class:s.prefixIcon,alt:""},null),suffix:()=>e(E,{class:s.sendMsg,disabled:h.value,onClick:()=>v()},{default:()=>[h.value?t.value+"S":I]})})]})]}),e(d,{class:s["default-color"]},{default:()=>[e("div",{class:[s.flex,s["justify-between"]]},[e("div",{class:s["flex-initial"]},null)])]}),e(d,null,{default:()=>[e(E,{class:s.submitBtm,type:"primary",onClick:c,size:"large",disabled:n.value,block:!0},{default:()=>[B("立即登录")]})]})]}),e(L,{show:o.value,"onUpdate:show":A=>o.value=A},{default:()=>[e(oe,{phone:a.username,onClose:()=>o.value=!1,onSendCode:()=>{y()}},null)]})])}}),_="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAA5RJREFUWEftmV+IG1UUxr8z6UaNPrjSQq1idVHxySLnDkt3XVzBPw8uKIqg9G2RUh+k+KLFpzy2fRCxCtZSn4pPgsJaEZSKLJLdzTlgBUHpKhXaYl1BYbDZxmaOjGyGMSbmJpPGLeQ+Ts75vt98M3Pn3gkh52DmrUEQ7DGzGQAPANhqZgER/Q7gGzOrjI2NnVhaWjqb0+rvdupXZGZmZlutVjtkZnsAFLvoGICTxWLx5UqlstqvZ9/AYRg+bWbHzOyWHs0vE9EBEXmjx760vOeEmXkfgLcBBP2aAnhTVff3098TsHPuSTP7qI3Rd0T0LhF9MT4+fiaKorher+8E8CARzZvZ7tYeInpVRA73Cu0NzMx3ADgN4OasCRG9bmYHVPXPTubM/CyA9wDc1KwhogaAh0Tkq16gvYGdc8fNbD4jXi8UCs+trKx86GPIzA8T0Sdmdn0GuiIiUz79aY9P8dTU1M56vb5qZlsyZi+JyFs+/c0aZn4CwMctV+hREfnc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cGRdoIsellF8DwAovyyc6Ojrm9fT0/O2+G86wlPJhAPDvGv4KgmBhuVwe2lMnywqFwsxareaO/1d4MdcaY9xF4r/ArnaVUr8AwLWe02ZjjHsNT7pJKTe5vdoL/CsRLXK1PATcaM7JcxicOnXq1QcOHHD/UUy6LVmyZNbZs2f7AWBKFDwIAuVuOIeAlVIbmPk1r24+I6LuSSf1AiqlPmXm+z2mZ4hoyxCwlPJLAHD/Ag2ZEGK91vqtSwkchuHj1tptHsNOY8w9EbBrYDo84Ou01q6mL5mFYbjIWvuzBzBgjJkRlcRRZp7TGDxORHOSNjQX6xc1NoJjADDbxUDEY0Q0N8rwCkSMNux1RPTtxQJJo6uUusM1SI05Q1yx/XCaAJPh+w8iEp9LNey2nAAAAABJRU5ErkJggg==",We=x({name:"codeLogin",props:{phone:{type:String,default:""}},emits:["changType","update:phone"],setup(i,{emit:f}){const b=P(),w=l(),p=D(),u=l(!1),n=l(!1),r=O();let o=R({username:"",password:"",isCaptcha:!0});const m=k.get("userInfo-teacher");m&&(o=R({...JSON.parse(m)})),o.username?o.username!==i.phone&&i.phone?o.username=i.phone:f("update:phone",o.username):i.phone&&(o.username=i.phone);const g=async()=>{w.value.validate(async a=>{if(!a){const{username:h,password:t}=o;u.value=!0;const I={username:h,password:t,loginType:"PASSWORD",grant_type:"password",client_id:"cooleshow-teacher",client_secret:"cooleshow-teacher"};try{await r.login(I),p.destroyAll(),o.isCaptcha?k.set("userInfo-teacher",JSON.stringify(o)):k.set("userInfo-teacher",JSON.stringify({...o,password:"",isCaptcha:!0}));const C=decodeURIComponent("/");console.log(C,"toPath"),p.success("登录成功,即将进入系统"),b.replace(C)}catch(C){console.log(C,"e")}finally{u.value=!1}}})};return()=>e("div",{class:s["view-account-form-wrap"]},[e(N,{ref:w,"label-placement":"left",size:"large",model:o},{default:()=>[e(d,{path:"username",rule:[{required:!0,message:"请输入用户名",trigger:"blur"}]},{default:()=>[e(F,{maxlength:11,value:o.username,"onUpdate:value":a=>o.username=a,placeholder:"请输入用户名",onInput:a=>{f("update:phone",a)}},{prefix:()=>e("img",{src:qe,class:s.prefixIcon,alt:""},null)})]}),e(d,{path:"password",rule:[{required:!0,message:"请输入密码",trigger:"blur"}]},{default:()=>[e(F,{value:o.password,"onUpdate:value":a=>o.password=a,type:"text",showPasswordOn:"click",placeholder:"请输入密码",inputProps:{autocomplete:"off"},class:[n.value?"":s["no-pwd"]],onKeydown:a=>{(a.code==="Enter"||a.code==="NumpadEnter")&&g()}},{prefix:()=>e("img",{src:_,class:s.prefixIcon,alt:""},null),suffix:()=>e("img",{src:n.value?S:T,class:s.pwdIcon,alt:"",onClick:()=>{n.value=!n.value}},null)})]}),e(d,{class:s["default-color"]},{default:()=>[e("div",{class:[s.flex,s["justify-between"]]},[e("div",{class:s["flex-initial"]},[e(Y,{checked:o.isCaptcha,"onUpdate:checked":a=>o.isCaptcha=a},{default:()=>[B("记住密码")]})])])]}),e(d,null,{default:()=>[e(E,{class:s.submitBtm,type:"primary",onClick:g,size:"large",disabled:u.value,loading:u.value,block:!0},{default:()=>[B("立即登录")]})]}),e(d,null,{default:()=>[e(E,{text:!0,class:s.forgetBtm,onClick:()=>{f("changType")},size:"large",block:!0},{default:()=>[B("忘记密码")]})]})]})])}}),Je=x({name:"forgotPassword",props:{phone:{type:String,default:""}},emits:["changType"],setup(i,{emit:f}){P(),W();const b=l(),w=D(),p=l(!1);l(!0),J.BASE_LOGIN_NAME;const u=l(!1),n=l(!1);O();const r=R({mobile:"",password:"",password1:"",code:"",isCaptcha:!0}),o=l(!1),m=l(60),g="发送短信",a=(c,v,y)=>{v===""?y(new Error("请再次输入密码")):v!==r.password?y(new Error("两次输入密码不一致!")):v.length<8||v.length>20?y(new Error("8~20位含数字、字母、特殊字符(如:%、&、#等)组合")):y()},h=(c,v,y)=>{v===""?y(new Error("请输入密码")):v.length<8||v.length>20?y(new Error("8~20位包数字、字母、特殊字符(如:%、&、#等)组合")):y()};i.phone&&(r.mobile=i.phone);const t=async()=>(b.value.validate(async c=>{if(!c){w.loading("修改中..."),p.value=!0;try{return await ae({...r,clientType:"TEACHER"}),w.success("修改成功"),p.value=!1,f("changType"),!1}catch(v){return p.value=!1,w.error(v.msg),!1}}}),!1),I=async()=>{if(!r.mobile){w.error("请输入手机号");return}try{const c=await te({clientId:"cooleshow-teacher",mobile:r.mobile,type:"PASSWORD"});C()}catch(c){console.log(c)}},C=()=>{if(o.value)return;o.value=!0;const c=setInterval(()=>{m.value--,console.log(m.value),m.value<=0&&(o.value=!1,clearInterval(c))},1e3)};return()=>e("div",{class:s["view-account-form-wrap"]},[e(N,{ref:b,"label-placement":"left",size:"large",model:r},{default:()=>[e(d,{path:"mobile",rule:[{required:!0,message:"请输入手机号",trigger:"blur"}]},{default:()=>[e(F,{maxlength:11,value:r.mobile,"onUpdate:value":c=>r.mobile=c,placeholder:"请输入手机号"},{prefix:()=>e("img",{src:j,class:s.prefixIcon,alt:""},null)})]}),e(d,{path:"password",rule:[{validator:h,trigger:"blur",required:!0}]},{default:()=>[e(F,{value:r.password,"onUpdate:value":c=>r.password=c,type:"text",showPasswordOn:"click",placeholder:"请输入密码",inputProps:{autocomplete:"off"},class:[u.value?"":s["no-pwd"]]},{prefix:()=>e("img",{src:_,class:s.prefixIcon,alt:""},null),suffix:()=>e("img",{src:u.value?S:T,class:s.pwdIcon,alt:"",onClick:()=>{u.value=!u.value}},null)})]}),e(d,{path:"password1",rule:[{validator:a,trigger:"blur",required:!0}]},{default:()=>[e(F,{value:r.password1,"onUpdate:value":c=>r.password1=c,type:"text",showPasswordOn:"click",placeholder:"请确认密码",inputProps:{autocomplete:"off"},class:[n.value?"":s["no-pwd"]]},{prefix:()=>e("img",{src:_,class:s.prefixIcon,alt:""},null),suffix:()=>e("img",{src:n.value?S:T,class:s.pwdIcon,alt:"",onClick:()=>{n.value=!n.value}},null)})]}),e(d,{path:"code",rule:[{required:!0,message:"请输入验证码",trigger:"blur"}]},{default:()=>[e(z,null,{default:()=>[e(F,{value:r.code,"onUpdate:value":c=>r.code=c,type:"text",showPasswordOn:"click",placeholder:"请输入验证码",inputProps:{autocomplete:"off"},class:s.sendInput,onKeydown:c=>{(c.code==="Enter"||c.code==="NumpadEnter")&&t()}},{prefix:()=>e("img",{src:V,class:s.prefixIcon,alt:""},null),suffix:()=>e(E,{class:s.sendMsg,disabled:o.value,onClick:()=>I()},{default:()=>[o.value?m.value+"S":g]})})]})]}),e(d,null,{default:()=>[e(E,{class:[s.submitBtm,s.submitForgoBtm],type:"primary",onClick:t,size:"large",disabled:p.value,block:!0},{default:()=>[B("确认")]})]}),e(d,null,{default:()=>[e(E,{text:!0,class:s.forgetBtm,onClick:()=>{f("changType")},size:"large",block:!0},{default:()=>[B("返回登录")]})]})]})])}}),ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAo1JREFUWEfNmL9v01AQx79f26DCghATaQpFCAF/AA1bywgSQp34sbCwgDqUGgEDIwOgJs1QwcLCgmCqEBKMpBuFPwBQhSi0hAkhFqgg9hc9Nw5JSRrHccXzZCt39z65u3d37xEpn32z2vv7F4bDEDk6yBkzClF1HFS3bMXShwl+TGOavSjlyyqEAcYBnJJ0aCNdkm8BPHFczK1MciHpOomA8iWNBMIdSKNJDbfIkfMucXVliq+66W8ItOeudtZ+4p6k090MJfmd5GNvGy5+usRvneQ7AuXKOogango6kGSxpDIEF+HhZHWS79rptAUaLOqYhDlBO5Iu1Iscwe8kxj/7fLFe7x+gumcWNgsmBjBQ8FBY76kWoChnfsDAZBqmzvnCRW87Cs051QKUK+pRVgmcNIQm0as+z/z1XP0t2tqhEteLJte/d1xcMN9hgPuC9ieFieVch4W4JDQ8tLuoSqo6Q85/8TlmjGdhIwIyFTio6WWv/yySzwIIgOvxqKnoEVCuqFuSrv1PIJK3qz6vx0BvuvWmjrAZecj0vqrPwzRde3VVS6m8k2HIjKmBAQ4zX9JoEKpiA5DrcIy5aZ0V9NAGIILnOFiSH4aatgHIcXiFg0VNhVLRCiDSty9k/SY1wa8gZiMPCxOCdqX1dpTUfW/7tKu30Yu2fb1Spy+MGQE1CmPfrQOs0MP5KGI1PAAUNdpen5bW0U9z9TyOLE/ytQEYKutIraauJ4t2sC3NtZ/RwXV5YuUyn0dTw4yOB4Ge9eqd5omhMQ+lHtDIZQI31jYZbkoa6hWo7YBWzyV7RlgDZN2QH3lp7YBoxzEojr1VB8UYyqqjdAxl1WVD89a15jpmfT2x5sKqXaHbrCu9P01pn9rR5pptAAAAAElFTkSuQmCC",He=x({name:"login-page",setup(){const i=l(!1),f=l("pwdLogin"),b=l(),w=l(),p=l();X();const u=l(),n=l(!1),r=l(!1),o=l(!1),m=async t=>{t.preventDefault(),console.log("checkInstall",t),p.value=t,console.log("beforeoutcome"),window.matchMedia("(display-mode: standalone)").matches?ce.application=window.matchMedia("(display-mode: standalone)").matches:(console.log(p.value,"popEvent.value"),p.value&&(n.value=!0,setTimeout(()=>{const I=document.querySelector("#submitBtn");I&&I.addEventListener("click",()=>{n.value=!1,p.value&&(p.value.prompt(),p.value.userChoice.then(C=>{C.outcome==="accepted"?(console.log("用户已同意添加到桌面"),n.value=!1,g()):(console.log("用户已取消添加到桌面"),n.value=!1,g())}))})},500))),await a(),!n.value&&r.value&&(o.value=!0)},g=()=>{r.value&&(o.value=!0)};window.addEventListener("beforeinstallprompt",m,{once:!0}),Q(()=>{window.removeEventListener("beforeinstallprompt",m)});const a=async()=>{try{await ne({})}catch(t){t.message.indexOf("511")&&(r.value=!0)}};H(async()=>{sessionStorage.removeItem("task-upload-music")});const h=()=>{const t=navigator.userAgent.toLowerCase(),I=function(){return/macintosh|mac os x/i.test(navigator.userAgent)}();(t.indexOf("win32")>=0||t.indexOf("wow32")>=0)&&window.open("https://oss.dayaedu.com/appstore/ChromeStandaloneSetup32.exe"),(t.indexOf("win64")>=0||t.indexOf("wow64")>=0)&&window.open("https://oss.dayaedu.com/appstore/ChromeStandaloneSetup64.exe"),I&&window.open("https://oss.dayaedu.com/appstore/googlechrome-mac.dmg")};return()=>e("div",{class:s["view-account"]},[e("div",{class:s["view-account-container"]},[e("img",{src:de,class:s.loginLeft,alt:""},null),e("img",{src:fe,class:s.loginRight,alt:""},null),e("div",{class:s.stylesWrap},[e("img",{src:pe,alt:""},null)])]),e("div",{class:s["view-account-form"]},[e("img",{class:s.colLogo,src:Ae},null),i.value?e(q,{key:"forgotPassword","default-value":f.value,class:[s.loginTabs,s.loginForgot],ref:w,"justify-content":"center"},{default:()=>[e(U,{name:"forgotPassword",tab:"重置密码"},{default:()=>[e(Je,{phone:u.value,"onUpdate:phone":t=>u.value=t,onChangType:()=>{i.value=!1,f.value="pwdLogin"}},null)]})]}):e(q,{key:"pwdLogin",ref:b,"default-value":f.value,class:[s.loginTabs],"justify-content":"center"},{default:()=>[e(U,{name:"pwdLogin",tab:"密码登录"},{default:()=>[e(We,{phone:u.value,"onUpdate:phone":t=>u.value=t,onChangType:()=>{i.value=!0,f.value="forgotPassword"}},null)]}),e(U,{name:"codeLogin",tab:"短信验证"},{default:()=>[e(Ze,{phone:u.value,"onUpdate:phone":t=>u.value=t},null)]})]}),e("div",{class:s.alertWrap},[e("div",{class:s.alertInfo},[e($,{src:ze,class:s.infoIcon,previewDisabled:!0},null),B("为了您更好的上课体验,推荐使用Chrome浏览器")]),e("div",{class:s.down,onClick:h},[B("立即下载")])])]),e(L,{show:n.value,"onUpdate:show":t=>n.value=t,onMaskClick:()=>{g()},onClose:()=>{g()}},{default:()=>[e("div",{class:s.downMove},[e("img",{src:ue,class:s.dingPng,alt:""},null),e("img",{src:re,class:s.downMoveBg,alt:""},null),e("img",{src:le,class:s.closeAble,onClick:()=>{n.value=!1,g()},alt:""},null),e("h2",null,[B("温馨提示")]),e("p",null,[B("检测到您尚未安装“音乐数字课堂”应用程序,为了更好的使用体验,是否立即下载?")]),e(ee,{style:{padding:"25px 0 0 0"},justify:"center"},{default:()=>[e(E,se({id:"submitBtn"},{class:s.submitAppBtn,round:!0,type:"primary"}),{default:()=>[B("立即下载")]})]})])]}),e(L,{show:o.value,"onUpdate:show":t=>o.value=t,closeOnEsc:!1,maskClosable:!1},{default:()=>[e(ie,{onClose:()=>o.value=!1},null)]})])}});export{He as default};