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