import{E as q,j as e,d as x,G as M,U as j,ai as _,aq as Z,aT as G,a0 as z,ab as J,H as A,W as X,a3 as U,bu as Y,a6 as $,aF as ee,ae as te,bv as oe,b0 as se,bw as ae,aU as ne,O as P,bx as ue,a2 as re,by as ie,y as b,u as le,A as a,B as F,F as O,h as ce,n as Q,T as w,f as W,N as R,aS as he}from"./ResizeObserver.es.f28023e0.js";import{C as de}from"./index.2a22730e.js";import"./index.3b2e70c8.js";import{F as me}from"./index.975e8f79.js";import{R as H,C}from"./index.00276806.js";import{C as ge}from"./index.b5553db8.js";import"./index.49ee134a.js";import{c as fe}from"./validate.ba62cd4c.js";import{i as K}from"./icon_teacher.40b6f077.js";import{a as ve,i as pe}from"./icon_checkbox_default.2fe5d57e.js";import{C as ye}from"./index.8ba4d452.js";import{C as we}from"./index.bd375ca9.js";import{I as Ae}from"./index.b27ef3b6.js";import{O as Ce}from"./index.637c893a.js";import"./use-id.cc14bbe9.js";import"./index.7a1af785.js";const[xe,B]=q("key"),Te=e("svg",{class:B("collapse-icon"),viewBox:"0 0 30 24"},[e("path",{d:"M26 13h-2v2h2v-2zm-8-3h2V8h-2v2zm2-4h2V4h-2v2zm2 4h4V4h-2v4h-2v2zm-7 14 3-3h-6l3 3zM6 13H4v2h2v-2zm16 0H8v2h14v-2zm-12-3h2V8h-2v2zM28 0l1 1 1 1v15l-1 2H1l-1-2V2l1-1 1-1zm0 2H2v15h26V2zM6 4v2H4V4zm10 2h2V4h-2v2zM8 9v1H4V8zm8 0v1h-2V8zm-6-5v2H8V4zm4 0v2h-2V4z",fill:"currentColor"},null)]),Ie=e("svg",{class:B("delete-icon"),viewBox:"0 0 32 22"},[e("path",{d:"M28 0a4 4 0 0 1 4 4v14a4 4 0 0 1-4 4H10.4a2 2 0 0 1-1.4-.6L1 13.1c-.6-.5-.9-1.3-.9-2 0-1 .3-1.7.9-2.2L9 .6a2 2 0 0 1 1.4-.6zm0 2H10.4l-8.2 8.3a1 1 0 0 0-.3.7c0 .3.1.5.3.7l8.2 8.4H28a2 2 0 0 0 2-2V4c0-1.1-.9-2-2-2zm-5 4a1 1 0 0 1 .7.3 1 1 0 0 1 0 1.4L20.4 11l3.3 3.3c.2.2.3.5.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3L19 12.4l-3.4 3.3a1 1 0 0 1-.6.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.2.1-.5.3-.7l3.3-3.3-3.3-3.3A1 1 0 0 1 14 7c0-.3.1-.5.3-.7A1 1 0 0 1 15 6a1 1 0 0 1 .6.3L19 9.6l3.3-3.3A1 1 0 0 1 23 6z",fill:"currentColor"},null)]);var L=x({name:xe,props:{type:String,text:M,color:String,wider:Boolean,large:Boolean,loading:Boolean},emits:["press"],setup(t,{emit:s,slots:n}){const r=j(!1),i=_(),T=h=>{i.start(h),r.value=!0},v=h=>{i.move(h),i.direction.value&&(r.value=!1)},p=h=>{r.value&&(n.default||Z(h),r.value=!1,s("press",t.text,t.type))},d=()=>{if(t.loading)return e(G,{class:B("loading-icon")},null);const h=n.default?n.default():t.text;switch(t.type){case"delete":return h||Ie;case"extra":return h||Te;default:return h}};return()=>e("div",{class:B("wrapper",{wider:t.wider}),onTouchstart:T,onTouchmove:v,onTouchend:p,onTouchcancel:p},[e("div",{role:"button",tabindex:0,class:B([t.color,{large:t.large,active:r.value,delete:t.type==="delete"}])},[d()])])}});const[De,g]=q("number-keyboard"),Be={show:Boolean,title:String,theme:z("default"),zIndex:M,teleport:[String,Object],maxlength:J(1/0),modelValue:z(""),transition:A,blurOnClose:A,showDeleteKey:A,randomKeyOrder:Boolean,closeButtonText:String,deleteButtonText:String,closeButtonLoading:Boolean,hideOnClickOutside:A,safeAreaInsetBottom:A,extraKey:{type:[String,Array],default:""}};var Se=x({name:De,props:Be,emits:["show","hide","blur","input","close","delete","update:modelValue"],setup(t,{emit:s,slots:n}){const r=j(),i=()=>{const o=Array(9).fill("").map((u,l)=>({text:l+1}));return t.randomKeyOrder&&o.sort(()=>Math.random()>.5?1:-1),o},T=()=>[...i(),{text:t.extraKey,type:"extra"},{text:0},{text:t.showDeleteKey?t.deleteButtonText:"",type:t.showDeleteKey?"delete":""}],v=()=>{const o=i(),{extraKey:u}=t,l=Array.isArray(u)?u:[u];return l.length===1?o.push({text:0,wider:!0},{text:l[0],type:"extra"}):l.length===2&&o.push({text:l[0],type:"extra"},{text:0},{text:l[1],type:"extra"}),o},p=X(()=>t.theme==="custom"?v():T()),d=()=>{t.show&&s("blur")},h=()=>{s("close"),t.blurOnClose&&d()},m=()=>s(t.show?"show":"hide"),y=(o,u)=>{if(o===""){u==="extra"&&d();return}const l=t.modelValue;u==="delete"?(s("delete"),s("update:modelValue",l.slice(0,l.length-1))):u==="close"?h():l.length{const{title:o,theme:u,closeButtonText:l}=t,k=n["title-left"],V=l&&u==="default";if(!!(o||V||k))return e("div",{class:g("header")},[k&&e("span",{class:g("title-left")},[k()]),o&&e("h2",{class:g("title")},[o]),V&&e("button",{type:"button",class:[g("close"),ne],onClick:h},[l])])},S=()=>p.value.map(o=>{const u={};return o.type==="delete"&&(u.default=n.delete),o.type==="extra"&&(u.default=n["extra-key"]),e(L,{key:o.text,text:o.text,type:o.type,wider:o.wider,color:o.color,onPress:y},u)}),E=()=>{if(t.theme==="custom")return e("div",{class:g("sidebar")},[t.showDeleteKey&&e(L,{large:!0,text:t.deleteButtonText,type:"delete",onPress:y},{delete:n.delete}),e(L,{large:!0,text:t.closeButtonText,type:"close",color:"blue",loading:t.closeButtonLoading,onPress:y},null)])};return U(()=>t.show,o=>{t.transition||s(o?"show":"hide")}),t.hideOnClickOutside&&Y(r,d,{eventName:"touchstart"}),()=>{const o=N(),u=e(se,{name:t.transition?"van-slide-up":""},{default:()=>[$(e("div",{ref:r,style:te(t.zIndex),class:g({unfit:!t.safeAreaInsetBottom,"with-title":!!o}),onTouchstart:oe,onAnimationend:m,onWebkitAnimationEnd:m},[o,e("div",{class:g("body")},[e("div",{class:g("keys")},[S()]),E()])]),[[ee,t.show]])]});return t.teleport?e(ae,{to:t.teleport},{default:()=>[u]}):u}}});const Ee=P(Se),[be,I]=q("password-input"),Fe={info:String,mask:A,value:z(""),gutter:M,length:J(6),focused:Boolean,errorInfo:String};var Ne=x({name:be,props:Fe,emits:["focus"],setup(t,{emit:s}){const n=i=>{i.stopPropagation(),s("focus",i)},r=()=>{const i=[],{mask:T,value:v,length:p,gutter:d,focused:h}=t;for(let m=0;m{const i=t.errorInfo||t.info;return e("div",{class:I()},[e("ul",{class:[I("security"),{[ue]:!t.gutter}],onTouchstart:n},[r()]),i&&e("div",{class:I(t.errorInfo?"error-info":"info")},[i])])}}});const ke=P(Ne),Le="_login_51jym_1",ze="_backIcon_51jym_7",He="_loginTitle_51jym_16",Ke="_txt_51jym_34",qe="_codeText_51jym_38",Me="_margin34_51jym_41",Ve="_formTitle_51jym_44",Oe="_teacherInfo_51jym_71",Qe="_teacherLogo_51jym_79",We="_teacherName_51jym_89",Re="_itips_51jym_100",je="_protocol_51jym_104",Je="_protocolText_51jym_110",Pe="_boxStyle_51jym_114";var c={login:Le,backIcon:ze,loginTitle:He,txt:Ke,codeText:qe,margin34:Me,formTitle:Ve,teacherInfo:Oe,teacherLogo:Qe,teacherName:We,itips:Re,protocol:je,protocolText:Je,boxStyle:Pe},_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAMAAADUMSJqAAACMVBMVEUAAADx8fHw8PDw8PDx8fHx8fHw8PDx8fHw8PDy8vLx8fHx8fH09PTw8PDw8PD////////w8PAp2bgszK4szrAszq8ztZsr0LEvxKcty60tyastyqwr0rI4ppAux6kuxakvwqb+/v4uyKowwKQwvaI3p5EvwaUyuqA0tpw0sZkp17Yq07M1r5cxvqMyuJ4yt50wv6M0s5o2qpM1rZUxvKH8/Pz5+fny8vIq1bUvxagztp0xu6Apup80sJg2q5QyuZ82rZXy+/r8/v74/fz6/v255t36+vr29vYq1LTY9e8r0rM6rpf1/Pve9PDG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pxwhkz8G15JYeENlA5wz19CYdttSVl+NbTFE4HrSDnAlAfD2xIXHDKMZ9ERNo3ZjNHLSDiLFbEvUk1DrWQytGTVc69qOWcfhaiPIrsddizwx9Dqrd0Om3VzJQNuHkfaRMb8f6MpIvzWQ8CY6zLPJLTltMvn9BkkEfrwy5spJazlPeL0J5FdKJpq5Z1F6m+VXmB98ExQlTpMvroE+vlXEasNJywV+7XlZQyjkdJISFi6NDC1u49YzfDh4X8QP/jAQCIWMRKQ7jw4tbm9dt1v/opsfvN7hCATskiqG251ri3yvm0V84GWPHCALDFuicFV0IvK6XMQHfq4hHw5I2u0ujIvcw0Zu1r68IOIDDzfmgxxqdwVMiTjjFvPv8zxnXKW7qzHeyxSuZTjwH5v4D9DW7wso8vMDOiYxcvVwqYg3HNSzrxrwIbM4LhXbIc2Tw3NSOlt2NDqAb9cq2Wx5NtyT0tAy5XFrz47RxtPVpjed7YO94RTHrYIOigUdcQs6nBf0WkHICxFBr3IEvYQS8vpMyIs/Qa8shbxsFfKaWMgLbmGv5oX/UoGgX4f4B/PM8zgpeF23AAAAAElFTkSuQmCC";const Ze="_loginCode_1ohk2_1",Ge="_codeTips_1ohk2_23",Xe="_codeTxt_1ohk2_28",Ue="_btnWrap_1ohk2_36";var D={loginCode:Ze,codeTips:Ge,codeTxt:Xe,btnWrap:Ue},Ye=x({name:"invteCode",props:{phone:String,onLoginSuccess:{type:Function,default:()=>{}}},data(){return{smsCode:"",showKeyboard:!1,countDownStatus:!0,countDownTime:120,countTimer:null,imgCodeStatus:!1}},watch:{smsCode(t){t&&t.length===6&&this.onLogin()}},async mounted(){this.$nextTick(async()=>{this.imgCodeStatus=!0})},unmounted(){clearInterval(this.countTimer)},methods:{async onSendSms(){try{this.imgCodeStatus=!0}catch{this.countDownStatus=!0}},onCountDown(){this.countDownStatus=!1,this.countTimer=setInterval(()=>{this.countDownTime>0?this.countDownTime--:(this.countDownStatus=!0,clearInterval(this.countTimer))},1e3)},async onLogin(){try{const t=await b.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:this.phone,smsCode:this.smsCode,isSurportRegister:!0}}),{authentication:s}=t.data;le(s.token_type+" "+s.access_token),window.history.go(-1),this.onLoginSuccess()}catch{}}},render(){return e(O,null,[e("div",{class:D.loginCode},[e(we,{border:!1,background:"transparent",title:" ",isBack:!0},null),e("div",{class:D.codeTips},[e("p",{class:D.txt},[a("\u8F93\u5165\u9A8C\u8BC1\u7801")]),e("p",{class:D.codeTxt},[a("\u5DF2\u53D1\u90016\u4F4D\u9A8C\u8BC1\u7801\u81F3 "),e("span",null,[this.phone])])]),e(ke,{value:this.smsCode,focused:this.showKeyboard,length:6,onFocus:()=>{this.showKeyboard=!0},gutter:10},null),e(Ee,{modelValue:this.smsCode,"onUpdate:modelValue":t=>this.smsCode=t,show:this.showKeyboard,maxlength:6,onBlur:()=>{this.showKeyboard=!1}},null),e("div",{class:D.btnWrap},[e(F,{type:"primary",round:!0,onClick:this.onSendSms,disabled:!this.countDownStatus},{default:()=>[a("\u91CD\u65B0\u53D1\u9001 "),!this.countDownStatus&&e(O,null,[a("("),this.countDownTime,a(")")])]})])]),this.imgCodeStatus?e(Ae,{value:this.imgCodeStatus,"onUpdate:value":t=>this.imgCodeStatus=t,phone:this.$props.phone,onClose:()=>{this.imgCodeStatus=!1},onSendCode:this.onCountDown},null):null])}});const $e="_teacherChange_1l022_1",et="_changeInfo_1l022_6",tt="_txt_1l022_24",ot="_name_1l022_25",st="_changeTips_1l022_39";var f={teacherChange:$e,changeInfo:et,txt:tt,name:ot,changeTips:st},at="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABXFJREFUaN7dmmtTU1cUhsNP8WdYOzjTD1Xb6Uw7WiveWlsvVUArAZRLIECAnAAhhEtIQFRKLWqpgmMdLWCFIIpCpQYJKHCCClUM8aN+evph7wwhRg0JSZHM7JnMnMnOes+z1nv2WXtrNO/5AAn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GyD3O2LhfhpFOyDwgNgCLTcwzKtgmqj7Di0NcZxLdT7O2RthuyvIecbQSN3B+h2Qd7uMGtD0jClQ10RzLjjKOD5I2i3Qc5WyNrybhp6f23sD/0AtOpg8t6SY4hcwK1LMOoU3903wXJE0MgKprEziEaQ5RqSoUkRa6sI4ohMwGgfaDdCxudwzgz/jov32isnQbctiEZSiNqQaVWbA/2Xw7bM5RPw7CHUHIW0DUJI8W4YuiauPboDtRlwPIBGThLYdXC6BM5bobMVxm4vSxdEE1HwT0bEXetugewvQbsB0j+DlhKYGRXXus5A/nYw7IGe32LW4Fq6gJlRyP4CnDIodRjsxyDtU9BuAn0S3OqQr5wuUegx7NBF9lKf9xWkfgy2NPBI53C2gW6zSKv0TXDZEY9u9avI2irt1ZCyFlLXQeZG6GoWafNkBE7miZRqVeLRI52NrLE1NwHm/ZC8FlI+EjQsh2DirnzdHI7KWZbW2Jr3KJE9xCbgvAm0nwghqesgYwPcvx7HDQ+PEn1z99k43O+GoavgGY5vi903nRjb9nqsdzD927Af9AbHqthiWhWbfB/8Nuuq2OheFUcNVsVhj5DHbbyqKW7HbbyqKdzjNv8BYjqelRrm8xEAAAAASUVORK5CYII=",nt=x({name:"teacherChange",props:{changeInfo:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onChangeTeacher:{type:Function,default:t=>{}}},computed:{teacherInfo(){const{old:t,now:s}=this.changeInfo;return{oldName:t.username,oldAvatar:t.avatar,nowName:s.username,nowAvatar:s.avatar}}},render(){return e("div",{class:f.teacherChange},[e("div",{class:f.changeInfo},[e(H,null,{default:()=>[e(C,{span:12,class:f.txt},{default:()=>[a("\u60A8\u5DF2\u7ED1\u5B9A")]}),e(C,{span:12,class:f.name},{default:()=>[e("img",{src:this.teacherInfo.oldAvatar||K},null),e("span",null,[this.teacherInfo.oldName])]})]}),e(H,null,{default:()=>[e(C,{span:12,class:f.txt},{default:()=>[a("\u662F\u5426\u66F4\u6362\u4E3A")]}),e(C,{span:12,class:f.name},{default:()=>[e("img",{src:this.teacherInfo.nowAvatar||K},null),e("span",null,[this.teacherInfo.nowName])]})]})]),e("div",{class:f.changeTips},[e("img",{src:at},null),e("span",null,[a("\u66F4\u6362\u540E\u539F\u8001\u5E08\u5DF2\u6392\u8BFE\u7A0B\u53EF\u7EE7\u7EED\u4E0A\u8BFE")])]),e("div",{class:["btnGroup","btnMore"]},[e(F,{type:"primary",round:!0,plain:!0,onClick:()=>{this.onClose()}},{default:()=>[a("\u4E0D\u66F4\u6362")]}),e(F,{type:"primary",round:!0,onClick:()=>{this.onChangeTeacher(!0)}},{default:()=>[a("\u66F4\u6362")]})])])}}),Tt=x({name:"login",data(){return{id:this.$route.query.id,username:"",teacherInfo:{},imgCodeStatus:!1,checked:!1,teacherChangeStatus:!1,changeInfo:{},showTips:!1,navBarHeight:0}},computed:{codeDisable(){return console.log(!!this.username),!!this.username}},async mounted(){ce(),Q({api:"getNavHeight"},t=>{const{content:s}=t,n=s.dpi||2;if(s.navHeight){const r=s.navHeight/n;this.navBarHeight=r}});try{const t=await b.get("/api-student/open/getTeacher",{params:{userId:this.id}});if(this.teacherInfo=t.data||{},this.teacherInfo.lockFlag==1){setTimeout(()=>{w("\u8BE5\u8001\u5E08\u5DF2\u88AB\u51BB\u7ED3")},100);return}}catch{}},methods:{onBack(){W().isApp?Q({api:"goBack"}):this.$router.back()},async onSendCode(){if(this.teacherInfo.lockFlag==1)return w("\u8BE5\u8001\u5E08\u5DF2\u88AB\u51BB\u7ED3");if(!fe(this.username))return w("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801");if(!this.checked)return w("\u8BF7\u9605\u8BFB\u5E76\u540C\u610F\u534F\u8BAE");try{const{data:t}=await b.get("/api-student/open/checkPhone?phone="+this.username);console.log(t),t?this.imgCodeStatus=!0:this.showTips=!0}catch{}},previewProtocol(t){t==="user"?this.$router.push({path:"/registerProtocol",query:{showHeader:1}}):t==="privacy"&&this.$router.push({path:"/privacyProtocol",query:{showHeader:1}})},async onLoginSuccess(t=!1){try{const s=await b.get("/api-student/open/bindTeacher",{params:{phone:this.username,userId:this.id,isUpdate:t}});this.changeInfo=s.data||{};const{old:n,now:r}=s.data;!t&&r&&n&&r.userId!==n.userId?this.teacherChangeStatus=!0:n&&n.userId===r.userId?setTimeout(()=>{w("\u60A8\u5DF2\u7ED1\u5B9A\u8BE5\u8001\u5E08")},100):(setTimeout(()=>{w("\u60A8\u5DF2\u6210\u529F\u7ED1\u5B9A\u8001\u5E08")},100),this.$router.push("/inviteSuccess"))}catch{}}},render(){return e("div",{class:c.login},[W().isApp&&e(R,{name:"arrow-left",class:c.backIcon,style:{top:`calc(${this.navBarHeight}px + 12px)`},onClick:this.onBack},null),e("div",{class:c.loginTitle},[e("img",{src:_e,alt:""},null),e("p",null,[e("span",{class:c.txt},[a("\u9177\u4E50\u79C0")]),e("span",null,[a("\u4F60\u7684\u5668\u4E50\u5B66\u4E60\u597D\u5E2E\u624B")])])]),e("div",{class:c.teacherInfo},[e("div",{class:c.teacherLogo},[e("img",{src:this.teacherInfo.avatar||K,alt:""},null)]),e("div",{class:c.teacherName},[e("span",null,[this.teacherInfo.username])," ",a("\u8001\u5E08\u9080\u8BF7\u60A8\u6CE8\u518C\u9177\u4E50\u79C0\u4E00\u8D77\u4F53\u9A8C\u5668\u4E50\u5B66\u4E60\u7684\u4E50\u8DA3\u5427\uFF01")])]),e(de,{class:c.margin34,border:!1},{default:()=>[e(H,{style:{marginBottom:"16px"}},{default:()=>[e(C,{span:24,class:c.formTitle},{default:()=>[a("\u624B\u673A\u53F7")]}),e(C,{span:24,class:"van-hairline--bottom"},{default:()=>[e(me,{modelValue:this.username,"onUpdate:modelValue":t=>this.username=t,name:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165\u60A8\u7684\u624B\u673A\u53F7",type:"tel",maxlength:11},null)]})]}),e("div",{class:c.itips},[a("\u672A\u6CE8\u518C\u7684\u624B\u673A\u53F7\u7801\u5C06\u81EA\u52A8\u6CE8\u518C\u9177\u4E50\u79C0\u8D26\u53F7")])]}),e("div",{class:c.margin34},[e(F,{round:!0,block:!0,type:"primary",disabled:!this.codeDisable,onClick:this.onSendCode},{default:()=>[a("\u83B7\u53D6\u77ED\u4FE1\u9A8C\u8BC1\u7801")]})]),e("div",{class:c.protocol},[e(ge,{modelValue:this.checked,"onUpdate:modelValue":t=>this.checked=t},{default:()=>[a("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")],icon:t=>e(R,{class:c.boxStyle,name:t.checked?ve:pe,size:"15"},null)}),e("span",{class:c.protocolText,onClick:()=>{this.previewProtocol("user")}},[a("\u300A\u7528\u6237\u6CE8\u518C\u534F\u8BAE\u300B")]),a("\u548C"),e("span",{class:c.protocolText,onClick:()=>{this.previewProtocol("privacy")}},[a("\u300A\u9690\u79C1\u653F\u7B56\u300B")])]),e(ye,{modelValue:this.imgCodeStatus,"onUpdate:modelValue":t=>this.imgCodeStatus=t},{default:()=>[this.imgCodeStatus&&e(Ye,{phone:this.username,onLoginSuccess:this.onLoginSuccess},null)]}),e(he,{show:this.teacherChangeStatus,round:!0},{default:()=>[e(nt,{changeInfo:this.changeInfo,onClose:()=>{this.teacherChangeStatus=!1,this.$router.push("/inviteSuccess")},onChangeTeacher:t=>{this.onLoginSuccess(t)}},null)]}),e(Ce,{show:this.showTips,message:"\u60A8\u5DF2\u7ED1\u5B9A\u673A\u6784\uFF0C\u65E0\u6CD5\u518D\u7ED1\u5B9A\u8001\u5E08",showButton:!0,buttonText:"\u786E\u5B9A",onConfirm:()=>{this.showTips=!1}},null)])}});export{Tt as default};