index.b22e0f1d.js 19 KB

1
  1. import{A as V,j as e,d as x,E as M,S as Q,ah as J,ap as P,aS as _,$ as K,aa as R,G as A,V as G,a2 as Z,bt as X,a5 as j,aE as U,ad as Y,bu as $,a$ as ee,bv as te,aT as oe,N as W,bw as se,a1 as ae,bx as ne,w as B,T as v,t as ue,z as a,B as b,F as O,h as re,M as le,aR as ie}from"./index.394decd7.js";import{C as ce}from"./index.9462d7c5.js";import"./index.9e0d46e4.js";import{F as de}from"./index.224299a1.js";import{R as k,C}from"./index.a9c78aa8.js";import{C as he}from"./index.24fb4ee4.js";import"./index.b91a923c.js";import{c as me}from"./validate.ba62cd4c.js";import{i as q}from"./icon_teacher.40b6f077.js";import{a as fe,i as ge}from"./icon_checkbox_default.2fe5d57e.js";import{C as ve}from"./index.d66a5072.js";import{C as we}from"./index.e6e212d8.js";import{O as pe}from"./index.041b3d31.js";import"./use-id.e2f22365.js";const[ye,E]=V("key"),Ae=e("svg",{class:E("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)]),Ce=e("svg",{class:E("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:ye,props:{type:String,text:M,color:String,wider:Boolean,large:Boolean,loading:Boolean},emits:["press"],setup(t,{emit:s,slots:u}){const i=Q(!1),r=J(),T=c=>{r.start(c),i.value=!0},w=c=>{r.move(c),r.direction.value&&(i.value=!1)},p=c=>{i.value&&(u.default||P(c),i.value=!1,s("press",t.text,t.type))},h=()=>{if(t.loading)return e(_,{class:E("loading-icon")},null);const c=u.default?u.default():t.text;switch(t.type){case"delete":return c||Ce;case"extra":return c||Ae;default:return c}};return()=>e("div",{class:E("wrapper",{wider:t.wider}),onTouchstart:T,onTouchmove:w,onTouchend:p,onTouchcancel:p},[e("div",{role:"button",tabindex:0,class:E([t.color,{large:t.large,active:i.value,delete:t.type==="delete"}])},[h()])])}});const[xe,f]=V("number-keyboard"),Te={show:Boolean,title:String,theme:K("default"),zIndex:M,teleport:[String,Object],maxlength:R(1/0),modelValue:K(""),transition:A,blurOnClose:A,showDeleteKey:A,randomKeyOrder:Boolean,closeButtonText:String,deleteButtonText:String,closeButtonLoading:Boolean,hideOnClickOutside:A,safeAreaInsetBottom:A,extraKey:{type:[String,Array],default:""}};var Ie=x({name:xe,props:Te,emits:["show","hide","blur","input","close","delete","update:modelValue"],setup(t,{emit:s,slots:u}){const i=Q(),r=()=>{const o=Array(9).fill("").map((n,l)=>({text:l+1}));return t.randomKeyOrder&&o.sort(()=>Math.random()>.5?1:-1),o},T=()=>[...r(),{text:t.extraKey,type:"extra"},{text:0},{text:t.showDeleteKey?t.deleteButtonText:"",type:t.showDeleteKey?"delete":""}],w=()=>{const o=r(),{extraKey:n}=t,l=Array.isArray(n)?n:[n];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=G(()=>t.theme==="custom"?w():T()),h=()=>{t.show&&s("blur")},c=()=>{s("close"),t.blurOnClose&&h()},m=()=>s(t.show?"show":"hide"),y=(o,n)=>{if(o===""){n==="extra"&&h();return}const l=t.modelValue;n==="delete"?(s("delete"),s("update:modelValue",l.slice(0,l.length-1))):n==="close"?c():l.length<t.maxlength&&(s("input",o),s("update:modelValue",l+o))},z=()=>{const{title:o,theme:n,closeButtonText:l}=t,N=u["title-left"],H=l&&n==="default";if(!!(o||H||N))return e("div",{class:f("header")},[N&&e("span",{class:f("title-left")},[N()]),o&&e("h2",{class:f("title")},[o]),H&&e("button",{type:"button",class:[f("close"),oe],onClick:c},[l])])},S=()=>p.value.map(o=>{const n={};return o.type==="delete"&&(n.default=u.delete),o.type==="extra"&&(n.default=u["extra-key"]),e(L,{key:o.text,text:o.text,type:o.type,wider:o.wider,color:o.color,onPress:y},n)}),F=()=>{if(t.theme==="custom")return e("div",{class:f("sidebar")},[t.showDeleteKey&&e(L,{large:!0,text:t.deleteButtonText,type:"delete",onPress:y},{delete:u.delete}),e(L,{large:!0,text:t.closeButtonText,type:"close",color:"blue",loading:t.closeButtonLoading,onPress:y},null)])};return Z(()=>t.show,o=>{t.transition||s(o?"show":"hide")}),t.hideOnClickOutside&&X(i,h,{eventName:"touchstart"}),()=>{const o=z(),n=e(ee,{name:t.transition?"van-slide-up":""},{default:()=>[j(e("div",{ref:i,style:Y(t.zIndex),class:f({unfit:!t.safeAreaInsetBottom,"with-title":!!o}),onTouchstart:$,onAnimationend:m,onWebkitAnimationEnd:m},[o,e("div",{class:f("body")},[e("div",{class:f("keys")},[S()]),F()])]),[[U,t.show]])]});return t.teleport?e(te,{to:t.teleport},{default:()=>[n]}):n}}});const De=W(Ie),[Be,I]=V("password-input"),Ee={info:String,mask:A,value:K(""),gutter:M,length:R(6),focused:Boolean,errorInfo:String};var Se=x({name:Be,props:Ee,emits:["focus"],setup(t,{emit:s}){const u=r=>{r.stopPropagation(),s("focus",r)},i=()=>{const r=[],{mask:T,value:w,length:p,gutter:h,focused:c}=t;for(let m=0;m<p;m++){const y=w[m],z=m!==0&&!h,S=c&&m===w.length;let F;m!==0&&h&&(F={marginLeft:ae(h)}),r.push(e("li",{class:[{[ne]:z},I("item",{focus:S})],style:F},[T?e("i",{style:{visibility:y?"visible":"hidden"}},null):y,S&&e("div",{class:I("cursor")},null)]))}return r};return()=>{const r=t.errorInfo||t.info;return e("div",{class:I()},[e("ul",{class:[I("security"),{[se]:!t.gutter}],onTouchstart:u},[i()]),r&&e("div",{class:I(t.errorInfo?"error-info":"info")},[r])])}}});const Fe=W(Se),be="_login_a43zm_1",ze="_loginTitle_a43zm_7",Ne="_txt_a43zm_25",Le="_codeText_a43zm_29",Ke="_margin34_a43zm_32",ke="_formTitle_a43zm_35",qe="_teacherInfo_a43zm_62",Ve="_teacherLogo_a43zm_70",Me="_teacherName_a43zm_80",He="_itips_a43zm_91",Oe="_protocol_a43zm_95",Qe="_protocolText_a43zm_101",Re="_boxStyle_a43zm_105";var d={login:be,loginTitle:ze,txt:Ne,codeText:Le,margin34:Ke,formTitle:ke,teacherInfo:qe,teacherLogo:Ve,teacherName:Me,itips:He,protocol:Oe,protocolText:Qe,boxStyle:Re},We="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAMAAADUMSJqAAACMVBMVEUAAADx8fHw8PDw8PDx8fHx8fHw8PDx8fHw8PDy8vLx8fHx8fH09PTw8PDw8PD////////w8PAp2bgszK4szrAszq8ztZsr0LEvxKcty60tyastyqwr0rI4ppAux6kuxakvwqb+/v4uyKowwKQ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MsgZ/W2NCIHdXexcKdJG8PLrBaLJWjDnk+OvDydKrfvDIaHTEa7XsmMuyP3WkFaaCz2cBa3kGRdWiV03Rk2cr+R9Fp8OhXULDRp8HqtZihyH3DW7vCSm9Krz5urAe402gGuLzJr1LSNJEmDwQZ1qJxT/OwmDTVpFv+1pxwhkz8G15JYeENlA5wz19CYdttSVl+NbTFE4HrSDnAlAfD2xIXHDKMZ9ERNo3ZjNHLSDiLFbEvUk1DrWQytGTVc69qOWcfhaiPIrsddizwx9Dqrd0Om3VzJQNuHkfaRMb8f6MpIvzWQ8CY6zLPJLTltMvn9BkkEfrwy5spJazlPeL0J5FdKJpq5Z1F6m+VXmB98ExQlTpMvroE+vlXEasNJywV+7XlZQyjkdJISFi6NDC1u49YzfDh4X8QP/jAQCIWMRKQ7jw4tbm9dt1v/opsfvN7hCATskiqG251ri3yvm0V84GWPHCALDFuicFV0IvK6XMQHfq4hHw5I2u0ujIvcw0Zu1r68IOIDDzfmgxxqdwVMiTjjFvPv8zxnXKW7qzHeyxSuZTjwH5v4D9DW7wso8vMDOiYxcvVwqYg3HNSzrxrwIbM4LhXbIc2Tw3NSOlt2NDqAb9cq2Wx5NtyT0tAy5XFrz47RxtPVpjed7YO94RTHrYIOigUdcQs6nBf0WkHICxFBr3IEvYQS8vpMyIs/Qa8shbxsFfKaWMgLbmGv5oX/UoGgX4f4B/PM8zgpeF23AAAAAElFTkSuQmCC";const Je="_loginCode_1ohk2_1",Pe="_codeTips_1ohk2_23",_e="_codeTxt_1ohk2_28",Ge="_btnWrap_1ohk2_36";var D={loginCode:Je,codeTips:Pe,codeTxt:_e,btnWrap:Ge},Ze=x({name:"invteCode",props:{phone:String,onLoginSuccess:{type:Function,default:()=>{}}},data(){return{smsCode:"",showKeyboard:!0,countDownStatus:!0,countDownTime:120,countTimer:null}},watch:{smsCode(t){t&&t.length===6&&this.onLogin()}},async mounted(){this.$nextTick(async()=>{await this.onSendSms()})},unmounted(){clearInterval(this.countTimer)},methods:{async onSendSms(){try{await B.post("/api-student/code/sendSmsCode",{requestType:"form",data:{mobile:this.phone,type:"LOGIN"}}),this.onCountDown(),setTimeout(()=>{v("\u9A8C\u8BC1\u7801\u5DF2\u53D1\u9001")},100)}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{let t=await B.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:this.phone,smsCode:this.smsCode,isSurportRegister:!0}});const{authentication:s}=t.data;ue(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(Fe,{value:this.smsCode,focused:this.showKeyboard,length:6,onFocus:()=>{this.showKeyboard=!0},gutter:10},null),e(De,{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(b,{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(")")])]})])])])}});const Xe="_teacherChange_1l022_1",je="_changeInfo_1l022_6",Ue="_txt_1l022_24",Ye="_name_1l022_25",$e="_changeTips_1l022_39";var g={teacherChange:Xe,changeInfo:je,txt:Ue,name:Ye,changeTips:$e},et="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABXFJREF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Ulosgnh+Ngo2ctkP8t5H8XRONAaBqKNsByJY2/b4jliN20YLmOCnGDYi5g9CbodkLeLinCT2NveDQaFRGoqw/MssgtekEjLg+yySHITQLdDikiHBqHwSiF1Orh4V04ZZZpJWvDPRAnAX0XIXsr5GyD3O2LhfhpFOyDwgNgCLTcwzKtgmqj7Di0NcZxLdT7O2RthuyvIecbQSN3B+h2Qd7uMGtD0jClQ10RzLjjKOD5I2i3Qc5WyNrybhp6f23sD/0AtOpg8t6SY4hcwK1LMOoU3903wXJE0MgKprEziEaQ5RqSoUkRa6sI4ohMwGgfaDdCxudwzgz/jov32isnQbctiEZSiNqQaVWbA/2Xw7bM5RPw7CHUHIW0DUJI8W4YuiauPboDtRlwPIBGThLYdXC6BM5bobMVxm4vSxdEE1HwT0bEXetugewvQbsB0j+DlhKYGRXXus5A/nYw7IGe32LW4Fq6gJlRyP4CnDIodRjsxyDtU9BuAn0S3OqQr5wuUegx7NBF9lKf9xWkfgy2NPBI53C2gW6zSKv0TXDZEY9u9avI2irt1ZCyFlLXQeZG6GoWafNkBE7miZRqVeLRI52NrLE1NwHm/ZC8FlI+EjQsh2DirnzdHI7KWZbW2Jr3KJE9xCbgvAm0nwghqesgYwPcvx7HDQ+PEn1z99k43O+GoavgGY5vi903nRjb9nqsdzD927Af9AbHqthiWhWbfB/8Nuuq2OheFUcNVsVhj5DHbbyqKW7HbbyqKdzjNv8BYjqelRrm8xEAAAAASUVORK5CYII=",tt=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:g.teacherChange},[e("div",{class:g.changeInfo},[e(k,null,{default:()=>[e(C,{span:12,class:g.txt},{default:()=>[a("\u60A8\u5DF2\u7ED1\u5B9A")]}),e(C,{span:12,class:g.name},{default:()=>[e("img",{src:this.teacherInfo.oldAvatar||q},null),e("span",null,[this.teacherInfo.oldName])]})]}),e(k,null,{default:()=>[e(C,{span:12,class:g.txt},{default:()=>[a("\u662F\u5426\u66F4\u6362\u4E3A")]}),e(C,{span:12,class:g.name},{default:()=>[e("img",{src:this.teacherInfo.nowAvatar||q},null),e("span",null,[this.teacherInfo.nowName])]})]})]),e("div",{class:g.changeTips},[e("img",{src:et},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(b,{type:"primary",round:!0,plain:!0,onClick:()=>{this.onClose()}},{default:()=>[a("\u4E0D\u66F4\u6362")]}),e(b,{type:"primary",round:!0,onClick:()=>{this.onChangeTeacher(!0)}},{default:()=>[a("\u66F4\u6362")]})])])}}),wt=x({name:"login",data(){return{id:this.$route.query.id,username:"",teacherInfo:{},imgCodeStatus:!1,checked:!1,teacherChangeStatus:!1,changeInfo:{},showTips:!1}},computed:{codeDisable(){return console.log(!!this.username),!!this.username}},async mounted(){re();try{const t=await B.get("/api-student/open/getTeacher",{params:{userId:this.id}});if(this.teacherInfo=t.data||{},this.teacherInfo.lockFlag==1){setTimeout(()=>{v("\u8BE5\u8001\u5E08\u5DF2\u88AB\u51BB\u7ED3")},100);return}}catch{}},methods:{async onSendCode(){if(this.teacherInfo.lockFlag==1)return v("\u8BE5\u8001\u5E08\u5DF2\u88AB\u51BB\u7ED3");if(!me(this.username))return v("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801");if(!this.checked)return v("\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:u,now:i}=s.data;!t&&i&&u&&i.userId!==u.userId?this.teacherChangeStatus=!0:u&&u.userId===i.userId?setTimeout(()=>{v("\u60A8\u5DF2\u7ED1\u5B9A\u8BE5\u8001\u5E08")},100):(setTimeout(()=>{v("\u60A8\u5DF2\u6210\u529F\u7ED1\u5B9A\u8001\u5E08")},100),this.$router.push("/inviteSuccess"))}catch{}}},render(){return e("div",{class:d.login},[e("div",{class:d.loginTitle},[e("img",{src:We,alt:""},null),e("p",null,[e("span",{class:d.txt},[a("\u9177\u4E50\u79C0")]),e("span",null,[a("\u4F60\u7684\u5668\u4E50\u5B66\u4E60\u597D\u5E2E\u624B")])])]),e("div",{class:d.teacherInfo},[e("div",{class:d.teacherLogo},[e("img",{src:this.teacherInfo.avatar||q,alt:""},null)]),e("div",{class:d.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(ce,{class:d.margin34,border:!1},{default:()=>[e(k,{style:{marginBottom:"16px"}},{default:()=>[e(C,{span:24,class:d.formTitle},{default:()=>[a("\u624B\u673A\u53F7")]}),e(C,{span:24,class:"van-hairline--bottom"},{default:()=>[e(de,{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:d.itips},[a("\u672A\u6CE8\u518C\u7684\u624B\u673A\u53F7\u7801\u5C06\u81EA\u52A8\u6CE8\u518C\u9177\u4E50\u79C0\u8D26\u53F7")])]}),e("div",{class:d.margin34},[e(b,{round:!0,block:!0,type:"primary",disabled:!this.codeDisable,onClick:this.onSendCode},{default:()=>[a("\u83B7\u53D6\u77ED\u4FE1\u9A8C\u8BC1\u7801")]})]),e("div",{class:d.protocol},[e(he,{modelValue:this.checked,"onUpdate:modelValue":t=>this.checked=t},{default:()=>[a("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")],icon:t=>e(le,{class:d.boxStyle,name:t.checked?fe:ge,size:"15"},null)}),e("span",{class:d.protocolText,onClick:()=>{this.previewProtocol("user")}},[a("\u300A\u7528\u6237\u6CE8\u518C\u534F\u8BAE\u300B")]),a("\u548C"),e("span",{class:d.protocolText,onClick:()=>{this.previewProtocol("privacy")}},[a("\u300A\u9690\u79C1\u653F\u7B56\u300B")])]),e(ve,{modelValue:this.imgCodeStatus,"onUpdate:modelValue":t=>this.imgCodeStatus=t},{default:()=>[this.imgCodeStatus&&e(Ze,{phone:this.username,onLoginSuccess:this.onLoginSuccess},null)]}),e(ie,{show:this.teacherChangeStatus,round:!0},{default:()=>[e(tt,{changeInfo:this.changeInfo,onClose:()=>{this.teacherChangeStatus=!1,this.$router.push("/inviteSuccess")},onChangeTeacher:t=>{this.onLoginSuccess(t)}},null)]}),e(pe,{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{wt as default};