1 |
- import{d as q,P as M,q as Y,r as A,e as w,x as S,y as U,a,A as n,C as G,R as C,z as I,M as d,N as l,D as p,S as j}from"./index-0f430fcc.js";import{C as Q,M as k}from"./index-0d69ce30.js";import{M as z}from"./index-0ead74db.js";import{u as J}from"./student-register-store-f0c1b2ce.js";import{i as K}from"./icon-gift-94736468.js";import{M as P}from"./index-006d92d8.js";import{F as H}from"./index-a1e7c45c.js";import{F as i}from"./index-42a305c0.js";import{R as L,a as E}from"./index-e02130b9.js";import{T as F}from"./index-9a0fefcc.js";import{P as B}from"./index-1a705d0f.js";import"./index-cc542b8c.js";import"./index-15acf057.js";import"./index-9b258718.js";import"./index-787e92a9.js";import"./Checker-53dd11d8.js";const Z="_registerModal_1esqj_1",O="_headBg_1esqj_7",X="_memberNumer_1esqj_14",W="_iconGift_1esqj_25",$="_infoTitle_1esqj_30",ee="_registerForm_1esqj_36",te="_tips_1esqj_42",se="_submitBtn_1esqj_67",ae="_radioSection_1esqj_77",ue="_radioItem_1esqj_87",oe="_giftTips_1esqj_98",re="_agreeColumn_1esqj_121",ne="_username_1esqj_140",le="_fieldTipsGroup_1esqj_151",ie="_fieldTips_1esqj_151",ce="_codeText_1esqj_174",de="_countDown_1esqj_178",u={registerModal:Z,headBg:O,memberNumer:X,iconGift:W,infoTitle:$,registerForm:ee,tips:te,submitBtn:se,radioSection:ae,radioItem:ue,giftTips:oe,agreeColumn:re,username:ne,fieldTipsGroup:le,fieldTips:ie,codeText:ce,countDown:de},pe=""+new URL("register-bg-f7f91121.png",import.meta.url).href,me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAABndJREFUWEetmFtsFHUUxr9vKYoKEQsKUm0QUYqSJhrxwQtGJWpsJGDkooYYUJGbF6IPoj60mhjNahQRRFRQVBRQFKyXKoYEgRdUvJBIDCoUIbUUfDCxVTrn0//M7O7M7swsJjZttrvz35nfnPP9v3POEP/xZ1SbzoJwLQyXARg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V/iXxy5UX9KOqHUNsT7GQMn7p/MTA0NfVWtMjWR1YFqn9djJj1SUXyDhq7bAR0w07DMfoactH8q30/T0ZCVaoXUJLGl8/b0CJ2yxMvL+EB5Nkrp40Ge/b6+lnRBYspKNW3S/luygeRSxipAi728iQ/E9BOta8BOjnhPr0iaGRbHoMcp5DQEIpgN9IpazaUMbOm8Mz1CJy/28nARCiGcgcYaOHAFh6/XbCowxgJMuWPLOOng9IwIvRwAiWzpygJa5OWlMGVhrx3rPJ0xnvGB6vr0qB1Azj9YTu2DZgMNXh5oyO2yrrsyIvSMlzcEEYrWtLDfNvRFvV9c69dpC0yXp9YyVAfyd5nY0jUnHWjA015eKNNQoS8SvuhemBsXAK11xU/rkpp1v5NiFaAXg5S5CB05BqByjbrMUJzc/RDfCRo0iWeuwXeSxgQtSHzModPQjHQN1S5TKxwQs4FOynt5uJSVzXQQdvUsZKPrHostbN1qXUVgk2tDKiyAvOe327g4zYdql5Y0dGReesr65701EqfEzu9u33h1z8PcXGphwyvVrdYSeZqboKXfaXzSEzr9pV7Y/hRHH90HoVHgBggb/J4oOjR7/l4ZA+BemfpEgUgu7V7IeYWbjY9BK9Xv7xo/SpeWSklkAq3Sz8S+EzZwMZ8pewbgusSevzEezaUptmJQrHtNg0zYWhwUfY2FZlnaESnjdMToErQY1w5/+Iu4HA/xcFQKiaO0g+r1tDF40hEXeNrYHD6OKZlrSjSD+Qfbe8gJ5TAVGoqSDl+pfn96eFrSHLmnBJE7TmzmojUpmpooGGg0W9Z9NHd/NE1VIxRdMOglXQVPiySMSfOp2GiTUAvDG9gF8Z7CbkrbsVWfDxV8qnYZbpRwLwLBB2UmOqUklQPRIGwDsKj7Qax3PpPVCmemLO2LJ7ygun5HMcGEiwRdIONQmU4JR5nfIXVI3AnDl+rFxu5HeKAaRPT4PxS8DFqftuYQAAAAAElFTkSuQmCC",f=[];for(let c=1;c<=40;c++)f.push({text:c+"班",value:c});const _e=q({name:"register-new",emits:["close","submit"],setup(c,{emit:ge}){const h=M(),y=Y();J().setShoolId(h.query.sId);const m=A(),x=w(()=>{let t=[];const o=[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5}],r=[{text:"六年级",value:6}],g=[{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}];return e.gradeYear==="FIVE_YEAR_SYSTEM"?t.push([...o]):e.gradeYear==="SIX_YEAR_SYSTEM"?t.push([...o,...r]):e.gradeYear==="THREE_YEAR_SYSTEM"?t.push([...g]):e.gradeYear==="FORE_YEAR_SYSTEM"?t.push([...r,...g]):t.push([...o,...r,...g]),t}),e=S({countDownStatus:!0,countDownTime:1e3*120,modelValue:!1,imgCodeStatus:!1,gradeNumText:"",currentClassText:"",gradeStatus:!1,classStatus:!1,loading:!1,schoolId:h.query.sId,gradeYear:null,schoolType:null,giftVipDay:null,showTips:!1,showButton:!1,showMessage:"请使用微信打开"});A(!1);const s=S({autoRegister:!0,client_id:"cooleshow-student",client_secret:"cooleshow-student",extra:{nickname:"",currentGradeNum:"",currentClass:"",gender:1,registerType:"",giftVipDay:0,clientType:"TEACHER"},grant_type:"password",loginType:"SMS",password:"",username:""}),D=()=>{e.countDownStatus=!1,I(()=>{m.value.start()})},b=()=>{if(!d(s.username))return l("请输入正确的手机号码");e.imgCodeStatus=!0},R=async()=>{if(!(s.password.length!==6||!d(s.username)))try{const{data:t}=await p.get(`/edu-app/open/student/studentInfo?mobile=${s.username}&code=${s.password}&type=REGISTER`);if(t){s.extra.nickname||(s.extra.nickname=t.nickname),s.extra.currentGradeNum||(s.extra.currentGradeNum=t.currentGradeNum),s.extra.currentClass||(s.extra.currentClass=t.currentClass),s.extra.gender=s.extra.gender!==t.gender?t.gender:s.extra.gender,f.forEach(r=>{r.value===t.currentClass&&(e.currentClassText=r.text)});const o=x.value[0]||[];o==null||o.forEach(r=>{r.value===t.currentGradeNum&&(e.gradeNumText=r.text)})}}catch(t){}},v=w(()=>!!d(s.username)),N=()=>{e.countDownStatus=!0,m.value.reset()},_=async()=>{try{if(V())return;e.loading=!0,await p.get("/edu-app/open/student/schoolQuery",{params:{schoolId:e.schoolId,mobile:s.username}});const{extra:t,...o}=s,r=await p.post("/edu-app/userlogin",{hideLoading:!1,requestType:"form",data:{...o,extra:JSON.stringify({...t,schoolId:e.schoolId})}});r.code===5435||r.code===5436?(e.showTips=!0,e.showMessage="报名信息更新,请刷新后重新提交",e.showButton=!0):setTimeout(()=>{l("报名成功"),y.push("/download")},100)}catch(t){}finally{e.loading=!1}},V=()=>{if(d(s.username))if(s.password)if(s.extra.nickname)if(s.extra.currentGradeNum){if(!s.extra.currentClass)return l("请选择所在班级"),!0}else return l("请选择所在年级"),!0;else return l("请输入学生姓名"),!0;else return l("请输入验证码"),!0;else return l("请输入正确的手机号码"),!0;return!1},T=async()=>{try{const{data:t}=await p.get("/edu-app/open/school/detail",{params:{id:e.schoolId},noAuthorization:!0});e.giftVipDay=t.giftVipDay,e.schoolType=t.schoolType,e.gradeYear=t.gradeYear,s.extra.giftVipDay=t.giftVipDay,s.extra.registerType=t.registerType,j().weixin?t.status===0&&(e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1):e.showTips=!0}catch(t){}};return U(()=>{T()}),()=>a("div",{class:u.registerModal},[e.giftVipDay?a("div",{class:u.memberNumer},[a("img",{src:K,class:u.iconGift},null),a("p",null,[n("现在报名立即赠送乐器AI学练工具有效期")," ",a("span",null,[e.giftVipDay]),n(" 天")])]):"",a("img",{class:u.headBg,src:pe},null),a(H,{labelAlign:"top",class:u.registerForm},{default:()=>[a(i,{clearable:!1,label:"联系方式",placeholder:"请输入手机号码",type:"tel",autocomplete:"off",class:u.username,modelValue:s.username,"onUpdate:modelValue":t=>s.username=t,required:!0,"input-align":"right",maxlength:11},{label:()=>a("div",null,[n("联系方式"),a("p",{class:u.tips},[n("(直接监护人)")])])}),a("div",{class:[u.fieldTipsGroup]},[a("div",{class:[u.fieldTips]},[n("手机号是音乐数字课堂的唯一登录账户")])]),a(i,{center:!0,clearable:!1,label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:s.password,"onUpdate:modelValue":[t=>s.password=t,t=>{R()}],required:!0,"input-align":"right",maxlength:6},{button:()=>e.countDownStatus?a("span",{class:[u.codeText,v.value?"":u.codeTextDisabled],onClick:b},[n("获取验证码")]):a(Q,{ref:t=>m.value=t,"auto-start":!1,class:u.countDown,time:e.countDownTime,onFinish:N,format:"ss秒后重试"},null)}),a(i,{clearable:!1,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:s.extra.nickname,"onUpdate:modelValue":t=>s.extra.nickname=t,required:!0,"input-align":"right"},null),a(i,{clearable:!1,label:"学生性别",placeholder:"请选择性别",autocomplete:"off",required:!0,"input-align":"right"},{input:()=>a(L,{"checked-color":"#ffcb75",modelValue:s.extra.gender,"onUpdate:modelValue":t=>s.extra.gender=t,direction:"horizontal"},{default:()=>[a(F,{size:"large",type:"primary",color:s.extra.gender!==1?"#F5F6FA":"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",textColor:s.extra.gender!==1?"#626264":"#fff",class:u.radioSection,round:!0},{default:()=>[a(E,{class:u.radioItem,name:1},null),n("男")]}),a(F,{size:"large",type:"primary",color:s.extra.gender!==0?"#F5F6FA":"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",textColor:s.extra.gender!==0?"#626264":"#fff",class:u.radioSection,round:!0},{default:()=>[a(E,{class:u.radioItem,name:0},null),n("女")]})]})}),a(i,{clearable:!1,label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:e.gradeNumText,onClick:()=>e.gradeStatus=!0,required:!0,"input-align":"right"},null),a(i,{clearable:!1,label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:e.currentClassText,onClick:()=>e.classStatus=!0,required:!0,"input-align":"right"},null),s.extra.registerType==="GIFT_VIP_DAY"&&e.giftVipDay&&Number(e.giftVipDay)>0?a("div",{class:u.giftTips},[a("img",{src:me},null),a("span",null,[n("注册成功即可获得乐器AI学练工具"),a("i",null,[e.giftVipDay]),n("天有效期")])]):null]}),a(P,{position:"bottom"},{default:()=>[a(G,{type:"primary",class:u.submitBtn,color:"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",block:!0,onClick:_,disabled:e.loading,loading:e.loading},{default:()=>[n("确认")]})]}),e.imgCodeStatus?a(z,{value:e.imgCodeStatus,"onUpdate:value":t=>e.imgCodeStatus=t,phone:s.username,type:"REGISTER",onClose:()=>{e.imgCodeStatus=!1},onSendCode:D},null):null,a(C,{show:e.gradeStatus,"onUpdate:show":t=>e.gradeStatus=t,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[a(B,{showToolbar:!0,columns:x.value,onCancel:()=>e.gradeStatus=!1,onConfirm:t=>{const o=t.selectedOptions[0];s.extra.currentGradeNum=o.value,e.gradeNumText=o.text,e.gradeStatus=!1}},null)]}),a(C,{show:e.classStatus,"onUpdate:show":t=>e.classStatus=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[a(B,{showToolbar:!0,columns:f,onCancel:()=>e.classStatus=!1,onConfirm:t=>{const o=t.selectedOptions[0];s.extra.currentClass=o.value,e.currentClassText=o.text,e.classStatus=!1}},null)]}),a(k,{show:e.showTips,"onUpdate:show":t=>e.showTips=t,message:e.showMessage,showButton:e.showButton,buttonText:"刷新",onConfirm:async()=>{e.showTips=!1,await T(),s.password="",window.scrollTo({top:0,behavior:"smooth"})}},null)])}});export{_e as default};
|