forgotPassword-985ab9db-1731319840132.js 7.5 KB

1
  1. import{d as b,r,b as N,c as K,e as P,f as e,N as C,g as p,h as g,i as S,j as m,x as _,k as h,l as T,m as D,F as U}from"./index-6198d9d3-1731319840132.js";import{u as M}from"./api-e20c9545-1731319840132.js";import{S as W}from"./sendSms-4af78ee1-1731319840132.js";const k="_listWrap_yaott_1",q="_customTabs_yaott_7",z="_infoWrap_yaott_28",Y="_teacherInfoWrap_yaott_35",x="_teacherHeadWrap_yaott_40",H="_headerD_yaott_45",Q="_defultHeade_yaott_49",j="_changeHead_yaott_58",X="_disalbedNone_yaott_69",Z="_hoverNone_yaott_72",V="_uploadFile_yaott_82",O="_headerInfo_yaott_90",J="_headerTitle_yaott_90",L="_sexIcon_yaott_103",G="_roleType_yaott_108",$="_headerSubTitle_yaott_119",ee="_setInfo_yaott_126",te="_btnList_yaott_167",ae="_btn_yaott_167",se="_changePwdModal_yaott_190",oe="_wrap_yaott_193",re="_sendMsg_yaott_205",le="_pwdIcon_yaott_209",ne="_submitBtm_yaott_214",s={listWrap:k,customTabs:q,infoWrap:z,teacherInfoWrap:Y,teacherHeadWrap:x,headerD:H,defultHeade:Q,changeHead:j,disalbedNone:X,hoverNone:Z,uploadFile:V,headerInfo:O,headerTitle:J,sexIcon:L,roleType:G,headerSubTitle:$,setInfo:ee,btnList:te,btn:ae,changePwdModal:se,wrap:oe,sendMsg:re,pwdIcon:le,submitBtm:ne},ie="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAABPZJREFUaEPtWN1vG0UQn7kYny1hFQgEqASRQYhS4GnPMbFTxaCmkJC0UAiipPwDPECfykcr4QcKqE8pD/wDhBY1fLQkbVBA4EDsxL67J0pbhEhUkAoKFVDZKD7ncoM2nKPrcT5/Nq0l7+Puzuz8ZmZ/M7sITT6wye2HFoBrHcFWBFoRqNMDrRSq04F1izcsApFIpEPTtGcQMQIADxHRZgDYZFp4GREvAsAZI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PnUTkEjpdPqBIAiekM2rlNqYz+d/OhcE6XR6fhAEz8h29jyvN5/P7z0Xu2rvNESg3qDNtGsRaGY26/HVqkA9WWumTasCzcxmPb5aFagna820aVWgmdmsx9e/6msHT1UYKgkAAAAASUVORK5CYII=",pe=b({name:"forgotPassword",emits:["close"],props:{phone:{type:String,default:""}},setup(I,{emit:f}){const c=r(),d=N(),l=r(!1),w=r(!1),i=r(!1),E=K(),o=P({mobile:I.phone,password:"",code:""}),n=r(!1),u=r(60),y="发送短信",v=async()=>(c.value.validate(async t=>{if(!t){d.loading("修改中..."),l.value=!0;try{return await M({...o,mobile:null,clientType:"TEACHER"}),d.success("修改成功"),l.value=!1,f("close"),setTimeout(()=>{E.logout(),history.go(0)},500),!1}catch(a){return l.value=!1,d.error(a.msg),!1}}}),!1),R=()=>{var t;(t=c.value)==null||t.validate(a=>{a||(i.value=!0)},a=>a.key==="a")},F=()=>{if(n.value)return;n.value=!0;const t=setInterval(()=>{u.value--,console.log(u.value),u.value<=0&&(n.value=!1,clearInterval(t))},1e3)},B=(t,a,A)=>{a===""||!a?A(new Error("请输入新密码")):a.length<8||a.length>20?A(new Error("8~20位含数字、字母、特殊字符(如:%、&、#等)组合")):A()};return()=>e(U,null,[e("div",{class:s.wrap},[e(C,{ref:c,"label-placement":"left",size:"large",model:o},{default:()=>[e(p,{path:"mobile",rule:[{key:"a",required:!0,message:"请输入手机号",trigger:"blur"},{key:"a",pattern:/^1[3456789]\d{9}$/,message:"手机号格式不正确",trigger:"blur"}]},{default:()=>[e(g,{readonly:!0,type:"text",disabled:!0,maxlength:11,value:o.mobile,"onUpdate:value":t=>o.mobile=t,placeholder:"请输入手机号"},null)]}),e(p,{path:"code",rule:[{required:!0,message:"请输入验证码",trigger:"blur"},{pattern:/^\d+$/,message:"请输入数字验证码",trigger:"blur"}]},{default:()=>[e(S,null,{default:()=>[e(g,{value:o.code,"onUpdate:value":t=>o.code=t,type:"text",maxlength:6,placeholder:"请输入验证码",class:s.sendInput},null),e(m,{type:"primary",class:s.sendMsg,disabled:n.value,bordered:!1,onClick:()=>R()},{default:()=>[n.value?u.value:y]})]})]}),e(p,{path:"password",rule:[{validator:B,trigger:"blur",required:!0}]},{default:()=>[e(g,{value:o.password,"onUpdate:value":t=>o.password=t,showPasswordOn:"click",placeholder:"请输入密码",inputProps:{autocomplete:"off"},class:[w.value?"":s["no-pwd"]]},{"password-visible-icon":()=>e("img",{src:ie,class:s.pwdIcon},null),"password-invisible-icon":()=>e("img",{src:ue,class:s.pwdIcon},null)})]})]})]),e(_,{justify:"space-around",style:{width:"100%"},wrap:!1,wrapItem:!1},{default:()=>[e(m,{class:[s.submitBtm,s.submitForgoBtm],onClick:()=>f("close"),size:"large",round:!0,disabled:l.value},{default:()=>[h("取消")]}),e(m,{class:[s.submitBtm,s.submitForgoBtm],type:"primary",onClick:v,size:"large",round:!0,disabled:l.value},{default:()=>[h("确认修改")]})]}),e(T,{maskClosable:D,show:i.value,"onUpdate:show":t=>i.value=t},{default:()=>[e(W,{phone:o.mobile,type:"PASSWORD",onClose:()=>i.value=!1,onSendCode:()=>{F()}},null)]})])}});export{pe as F,s};