index-legacy-aef474fd.js 10 KB

1
  1. !function(){const e=["extra"];function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function r(e){for(var r=1;r<arguments.length;r++){var a=null!=arguments[r]?arguments[r]:{};r%2?t(Object(a),!0).forEach((function(t){l(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 l(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var l=r.call(e,t||"default");if("object"!=typeof l)return l;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:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(null==e)return{};var r,l,a=function(e,t){if(null==e)return{};var r,l,a={},o=Object.keys(e);for(l=0;l<o.length;l++)r=o[l],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)r=o[l],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function o(e,t,r,l,a,o,n){try{var i=e[o](n),s=i.value}catch(u){return void r(u)}i.done?t(s):Promise.resolve(s).then(l,a)}function n(e){return function(){var t=this,r=arguments;return new Promise((function(l,a){var n=e.apply(t,r);function i(e){o(n,l,a,i,s,"next",e)}function s(e){o(n,l,a,i,s,"throw",e)}i(void 0)}))}}System.register(["./index-legacy-fdce4919.js","./index-legacy-51415c83.js","./index-legacy-124764cd.js","./student-register-store-legacy-4070a904.js","./icon-gift-legacy-ce1b66cd.js","./index-legacy-179fe8dd.js","./index-legacy-15a463c0.js","./index-legacy-39907d87.js","./index-legacy-681a6434.js","./index-legacy-846b635d.js","./index-legacy-8883e09d.js","./index-legacy-a5d03881.js","./index-legacy-ff6f675b.js","./index-legacy-03a60eb4.js","./index-legacy-f2d9cc85.js","./Checker-legacy-169b5c1c.js","./index-legacy-e0a2b452.js","./use-tab-status-legacy-8cf70741.js","./index-legacy-541b7c26.js"],(function(t,l){"use strict";var o,i,s,u,c,d,m,g,p,f,_,h,y,v,b,x,S,w,z,j,C,O,F,T,E,k,A,D=document.createElement("style");return D.textContent="._registerModal_18lzv_1{background:#FFF4E2;overflow:hidden;min-height:100vh}._memberNumer_18lzv_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_18lzv_6 ._iconGift_18lzv_17{width:.53333rem;height:.53333rem;margin-right:.16rem}._infoTitle_18lzv_22{width:8.4rem;height:.82667rem;display:block;margin:.37333rem auto .26667rem}._registerForm_18lzv_28{background:#FFFFFF;box-shadow:0 .02667rem .16rem #f0d8c8;border-radius:.48rem;margin:.32rem .32rem 0;overflow:hidden}._registerForm_18lzv_28 ._tips_18lzv_35{padding-top:.10667rem;font-size:.32rem;font-weight:400;color:#ff5a56;line-height:.45333rem}._registerForm_18lzv_28 .van-cell{padding:.37333rem}._registerForm_18lzv_28 .van-field__label{font-size:.42667rem;font-weight:600;color:#5b2c03;line-height:.58667rem;margin-bottom:.21333rem}._registerForm_18lzv_28 .van-field__control{font-size:.42667rem}._registerForm_18lzv_28 ._codeText_18lzv_55{color:#ffcf7c;font-size:.37333rem;font-weight:600}._registerForm_18lzv_28 ._codeText_18lzv_55._codeTextDisabled_18lzv_60{color:#ccc}._submitBtn_18lzv_63{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_18lzv_73{position:relative;min-width:.85333rem;justify-content:center;padding-left:.37333rem;padding-right:.37333rem}._radioItem_18lzv_80{position:absolute;top:0;left:0;right:0;bottom:0;opacity:0}._radioSection_18lzv_73+._radioSection_18lzv_73{margin-left:.32rem}\n",document.head.appendChild(D),{setters:[e=>{o=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,f=e.C,_=e.V,h=e.z,y=e.N,v=e.E,b=e.D},e=>{x=e.C,S=e.O},e=>{w=e.M},e=>{z=e.u},e=>{j=e.i},e=>{C=e.M},e=>{O=e.F},e=>{F=e.F},e=>{T=e.R,E=e.a},e=>{k=e.T},e=>{A=e.P},null,null,null,null,null,null,null,null],execute:function(){const l="_registerModal_18lzv_1",D="_memberNumer_18lzv_6",V="_iconGift_18lzv_17",P="_registerForm_18lzv_28",I="_tips_18lzv_35",Y="_codeText_18lzv_55",N="_codeTextDisabled_18lzv_60",M="_submitBtn_18lzv_63",R="_radioSection_18lzv_73",B="_radioItem_18lzv_80",U=[];for(let e=1;e<=40;e++)U.push({text:e+"班",value:e});t("default",o({name:"register-modal",emits:["close","submit"],setup(t,{emit:o}){const G=i(),q=s();z().setShoolId(G.query.sId);const L=u(),J=c((()=>{let e=[];const t=[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5}],r=[{text:"六年级",value:6}],l=[{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}];return"FIVE_YEAR_SYSTEM"===X.gradeYear?e.push([...t]):"SIX_YEAR_SYSTEM"===X.gradeYear?e.push([...t,...r]):"THREE_YEAR_SYSTEM"===X.gradeYear?e.push([...l]):"FORE_YEAR_SYSTEM"===X.gradeYear?e.push([...r,...l]):e.push([...t,...r,...l]),e})),X=d({countDownStatus:!0,countDownTime:12e4,modelValue:!1,imgCodeStatus:!1,gradeNumText:"",currentClassText:"",gradeStatus:!1,classStatus:!1,loading:!1,schoolId:G.query.sId,gradeYear:null,schoolType:null,giftVipDay:null}),H=d({autoRegister:!0,client_id:"cooleshow-student",client_secret:"cooleshow-student",extra:{nickname:"",currentGradeNum:"",currentClass:"",gender:1},grant_type:"password",loginType:"SMS",password:"",username:""}),Q=()=>{X.countDownStatus=!1,h((()=>{L.value.start()}))},W=()=>{if(!y(H.username))return v("请输入正确的手机号码");X.imgCodeStatus=!0},Z=c((()=>!!y(H.username))),$=()=>{X.countDownStatus=!0,L.value.reset()},K=function(){var t=n((function*(){try{if(ee())return;X.loading=!0,yield b.get("/edu-app/open/student/schoolQuery",{params:{schoolId:X.schoolId,mobile:H.username}});const{extra:t}=H,l=a(H,e),{data:o}=yield b.post("/edu-app/userlogin",{hideLoading:!1,requestType:"form",data:r(r({},l),{},{extra:JSON.stringify(r(r({},t),{},{schoolId:X.schoolId}))})});setTimeout((()=>{v("报名成功"),q.push("/download")}),100)}catch(t){}finally{X.loading=!1}}));return function(){return t.apply(this,arguments)}}(),ee=()=>y(H.username)?H.password?H.extra.nickname?H.extra.currentGradeNum?!H.extra.currentClass&&(v("请选择所在班级"),!0):(v("请选择所在年级"),!0):(v("请输入学生姓名"),!0):(v("请输入验证码"),!0):(v("请输入正确的手机号码"),!0),te=function(){var e=n((function*(){try{const{data:e}=yield b.get("/edu-app/open/school/detail",{params:{id:X.schoolId},noAuthorization:!0});X.giftVipDay=e.giftVipDay,X.schoolType=e.schoolType,X.gradeYear=e.gradeYear}catch(e){}}));return function(){return e.apply(this,arguments)}}();return m((()=>{te()})),()=>g("div",{class:l},[X.giftVipDay?g("div",{class:D},[g("img",{src:j,class:V},null),g("p",null,[p("现在报名立即赠送乐器AI学练工具有效期")," ",g("span",null,[X.giftVipDay]),p(" 天")])]):"",g(O,{labelAlign:"top",class:P},{default:()=>[g(F,{clearable:!0,label:"联系方式(直接监护人)",placeholder:"请输入手机号码",type:"tel",autocomplete:"off",modelValue:H.username,"onUpdate:modelValue":e=>H.username=e,maxlength:11},{label:()=>g("div",null,[p("联系方式(直接监护人)"),g("p",{class:I},[p("手机号是音乐数字课堂的唯一登录账户")])])}),g(F,{center:!0,clearable:!0,label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:H.password,"onUpdate:modelValue":e=>H.password=e,maxlength:6},{button:()=>X.countDownStatus?g("span",{class:[Y,Z.value?"":N],onClick:W},[p("获取验证码")]):g(x,{ref:e=>L.value=e,"auto-start":!1,time:X.countDownTime,onFinish:$,format:"ss秒"},null)}),g(F,{clearable:!0,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:H.extra.nickname,"onUpdate:modelValue":e=>H.extra.nickname=e},null),g(F,{clearable:!0,label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>g(T,{"checked-color":"#ffcb75",modelValue:H.extra.gender,"onUpdate:modelValue":e=>H.extra.gender=e,direction:"horizontal"},{default:()=>[g(k,{size:"large",type:"primary",color:1!==H.extra.gender?"#EAEAEA":"#ffcb75",textColor:1!==H.extra.gender?"#AAA":"#5B2C03",class:R,round:!0},{default:()=>[g(E,{class:B,name:1},null),p("男")]}),g(k,{size:"large",type:"primary",color:0!==H.extra.gender?"#EAEAEA":"#ffcb75",textColor:0!==H.extra.gender?"#AAA":"#5B2C03",class:R,round:!0},{default:()=>[g(E,{class:B,name:0},null),p("女")]})]})}),g(F,{clearable:!0,label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:X.gradeNumText,onClick:()=>X.gradeStatus=!0},null),g(F,{clearable:!0,label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:X.currentClassText,onClick:()=>X.classStatus=!0},null)]}),g(C,{position:"bottom"},{default:()=>[g(f,{type:"primary",class:M,color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",block:!0,onClick:K,disabled:X.loading,loading:X.loading},{default:()=>[p("确认")]})]}),X.imgCodeStatus?g(w,{value:X.imgCodeStatus,"onUpdate:value":e=>X.imgCodeStatus=e,phone:H.username,onClose:()=>{X.imgCodeStatus=!1},onSendCode:Q},null):null,g(_,{show:X.gradeStatus,"onUpdate:show":e=>X.gradeStatus=e,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[g(A,{showToolbar:!0,columns:J.value,onCancel:()=>X.gradeStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];H.extra.currentGradeNum=t.value,X.gradeNumText=t.text,X.gradeStatus=!1}},null)]}),g(_,{show:X.classStatus,"onUpdate:show":e=>X.classStatus=e,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[g(A,{showToolbar:!0,columns:U,onCancel:()=>X.classStatus=!1,onConfirm:e=>{const t=e.selectedOptions[0];H.extra.currentClass=t.value,X.currentClassText=t.text,X.classStatus=!1}},null)]}),g(S,null,null)])}}))}}}))}();