!function(){const e=["extra"];function t(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function o(e){for(var o=1;o=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(a[o]=e[o])}return a}function n(e,t,o,r,a,n,l){try{var s=e[n](l),i=s.value}catch(u){return void o(u)}s.done?t(i):Promise.resolve(i).then(r,a)}function l(e){return function(){var t=this,o=arguments;return new Promise((function(r,a){var l=e.apply(t,o);function s(e){n(l,r,a,s,i,"next",e)}function i(e){n(l,r,a,s,i,"throw",e)}s(void 0)}))}}System.register(["./index-legacy-a314c7dd.js","./index-legacy-3d32cf53.js","./index-legacy-00316754.js","./student-register-store-legacy-5e7da7c2.js","./icon-gift-legacy-ce1b66cd.js","./index-legacy-2788affc.js","./index-legacy-2358b05b.js","./index-legacy-31697f57.js","./index-legacy-701fd443.js","./index-legacy-59282c70.js","./index-legacy-ec2eff9b.js","./index-legacy-7729bbe4.js","./index-legacy-72dfb7ed.js","./index-legacy-fb49b6ec.js","./index-legacy-dff5e6e7.js","./Checker-legacy-855ee8e8.js"],(function(t,r){"use strict";var n,s,i,u,c,d,m,p,g,w,f,h,_,y,b,x,v,S,T,j,C,F,O,E,D,k,A,V;return{setters:[e=>{n=e.d,s=e.P,i=e.q,u=e.r,c=e.e,d=e.x,m=e.y,p=e.a,g=e.A,w=e.C,f=e.Q,h=e.z,_=e.N,y=e.E,b=e.D,x=e.R},e=>{v=e.C,S=e.M},e=>{T=e.M},e=>{j=e.u},e=>{C=e.i},e=>{F=e.M},e=>{O=e.F},e=>{E=e.F},e=>{D=e.R,k=e.a},e=>{A=e.T},e=>{V=e.P},null,null,null,null,null],execute:function(){var r=document.createElement("style");r.textContent="._registerModal_w1mwo_1{background:#FFF4E2;overflow:hidden;min-height:100vh}._memberNumer_w1mwo_6{margin:.32rem .32rem 0;background:linear-gradient(90deg,#FF8633 0%,#FFB047 100%);border-radius:.26667rem;padding:.32rem 0 .32rem .42667rem;display:flex;align-items:center;font-size:.37333rem;color:#fff;font-weight:700}._memberNumer_w1mwo_6 ._iconGift_w1mwo_17{width:.53333rem;height:.53333rem;margin-right:.16rem}._infoTitle_w1mwo_22{width:8.4rem;height:.82667rem;display:block;margin:.37333rem auto .26667rem}._registerForm_w1mwo_28{background:#FFFFFF;box-shadow:0 .02667rem .16rem #f0d8c8;border-radius:.48rem;margin:.32rem .32rem 0;overflow:hidden}._registerForm_w1mwo_28 ._tips_w1mwo_35{display:inline-block;padding-left:.13333rem;padding-top:.10667rem;font-size:.32rem;font-weight:400;color:#777;line-height:.45333rem}._registerForm_w1mwo_28 .van-cell{padding:.37333rem}._registerForm_w1mwo_28 .van-field__label{font-size:.42667rem;font-weight:600;color:#5b2c03;line-height:.58667rem;margin-bottom:.21333rem}._registerForm_w1mwo_28 .van-field__control{font-size:.42667rem}._registerForm_w1mwo_28 ._codeText_w1mwo_57{color:#ffcf7c;font-size:.37333rem;font-weight:600}._registerForm_w1mwo_28 ._codeText_w1mwo_57._codeTextDisabled_w1mwo_62{color:#ccc}._submitBtn_w1mwo_65{margin:.42667rem .32rem .58667rem;width:calc(100% - .64rem);height:1.22667rem;border-radius:.32rem;font-size:.42667rem;font-weight:600;color:#5b2c03!important;line-height:.58667rem}._radioSection_w1mwo_75{position:relative;min-width:.85333rem;justify-content:center;padding-left:.37333rem;padding-right:.37333rem}._radioItem_w1mwo_82{position:absolute;top:0;left:0;right:0;bottom:0;opacity:0}._radioSection_w1mwo_75+._radioSection_w1mwo_75{margin-left:.32rem}\n",document.head.appendChild(r);const I="_registerModal_w1mwo_1",P="_memberNumer_w1mwo_6",Y="_iconGift_w1mwo_17",M="_registerForm_w1mwo_28",B="_tips_w1mwo_35",N="_codeText_w1mwo_57",z="_codeTextDisabled_w1mwo_62",R="_submitBtn_w1mwo_65",U="_radioSection_w1mwo_75",G="_radioItem_w1mwo_82",q=[];for(let e=1;e<=40;e++)q.push({text:e+"班",value:e});t("default",n({name:"register-modal",emits:["close","submit"],setup(t,{emit:r}){const n=s(),L=i();j().setShoolId(n.query.sId);const Q=u(),H=c((()=>{let e=[];const t=[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5}],o=[{text:"六年级",value:6}],r=[{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}];return"FIVE_YEAR_SYSTEM"===J.gradeYear?e.push([...t]):"SIX_YEAR_SYSTEM"===J.gradeYear?e.push([...t,...o]):"THREE_YEAR_SYSTEM"===J.gradeYear?e.push([...r]):"FORE_YEAR_SYSTEM"===J.gradeYear?e.push([...o,...r]):e.push([...t,...o,...r]),e})),J=d({countDownStatus:!0,countDownTime:12e4,modelValue:!1,imgCodeStatus:!1,gradeNumText:"",currentClassText:"",gradeStatus:!1,classStatus:!1,loading:!1,schoolId:n.query.sId,gradeYear:null,schoolType:null,giftVipDay:null,showTips:!1,showButton:!1,showMessage:"请使用微信打开"}),X=d({autoRegister:!0,client_id:"cooleshow-student",client_secret:"cooleshow-student",extra:{nickname:"",currentGradeNum:"",currentClass:"",gender:1,registerType:"",giftVipDay:0},grant_type:"password",loginType:"SMS",password:"",username:""}),Z=()=>{J.countDownStatus=!1,h((()=>{Q.value.start()}))},K=()=>{if(!_(X.username))return y("请输入正确的手机号码");J.imgCodeStatus=!0},W=c((()=>!!_(X.username))),$=()=>{J.countDownStatus=!0,Q.value.reset()},ee=function(){var t=l((function*(){try{if(te())return;J.loading=!0,yield b.get("/edu-app/open/student/schoolQuery",{params:{schoolId:J.schoolId,mobile:X.username}});const{extra:t}=X,r=a(X,e),n=yield b.post("/edu-app/userlogin",{hideLoading:!1,requestType:"form",data:o(o({},r),{},{extra:JSON.stringify(o(o({},t),{},{schoolId:J.schoolId}))})});5436===n.code?(J.showTips=!0,J.showMessage="二维码已经失效,详情请咨询学校老师",J.showButton=!1):5435===n.code?(J.showTips=!0,J.showMessage="报名信息更新,请刷新后重新提交",J.showButton=!0):setTimeout((()=>{y("报名成功"),L.push("/download")}),100)}catch(t){}finally{J.loading=!1}}));return function(){return t.apply(this,arguments)}}(),te=()=>X.extra.nickname?X.extra.currentGradeNum?X.extra.currentClass?_(X.username)?!X.password&&(y("请输入验证码"),!0):(y("请输入正确的手机号码"),!0):(y("请选择所在班级"),!0):(y("请选择所在年级"),!0):(y("请输入学生姓名"),!0),oe=function(){var e=l((function*(){try{const{data:e}=yield b.get("/edu-app/open/school/detail",{params:{id:J.schoolId},noAuthorization:!0});J.giftVipDay=e.giftVipDay,J.schoolType=e.schoolType,J.gradeYear=e.gradeYear,X.extra.giftVipDay=e.giftVipDay,X.extra.registerType=e.registerType,x().weixin?"GIFT_VIP_DAY"===e.registerType&&0!==e.status||(J.showTips=!0,J.showMessage="二维码已经失效,详情请咨询学校老师",J.showButton=!1):J.showTips=!0}catch(e){}}));return function(){return e.apply(this,arguments)}}();return m((()=>{oe()})),()=>{return p("div",{class:I},[J.giftVipDay?p("div",{class:P},[p("img",{src:C,class:Y},null),p("p",null,[g("现在报名立即赠送乐器AI学练工具有效期")," ",p("span",null,[J.giftVipDay]),g(" 天")])]):"",p(O,{labelAlign:"top",class:M},{default:()=>[p(E,{clearable:!0,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:X.extra.nickname,"onUpdate:modelValue":e=>X.extra.nickname=e},null),p(E,{clearable:!0,label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>p(D,{"checked-color":"#ffcb75",modelValue:X.extra.gender,"onUpdate:modelValue":e=>X.extra.gender=e,direction:"horizontal"},{default:()=>[p(A,{size:"large",type:"primary",color:1!==X.extra.gender?"#EAEAEA":"#ffcb75",textColor:1!==X.extra.gender?"#AAA":"#5B2C03",class:U,round:!0},{default:()=>[p(k,{class:G,name:1},null),g("男")]}),p(A,{size:"large",type:"primary",color:0!==X.extra.gender?"#EAEAEA":"#ffcb75",textColor:0!==X.extra.gender?"#AAA":"#5B2C03",class:U,round:!0},{default:()=>[p(k,{class:G,name:0},null),g("女")]})]})}),p(E,{clearable:!0,label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:J.gradeNumText,onClick:()=>J.gradeStatus=!0},null),p(E,{clearable:!0,label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:J.currentClassText,onClick:()=>J.classStatus=!0},null),p(E,{clearable:!0,label:"联系方式(直接监护人)",placeholder:"请输入手机号码",type:"tel",autocomplete:"off",modelValue:X.username,"onUpdate:modelValue":e=>X.username=e,maxlength:11},{label:()=>p("div",null,[g("联系方式"),p("p",{class:B},[g("手机号是音乐数字课堂的唯一登录账户")])])}),p(E,{center:!0,clearable:!0,label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:X.password,"onUpdate:modelValue":e=>X.password=e,maxlength:6},{button:()=>J.countDownStatus?p("span",{class:[N,W.value?"":z],onClick:K},[g("获取验证码")]):p(v,{ref:e=>Q.value=e,"auto-start":!1,time:J.countDownTime,onFinish:$,format:"ss秒"},null)})]}),p(F,{position:"bottom"},{default:()=>[p(w,{type:"primary",class:R,color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",block:!0,onClick:ee,disabled:J.loading,loading:J.loading},{default:()=>[g("确认")]})]}),J.imgCodeStatus?p(T,{value:J.imgCodeStatus,"onUpdate:value":e=>J.imgCodeStatus=e,phone:X.username,type:"REGISTER",onClose:()=>{J.imgCodeStatus=!1},onSendCode:Z},null):null,p(f,{show:J.gradeStatus,"onUpdate:show":e=>J.gradeStatus=e,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[p(V,{showToolbar:!0,columns:H.value,onCancel:()=>J.gradeStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];X.extra.currentGradeNum=t.value,J.gradeNumText=t.text,J.gradeStatus=!1}},null)]}),p(f,{show:J.classStatus,"onUpdate:show":e=>J.classStatus=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[p(V,{showToolbar:!0,columns:q,onCancel:()=>J.classStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];X.extra.currentClass=t.value,J.currentClassText=t.text,J.classStatus=!1}},null)]}),p(S,{show:J.showTips,"onUpdate:show":e=>J.showTips=e,message:J.showMessage,showButton:J.showButton,buttonText:"刷新",onConfirm:(e=l((function*(){J.showTips=!1,yield oe(),X.password="",window.scrollTo({top:0,behavior:"smooth"})})),function(){return e.apply(this,arguments)})},null)]);var e}}}))}}}))}();