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 i=e[n](l),s=i.value}catch(u){return void o(u)}i.done?t(s):Promise.resolve(s).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 i(e){n(l,r,a,i,s,"next",e)}function s(e){n(l,r,a,i,s,"throw",e)}i(void 0)}))}}System.register(["./index-legacy-e1ea41b7.js","./index-legacy-ee250b2b.js","./index-legacy-a9f6616b.js","./student-register-store-legacy-66440c28.js","./icon-gift-legacy-ce1b66cd.js","./index-legacy-820d5526.js","./index-legacy-6b36b292.js","./index-legacy-f104347d.js","./index-legacy-e197f4cd.js","./index-legacy-f9c3c6d2.js","./index-legacy-2c98c5e9.js","./index-legacy-c42bec0c.js","./index-legacy-01b7024c.js","./index-legacy-c9b011be.js","./index-legacy-666fea96.js","./Checker-legacy-f2b46109.js"],(function(t,r){"use strict";var n,i,s,u,c,d,m,g,p,w,f,h,_,y,b,x,v,S,T,j,C,O,F,E,D,V,k,A;return{setters:[e=>{n=e.d,i=e.U,s=e.q,u=e.r,c=e.e,d=e.x,m=e.y,g=e.a,p=e.A,w=e.C,f=e.V,h=e.z,_=e.N,y=e.E,b=e.D,x=e.R},e=>{v=e.C,S=e.O},e=>{T=e.M},e=>{j=e.u},e=>{C=e.i},e=>{O=e.M},e=>{F=e.F},e=>{E=e.F},e=>{D=e.R,V=e.a},e=>{k=e.T},e=>{A=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",B="_registerForm_w1mwo_28",M="_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=i(),L=s();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:"请使用微信打开"}),W=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:""}),X=()=>{J.countDownStatus=!1,h((()=>{Q.value.start()}))},K=()=>{if(!_(W.username))return y("请输入正确的手机号码");J.imgCodeStatus=!0},Z=c((()=>!!_(W.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:W.username}});const{extra:t}=W,r=a(W,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=()=>W.extra.nickname?W.extra.currentGradeNum?W.extra.currentClass?_(W.username)?!W.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,W.extra.giftVipDay=e.giftVipDay,W.extra.registerType=e.registerType,x().weixin&&"GIFT_VIP_DAY"!==e.registerType&&(J.showTips=!0,J.showMessage="二维码已经失效,详情请咨询乐团老师",J.showButton=!1)}catch(e){}}));return function(){return e.apply(this,arguments)}}();return m((()=>{oe()})),()=>{return g("div",{class:I},[J.giftVipDay?g("div",{class:P},[g("img",{src:C,class:Y},null),g("p",null,[p("现在报名立即赠送乐器AI学练工具有效期")," ",g("span",null,[J.giftVipDay]),p(" 天")])]):"",g(F,{labelAlign:"top",class:B},{default:()=>[g(E,{clearable:!0,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:W.extra.nickname,"onUpdate:modelValue":e=>W.extra.nickname=e},null),g(E,{clearable:!0,label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>g(D,{"checked-color":"#ffcb75",modelValue:W.extra.gender,"onUpdate:modelValue":e=>W.extra.gender=e,direction:"horizontal"},{default:()=>[g(k,{size:"large",type:"primary",color:1!==W.extra.gender?"#EAEAEA":"#ffcb75",textColor:1!==W.extra.gender?"#AAA":"#5B2C03",class:U,round:!0},{default:()=>[g(V,{class:G,name:1},null),p("男")]}),g(k,{size:"large",type:"primary",color:0!==W.extra.gender?"#EAEAEA":"#ffcb75",textColor:0!==W.extra.gender?"#AAA":"#5B2C03",class:U,round:!0},{default:()=>[g(V,{class:G,name:0},null),p("女")]})]})}),g(E,{clearable:!0,label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:J.gradeNumText,onClick:()=>J.gradeStatus=!0},null),g(E,{clearable:!0,label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:J.currentClassText,onClick:()=>J.classStatus=!0},null),g(E,{clearable:!0,label:"联系方式(直接监护人)",placeholder:"请输入手机号码",type:"tel",autocomplete:"off",modelValue:W.username,"onUpdate:modelValue":e=>W.username=e,maxlength:11},{label:()=>g("div",null,[p("联系方式"),g("p",{class:M},[p("手机号是音乐数字课堂的唯一登录账户")])])}),g(E,{center:!0,clearable:!0,label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:W.password,"onUpdate:modelValue":e=>W.password=e,maxlength:6},{button:()=>J.countDownStatus?g("span",{class:[N,Z.value?"":z],onClick:K},[p("获取验证码")]):g(v,{ref:e=>Q.value=e,"auto-start":!1,time:J.countDownTime,onFinish:$,format:"ss秒"},null)})]}),g(O,{position:"bottom"},{default:()=>[g(w,{type:"primary",class:R,color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",block:!0,onClick:ee,disabled:J.loading,loading:J.loading},{default:()=>[p("确认")]})]}),J.imgCodeStatus?g(T,{value:J.imgCodeStatus,"onUpdate:value":e=>J.imgCodeStatus=e,phone:W.username,onClose:()=>{J.imgCodeStatus=!1},onSendCode:X},null):null,g(f,{show:J.gradeStatus,"onUpdate:show":e=>J.gradeStatus=e,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[g(A,{showToolbar:!0,columns:H.value,onCancel:()=>J.gradeStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];W.extra.currentGradeNum=t.value,J.gradeNumText=t.text,J.gradeStatus=!1}},null)]}),g(f,{show:J.classStatus,"onUpdate:show":e=>J.classStatus=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[g(A,{showToolbar:!0,columns:q,onCancel:()=>J.classStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];W.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 oe(),W.password="",window.scrollTo({top:0,behavior:"smooth"})})),function(){return e.apply(this,arguments)})},null)]);var e}}}))}}}))}();
|