index-legacy-c1b29e39.js 10 KB

1
  1. !function(){const e=["extra"];function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}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){o(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 o(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 o=r.call(e,t||"default");if("object"!=typeof o)return o;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,o,a=function(e,t){if(null==e)return{};var r,o,a={},n=Object.keys(e);for(o=0;o<n.length;o++)r=n[o],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)r=n[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function n(e,t,r,o,a,n,l){try{var i=e[n](l),s=i.value}catch(u){return void r(u)}i.done?t(s):Promise.resolve(s).then(o,a)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var l=e.apply(t,r);function i(e){n(l,o,a,i,s,"next",e)}function s(e){n(l,o,a,i,s,"throw",e)}i(void 0)}))}}System.register(["./index-legacy-26bc1086.js","./index-legacy-9154432b.js","./index-legacy-c58d5e27.js","./student-register-store-legacy-0d639248.js","./icon-gift-legacy-ce1b66cd.js","./index-legacy-011da5c2.js","./index-legacy-1d232c19.js","./index-legacy-38bdcb23.js","./index-legacy-a5b76900.js","./index-legacy-6c36efb9.js","./index-legacy-806bdfbf.js","./index-legacy-2de1a95d.js","./index-legacy-30eeb051.js","./index-legacy-b4308f5a.js","./index-legacy-37cb4646.js","./Checker-legacy-de11bc69.js"],(function(t,o){"use strict";var n,i,s,u,c,d,m,g,p,f,_,w,h,y,b,x,v,S,j,C,O,F,T,E,k,A,D;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,f=e.C,_=e.V,w=e.z,h=e.N,y=e.E,b=e.D},e=>{x=e.C,v=e.O},e=>{S=e.M},e=>{j=e.u},e=>{C=e.i},e=>{O=e.M},e=>{F=e.F},e=>{T=e.F},e=>{E=e.R,k=e.a},e=>{A=e.T},e=>{D=e.P},null,null,null,null,null],execute:function(){var o=document.createElement("style");o.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(o);const V="_registerModal_w1mwo_1",P="_memberNumer_w1mwo_6",I="_iconGift_w1mwo_17",Y="_registerForm_w1mwo_28",N="_tips_w1mwo_35",z="_codeText_w1mwo_57",R="_codeTextDisabled_w1mwo_62",B="_submitBtn_w1mwo_65",M="_radioSection_w1mwo_75",U="_radioItem_w1mwo_82",G=[];for(let e=1;e<=40;e++)G.push({text:e+"班",value:e});t("default",n({name:"register-modal",emits:["close","submit"],setup(t,{emit:o}){const n=i(),q=s();j().setShoolId(n.query.sId);const L=u(),Q=c((()=>{let e=[];const t=[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5}],r=[{text:"六年级",value:6}],o=[{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([...o]):"FORE_YEAR_SYSTEM"===X.gradeYear?e.push([...r,...o]):e.push([...t,...r,...o]),e})),X=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}),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:""}),J=()=>{X.countDownStatus=!1,w((()=>{L.value.start()}))},W=()=>{if(!h(H.username))return y("请输入正确的手机号码");X.imgCodeStatus=!0},$=c((()=>!!h(H.username))),K=()=>{X.countDownStatus=!0,L.value.reset()},Z=function(){var t=l((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,o=a(H,e),{data:n}=yield b.post("/edu-app/userlogin",{hideLoading:!1,requestType:"form",data:r(r({},o),{},{extra:JSON.stringify(r(r({},t),{},{schoolId:X.schoolId}))})});setTimeout((()=>{y("报名成功"),q.push("/download")}),100)}catch(t){}finally{X.loading=!1}}));return function(){return t.apply(this,arguments)}}(),ee=()=>H.extra.nickname?H.extra.currentGradeNum?H.extra.currentClass?h(H.username)?!H.password&&(y("请输入验证码"),!0):(y("请输入正确的手机号码"),!0):(y("请选择所在班级"),!0):(y("请选择所在年级"),!0):(y("请输入学生姓名"),!0),te=function(){var e=l((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:V},[X.giftVipDay?g("div",{class:P},[g("img",{src:C,class:I},null),g("p",null,[p("现在报名立即赠送乐器AI学练工具有效期")," ",g("span",null,[X.giftVipDay]),p(" 天")])]):"",g(F,{labelAlign:"top",class:Y},{default:()=>[g(T,{clearable:!0,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:H.extra.nickname,"onUpdate:modelValue":e=>H.extra.nickname=e},null),g(T,{clearable:!0,label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>g(E,{"checked-color":"#ffcb75",modelValue:H.extra.gender,"onUpdate:modelValue":e=>H.extra.gender=e,direction:"horizontal"},{default:()=>[g(A,{size:"large",type:"primary",color:1!==H.extra.gender?"#EAEAEA":"#ffcb75",textColor:1!==H.extra.gender?"#AAA":"#5B2C03",class:M,round:!0},{default:()=>[g(k,{class:U,name:1},null),p("男")]}),g(A,{size:"large",type:"primary",color:0!==H.extra.gender?"#EAEAEA":"#ffcb75",textColor:0!==H.extra.gender?"#AAA":"#5B2C03",class:M,round:!0},{default:()=>[g(k,{class:U,name:0},null),p("女")]})]})}),g(T,{clearable:!0,label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:X.gradeNumText,onClick:()=>X.gradeStatus=!0},null),g(T,{clearable:!0,label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:X.currentClassText,onClick:()=>X.classStatus=!0},null),g(T,{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:N},[p("手机号是音乐数字课堂的唯一登录账户")])])}),g(T,{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:[z,$.value?"":R],onClick:W},[p("获取验证码")]):g(x,{ref:e=>L.value=e,"auto-start":!1,time:X.countDownTime,onFinish:K,format:"ss秒"},null)})]}),g(O,{position:"bottom"},{default:()=>[g(f,{type:"primary",class:B,color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",block:!0,onClick:Z,disabled:X.loading,loading:X.loading},{default:()=>[p("确认")]})]}),X.imgCodeStatus?g(S,{value:X.imgCodeStatus,"onUpdate:value":e=>X.imgCodeStatus=e,phone:H.username,onClose:()=>{X.imgCodeStatus=!1},onSendCode:J},null):null,g(_,{show:X.gradeStatus,"onUpdate:show":e=>X.gradeStatus=e,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[g(D,{showToolbar:!0,columns:Q.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(D,{showToolbar:!0,columns:G,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(v,null,null)])}}))}}}))}();