index-1a4a79fe-1708220053196.js 20 KB

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