index.d5eef257.js 18 KB

1
  1. import{A as k,j as e,d as x,E as M,S as R,ah as J,ap as P,aS as _,$ as K,aa as O,G as A,V as G,a2 as Z,bs as X,a5 as j,aE as U,ad as Y,bt as $,a$ as ee,bu as te,aX as oe,N as W,bv as ae,a1 as se,bw as ne,w as F,T as v,t as re,z as s,B as b,F as Q,h as ue,M as le,aR as ie}from"./index.e6d6174e.js";import{C as ce}from"./index.4aea64de.js";import"./index.af99cf22.js";import{F as de}from"./index.17d70acf.js";import{R as q,C}from"./index.83d3716a.js";import{C as he}from"./index.3d7e5752.js";import"./index.d92a5aca.js";import{c as me}from"./validate.ba62cd4c.js";import{i as V}from"./icon_teacher.40b6f077.js";import{a as ge,i as fe}from"./icon_checkbox_default.2fe5d57e.js";import{C as ve}from"./index.62005a6f.js";import{C as we}from"./index.045f03fd.js";import"./use-id.f239f36f.js";import"./index.d8c651bf.js";import"./use-height.8140ea04.js";const[pe,E]=k("key"),ye=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)]),Ae=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:pe,props:{type:String,text:M,color:String,wider:Boolean,large:Boolean,loading:Boolean},emits:["press"],setup(t,{emit:a,slots:r}){const i=R(!1),u=J(),T=c=>{u.start(c),i.value=!0},w=c=>{u.move(c),u.direction.value&&(i.value=!1)},p=c=>{i.value&&(r.default||P(c),i.value=!1,a("press",t.text,t.type))},h=()=>{if(t.loading)return e(_,{class:E("loading-icon")},null);const c=r.default?r.default():t.text;switch(t.type){case"delete":return c||Ae;case"extra":return c||ye;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[Ce,g]=k("number-keyboard"),xe={show:Boolean,title:String,theme:K("default"),zIndex:M,teleport:[String,Object],maxlength:O(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 Te=x({name:Ce,props:xe,emits:["show","hide","blur","input","close","delete","update:modelValue"],setup(t,{emit:a,slots:r}){const i=R(),u=()=>{const o=Array(9).fill("").map((n,l)=>({text:l+1}));return t.randomKeyOrder&&o.sort(()=>Math.random()>.5?1:-1),o},T=()=>[...u(),{text:t.extraKey,type:"extra"},{text:0},{text:t.showDeleteKey?t.deleteButtonText:"",type:t.showDeleteKey?"delete":""}],w=()=>{const o=u(),{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&&a("blur")},c=()=>{a("close"),t.blurOnClose&&h()},m=()=>a(t.show?"show":"hide"),y=(o,n)=>{if(o===""){n==="extra"&&h();return}const l=t.modelValue;n==="delete"?(a("delete"),a("update:modelValue",l.slice(0,l.length-1))):n==="close"?c():l.length<t.maxlength&&(a("input",o),a("update:modelValue",l+o))},z=()=>{const{title:o,theme:n,closeButtonText:l}=t,N=r["title-left"],H=l&&n==="default";if(!!(o||H||N))return e("div",{class:g("header")},[N&&e("span",{class:g("title-left")},[N()]),o&&e("h2",{class:g("title")},[o]),H&&e("button",{type:"button",class:[g("close"),oe],onClick:c},[l])])},B=()=>p.value.map(o=>{const n={};return o.type==="delete"&&(n.default=r.delete),o.type==="extra"&&(n.default=r["extra-key"]),e(L,{key:o.text,text:o.text,type:o.type,wider:o.wider,color:o.color,onPress:y},n)}),S=()=>{if(t.theme==="custom")return e("div",{class:g("sidebar")},[t.showDeleteKey&&e(L,{large:!0,text:t.deleteButtonText,type:"delete",onPress:y},{delete:r.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||a(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:g({unfit:!t.safeAreaInsetBottom,"with-title":!!o}),onTouchstart:$,onAnimationend:m,onWebkitAnimationEnd:m},[o,e("div",{class:g("body")},[e("div",{class:g("keys")},[B()]),S()])]),[[U,t.show]])]});return t.teleport?e(te,{to:t.teleport},{default:()=>[n]}):n}}});const Ie=W(Te),[De,I]=k("password-input"),Ee={info:String,mask:A,value:K(""),gutter:M,length:O(6),focused:Boolean,errorInfo:String};var Be=x({name:De,props:Ee,emits:["focus"],setup(t,{emit:a}){const r=u=>{u.stopPropagation(),a("focus",u)},i=()=>{const u=[],{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,B=c&&m===w.length;let S;m!==0&&h&&(S={marginLeft:se(h)}),u.push(e("li",{class:[{[ne]:z},I("item",{focus:B})],style:S},[T?e("i",{style:{visibility:y?"visible":"hidden"}},null):y,B&&e("div",{class:I("cursor")},null)]))}return u};return()=>{const u=t.errorInfo||t.info;return e("div",{class:I()},[e("ul",{class:[I("security"),{[ae]:!t.gutter}],onTouchstart:r},[i()]),u&&e("div",{class:I(t.errorInfo?"error-info":"info")},[u])])}}});const Se=W(Be),Fe="_login_a43zm_1",be="_loginTitle_a43zm_7",ze="_txt_a43zm_25",Ne="_codeText_a43zm_29",Le="_margin34_a43zm_32",Ke="_formTitle_a43zm_35",qe="_teacherInfo_a43zm_62",Ve="_teacherLogo_a43zm_70",ke="_teacherName_a43zm_80",Me="_itips_a43zm_91",He="_protocol_a43zm_95",Qe="_protocolText_a43zm_101",Re="_boxStyle_a43zm_105";var d={login:Fe,loginTitle:be,txt:ze,codeText:Ne,margin34:Le,formTitle:Ke,teacherInfo:qe,teacherLogo:Ve,teacherName:ke,itips:Me,protocol:He,protocolText:Qe,boxStyle:Re},Oe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABcCAMAAADUMSJqAAACMVBMVEUAAADx8fHw8PDw8PDx8fHx8fHw8PDx8fHw8PDy8vLx8fHx8fH09PTw8PDw8PD////////w8PAp2bgszK4szrAszq8ztZsr0LEvxKcty60tyastyqwr0rI4ppAux6kuxakvwqb+/v4uyKowwK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YMsgZ/W2NCIHdXexcKdJG8PLrBaLJWjDnk+OvDydKrfvDIaHTEa7XsmMuyP3WkFaaCz2cBa3kGRdWiV03Rk2cr+R9Fp8OhXULDRp8HqtZihyH3DW7vCSm9Krz5urAe402gGuLzJr1LSNJEmDwQZ1qJxT/OwmDTVpFv+1pxwhkz8G15JYeENlA5wz19CYdttSVl+NbTFE4HrSDnAlAfD2xIXHDKMZ9ERNo3ZjNHLSDiLFbEvUk1DrWQytGTVc69qOWcfhaiPIrsddizwx9Dqrd0Om3VzJQNuHkfaRMb8f6MpIvzWQ8CY6zLPJLTltMvn9BkkEfrwy5spJazlPeL0J5FdKJpq5Z1F6m+VXmB98ExQlTpMvroE+vlXEasNJywV+7XlZQyjkdJISFi6NDC1u49YzfDh4X8QP/jAQCIWMRKQ7jw4tbm9dt1v/opsfvN7hCATskiqG251ri3yvm0V84GWPHCALDFuicFV0IvK6XMQHfq4hHw5I2u0ujIvcw0Zu1r68IOIDDzfmgxxqdwVMiTjjFvPv8zxnXKW7qzHeyxSuZTjwH5v4D9DW7wso8vMDOiYxcvVwqYg3HNSzrxrwIbM4LhXbIc2Tw3NSOlt2NDqAb9cq2Wx5NtyT0tAy5XFrz47RxtPVpjed7YO94RTHrYIOigUdcQs6nBf0WkHICxFBr3IEvYQS8vpMyIs/Qa8shbxsFfKaWMgLbmGv5oX/UoGgX4f4B/PM8zgpeF23AAAAAElFTkSuQmCC";const We="_loginCode_1ohk2_1",Je="_codeTips_1ohk2_23",Pe="_codeTxt_1ohk2_28",_e="_btnWrap_1ohk2_36";var D={loginCode:We,codeTips:Je,codeTxt:Pe,btnWrap:_e},Ge=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 F.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 F.post("/api-auth/smsLogin",{requestType:"form",data:{clientId:"student",clientSecret:"student",phone:this.phone,smsCode:this.smsCode,isSurportRegister:!0}});const{authentication:a}=t.data;re(a.token_type+" "+a.access_token),window.history.go(-1),this.onLoginSuccess()}catch{}}},render(){return e(Q,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},[s("\u8F93\u5165\u9A8C\u8BC1\u7801")]),e("p",{class:D.codeTxt},[s("\u5DF2\u53D1\u90016\u4F4D\u9A8C\u8BC1\u7801\u81F3 "),e("span",null,[this.phone])])]),e(Se,{value:this.smsCode,focused:this.showKeyboard,length:6,onFocus:()=>{this.showKeyboard=!0},gutter:10},null),e(Ie,{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:()=>[s("\u91CD\u65B0\u53D1\u9001 "),!this.countDownStatus&&e(Q,null,[s("("),this.countDownTime,s(")")])]})])])])}});const Ze="_teacherChange_1l022_1",Xe="_changeInfo_1l022_6",je="_txt_1l022_24",Ue="_name_1l022_25",Ye="_changeTips_1l022_39";var f={teacherChange:Ze,changeInfo:Xe,txt:je,name:Ue,changeTips:Ye},$e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABXFJ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VtUlosgnh+Ngo2ctkP8t5H8XRONAaBqKNsByJY2/b4jliN20YLmOCnGDYi5g9CbodkLeLinCT2NveDQaFRGoqw/MssgtekEjLg+yySHITQLdDikiHBqHwSiF1Orh4V04ZZZpJWvDPRAnAX0XIXsr5GyD3O2LhfhpFOyDwgNgCLTcwzKtgmqj7Di0NcZxLdT7O2RthuyvIecbQSN3B+h2Qd7uMGtD0jClQ10RzLjjKOD5I2i3Qc5WyNrybhp6f23sD/0AtOpg8t6SY4hcwK1LMOoU3903wXJE0MgKprEziEaQ5RqSoUkRa6sI4ohMwGgfaDdCxudwzgz/jov32isnQbctiEZSiNqQaVWbA/2Xw7bM5RPw7CHUHIW0DUJI8W4YuiauPboDtRlwPIBGThLYdXC6BM5bobMVxm4vSxdEE1HwT0bEXetugewvQbsB0j+DlhKYGRXXus5A/nYw7IGe32LW4Fq6gJlRyP4CnDIodRjsxyDtU9BuAn0S3OqQr5wuUegx7NBF9lKf9xWkfgy2NPBI53C2gW6zSKv0TXDZEY9u9avI2irt1ZCyFlLXQeZG6GoWafNkBE7miZRqVeLRI52NrLE1NwHm/ZC8FlI+EjQsh2DirnzdHI7KWZbW2Jr3KJE9xCbgvAm0nwghqesgYwPcvx7HDQ+PEn1z99k43O+GoavgGY5vi903nRjb9nqsdzD927Af9AbHqthiWhWbfB/8Nuuq2OheFUcNVsVhj5DHbbyqKW7HbbyqKdzjNv8BYjqelRrm8xEAAAAASUVORK5CYII=",et=x({name:"teacherChange",props:{changeInfo:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onChangeTeacher:{type:Function,default:t=>{}}},computed:{teacherInfo(){const{old:t,now:a}=this.changeInfo;return{oldName:t.username,oldAvatar:t.avatar,nowName:a.username,nowAvatar:a.avatar}}},render(){return e("div",{class:f.teacherChange},[e("div",{class:f.changeInfo},[e(q,null,{default:()=>[e(C,{span:12,class:f.txt},{default:()=>[s("\u60A8\u5DF2\u7ED1\u5B9A")]}),e(C,{span:12,class:f.name},{default:()=>[e("img",{src:this.teacherInfo.oldAvatar||V},null),e("span",null,[this.teacherInfo.oldName])]})]}),e(q,null,{default:()=>[e(C,{span:12,class:f.txt},{default:()=>[s("\u662F\u5426\u66F4\u6362\u4E3A")]}),e(C,{span:12,class:f.name},{default:()=>[e("img",{src:this.teacherInfo.nowAvatar||V},null),e("span",null,[this.teacherInfo.nowName])]})]})]),e("div",{class:f.changeTips},[e("img",{src:$e},null),e("span",null,[s("\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:()=>[s("\u4E0D\u66F4\u6362")]}),e(b,{type:"primary",round:!0,onClick:()=>{this.onChangeTeacher(!0)}},{default:()=>[s("\u66F4\u6362")]})])])}}),wt=x({name:"login",data(){return{id:this.$route.query.id,username:"",teacherInfo:{},imgCodeStatus:!1,checked:!1,teacherChangeStatus:!1,changeInfo:{}}},computed:{codeDisable(){return console.log(!!this.username),!!this.username}},async mounted(){ue();try{const t=await F.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");this.imgCodeStatus=!0},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 a=await F.get("/api-student/open/bindTeacher",{params:{phone:this.username,userId:this.id,isUpdate:t}});this.changeInfo=a.data||{};const{old:r,now:i}=a.data;!t&&i&&r&&i.userId!==r.userId?this.teacherChangeStatus=!0:r&&r.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:Oe,alt:""},null),e("p",null,[e("span",{class:d.txt},[s("\u9177\u4E50\u79C0")]),e("span",null,[s("\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||V,alt:""},null)]),e("div",{class:d.teacherName},[e("span",null,[this.teacherInfo.username])," ",s("\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(q,{style:{marginBottom:"16px"}},{default:()=>[e(C,{span:24,class:d.formTitle},{default:()=>[s("\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},[s("\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:()=>[s("\u83B7\u53D6\u77ED\u4FE1\u9A8C\u8BC1\u7801")]})]),e("div",{class:d.protocol},[e(he,{modelValue:this.checked,"onUpdate:modelValue":t=>this.checked=t},{default:()=>[s("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")],icon:t=>e(le,{class:d.boxStyle,name:t.checked?ge:fe,size:"15"},null)}),e("span",{class:d.protocolText,onClick:()=>{this.previewProtocol("user")}},[s("\u300A\u7528\u6237\u6CE8\u518C\u534F\u8BAE\u300B")]),s("\u548C"),e("span",{class:d.protocolText,onClick:()=>{this.previewProtocol("privacy")}},[s("\u300A\u9690\u79C1\u653F\u7B56\u300B")])]),e(ve,{modelValue:this.imgCodeStatus,"onUpdate:modelValue":t=>this.imgCodeStatus=t},{default:()=>[this.imgCodeStatus&&e(Ge,{phone:this.username,onLoginSuccess:this.onLoginSuccess},null)]}),e(ie,{show:this.teacherChangeStatus,round:!0},{default:()=>[e(et,{changeInfo:this.changeInfo,onClose:()=>{this.teacherChangeStatus=!1,this.$router.push("/inviteSuccess")},onChangeTeacher:t=>{this.onLoginSuccess(t)}},null)]})])}});export{wt as default};