index-277707f0.js 41 KB

123
  1. var ze=Object.defineProperty;var Ye=(p,l,m)=>l in p?ze(p,l,{enumerable:!0,configurable:!0,writable:!0,value:m}):p[l]=m;var k=(p,l,m)=>(Ye(p,typeof l!="symbol"?l+"":l,m),m);import{bY as Qe,G as Ze,bZ as ge,N as C,b_ as Ke,d as He,P as Xe,aO as We,q as $e,r as $,x as V,am as et,e as ee,V as z,b$ as tt,Z as te,Y as fe,w as he,y as st,D as S,ad as U,R as ot,a as o,A as y,z as se,F as nt,X as ye,C as Te,U as M,M as Y,c0 as at,J as rt,K as it,a0 as ut,c1 as lt}from"./index-ec1086fa.js";import{T as Q}from"./tcplayer.v4.8.0.min-bea4b434.js";/* empty css */import{M as ct}from"./index-ded61d08.js";import{u as Ae}from"./student-register-store-fa0fe016.js";import{d as oe}from"./deep-clone-c0d00fc2.js";import{O as dt}from"./index-686767e2.js";import{O as pt}from"./index-d08ff16b.js";import{i as mt}from"./icon-gift-20293d47.js";import{P as gt,Q as ft,U as ht,b as yt}from"./user-auth-6f056c91.js";import{M as Tt}from"./index-5fac5837.js";import{O as St}from"./index-afbc27e3.js";import{M as wt}from"./index-21068f09.js";import{S as Ct}from"./index-df11dabd.js";import{u as ne,b as vt}from"./index-c5383b3e.js";import{C as xt}from"./index-9c09b4cb.js";import{T as Se}from"./index-0fac8ec4.js";import{P as we}from"./index-524d9e17.js";import{F as At}from"./index-06a0e939.js";import{F as R}from"./index-1452dcc2.js";import{R as _t,a as Ce}from"./index-ce804f8d.js";const It="_studentRegisterContainer_xnmd6_8",Bt="_videoDuration_xnmd6_22",Ft="_coverImg_xnmd6_33",Et="_video_xnmd6_13",Dt="_countdownSection_xnmd6_94",bt="_timer_xnmd6_113",Rt="_timerAll_xnmd6_118",Nt="_timerTitle_xnmd6_140",Lt="_timerTip_xnmd6_145",Pt="_paymentContainer_xnmd6_155",Ot="_payemntPrice_xnmd6_165",Gt="_giftTip_xnmd6_169",kt="_needPrice_xnmd6_173",Vt="_unit_xnmd6_190",Ut="_allPrice_xnmd6_193",Mt="_traditionBtn_xnmd6_212",qt="_studentSection_xnmd6_220",Jt="_studentSectionForm_xnmd6_227",jt="_noSendDay_xnmd6_231",zt="_title1_xnmd6_234",Yt="_title3_xnmd6_235",Qt="_title4_xnmd6_236",Zt="_title2_xnmd6_243",Kt="_goodsGroup_xnmd6_258",Ht="_goodsItem_xnmd6_263",Xt="_goodsInner_xnmd6_277",Wt="_checked_xnmd6_281",$t="_checked1_xnmd6_287",es="_proposalTip_xnmd6_293",ts="_goodsTypeGroup_xnmd6_307",ss="_showImg_xnmd6_311",os="_memberNumer_xnmd6_314",ns="_iconGift_xnmd6_325",as="_registerForm_xnmd6_336",rs="_selectStudentGroup_xnmd6_340",is="_selectStudentGroupChecked_xnmd6_348",us="_fieldTipsGroup_xnmd6_368",ls="_fieldTips_xnmd6_368",cs="_tips_xnmd6_380",ds="_username_xnmd6_387",ps="_countDown_xnmd6_395",ms="_codeText_xnmd6_413",gs="_radioSection_xnmd6_439",fs="_radioItem_xnmd6_448",hs="_goodsSection_xnmd6_459",ys="_iconArrow_xnmd6_470",Ts="_goodsExtra_xnmd6_477",Ss="_goodsCell_xnmd6_511",ws="_img_xnmd6_516",Cs="_goodsName_xnmd6_532",vs="_brandName_xnmd6_537",xs="_model_xnmd6_549",As="_sendInstrument_xnmd6_567",_s="_moreBtn_xnmd6_571",Is="_sbtnGroup_xnmd6_578",Bs="_goodsTradition_xnmd6_590",Fs="_goodsTitle_xnmd6_602",Es="_step_xnmd6_609",Ds="_stepContent_xnmd6_629",bs="_nums_xnmd6_640",Rs="_numInner_xnmd6_651",Ns="_selectStudentPopup_xnmd6_663",Ls="_vipGiftContainer_xnmd6_666",Ps="_vipGiftNum_xnmd6_698",Os="_vipGiftPreviod_xnmd6_704",i={"student-register":"_student-register_xnmd6_1",studentRegisterContainer:It,"video-content":"_video-content_xnmd6_13",videoDuration:Bt,coverImg:Ft,video:Et,countdownSection:Dt,timer:bt,timerAll:Rt,timerTitle:Nt,timerTip:Lt,paymentContainer:Pt,payemntPrice:Ot,giftTip:Gt,needPrice:kt,unit:Vt,allPrice:Ut,traditionBtn:Mt,studentSection:qt,studentSectionForm:Jt,noSendDay:jt,title1:zt,title3:Yt,title4:Qt,title2:Zt,goodsGroup:Kt,goodsItem:Ht,goodsInner:Xt,checked:Wt,checked1:$t,proposalTip:es,goodsTypeGroup:ts,showImg:ss,memberNumer:os,iconGift:ns,registerForm:as,selectStudentGroup:rs,selectStudentGroupChecked:is,fieldTipsGroup:us,fieldTips:ls,tips:cs,username:ds,countDown:ps,codeText:ms,radioSection:gs,radioItem:fs,goodsSection:hs,iconArrow:ys,goodsExtra:Ts,goodsCell:Ss,img:ws,goodsName:Cs,brandName:vs,model:xs,sendInstrument:As,moreBtn:_s,sbtnGroup:Is,goodsTradition:Bs,goodsTitle:Fs,step:Es,stepContent:Ds,nums:bs,numInner:Rs,selectStudentPopup:Ns,vipGiftContainer:Ls,vipGiftNum:Ps,vipGiftPreviod:Os},Gs=Ke({prefixKey:"",storage:sessionStorage}),ks=Ae(),ae=Qe({noAuthorization:!1,hideLoading:!0,timeout:2e4,timeoutMessage:"请求超时"});ae.interceptors.request.use((p,l)=>{l.initRequest;const m=Gs.get(Ze)||"",A={};return m&&!["/edu-app/userlogin","/edu-app/smsLogin","/edu-app/open/sendSms"].includes(p)&&!l.noAuthorization&&(A.Authorization=m),{url:p,options:{...l,params:ge(l.params),data:ge(l.data),headers:{...l.headers,...A}}}},{global:!1});ae.interceptors.response.use(async p=>{if(p.status>299||p.status<200){const m="服务器错误,状态码"+p.status;throw C(m),new Error(m)}const l=await p.clone().json();if(l.code!==200&&l.errCode!==0&&l.code!==999){let m=l.msg||l.message||"处理失败,请重试";throw l.code===403||l.code===5e3||C(m),(l.code===5e3||l.code===403)&&(m+=" authentication "+l.code,ks.studentLoutOut()),new Error(m)}return p},{global:!1});const Vs="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAeCAYAAACrDxUoAAA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ZOyiO3GuqvTTB3WhACjJyPzzQbwAkIe9r9FgsXt/El0jfncAvogoZwrlKhgsAMc9ULFPybx9SivZ6QS8AyCEmA8VbcbyXwjg56QaAcLh1lUZ+TF5DgCvOSR0AwUTfe9bezHajASlHgivzqpYcofldjIPv4n+i4bT4KwJDHYD4O7gWHmQGutwBsmfqFICkqwAbeVUsBVxkiXQDwJL+S9t0BEDq7nC2q4RcsF+EurZ2PwUK5FdN8Cv53RUTUmu5H/Khja+0LX3w0nZo56p3g3mR3ZdjYSpzP+FRMhZv8VWVtbGWvozJ90WtIZUonQi/A+N/3AgOM6XDOum37T2kY9P3fqwPrF9fRfz/AMq5VkzUx5cLAAAAAElFTkSuQmCC",Us=""+new URL("icon-9-43fe682e.png",import.meta.url).href,Ms=""+new URL("vip_gift_tips-910d8de4.png",import.meta.url).href,qs=""+new URL("icon-n-10-89abe28d.png",import.meta.url).href,Js=""+new URL("icon-n-11-64a5489e.png",import.meta.url).href;class js{constructor(){k(this,"startTime");k(this,"elapsedTime");k(this,"timerId");k(this,"isRunning");this.startTime=0,this.elapsedTime=0,this.timerId=null,this.isRunning=!1}start(){this.isRunning||(this.isRunning=!0,this.startTime=Date.now()-this.elapsedTime,this.timerId=window.setInterval(()=>{this.elapsedTime=Date.now()-this.startTime},10))}pause(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearInterval(this.timerId))}resume(){this.isRunning||this.start()}resetTime(){this.elapsedTime=0,this.startTime=Date.now()-this.elapsedTime}reset(){this.isRunning=!1,this.timerId!==null&&clearInterval(this.timerId),this.elapsedTime=0}getTime(){return this.elapsedTime/1e3}formatTime(l){return l/1e3}pad(l,m=2){return l.toString().padStart(m,"0")}}const Z=[];for(let p=1;p<=40;p++)Z.push({text:p+"班",value:p});const ve={1:"一年级",2:"二年级",3:"三年级",4:"四年级",5:"五年级",6:"六年级",7:"七年级",8:"八年级",9:"九年级"},xe=(p,l)=>{let m=[];const A=[{text:"一年级",value:1,instrumentCode:l},{text:"二年级",value:2,instrumentCode:l},{text:"三年级",value:3,instrumentCode:l},{text:"四年级",value:4,instrumentCode:l},{text:"五年级",value:5,instrumentCode:l}],B=[{text:"六年级",value:6,instrumentCode:l}],F=[{text:"七年级",value:7,instrumentCode:l},{text:"八年级",value:8,instrumentCode:l},{text:"九年级",value:9,instrumentCode:l}];return p==="FIVE_YEAR_SYSTEM"?m.push(...A):p==="SIX_YEAR_SYSTEM"?m.push(...A,...B):p==="THREE_YEAR_SYSTEM"?m.push(...F):p==="FORE_YEAR_SYSTEM"?m.push(...B,...F):m.push(...A,...B,...F),m},_e={DAY:"天",MONTH:"个月",YEAR:"年"},zs=He({name:"student-register",setup(){const p=Xe(),l=We(),m=Ae(),A=$e();m.setShoolId(p.query.sId);const B=$(),F=$(),e=V({schoolId:p.query.sId,paymentType:"",paymentChannel:"",multi_user_limit:1,registerDetails:{},details:[],gradeYear:"",schoolInstrumentSetType:null,isRegister:"create",isTipRegister:!1,isChangeSchool:!1,registerType:"",detailVip:{},giftVipDay:0,submitLoading:!1,showTips:!1,showButton:!1,showMessage:"请使用微信扫描二维码",countDownStatus:!0,countDownTime:1e3*120,imgCodeStatus:!1,gradeNumText:"",currentClassText:"",gradeStatus:!1,classStatus:!1,loading:!1,dialogStatus:!1,dialogMessage:"",confirmButtonText:"确定",cancelButtonText:"取消",messageAlign:"center",showDuration:!0,dialogConfirmStatus:!1,contract_sign:!1,countDownTimePay:60*1e3,dialogConfig:{},showSelectStudent:!1,studentList:[],studentItem:{},joinType:"",gradeList:[],classList:[],saveUserId:null,saveId:null,openId:null,code:null,intervalFnRef:null,registerExpireTime:null,instrumentCode:null,activeOverTime:0,activeOverStatus:!0,gradePopupShow:!1,gradePopupIndex:[],classPopupShow:!1,classPopupIndex:[]}),r=V({showOtherSchool:!1,showCloseButton:!0,showOtherMessage:"",otherType:"",showCancelButton:!0,cancelButtonColor:"",cancelButtonText:"取消",showConfirmButton:!0,confirmButtonColor:"",confirmButtonText:"确定",messageAlign:"left"}),d=V({showQrcode:!1,qrCodeUrl:"",pay_channel:"",orderInfo:{},authShow:!1,orderNo:null,config:{},paymentStatus:!1,orderTimer:null}),u=V({autoRegister:!0,multiUser:!0,client_id:"cooleshow-student",client_secret:"cooleshow-student",extra:{nickname:"",currentGradeNum:"",currentClass:"",gender:1,registerType:null,giftVipDay:0},grant_type:"password",loginType:"SMS",password:"",username:""}),c=V({introductionVideo:"",introductionVideoTime:0,videoBrowsePoint:0,player:null,playerSpeed:1,intervalFnRef:null,videoDetails:[],pointVideo:{},pointVideoTime:0}),w=ne(1e3,{controls:!0});w.pause();const _=new js,D=ne(1e3,{controls:!0});D.pause();const re=t=>{const s=[];t.sort((a,g)=>a[0]-g[0]);let n=t[0];for(let a=1;a<t.length;a++){const g=t[a];n[1]>=g[0]?n[1]=Math.max(g[1],n[1]):(s.push(n),n=g)}return s.push(n),s},Ie=t=>{const s=re(t);let n=0;return s.forEach(a=>{n+=a[1]-a[0]}),n},b=et({time:e.activeOverTime,onFinish(){e.activeOverStatus=!0,!e.submitLoading&&N()}}),N=()=>{var t;e.showTips=!0,e.showMessage='<p style="color: #F44541">报名已截止,感谢您的参与</p>',e.showButton=!1,(t=e.intervalFnRef)==null||t.pause()},Be=()=>{e.countDownStatus=!1,se(()=>{B.value.start()})},Fe=()=>{if(!Y(u.username))return C("请输入正确的手机号码");e.imgCodeStatus=!0},Ee=ee(()=>!!Y(u.username)),De=()=>{e.countDownStatus=!0,B.value.reset()},ie=ee(()=>d.orderInfo.orderType),be=async()=>{var t;try{const{data:s}=await S.get("/edu-app/open/userOrder/registerGoods/"+e.schoolId,{noAuthorization:!0});m.setVip(s.details||[]),e.details=oe(s.details||[]),e.registerDetails=s,e.registerExpireTime=s.registerExpireTime,e.registerExpireTime&&(U(new Date).isBefore(e.registerExpireTime)?(e.activeOverStatus=!1,e.activeOverTime=U(e.registerExpireTime).diff(U(new Date)),b.reset(e.activeOverTime),b.start()):(N(),e.activeOverStatus=!0)),e.details.length>0&&(e.detailVip=e.details[0]),e.giftVipDay=s.giftVipDay||0,e.gradeYear=s.gradeYear,e.schoolInstrumentSetType=s.schoolInstrumentSetType,e.registerType=s.registerType,u.extra.registerType=s.registerType;const n=s.schoolInstrumentList||[];if(s.schoolInstrumentSetType==="SCHOOL"){const a=(t=n[0])==null?void 0:t.instrumentCode;e.gradeList=xe(s.gradeYear,a),e.classList=Z}else if(s.schoolInstrumentSetType==="GRADE")n.forEach(a=>{e.gradeList.push({text:ve[a.gradeNum],value:a.gradeNum,instrumentId:a.instrumentId,instrumentCode:a.instrumentCode})}),e.gradeList.sort((a,g)=>a.value-g.value),e.classList=Z;else if(s.schoolInstrumentSetType==="CLASS"){const a=[];n.forEach(f=>{a.includes(f.gradeNum)||a.push(f.gradeNum)});const g=[];a.forEach(f=>{const T={text:ve[f],value:f,instrumentId:"",instrumentCode:"",instrumentName:"",classList:[]};n.forEach(h=>{f===h.gradeNum&&(T.instrumentId=h.instrumentId,T.instrumentCode=h.instrumentCode,T.instrumentName=h.instrumentName,T.classList.push({text:h.classNum+"班",value:h.classNum,instrumentCode:h.instrumentCode}))}),T.classList.sort((h,E)=>h.value-E.value),g.push(T)}),g.sort((f,T)=>f.value-T.value),e.gradeList=g,e.classList=[]}else e.gradeList=xe(s.gradeYear),e.classList=Z;if(z().weixin){if(s.registerType!=="BUG_GOODS"||s.schoolStatus===0){e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1;return}}else{e.showTips=!0;return}(!e.registerExpireTime||!e.activeOverStatus)&&qe()}catch(s){}},L=ee(()=>{let t=0,s=0;return m.getVip.forEach(a=>{t+=Number(a.currentPrice),s+=Number(a.originalPrice)}),{amount:t,originAmount:s}}),x=(t,s)=>{e.isTipRegister=t,e.isChangeSchool=s},K=(t=!0)=>{if(Y(u.username))if(u.password)if(u.extra.nickname)if([0,1].includes(u.extra.gender))if(u.extra.currentGradeNum){if(!u.extra.currentClass)return t&&C("请选择所在班级"),!0}else return t&&C("请选择所在年级"),!0;else return t&&C("请选择性别"),!0;else return t&&C("请输入学生姓名"),!0;else return t&&C("请输入验证码"),!0;else return t&&C("请输入正确的手机号码"),!0;return!1},Re=()=>{var s;const{extra:t}=u;return e.studentItem.nickname!==t.nickname&&e.isTipRegister?(r.showOtherMessage="学生姓名与上次提交信息不一致,请确认修改学生信息或创建新的学生账号",r.showOtherSchool=!0,r.showCancelButton=!0,r.showCloseButton=!0,r.cancelButtonColor="linear-gradient( 224deg, #3FE1E6 0%, #00CDD4 100%)",r.cancelButtonText="新建学生",r.confirmButtonColor="linear-gradient( 305deg, #40C8FF 0%, #3192FF 100%)",r.confirmButtonText="修改信息",r.otherType="nickname",r.messageAlign="left",!0):e.isRegister==="create"&&e.studentList.length>=e.multi_user_limit?(r.showOtherMessage=`同一手机号最多创建${e.multi_user_limit}个学生`,r.showOtherSchool=!0,r.showCancelButton=!1,r.showCloseButton=!0,r.confirmButtonColor="linear-gradient( 305deg, #40C8FF 0%, #3192FF 100%)",r.confirmButtonText="我知道了",r.otherType="limit",r.messageAlign="center",!0):e.studentItem.schoolId&&e.studentItem.schoolId!==e.registerDetails.schoolId&&!e.isChangeSchool&&e.isRegister==="update"?(r.showOtherMessage=`您已绑定<span style="color: #2B85FF">【${((s=e.studentItem)==null?void 0:s.schoolName)||""}】</span>,提交后将更换到
  2. <span style="color: #2B85FF">【${e.registerDetails.schoolName||""}】</span>
  3. ,是否确认提交?`,r.showOtherSchool=!0,r.showCloseButton=!1,r.showCancelButton=!0,r.cancelButtonColor="",r.cancelButtonText="取消",r.confirmButtonColor="",r.confirmButtonText="确定",r.otherType="change",r.messageAlign="left",!0):!1},P=async()=>{e.submitLoading=!0,e.intervalFnRef.pause();try{if(K()||Re()){e.submitLoading=!1;return}const{extra:t,loginType:s,autoRegister:n,password:a,multiUser:g,...f}=u;let T=s,h=n,E=a,j=g;e.isRegister==="update"&&(T="TOKEN",h=!1,E=e.studentItem.token,j=!1);const I=await S.post("/edu-app/userlogin",{requestType:"form",data:{loginType:T,autoRegister:h,password:E,multiUser:j,...f,extra:JSON.stringify({...t,giftVipDay:e.giftVipDay||0,schoolId:e.schoolId})}});if(I.code!==200)I.code===5436?(e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1):I.code===5435?(e.showTips=!0,e.showMessage=I.message,e.showButton=!0):I.code===5437&&(e.showTips=!0,e.showMessage='<p style="color: #F44541">报名已截止,感谢您的参与</p>',e.showButton=!1);else{m.setToken(I.data.token_type+" "+I.data.access_token),at();let W="NOT_REGISTER";e.joinType==="digitalize"&&(W="SELECT_INSTRUMENT"),e.joinType==="tradition"&&(W="NOT_BUY_INSTRUMENT"),await X(D.counter.value);const me=await X(D.counter.value,W,I.data.userId,e.schoolId);e.saveId=me,e.saveUserId=me,D.counter.value=0;const je=await S.get("/edu-app/user/getUserInfo",{requestType:"form"});rt(je.data),await ue()}}catch(t){x(e.isRegister!=="create",!1)}finally{e.submitLoading=!1,e.intervalFnRef.resume()}},O=async()=>{try{const{extra:t,username:s}=u,n=await S.post("/edu-app/student/register",{data:{schoolId:e.schoolId,clientType:"STUDENT",...t,giftVipFlag:e.registerDetails.giftVipFlag||!1,giftVipDay:e.giftVipDay||0,schoolVerify:!0,firstVipDay:e.detailVip.membershipDays||0,mobile:s,newRegUser:e.isRegister==="create"}});return n.code!==200?(n.code===5436?(e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1):n.code===5435?(e.showTips=!0,e.showMessage=n.message,e.showButton=!0):n.code===5437&&(e.showTips=!0,e.showMessage='<p style="color: #F44541">报名已截止,感谢您的参与</p>',e.showButton=!1),!1):!0}catch(t){}},ue=async()=>{try{if(await Le())return;const s=await S.get("/edu-app/userPaymentOrder/registerStatus/"+e.schoolId),n=m.getVip;if(e.joinType==="tradition"){if(!await O())return;setTimeout(()=>{C("报名成功")},100),setTimeout(()=>{z().weixin&&window.WeixinJSBridge.call("closeWindow")},1e3);return}if(s.data.hasBuyCourse&&n.length>0){r.showOtherMessage="该学员已购买会员,是否再次购买?",r.showOtherSchool=!0,r.showCloseButton=!1,r.showCancelButton=!0,r.cancelButtonColor="",r.cancelButtonText="取消",r.confirmButtonColor="",r.confirmButtonText="确定",r.otherType="member",r.messageAlign="center";return}await q()}catch(t){x(e.isRegister!=="create",!1)}},Ne=async()=>{if(!(u.password.length!==6||!Y(u.username)))try{const{data:t}=await S.get(`/edu-app/open/student/studentInfo?mobile=${u.username}&code=${u.password}&type=REGISTER&activationCodeFlag=1`);if(e.studentList=t||[],e.studentList.length>0){const s=e.studentList[0];e.studentItem=s,u.extra.nickname=s.nickname;const n=e.gradeList||[];n==null||n.forEach(a=>{a.value===s.currentGradeNum&&(e.instrumentCode=a.instrumentCode,e.gradeNumText=a.text,u.extra.currentGradeNum=s.currentGradeNum,e.schoolInstrumentSetType==="CLASS"&&(e.classList=a.classList))}),e.classList.forEach(a=>{a.value===s.currentClass&&(e.currentClassText=a.text,u.extra.currentClass=s.currentClass)}),u.extra.gender=s.gender,e.isRegister="update",x(!0,!1)}else e.isRegister="create",x(!1,!1),e.studentItem=[]}catch(t){}},Le=async()=>{let t=!1;try{const{data:s}=await S.get("/edu-app/userPaymentOrder/schoolRegisterOrder?schoolId="+e.schoolId);if(s&&s.length>0){let n=!1,a={},g={},f=!1,T={};return s.forEach(h=>{(h.status==="PAYING"||h.status==="WAIT_PAY")&&(n=!0,a=h.paymentConfig,g=h),(h.status==="PAID"||h.status==="PART_REFUNDED"||h.status==="REFUNDED")&&(f=!0,T=h.paymentConfig)}),f&&e.joinType==="tradition"?await O()?(setTimeout(()=>{C("您已通过数字化方式报名成功")},100),!0):void 0:n&&e.joinType==="tradition"?(e.dialogStatus=!0,e.dialogMessage="您有数字化方式报名的待支付订单,请关闭订单后重新报名",e.cancelButtonText="取消",e.confirmButtonText="关闭",e.dialogConfig=a,e.messageAlign="left",!0):n&&e.joinType==="digitalize"?(e.dialogConfig=a,await le()&&await q(),!0):!1}else return!1}catch(s){x(e.isRegister!=="create",!1)}return t},Pe=async()=>{var t;try{const s=(t=e.dialogConfig)==null?void 0:t.orderNo;if(!s)return;await S.post("/edu-app/userPaymentOrder/cancelPayment/"+s),await ue()}catch(s){}},le=async()=>{var t;try{const s=(t=e.dialogConfig)==null?void 0:t.orderNo;return s?(await S.post("/edu-app/userPaymentOrder/cancelPayment/"+s),!0):void 0}catch(s){return!1}},q=async()=>{try{const t=m.getVip,s=m.getGoods,n=[];if(t.forEach(f=>{n.push({giftVipDay:f.membershipDays,giftPeriod:f.giftPeriod,goodsId:f.goodsId,goodsNum:1,goodsType:f.goodsType,paymentCashAmount:f.currentPrice,paymentCouponAmount:0})}),s.forEach(f=>{n.push({goodsId:f.productId,goodsNum:f.quantity,goodsType:"INSTRUMENTS",paymentCashAmount:f.price,paymentCouponAmount:0,goodsSkuId:f.productSkuId})}),!await O())return;const g=await S.post("/edu-app/userPaymentOrder/executeOrder",{data:{buryId:e.saveUserId,registerType:e.registerType,paymentType:e.paymentType,bizId:e.schoolId,orderType:"SCHOOL_REGISTER",paymentCashAmount:L.value.amount||0,paymentCouponAmount:0,goodsInfos:n,orderName:"学生登记",orderDesc:"学生登记"}});g.code===5436?(e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1):g.code===5435?(e.showTips=!0,e.showMessage=g.message,e.showButton=!0):(d.config={...g.data.paymentConfig,paymentType:g.data.paymentType},d.orderNo=g.data.orderNo,await ce())}catch(t){console.log(t,"any"),x(e.isRegister!=="create",!1)}},ce=async()=>{try{const t=it.user.data;if(e.contract_sign&&(!(t!=null&&t.account.realName)||!(t!=null&&t.account.idCardNo))){d.authShow=!0;return}const{data:s}=await S.post("/edu-app/userPaymentOrder/updateReceiveAddress",{data:{orderNo:d.orderNo,orderType:"SCHOOL_REGISTER"}});d.pay_channel=s.paymentChannel,s.status!=="WAIT_PAY"&&s.status!=="PAYING"?A.replace({path:"/payment-result",query:{orderNo:d.orderNo}}):Oe()}catch(t){x(e.isRegister!=="create",!1)}},Oe=()=>{const t=d.pay_channel;if(t){const s=yt(d.pay_channel);H({payCode:s,pay_channel:t})}else ie.value==="VIP"?d.paymentStatus=!0:H({payCode:"payResult",pay_channel:e.paymentChannel})},H=t=>{const s=d.config;d.pay_channel=t.pay_channel;const n=fe.stringify({pay_channel:t.pay_channel,wxAppId:s.wxAppId,alipayAppId:s.alipayAppId,paymentType:e.paymentType,body:s.body,price:s.price,orderNo:s.merOrderNo,userId:s.userId});t.payCode==="payResult"?window.location.href=te()+"/classroom-app/#/payResult?"+n:(d.qrCodeUrl=te()+"/classroom-app/#/payDefine?"+n,d.showQrcode=!0,d.paymentStatus=!1,setTimeout(()=>{ke()},300))},Ge=async()=>{try{await S.post("/edu-app/userPaymentOrder/cancelPayment/"+d.orderNo)}catch(t){}},ke=async()=>{const t=setInterval(async()=>{if(p.name!="student-register-form"){clearInterval(t);return}d.orderTimer=t;try{const{data:s}=await S.post("/edu-app/open/userOrder/paymentStatus/"+d.orderNo,{hideLoading:!0});s.status!=="WAIT_PAY"&&s.status!=="PAYING"&&(d.showQrcode=!1,clearInterval(d.orderTimer),setTimeout(()=>{A.replace({path:"/payment-result",query:{orderNo:d.orderNo}})},100))}catch(s){clearInterval(d.orderTimer)}},5e3)},Ve=()=>{d.authShow=!1,q()},X=async(t=5,s,n,a)=>{try{const g={id:e.saveId,useTime:t,joinType:s,userId:n,schoolId:a};let f={};if(!n&&c.player.duration()>0){const h=G.value.length>0?re(G.value):[],E=h.length>0?Ie(h):0,j=Math.floor(Math.round(E)/Math.floor(c.player.duration())*100);f={videoBrowseData:JSON.stringify(h),videoBrowseDataTime:E||0,videoBrowsePercentage:j||0,videoBrowseTime:_.getTime(),videoBrowsePoint:c.player.currentTime()}}const{data:T}=await ae.post("/edu-app/open/studentRegisterPointRecord/update",{data:{...g,...f}});return T!==e.saveId&&(G.value=[]),e.saveId=T,T}catch(g){}},Ue=async t=>{try{const{data:s}=await S.get("/edu-app/open/paramConfig/wechatAppId");s&&(ut(),lt(s,t))}catch(s){}};if(z().weixin){const t=sessionStorage.getItem("active-open-id");e.openId=t;const s=tt();if(s)e.code=s;else{const n=te()+window.location.pathname+"#"+p.path+"?"+fe.stringify({...p.query});return Ue(n),""}}const J=t=>t>9?t+"":"0"+t,Me=()=>{const t=Q.getComponent("Button"),s=Q.getComponent("BigPlayButton");s.prototype.createEl=function(){const n=t.prototype.createEl.call(this),a='<button><svg width="42px" height="42px" viewBox="0 0 42 42" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><circle stroke="#FFFFFF" stroke-width="1.0112392" fill-opacity="0.3" fill="#000000" stroke-linecap="square" cx="21" cy="21" r="20.5056196"></circle><g transform="translate(13.000000, 12.000000)" fill="#FFFFFF"><path d="M11.7432433,3.46351367 L18.2071084,14.4520843 C18.7734418,15.4148511 18.4520691,16.6544316 17.4893024,17.2207649 C17.1784947,17.403593 16.8244584,17.5 16.4638651,17.5 L3.53613489,17.5 C2.41915092,17.5 1.51365649,16.5945056 1.51365649,15.4775216 C1.51365649,15.1169283 1.6100635,14.762892 1.79289156,14.4520843 L8.25675667,3.46351367 C8.82309003,2.50074696 10.0626705,2.17937423 11.0254373,2.74570759 C11.3218389,2.92006148 11.5688894,3.16711204 11.7432433,3.46351367 Z" id="三角形" transform="translate(10.000000, 9.000000) rotate(-270.000000) translate(-10.000000, -9.000000) "></path></g></g></svg></button>';return n.appendChild(Q.dom.createEl("div",{className:"vjs-button-icon",innerHTML:a})),n},c.player=Q("register-video",{appID:"",controls:!0,plugins:{}}),c.player&&(c.player.src(c.introductionVideo||"https://oss.dayaedu.com/ktyq/1719222831427bbef9504.mp4"),c.player.poster("https://oss.dayaedu.com/ktyq/17158281330381317fd87.png"),c.player.on("ready",n=>{}),c.player.on("loadedmetadata",()=>{console.log("loadedmetadata"),c.player.currentTime(c.videoBrowsePoint)}),c.player.on("ratechange",()=>{c.playerSpeed=c.playerSpeed<c.player.playbackRate()?c.player.playbackRate():c.playerSpeed}),c.player.on("seeking",()=>{console.log("seeking"),w.isActive.value&&w.pause(),_.pause()}),c.player.on("seeked",()=>{console.log("seeked"),w.isActive.value&&w.pause(),_.pause()}),c.player.on("waiting",()=>{w.isActive.value&&w.pause(),_.pause()}),c.player.on("timeupdate",()=>{!w.isActive.value&&c.player.currentTime()>0&&!c.player.paused()&&(w.resume(),_.resume())}),c.player.on("ended",()=>{c.player.pause()}),c.player.on("play",()=>{console.log("play"),e.showDuration=!1,w.resume(),_.resume()}),c.player.on("pause",()=>{console.log("pause",w.isActive.value),w.pause(),_.pause()}),c.player.on("fullscreenchange",()=>{if(c.player.isFullscreen()){console.log("fullscreen");const n=document.createElement("i");n.id="fullscreen-back",n.className="van-icon van-icon-arrow-left video-back",n.addEventListener("click",()=>{c.player.exitFullscreen()}),document.getElementsByClassName("video-js")[0].appendChild(n)}else{console.log("exitfullscreen");const n=document.getElementById("fullscreen-back");n&&n.remove()}}))},G=$([]);let v=[];const de=ne(1e3,{controls:!0});he(()=>w.isActive.value,t=>{console.log(w.isActive.value,"videoIntervalRef"),pe(t)});const pe=(t,s=!1)=>{const n=oe(v);if(s?v.length>0&&(v[1]=Math.floor(c.player.currentTime()*1e3)/1e3):t?v[0]=Math.floor(c.player.currentTime()*1e3)/1e3:v[1]=Math.floor(c.player.currentTime()*1e3)/1e3,v.length>=2){const a=v[1]-v[0]-de.counter.value*c.playerSpeed>2;v[1]>=v[0]&&!a&&G.value.push(v),s?v=oe(n):(v=[],de.counter.value=0)}};he(l,t=>{t=="hidden"&&c.player.pause()});const qe=async()=>{try{if(!e.code)return;const{data:t}=await S.post("/edu-app/open/studentRegisterPointRecord/save",{data:{code:e.code,schoolId:e.schoolId,openId:e.openId}});e.saveId=t.id,e.openId=t.openId,G.value=t.videoBrowseData?JSON.parse(t.videoBrowseData):[],c.videoBrowsePoint=t.videoBrowsePoint||0,c.player&&c.player.currentTime(t.videoBrowsePoint||0),sessionStorage.setItem("active-open-id",t.openId),e.intervalFnRef=vt(async()=>{e.intervalFnRef.pause(),D.counter.value=0,D.resume(),pe(!1,!0),X(),_.resetTime(),w.counter.value=0,e.intervalFnRef.resume()},5e3)}catch(t){}},Je=()=>{u.password="",u.extra.nickname="",u.extra.currentGradeNum="",u.extra.currentClass="",u.extra.gender=1,e.currentClassText="",e.gradeNumText="",e.studentList=[],e.studentItem={},e.isRegister="create",e.isTipRegister=!1,e.isChangeSchool=!1};return st(async()=>{try{let t=null;const{data:s}=await S.get("/edu-app/open/paramConfig/queryByParamNameList",{requestType:"form",params:{paramNames:"payment_service_provider,contract_sign,multi_user_limit,qr_code_expire_time"}});s&&Array.isArray(s)&&s.forEach(a=>{if(a.paramName==="contract_sign")e.contract_sign=a.paramValue==="1";else if(a.paramName==="payment_service_provider"){const g=JSON.parse(a.paramValue);e.paymentType=g.vendor,e.paymentChannel=g.channel}else a.paramName==="multi_user_limit"?e.multi_user_limit=a.paramValue?Number(a.paramValue):1:a.paramName==="qr_code_expire_time"&&(t=a.paramValue?Number(a.paramValue):null)});const n=p.query.t;n&&t!==null&&U(Number(n)).add(t,"day").isBefore(U())&&(e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1),Me(),await be()}catch(t){}}),ot(()=>{var t;(t=e.intervalFnRef)==null||t.pause()}),()=>o("div",{class:i["student-register"]},[o("div",{class:i.studentRegisterContainer},[!e.activeOverStatus&&o("div",{class:i.countdownSection},[o("div",{class:i.timer},[o("img",{src:Vs,class:i.timerTitle},null),o("div",{class:i.timerAll},[o("span",null,[J(b.current.value.days)]),y("天"),o("span",null,[J(b.current.value.hours)]),y("时"),o("span",null,[J(b.current.value.minutes)]),y("分"),o("span",null,[J(b.current.value.seconds)]),y("秒")])]),o("div",{class:i.timerTip},[y("为了确保您能顺利参与学习,请在规定时间内报名。")])]),o("div",{class:[i.studentSection,i.studentSectionForm]},[o("div",{class:i.title4},null),o("div",{class:i["video-content"]},[o("video",{id:"register-video",class:i.video,src:"https://oss.dayaedu.com/ktyq/1719222831427bbef9504.mp4",playsinline:!0,poster:"https://oss.dayaedu.com/ktyq/17158281330381317fd87.png",preload:"auto"},null),e.showDuration&&o("span",{class:i.videoDuration},[y("1:24")])])]),o("div",{class:[i.studentSection,i.studentSectionForm,e.giftVipDay<=0&&i.noSendDay]},[o("div",{class:i.title1},null),o(At,{labelAlign:"left",class:i.registerForm},{default:()=>[o(R,{clearable:!1,label:"联系方式(直接监护人)",placeholder:"请输入手机号码",type:"tel",required:!0,autocomplete:"off",inputAlign:"right",class:i.username,modelValue:u.username,"onUpdate:modelValue":[t=>u.username=t,()=>{Je()}],border:!1,maxlength:11},{label:()=>o("div",null,[y("联系方式"),o("p",{class:i.tips},[y("(直接监护人)")])])}),o("div",{class:["van-hairline--bottom",i.fieldTipsGroup]},[o("div",{class:[i.fieldTips]},[y("手机号是音乐数字课堂的唯一登录账户")])]),o(R,{center:!0,clearable:!1,required:!0,inputAlign:"right",label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:u.password,"onUpdate:modelValue":[t=>u.password=t,t=>{Ne()}],maxlength:6},{button:()=>e.countDownStatus?o("span",{class:[i.codeText,Ee.value?"":i.codeTextDisabled],onClick:Fe},[y("获取验证码")]):o(xt,{ref:t=>B.value=t,"auto-start":!1,class:i.countDown,time:e.countDownTime,onFinish:De,format:"ss秒后重试"},null)}),o(R,{clearable:!1,required:!0,inputAlign:"right",label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:u.extra.nickname,"onUpdate:modelValue":t=>u.extra.nickname=t},{extra:()=>e.studentList.length>1&&o("div",{class:[i.selectStudentGroup,e.showSelectStudent&&i.selectStudentGroupChecked],onClick:()=>e.showSelectStudent=!0},[o("span",null,[e.studentItem.userId?"切换":"新增"])])}),o(R,{clearable:!1,required:!0,inputAlign:"right",label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>o(_t,{"checked-color":"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",modelValue:u.extra.gender,"onUpdate:modelValue":t=>u.extra.gender=t,direction:"horizontal"},{default:()=>[o(Se,{size:"large",type:"primary",color:u.extra.gender!==1?"#F5F6FA":"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",textColor:u.extra.gender!==1?"#626264":"#fff",class:i.radioSection},{default:()=>[o(Ce,{class:i.radioItem,name:1},null),y("男")]}),o(Se,{size:"large",type:"primary",color:u.extra.gender!==0?"#F5F6FA":"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",textColor:u.extra.gender!==0?"#626264":"#fff",class:i.radioSection},{default:()=>[o(Ce,{class:i.radioItem,name:0},null),y("女")]})]})}),o(R,{clearable:!1,required:!0,inputAlign:"right",label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:e.gradeNumText,onClick:()=>{e.gradePopupIndex=[u.extra.currentGradeNum],e.gradeStatus=!0}},null),o(R,{clearable:!1,required:!0,inputAlign:"right",label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:e.currentClassText,onClick:()=>{if(e.schoolInstrumentSetType==="CLASS"&&e.classList.length<=0){C("请先选择年级");return}e.classPopupIndex=[u.extra.currentClass],e.classStatus=!0}},null),e.giftVipDay>0&&e.registerDetails.giftVipFlag?o("div",{class:i.memberNumer},[o("img",{src:mt,class:i.iconGift},null),o("p",null,[y("注册成功即可获得乐器AI学练工具"),o("span",null,[e.giftVipDay||0]),y("天有效期")])]):""]})]),o("div",{class:i.studentSection},[o("div",{class:i.title2},null),o("div",{class:i.goodsGroup},[o("div",{class:[i.goodsItem,i.digitalize,e.joinType==="digitalize"&&i.checked],onClick:()=>{if(K()){C("请将资料填写完整");return}e.joinType="digitalize",se(()=>{var t;(t=F.value)==null||t.onChnageHeight(),setTimeout(()=>{window.scrollTo(0,1e3)},50)})}},[o("div",{class:i.goodsInner},[o("i",{class:i.proposalTip},null),y("数字化方式")])]),o("div",{class:[i.goodsItem,i.tradition,e.joinType==="tradition"&&i.checked1],onClick:()=>{if(K()){C("请将资料填写完整");return}e.joinType="tradition",se(()=>{var t;(t=F.value)==null||t.onChnageHeight(),setTimeout(()=>{window.scrollTo(0,1e3)},50)})}},[o("div",{class:i.goodsInner},[y("传统方式")])])]),e.joinType&&o("div",{class:i.goodsTypeGroup},[e.joinType==="digitalize"&&o("img",{src:qs,class:i.showImg},null),e.joinType==="tradition"&&o("img",{src:Js,class:i.showImg},null)])]),e.detailVip.membershipDays&&e.joinType==="digitalize"?o("div",{class:i.vipGiftContainer},[o("img",{src:Ms,class:i.iconGift},null),o("p",null,[y("现在购买额外赠送有效期"),o("div",null,[o("span",{class:i.vipGiftNum},[e.detailVip.membershipDays||0]),o("span",{class:i.vipGiftPreviod},[_e[e.detailVip.giftPeriod]])])])]):"",e.joinType&&o(ct,{position:"bottom",ref:F},{default:()=>[o("div",{class:i.paymentContainer},[e.joinType==="digitalize"&&o(nt,null,[o("div",{class:i.payemntPrice},[o("img",{src:Us,class:i.giftTip},null),o("div",null,[o("span",{class:i.needPrice},[o("i",{style:"font-style: normal"},[y("¥ ")]),o("span",null,[ye(L.value.amount)]),o("i",{class:i.unit,style:"font-style: normal"},[y("/年")])]),L.value.originAmount>L.value.amount?o("del",{class:i.allPrice},[y("¥ "),ye(L.value.originAmount)]):""])]),o("div",{class:i.paymentBtn,onClick:()=>{P()}},[o(Te,{round:!0,disabled:e.submitLoading,loading:e.submitLoading},{default:()=>[y("立即支付")]})])]),e.joinType==="tradition"&&o("div",{class:i.traditionBtn,onClick:()=>{P()}},[o(Te,{round:!0,disabled:e.submitLoading,loading:e.submitLoading},{default:()=>[y("提交报名")]})])])]})]),e.imgCodeStatus?o(Tt,{value:e.imgCodeStatus,"onUpdate:value":t=>e.imgCodeStatus=t,phone:u.username,type:"REGISTER",onClose:()=>{e.imgCodeStatus=!1},onSendCode:Be},null):null,o(M,{show:e.gradeStatus,"onUpdate:show":t=>e.gradeStatus=t,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch",onOpen:()=>{e.gradePopupShow=!0},onClosed:()=>{e.gradePopupShow=!1}},{default:()=>[e.gradePopupShow&&o(we,{showToolbar:!0,modelValue:e.gradePopupIndex,"onUpdate:modelValue":t=>e.gradePopupIndex=t,columns:e.gradeList,onCancel:()=>e.gradeStatus=!1,onConfirm:t=>{const s=t.selectedOptions[0];u.extra.currentGradeNum=s.value,e.gradeNumText=s.text,e.gradeStatus=!1,["SCHOOL","GRADE"].includes(e.schoolInstrumentSetType)&&(e.instrumentCode=s.instrumentCode),e.schoolInstrumentSetType==="CLASS"&&(e.classList=s.classList),["CLASS","GRADE"].includes(e.schoolInstrumentSetType)&&(e.currentClassText="",u.extra.currentClass="")}},null)]}),o(M,{show:e.classStatus,"onUpdate:show":t=>e.classStatus=t,position:"bottom",round:!0,class:"popupBottomSearch",onOpen:()=>{e.classPopupShow=!0},onClosed:()=>{e.classPopupShow=!1}},{default:()=>[e.classPopupShow&&o(we,{showToolbar:!0,modelValue:e.classPopupIndex,"onUpdate:modelValue":t=>e.classPopupIndex=t,columns:e.classList,onCancel:()=>e.classStatus=!1,onConfirm:t=>{const s=t.selectedOptions[0];u.extra.currentClass=s.value,e.currentClassText=s.text,e.classStatus=!1,["CLASS"].includes(e.schoolInstrumentSetType)&&(e.instrumentCode=s.instrumentCode)}},null)]}),o(pt,{title:"提示",show:e.dialogStatus,"onUpdate:show":t=>e.dialogStatus=t,message:e.dialogMessage,allowHtml:!0,primaryColor:"#FF8057",showCancelButton:!0,messageAlign:e.messageAlign,confirmButtonText:e.confirmButtonText,cancelButtonText:e.cancelButtonText,onConfirm:async()=>{if(e.joinType==="tradition"&&(await le(),e.registerExpireTime&&e.activeOverStatus&&N()),e.joinType==="digitalize"){const t=e.dialogConfig;if(d.config=t==null?void 0:t.paymentConfig,d.orderNo=t==null?void 0:t.orderNo,!await O())return;await ce()}},onCancel:t=>{e.joinType==="tradition"&&(e.dialogStatus=!1,e.registerExpireTime&&e.activeOverStatus&&N()),e.joinType==="digitalize"&&Pe()}},null),o(M,{show:d.paymentStatus,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:()=>[o(gt,{paymentConfig:d.orderInfo,onClose:()=>d.paymentStatus=!1,onBackOut:Ge,onConfirm:t=>H(t)},null)]}),o(M,{show:d.showQrcode,"onUpdate:show":t=>d.showQrcode=t,round:!0,onClose:()=>{clearInterval(d.orderTimer)}},{default:()=>[o(ft,{url:d.qrCodeUrl,pay_channel:d.pay_channel,orderType:ie.value},null)]}),o(St,{modelValue:d.authShow,"onUpdate:modelValue":t=>d.authShow=t},{default:()=>[o(ht,{onSuccess:Ve,hideHeader:!z().isApp},null)]}),o(dt,{show:e.showTips,message:e.showMessage,showButton:e.showButton,buttonText:"刷新",onConfirm:()=>window.location.reload()},null),o(wt,{show:r.showOtherSchool,messageAlign:r.messageAlign,message:r.showOtherMessage,showCancelButton:r.showCancelButton,cancelButtonColor:r.cancelButtonColor,cancelButtonText:r.cancelButtonText,confirmButtonColor:r.confirmButtonColor,confirmButtonText:r.confirmButtonText,onClose:()=>r.showOtherSchool=!1,onCancel:async()=>{if(r.showOtherSchool=!1,r.otherType==="nickname")e.isRegister="create",x(!1,!1),P();else if(r.otherType==="member"){if(!await O())return;e.registerExpireTime&&e.activeOverStatus&&N()}},onConfirm:async()=>{r.showOtherSchool=!1,r.otherType==="nickname"?(e.isRegister="update",x(!1,!1),P()):r.otherType==="change"?(e.isChangeSchool=!0,P()):r.otherType==="limit"?x(!(e.isRegister==="create"&&!e.studentItem.userId),!1):r.otherType==="member"&&await q()}},null),o(M,{show:e.showSelectStudent,"onUpdate:show":t=>e.showSelectStudent=t,round:!0,position:"bottom",safeAreaInsetBottom:!0,closeable:!0,class:i.selectStudentPopup},{default:()=>[o(Ct,{studentItem:e.studentItem,list:e.studentList,onClose:()=>e.showSelectStudent=!1,onConfirm:t=>{if(t.userId){e.studentItem=t;const s=t;u.extra.nickname=s.nickname;const n=e.gradeList||[];u.extra.currentGradeNum=null,e.gradeNumText="",e.instrumentCode="",n==null||n.forEach(a=>{a.value===s.currentGradeNum&&(e.instrumentCode=a.instrumentCode,e.gradeNumText=a.text,u.extra.currentGradeNum=s.currentGradeNum,e.schoolInstrumentSetType==="CLASS"&&(e.classList=a.classList))}),u.extra.currentClass=null,e.currentClassText="",e.classList.forEach(a=>{a.value===s.currentClass&&(e.currentClassText=a.text,u.extra.currentClass=s.currentClass)}),u.extra.gender=s.gender,e.isRegister="update",x(!0,!1),e.showSelectStudent=!1}else{if(e.studentList.length>=e.multi_user_limit)return r.showOtherMessage=`同一手机号最多创建${e.multi_user_limit}个学生`,r.showOtherSchool=!0,r.showCancelButton=!1,r.showCloseButton=!0,r.confirmButtonColor="linear-gradient( 305deg, #40C8FF 0%, #3192FF 100%)",r.confirmButtonText="我知道了",r.otherType="limit",r.messageAlign="center",!0;e.studentItem=t,e.isRegister="create",x(!1,!1),u.extra.nickname="",u.extra.currentGradeNum="",u.extra.currentClass="",u.extra.gender=1,e.currentClassText="",e.gradeNumText="",e.showSelectStudent=!1}}},null)]})])}}),fo=Object.freeze(Object.defineProperty({__proto__:null,default:zs,vipGiftPeriodType:_e},Symbol.toStringTag,{value:"Module"}));export{_e as a,fo as b,Us as g,Vs as i,ae as r,Ms as v};