1 |
- !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<arguments.length;o++){var a=null!=arguments[o]?arguments[o]:{};o%2?t(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function r(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function a(e,t){if(null==e)return{};var o,r,a=function(e,t){if(null==e)return{};var o,r,a={},n=Object.keys(e);for(r=0;r<n.length;r++)o=n[r],t.indexOf(o)>=0||(a[o]=e[o]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(r=0;r<n.length;r++)o=n[r],t.indexOf(o)>=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-e6be1dcb.js","./index-legacy-9baea00d.js","./index-legacy-09a1b1db.js","./student-register-store-legacy-9e94918b.js","./icon-gift-legacy-ce1b66cd.js","./index-legacy-3fae0ac6.js","./index-legacy-f247d4cb.js","./index-legacy-ab315fa9.js","./index-legacy-92ba0770.js","./index-legacy-b6d273d9.js","./index-legacy-f9bb7174.js","./index-legacy-ff570bc2.js","./index-legacy-4e3eaaa9.js","./index-legacy-d3534fc9.js","./index-legacy-cdd7affc.js","./index-legacy-72ad1f03.js","./Checker-legacy-f8a8311d.js"],(function(t,r){"use strict";var n,s,i,u,c,d,m,g,p,h,w,f,_,y,b,x,v,S,T,O,j,C,F,E,k,A,D,I,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,g=e.a,p=e.A,h=e.C,w=e.R,f=e.z,_=e.M,y=e.N,b=e.D,x=e.S},e=>{v=e.C,S=e.M},e=>{T=e.M},e=>{O=e.u},e=>{j=e.i},e=>{C=e.M},e=>{F=e.M},e=>{E=e.F},e=>{k=e.F},e=>{A=e.R,D=e.a},e=>{I=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 M="_registerModal_w1mwo_1",P="_memberNumer_w1mwo_6",B="_iconGift_w1mwo_17",Y="_registerForm_w1mwo_28",R="_tips_w1mwo_35",N="_codeText_w1mwo_57",z="_codeTextDisabled_w1mwo_62",U="_submitBtn_w1mwo_65",G="_radioSection_w1mwo_75",$="_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();O().setShoolId(n.query.sId);const X=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,details:{},gradeYear:null,schoolType:null,giftVipDay:null,showTips:!1,showButton:!1,showMessage:"请使用微信打开",showOtherSchool:!1,showOtherMessage:""}),Q=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:""}),K=()=>{J.countDownStatus=!1,f((()=>{X.value.start()}))},W=()=>{if(!_(Q.username))return y("请输入正确的手机号码");J.imgCodeStatus=!0},Z=c((()=>!!_(Q.username))),ee=()=>{J.countDownStatus=!0,X.value.reset()},te=function(){var t=l((function*(t=!1){try{if(oe())return;if(J.loading=!0,!t){const e=yield b.get(`/edu-app/open/student/studentSchool?mobile=${Q.username}&code=${Q.password}&type=REGISTER`);var r;if(e&&e.schoolId!==J.schoolId)return J.showOtherSchool=!0,void(J.showOtherMessage=`您已绑定【${J.details.name||""}】,提交后将更换到【${null===(r=e.data)||void 0===r?void 0:r.schoolName}】,是否确认提交?`)}yield b.get("/edu-app/open/student/schoolQuery",{params:{schoolId:J.schoolId,mobile:Q.username}});const{extra:n}=Q,l=a(Q,e),s=yield b.post("/edu-app/userlogin",{hideLoading:!1,requestType:"form",data:o(o({},l),{},{extra:JSON.stringify(o(o({},n),{},{schoolId:J.schoolId}))})});5436===s.code?(J.showTips=!0,J.showMessage="二维码已经失效,详情请咨询学校老师",J.showButton=!1):5435===s.code?(J.showTips=!0,J.showMessage="报名信息更新,请刷新后重新提交",J.showButton=!0):setTimeout((()=>{y("报名成功"),L.push("/download")}),100)}catch(n){}finally{J.loading=!1}}));return function(){return t.apply(this,arguments)}}(),oe=()=>Q.extra.nickname?Q.extra.currentGradeNum?Q.extra.currentClass?_(Q.username)?!Q.password&&(y("请输入验证码"),!0):(y("请输入正确的手机号码"),!0):(y("请选择所在班级"),!0):(y("请选择所在年级"),!0):(y("请输入学生姓名"),!0),re=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,Q.extra.giftVipDay=e.giftVipDay,Q.extra.registerType=e.registerType,J.details=e,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((()=>{re()})),()=>{return g("div",{class:M},[J.giftVipDay?g("div",{class:P},[g("img",{src:j,class:B},null),g("p",null,[p("现在报名立即赠送乐器AI学练工具有效期")," ",g("span",null,[J.giftVipDay]),p(" 天")])]):"",g(E,{labelAlign:"top",class:Y},{default:()=>[g(k,{clearable:!0,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:Q.extra.nickname,"onUpdate:modelValue":e=>Q.extra.nickname=e},null),g(k,{clearable:!0,label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>g(A,{"checked-color":"#ffcb75",modelValue:Q.extra.gender,"onUpdate:modelValue":e=>Q.extra.gender=e,direction:"horizontal"},{default:()=>[g(I,{size:"large",type:"primary",color:1!==Q.extra.gender?"#EAEAEA":"#ffcb75",textColor:1!==Q.extra.gender?"#AAA":"#5B2C03",class:G,round:!0},{default:()=>[g(D,{class:$,name:1},null),p("男")]}),g(I,{size:"large",type:"primary",color:0!==Q.extra.gender?"#EAEAEA":"#ffcb75",textColor:0!==Q.extra.gender?"#AAA":"#5B2C03",class:G,round:!0},{default:()=>[g(D,{class:$,name:0},null),p("女")]})]})}),g(k,{clearable:!0,label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:J.gradeNumText,onClick:()=>J.gradeStatus=!0},null),g(k,{clearable:!0,label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:J.currentClassText,onClick:()=>J.classStatus=!0},null),g(k,{clearable:!0,label:"联系方式(直接监护人)",placeholder:"请输入手机号码",type:"tel",autocomplete:"off",modelValue:Q.username,"onUpdate:modelValue":e=>Q.username=e,maxlength:11},{label:()=>g("div",null,[p("联系方式"),g("p",{class:R},[p("手机号是音乐数字课堂的唯一登录账户")])])}),g(k,{center:!0,clearable:!0,label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:Q.password,"onUpdate:modelValue":e=>Q.password=e,maxlength:6},{button:()=>J.countDownStatus?g("span",{class:[N,Z.value?"":z],onClick:W},[p("获取验证码")]):g(v,{ref:e=>X.value=e,"auto-start":!1,time:J.countDownTime,onFinish:ee,format:"ss秒"},null)})]}),g(C,{position:"bottom"},{default:()=>[g(h,{type:"primary",class:U,color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",block:!0,onClick:()=>te(),disabled:J.loading,loading:J.loading},{default:()=>[p("确认")]})]}),J.imgCodeStatus?g(T,{value:J.imgCodeStatus,"onUpdate:value":e=>J.imgCodeStatus=e,phone:Q.username,type:"REGISTER",onClose:()=>{J.imgCodeStatus=!1},onSendCode:K},null):null,g(w,{show:J.gradeStatus,"onUpdate:show":e=>J.gradeStatus=e,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[g(V,{showToolbar:!0,columns:H.value,onCancel:()=>J.gradeStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];Q.extra.currentGradeNum=t.value,J.gradeNumText=t.text,J.gradeStatus=!1}},null)]}),g(w,{show:J.classStatus,"onUpdate:show":e=>J.classStatus=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[g(V,{showToolbar:!0,columns:q,onCancel:()=>J.classStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];Q.extra.currentClass=t.value,J.currentClassText=t.text,J.classStatus=!1}},null)]}),g(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 re(),Q.password="",window.scrollTo({top:0,behavior:"smooth"})})),function(){return e.apply(this,arguments)})},null),g(F,{show:J.showOtherSchool,messageAlign:"left",message:J.showOtherMessage,showCancelButton:!0,onCancel:()=>J.showOtherSchool=!1,onConfirm:()=>{J.showOtherSchool=!1,te(!0)}},null)]);var e}}}))}}}))}();
|