index-ec4018d1.js 31 KB

1
  1. import{d as fe,P as he,q as ye,r as k,x as L,ag as z,e as R,S as x,bi as Te,X as q,y as Ce,Q as we,a as s,A as i,N as A,z as j,F as Se,W as Z,C as X,R as _,M as D,D as m,a7 as P,bj as Ie,J as Fe,K as ve,aP as Ee,bk as be}from"./index-0f430fcc.js";import{M as xe}from"./index-006d92d8.js";import{u as _e}from"./student-register-store-f0c1b2ce.js";import{d as De}from"./deep-clone-c0d00fc2.js";import{C as Be,M as Oe}from"./index-0d69ce30.js";import{O as Q}from"./index-24d7fd9a.js";import{i as K}from"./icon-gift-20293d47.js";import{P as Ne,Q as Ve,U as Le,b as Re}from"./user-auth-71363221.js";import{M as je}from"./index-0ead74db.js";import{O as Pe}from"./index-e851542e.js";import{b as Ue,c as We}from"./index-9b258718.js";import{T as U}from"./index-9a0fefcc.js";import{P as Y}from"./index-1a705d0f.js";import{F as Ge}from"./index-a1e7c45c.js";import{F as S}from"./index-42a305c0.js";import{R as He,a as J}from"./index-e02130b9.js";import{C as Me}from"./index-787e92a9.js";import{I as ke}from"./index-15acf057.js";import"./index-3a587880.js";import"./index-9129a731.js";import"./browser-e949d08f.js";import"./index-cc542b8c.js";import"./Checker-53dd11d8.js";const ze="_studentRegisterContainer_1l3gf_8",qe="_countdownSection_1l3gf_13",Ze="_timer_1l3gf_32",Xe="_timerAll_1l3gf_37",Qe="_timerTitle_1l3gf_59",Ke="_timerTip_1l3gf_64",Ye="_paymentContainer_1l3gf_74",Je="_giftTip_1l3gf_84",$e="_needPrice_1l3gf_88",et="_unit_1l3gf_105",tt="_allPrice_1l3gf_108",st="_traditionBtn_1l3gf_127",ot="_studentSection_1l3gf_135",nt="_studentSectionForm_1l3gf_142",at="_noSendDay_1l3gf_146",rt="_title1_1l3gf_149",ut="_title2_1l3gf_156",it="_goodsGroup_1l3gf_163",lt="_goodsItem_1l3gf_168",ct="_goodsInner_1l3gf_182",dt="_checked_1l3gf_186",pt="_checked1_1l3gf_192",mt="_proposalTip_1l3gf_198",gt="_registerForm_1l3gf_212",At="_fieldTipsGroup_1l3gf_220",ft="_fieldTips_1l3gf_220",ht="_tips_1l3gf_232",yt="_username_1l3gf_239",Tt="_countDown_1l3gf_247",Ct="_codeText_1l3gf_265",wt="_memberNumer_1l3gf_269",St="_iconGift_1l3gf_281",It="_radioSection_1l3gf_291",Ft="_radioItem_1l3gf_299",vt="_goodsSection_1l3gf_310",Et="_iconArrow_1l3gf_321",bt="_goodsExtra_1l3gf_328",xt="_goodsCell_1l3gf_362",_t="_img_1l3gf_367",Dt="_goodsName_1l3gf_383",Bt="_brandName_1l3gf_388",Ot="_model_1l3gf_400",Nt="_sendInstrument_1l3gf_418",Vt="_moreBtn_1l3gf_422",Lt="_sbtnGroup_1l3gf_429",Rt="_goodsTradition_1l3gf_441",jt="_goodsTitle_1l3gf_453",Pt="_step_1l3gf_460",Ut="_stepContent_1l3gf_480",Wt="_nums_1l3gf_491",Gt="_numInner_1l3gf_502",n={"student-register":"_student-register_1l3gf_1",studentRegisterContainer:ze,countdownSection:qe,timer:Ze,timerAll:Xe,timerTitle:Qe,timerTip:Ke,paymentContainer:Ye,giftTip:Je,needPrice:$e,unit:et,allPrice:tt,traditionBtn:st,studentSection:ot,studentSectionForm:nt,noSendDay:at,title1:rt,title2:ut,goodsGroup:it,goodsItem:lt,goodsInner:ct,checked:dt,checked1:pt,proposalTip:mt,registerForm:gt,fieldTipsGroup:At,fieldTips:ft,tips:ht,username:yt,countDown:Tt,codeText:Ct,memberNumer:wt,iconGift:St,radioSection:It,radioItem:Ft,goodsSection:vt,iconArrow:Et,goodsExtra:bt,goodsCell:xt,img:_t,goodsName:Dt,brandName:Bt,model:Ot,sendInstrument:Nt,moreBtn:Vt,sbtnGroup:Lt,goodsTradition:Rt,goodsTitle:jt,step:Pt,stepContent:Ut,nums:Wt,numInner:Gt},Ht=""+new URL("tuangou-50d77141.png",import.meta.url).href,Mt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAAeC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LlO21otI+9h419tnHjS6JqkI9qBQ+dkO121RcEFp2iQocfge7cuC0dVgSFXQwE02h9fNIlVBepxKIi7o8ioGPvJMKVfxWAhOQwH+zM3bZcETvnWqCdoh6j0WbPPvVD0tFNzQbwpK/mhVrG8xwW1KpKAcrQmGuGeZbV/ysncaBG+EC1qUUhwZUrp5XlAdM/jar4eC58w2eRVvxAeD8rVuFiRCcFaI/o/gTvxjURVUx4x5xlzfyff75+WtyxNS55cECVbatSjYaSUj/Rw84iT2eFyQnC0DiM7mlwRXcF01HNQrxlmSJwSnk8kEJ+9PJqP/EhzC9yVpEIwChhyfEHylil//FhNLfIl/VDCyWq0nBf1awZ04dV4SPJyO3nq93pYEB9Bt1wq2Lhf6hOD7B0PSgyY49TS6umA0tB0XRWRuaIJIvaCgVtAJAqYJmiETxEqw8RwMVRQF6fnMXhdsu66hBMFKF8QRru3im14WhDlXBVffFdxDu15wJu45WCeHZwWD83I1fn8g6H4508dVfLTunL4jmBpYg3kWZN8W7GYz63jKJ1QWTG+2WT1m6tEFvR7HlE0E4xFcwbqZEx+tM+wh+YpE+r3jeDxOmp6I4Li/Ud61871kXEsAAAAASUVORK5CYII=",kt=""+new URL("icon-5-3d444825.png",import.meta.url).href,zt=""+new URL("icon-6-cbc3f8a5.png",import.meta.url).href,qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAAA2CAMAAAAF4QD3AAACylBMVEUAAAD/d1j/NWH/bFv/W13/NmH/OWL/flj/OV//NmD/eVn/N2H/eln/N1//eVj/N2D/NmD/OGD/OGD/elj/eVn/eFf/eFf/elf/OF//eFj/eFj/eFj/N2D/elj/N2H/N2L/OWH/N2D/d1j/NmD/OGD/eVj/e1b/clj/NV//eFj/e1j/elf/eFj/elj/eVf/OWH/cVj/fFn/e1n/////blj/cVj/dVf/PF//Ol//Xlr/RF7/Pl//S13/N1//aln/Ql7/T1z/QF7/Ulz/XFv/Ylr/NmD/ZFr/YFr/c1j/Tl3/SV3/OV//dFj/b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zo3HfCjE7aCTM2/Z1wUeWDZrHCGtn6D7+3lmzu+vm3QI5s/bffWyvW5Z8LpTuTkq3/+nurV0vGxlWwMs/Wf/u9dZBXE40v1GVLUbh/+721UZVyxTW/7ResU6TwwH/3vbWRV+tqdYvnz4n2GwFv0dLjugI1AAAAAElFTkSuQmCC",B=[];for(let p=1;p<=40;p++)B.push({text:p+"班",value:p});const $={1:"一年级",2:"二年级",3:"三年级",4:"四年级",5:"五年级",6:"六年级",7:"七年级",8:"八年级",9:"九年级"},ee=(p,d)=>{let f=[];const T=[{text:"一年级",value:1,instrumentCode:d},{text:"二年级",value:2,instrumentCode:d},{text:"三年级",value:3,instrumentCode:d},{text:"四年级",value:4,instrumentCode:d},{text:"五年级",value:5,instrumentCode:d}],C=[{text:"六年级",value:6,instrumentCode:d}],e=[{text:"七年级",value:7,instrumentCode:d},{text:"八年级",value:8,instrumentCode:d},{text:"九年级",value:9,instrumentCode:d}];return p==="FIVE_YEAR_SYSTEM"?f.push(...T):p==="SIX_YEAR_SYSTEM"?f.push(...T,...C):p==="THREE_YEAR_SYSTEM"?f.push(...e):p==="FORE_YEAR_SYSTEM"?f.push(...C,...e):f.push(...T,...C,...e),f},fs=fe({name:"student-register",setup(){const p=he(),d=_e(),f=ye();d.setShoolId(p.query.sId);const T=k(),C=k(),e=L({schoolId:p.query.sId,paymentType:"",details:[],gradeYear:"",schoolInstrumentSetType:null,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:"",dialogConfirmStatus:!1,contract_sign:!1,countDownTimePay:60*1e3,dialogConfig:{},showOtherSchool:!1,showOtherMessage:"",joinType:"",gradeList:[],classList:[],saveUserId:null,saveId:null,openId:null,code:null,intervalFnRef:null,registerExpireTime:null,instrumentCode:null,activeOverTime:0,activeOverStatus:!0,gradePopupIndex:[],classPopupIndex:[]}),r=L({showQrcode:!1,qrCodeUrl:"",pay_channel:"",orderInfo:{},authShow:!1,orderNo:null,config:{},paymentStatus:!1,orderTimer:null}),a=L({autoRegister:!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:""}),I=Ue(1e3,{controls:!0});I.pause();const F=z({time:e.countDownTimePay,onChange(t){e.dialogMessage=`有待支付订单,请在${Math.ceil(t.total/1e3)}s后重试`},onFinish(){e.dialogStatus=!1}}),w=z({time:e.activeOverTime,onFinish(){e.activeOverStatus=!0,console.log(e.submitLoading,"forms.submitLoading"),!e.submitLoading&&E()}}),E=()=>{var t;e.showTips=!0,e.showMessage="团购时间已截止,感谢您的参与",e.showButton=!1,(t=e.intervalFnRef)==null||t.pause()},te=()=>{e.countDownStatus=!1,j(()=>{T.value.start()})},se=()=>{if(!D(a.username))return A("请输入正确的手机号码");e.imgCodeStatus=!0},oe=R(()=>!!D(a.username)),ne=()=>{e.countDownStatus=!0,T.value.reset()},W=R(()=>r.orderInfo.orderType),ae=async()=>{var t;try{const{data:o}=await m.get("/edu-app/open/userOrder/registerGoods/"+e.schoolId,{noAuthorization:!0});d.setVip(o.details||[]),e.details=De(o.details||[]),e.registerExpireTime=o.registerExpireTime,e.registerExpireTime&&(P(new Date).isBefore(e.registerExpireTime)?(e.activeOverStatus=!1,e.activeOverTime=P(e.registerExpireTime).diff(P(new Date)),w.reset(e.activeOverTime),w.start()):(E(),e.activeOverStatus=!0)),e.details.length>0&&(e.detailVip=e.details[0]),e.giftVipDay=o.giftVipDay||0,e.gradeYear=o.gradeYear,e.schoolInstrumentSetType=o.schoolInstrumentSetType,e.registerType=o.registerType,a.extra.registerType=o.registerType;const u=o.schoolInstrumentList||[];if(o.schoolInstrumentSetType==="SCHOOL"){const l=(t=u[0])==null?void 0:t.instrumentCode;e.gradeList=ee(o.gradeYear,l),e.classList=B}else if(o.schoolInstrumentSetType==="GRADE")u.forEach(l=>{e.gradeList.push({text:$[l.gradeNum],value:l.gradeNum,instrumentId:l.instrumentId,instrumentCode:l.instrumentCode})}),e.gradeList.sort((l,c)=>l.value-c.value),e.classList=B;else if(o.schoolInstrumentSetType==="CLASS"){const l=[];u.forEach(g=>{l.includes(g.gradeNum)||l.push(g.gradeNum)});const c=[];l.forEach(g=>{const y={text:$[g],value:g,instrumentId:"",instrumentCode:"",instrumentName:"",classList:[]};u.forEach(h=>{g===h.gradeNum&&(y.instrumentId=h.instrumentId,y.instrumentCode=h.instrumentCode,y.instrumentName=h.instrumentName,y.classList.push({text:h.classNum+"班",value:h.classNum,instrumentCode:h.instrumentCode}))}),y.classList.sort((h,Ae)=>h.value-Ae.value),c.push(y)}),c.sort((g,y)=>g.value-y.value),e.gradeList=c,e.classList=[]}else e.gradeList=ee(o.gradeYear),e.classList=B;if(x().weixin){if(o.registerType!=="BUG_GOODS"||o.schoolStatus===0){e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1;return}}else{e.showTips=!0;return}(!e.registerExpireTime||!e.activeOverStatus)&&ge()}catch(o){}},v=R(()=>{let t=0,o=0;return d.getVip.forEach(l=>{t+=Number(l.currentPrice),o+=Number(l.originalPrice)}),{amount:t,originAmount:o}}),O=(t=!0)=>{if(D(a.username))if(a.password)if(a.extra.nickname)if(a.extra.currentGradeNum){if(!a.extra.currentClass)return t&&A("请选择所在班级"),!0}else return t&&A("请选择所在年级"),!0;else return t&&A("请输入学生姓名"),!0;else return t&&A("请输入验证码"),!0;else return t&&A("请输入正确的手机号码"),!0;return!1},G=async()=>{e.submitLoading=!0;try{if(O()){e.submitLoading=!1;return}const{extra:t,...o}=a,u=await m.post("/edu-app/userlogin",{requestType:"form",data:{...o,extra:JSON.stringify({...t,giftVipDay:e.detailVip.membershipDays||0+e.giftVipDay||0,schoolId:e.schoolId})}});if(u.code!==200)u.code===5436?(e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1):u.code===5435?(e.showTips=!0,e.showMessage=u.message,e.showButton=!0):u.code===5437&&(e.showTips=!0,e.showMessage="团购时间已截止,感谢您的参与",e.showButton=!1);else{d.setToken(u.data.token_type+" "+u.data.access_token),Ie();let l="NOT_REGISTER";e.joinType==="digitalize"&&(l="SELECT_INSTRUMENT"),e.joinType==="tradition"&&(l="NOT_BUY_INSTRUMENT");const c=await M(I.counter.value,l,u.data.userId,e.schoolId);e.saveId=c,e.saveUserId=c,I.counter.value=0;const g=await m.get("/edu-app/user/getUserInfo",{requestType:"form"});Fe(g.data),await re()}}catch(t){}finally{e.submitLoading=!1}},re=async()=>{try{if(await ie())return;const o=await m.get("/edu-app/userPaymentOrder/registerStatus/"+e.schoolId),u=d.getVip;if(e.joinType==="tradition"){setTimeout(()=>{A("报名成功")},100),setTimeout(()=>{x().weixin&&window.WeixinJSBridge.call("closeWindow")},1e3);return}if(o.data.hasBuyCourse&&u.length>0){e.dialogConfirmStatus=!0;return}await N()}catch(t){}},ue=async()=>{if(!(a.password.length!==6||!D(a.username)))try{const{data:t}=await m.get(`/edu-app/open/student/studentInfo?mobile=${a.username}&code=${a.password}&type=REGISTER`);if(t){if(a.extra.nickname||(a.extra.nickname=t.nickname),!a.extra.currentGradeNum){const o=e.gradeList||[];o==null||o.forEach(u=>{u.value===t.currentGradeNum&&(e.instrumentCode=u.instrumentCode,e.gradeNumText=u.text,a.extra.currentGradeNum=t.currentGradeNum,e.schoolInstrumentSetType==="CLASS"&&(e.classList=u.classList))})}a.extra.currentClass||e.classList.forEach(o=>{o.value===t.currentClass&&(e.currentClassText=o.text,a.extra.currentClass=t.currentClass)}),a.extra.gender=a.extra.gender!==t.gender?t.gender:a.extra.gender}}catch(t){}},ie=async()=>{let t=!1;try{const{data:o}=await m.get("/edu-app/userPaymentOrder/unpaid");if(!o.id)return!1;if(o.cancelPayment)return await m.post("/edu-app/userPaymentOrder/cancelPayment/"+o.orderNo),!1;e.countDownTime=o.cancelTimes,F.reset(Number(o.cancelTimes)),F.start(),e.dialogMessage=`有待支付订单,请在${Math.ceil(F.current.value.total/1e3)}s后重试`,e.dialogStatus=!0,e.dialogConfig=o,t=!0}catch(o){}return t},N=async()=>{try{const t=d.getVip,o=d.getGoods,u=[];t.forEach(c=>{u.push({giftVipDay:c.membershipDays,goodsId:c.goodsId,goodsNum:1,goodsType:c.goodsType,paymentCashAmount:c.currentPrice,paymentCouponAmount:0})}),o.forEach(c=>{u.push({goodsId:c.productId,goodsNum:c.quantity,goodsType:"INSTRUMENTS",paymentCashAmount:c.price,paymentCouponAmount:0,goodsSkuId:c.productSkuId})});const l=await m.post("/edu-app/userPaymentOrder/executeOrder",{data:{buryId:e.saveUserId,registerType:e.registerType,paymentType:e.paymentType,bizId:e.schoolId,orderType:"SCHOOL_REGISTER",paymentCashAmount:v.value.amount||0,paymentCouponAmount:0,goodsInfos:u,orderName:"学生登记",orderDesc:"学生登记"}});l.code===5436?(e.showTips=!0,e.showMessage="二维码已经失效,详情请咨询学校老师",e.showButton=!1):l.code===5435?(e.showTips=!0,e.showMessage=l.message,e.showButton=!0):(r.config={...l.data.paymentConfig,paymentType:l.data.paymentType},r.orderNo=l.data.orderNo,await H())}catch(t){console.log(t,"any")}},H=async()=>{try{const t=ve.user.data;if(e.contract_sign&&(!(t!=null&&t.account.realName)||!(t!=null&&t.account.idCardNo))){r.authShow=!0;return}const{data:o}=await m.post("/edu-app/userPaymentOrder/updateReceiveAddress",{data:{orderNo:r.orderNo,orderType:"SCHOOL_REGISTER"}});r.pay_channel=o.paymentChannel,o.status!=="WAIT_PAY"&&o.status!=="PAYING"?f.replace({path:"/payment-result",query:{orderNo:r.orderNo}}):le()}catch(t){}},le=()=>{const t=r.pay_channel;if(t){const o=Re(r.pay_channel);V({payCode:o,pay_channel:t})}else W.value==="VIP"?r.paymentStatus=!0:V({payCode:"payResult",pay_channel:"wx_pub"})},V=t=>{const o=r.config;r.pay_channel=t.pay_channel;const u=q.stringify({pay_channel:t.pay_channel,wxAppId:o.wxAppId,alipayAppId:o.alipayAppId,paymentType:e.paymentType,body:o.body,price:o.price,orderNo:o.merOrderNo,userId:o.userId});t.payCode==="payResult"?window.location.href=window.location.origin+"/classroom-app/#/payResult?"+u:(r.qrCodeUrl=window.location.origin+"/classroom-app/#/payDefine?"+u,r.showQrcode=!0,r.paymentStatus=!1,setTimeout(()=>{de()},300))},ce=async()=>{try{await m.post("/edu-app/userPaymentOrder/cancelPayment/"+r.orderNo)}catch(t){}},de=async()=>{const t=setInterval(async()=>{if(p.name!="student-register-form"){clearInterval(t);return}r.orderTimer=t;try{const{data:o}=await m.post("/edu-app/open/userOrder/paymentStatus/"+r.orderNo,{hideLoading:!0});o.status!=="WAIT_PAY"&&o.status!=="PAYING"&&(r.showQrcode=!1,clearInterval(r.orderTimer),setTimeout(()=>{f.replace({path:"/payment-result",query:{orderNo:r.orderNo}})},100))}catch(o){clearInterval(r.orderTimer)}},5e3)},pe=()=>{r.authShow=!1,N()},M=async(t=5,o,u,l)=>{try{const{data:c}=await m.post("/edu-app/open/studentRegisterPointRecord/update",{data:{id:e.saveId,useTime:t,joinType:o,userId:u,schoolId:l}});return e.saveId=c,c}catch(c){}},me=async t=>{try{const{data:o}=await m.get("/edu-app/open/paramConfig/wechatAppId");o&&(Ee(),be(o,t))}catch(o){}};if(x().weixin){const t=sessionStorage.getItem("active-open-id");e.openId=t;const o=Te();if(o)e.code=o;else{const u=window.location.origin+window.location.pathname+"#"+p.path+"?"+q.stringify({...p.query});return me(u),""}}const b=t=>t>9?t+"":"0"+t,ge=async()=>{try{if(!e.code)return;const{data:t}=await m.post("/edu-app/open/studentRegisterPointRecord/save",{data:{code:e.code,schoolId:e.schoolId,openId:e.openId}});e.saveId=t.id,e.openId=t.openId,sessionStorage.setItem("active-open-id",t.openId),e.intervalFnRef=We(async()=>{I.counter.value=0,I.resume(),await M()},5e3)}catch(t){}};return Ce(async()=>{await ae()}),we(()=>{var t;(t=e.intervalFnRef)==null||t.pause()}),()=>s("div",{class:n["student-register"]},[s("div",{class:n.studentRegisterContainer},[!e.activeOverStatus&&s("div",{class:n.countdownSection},[s("div",{class:n.timer},[s("img",{src:Mt,class:n.timerTitle},null),s("div",{class:n.timerAll},[s("span",null,[b(w.current.value.days)]),i("天"),s("span",null,[b(w.current.value.hours)]),i("时"),s("span",null,[b(w.current.value.minutes)]),i("分"),s("span",null,[b(w.current.value.seconds)]),i("秒")])]),s("div",{class:n.timerTip},[i("为了确保您能顺利参与学习,请在规定时间内报名。")])]),s("div",{class:[n.studentSection,n.studentSectionForm,e.giftVipDay<=0&&n.noSendDay]},[s("div",{class:n.title1},null),s(Ge,{labelAlign:"left",class:n.registerForm},{default:()=>[s(S,{clearable:!1,label:"联系方式(直接监护人)",placeholder:"请输入手机号码",type:"tel",required:!0,autocomplete:"off",inputAlign:"right",class:n.username,modelValue:a.username,"onUpdate:modelValue":t=>a.username=t,border:!1,maxlength:11},{label:()=>s("div",null,[i("联系方式"),s("p",{class:n.tips},[i("(直接监护人)")])])}),s("div",{class:["van-hairline--bottom",n.fieldTipsGroup]},[s("div",{class:[n.fieldTips]},[i("手机号是音乐数字课堂的唯一登录账户")])]),s(S,{center:!0,clearable:!1,required:!0,inputAlign:"right",label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:a.password,"onUpdate:modelValue":[t=>a.password=t,t=>{ue()}],maxlength:6},{button:()=>e.countDownStatus?s("span",{class:[n.codeText,oe.value?"":n.codeTextDisabled],onClick:se},[i("获取验证码")]):s(Be,{ref:t=>T.value=t,"auto-start":!1,class:n.countDown,time:e.countDownTime,onFinish:ne,format:"ss秒后重试"},null)}),s(S,{clearable:!1,required:!0,inputAlign:"right",label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:a.extra.nickname,"onUpdate:modelValue":t=>a.extra.nickname=t},null),s(S,{clearable:!1,required:!0,inputAlign:"right",label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>s(He,{"checked-color":"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",modelValue:a.extra.gender,"onUpdate:modelValue":t=>a.extra.gender=t,direction:"horizontal"},{default:()=>[s(U,{size:"large",type:"primary",color:a.extra.gender!==1?"#F5F6FA":"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",textColor:a.extra.gender!==1?"#626264":"#fff",class:n.radioSection},{default:()=>[s(J,{class:n.radioItem,name:1},null),i("男")]}),s(U,{size:"large",type:"primary",color:a.extra.gender!==0?"#F5F6FA":"linear-gradient( 135deg, #31C7FF 0%, #007AFE 100%)",textColor:a.extra.gender!==0?"#626264":"#fff",class:n.radioSection},{default:()=>[s(J,{class:n.radioItem,name:0},null),i("女")]})]})}),s(S,{clearable:!1,required:!0,inputAlign:"right",label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:e.gradeNumText,onClick:()=>{e.gradePopupIndex=[a.extra.currentGradeNum],e.gradeStatus=!0}},null),s(S,{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){A("请先选择年级");return}e.classPopupIndex=[a.extra.currentClass],e.classStatus=!0}},null),e.giftVipDay>0?s("div",{class:n.memberNumer},[s("img",{src:K,class:n.iconGift},null),s("p",null,[i("注册成功即可获得乐器AI学练工具"),s("span",null,[e.giftVipDay||0]),i("天有效期")])]):""]})]),s("div",{class:n.studentSection},[s("div",{class:n.title2},null),s("div",{class:n.goodsGroup},[s("div",{class:[n.goodsItem,n.digitalize,e.joinType==="digitalize"&&n.checked],onClick:()=>{if(O()){A("请将资料填写完整");return}e.joinType="digitalize",j(()=>{var t;(t=C.value)==null||t.onChnageHeight(),setTimeout(()=>{window.scrollTo(0,1e3)},50)})}},[s("div",{class:n.goodsInner},[s("i",{class:n.proposalTip},null),i("数字化方式")])]),s("div",{class:[n.goodsItem,n.tradition,e.joinType==="tradition"&&n.checked1],onClick:()=>{if(O()){A("请将资料填写完整");return}e.joinType="tradition",j(()=>{var t;(t=C.value)==null||t.onChnageHeight(),setTimeout(()=>{window.scrollTo(0,1e3)},50)})}},[s("div",{class:n.goodsInner},[i("传统方式")])])])]),e.joinType==="digitalize"&&s("div",{class:[n.goodsExtra]},[s("i",{class:n.iconArrow},null),s(Me,{border:!1,class:n.goodsCell},{icon:()=>s(ke,{class:n.img,src:e.detailVip.goodsUrl||Ht},null),title:()=>s("div",{class:n.section},[s("div",{class:n.sectionContent},[s("h2",null,[s("img",{src:kt,class:n.goodsName},null),s(U,{class:n.brandName},{default:()=>[i("12个月")]})]),s("p",{class:[n.model]},[s("p",null,[s("i",null,null),i("解决学生不会练、不知练的对错")]),s("p",null,[s("i",null,null),i("家长无法辅导、无需再额外请老师")])]),s("img",{src:zt,class:n.sendInstrument},null)])])}),e.detailVip.membershipDays?s("div",{class:n.memberNumer},[s("img",{src:K,class:n.iconGift},null),s("p",null,[i("现在购买赠送乐器AI学练工具"),s("span",null,[e.detailVip.membershipDays||0]),i("天有效期")])]):""]),e.joinType==="tradition"&&s("div",{class:n.goodsTradition},[s("i",{class:n.iconArrow},null),s("div",{class:n.goodsTitle},null),s("div",{class:n.steps},[s("div",{class:n.step},[s("span",{class:n.nums},[s("span",{class:n.numInner},[i("1")])]),s("div",{class:n.stepContent},[s("span",null,[i("AI工具标准:")]),i("可以学练音乐教材中的乐曲,通过手机应用商店准备。")])]),["Panpipes","Ocarina","Tenor Recorder","Woodwind"].includes(e.instrumentCode)&&s("div",{class:n.step},[s("span",{class:n.nums},[s("span",{class:n.numInner},[i("2")])]),s("div",{class:n.stepContent},[s("span",null,[e.instrumentCode==="Panpipes"&&"排箫",e.instrumentCode==="Ocarina"&&"陶笛",e.instrumentCode==="Tenor Recorder"&&"竖笛",e.instrumentCode==="Woodwind"&&"葫芦丝",i("标准:")]),e.instrumentCode==="Panpipes"&&"管数不限,建议20管以上C调加嘴排箫(不需要重复更换),黑色,选择单一原调(调性多很难掌握);",e.instrumentCode==="Ocarina"&&"C调、蓝色、十二孔高音、树脂或陶土均可;",e.instrumentCode==="Tenor Recorder"&&"C调、木质、高音德式八孔;",e.instrumentCode==="Woodwind"&&"C调、红木色、树脂或木质;"])])])]),e.joinType&&s(xe,{position:"bottom",ref:C},{default:()=>[s("div",{class:n.paymentContainer},[e.joinType==="digitalize"&&s(Se,null,[s("div",{class:n.payemntPrice},[s("img",{src:qt,class:n.giftTip},null),s("div",null,[s("span",{class:n.needPrice},[s("i",{style:"font-style: normal"},[i("¥ ")]),s("span",null,[Z(v.value.amount)]),s("i",{class:n.unit,style:"font-style: normal"},[i("/年")])]),v.value.originAmount>v.value.amount?s("del",{class:n.allPrice},[i("¥ "),Z(v.value.originAmount)]):""])]),s("div",{class:n.paymentBtn,onClick:()=>{G()}},[s(X,{round:!0,disabled:e.submitLoading,loading:e.submitLoading},{default:()=>[i("立即支付")]})])]),e.joinType==="tradition"&&s("div",{class:n.traditionBtn,onClick:()=>{G()}},[s(X,{round:!0,disabled:e.submitLoading,loading:e.submitLoading},{default:()=>[i("提交报名")]})])])]})]),e.imgCodeStatus?s(je,{value:e.imgCodeStatus,"onUpdate:value":t=>e.imgCodeStatus=t,phone:a.username,type:"REGISTER",onClose:()=>{e.imgCodeStatus=!1},onSendCode:te},null):null,s(_,{show:e.gradeStatus,"onUpdate:show":t=>e.gradeStatus=t,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[s(Y,{showToolbar:!0,modelValue:e.gradePopupIndex,"onUpdate:modelValue":t=>e.gradePopupIndex=t,columns:e.gradeList,onCancel:()=>e.gradeStatus=!1,onConfirm:t=>{const o=t.selectedOptions[0];a.extra.currentGradeNum=o.value,e.gradeNumText=o.text,e.gradeStatus=!1,["SCHOOL","GRADE"].includes(e.schoolInstrumentSetType)&&(e.instrumentCode=o.instrumentCode),e.schoolInstrumentSetType==="CLASS"&&(e.classList=o.classList),["CLASS","GRADE"].includes(e.schoolInstrumentSetType)&&(e.currentClassText="",a.extra.currentClass="")}},null)]}),s(_,{show:e.classStatus,"onUpdate:show":t=>e.classStatus=t,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[s(Y,{showToolbar:!0,modelValue:e.classPopupIndex,"onUpdate:modelValue":t=>e.classPopupIndex=t,columns:e.classList,onCancel:()=>e.classStatus=!1,onConfirm:t=>{const o=t.selectedOptions[0];a.extra.currentClass=o.value,e.currentClassText=o.text,e.classStatus=!1,["CLASS"].includes(e.schoolInstrumentSetType)&&(e.instrumentCode=o.instrumentCode)}},null)]}),s(Q,{title:"提示",show:e.dialogConfirmStatus,"onUpdate:show":t=>e.dialogConfirmStatus=t,message:"已购买会员,是否确认购买?",primaryColor:"#FF8057",allowHtml:!0,confirmButtonText:"确定",showCancelButton:!0,onConfirm:async()=>{await N()},onCancel:()=>{e.registerExpireTime&&e.activeOverStatus&&E()}},null),s(Q,{title:"提示",show:e.dialogStatus,"onUpdate:show":t=>e.dialogStatus=t,message:e.dialogMessage,allowHtml:!0,primaryColor:"#FF8057",confirmButtonText:"继续支付",onConfirm:async()=>{F.pause();const t=e.dialogConfig.paymentConfig;r.config=t==null?void 0:t.paymentConfig,r.orderNo=t==null?void 0:t.orderNo,await H()},onCancel:t=>{F.pause(),e.registerExpireTime&&e.activeOverStatus&&E()}},null),s(_,{show:r.paymentStatus,closeOnClickOverlay:!1,position:"bottom",round:!0,closeOnPopstate:!0,safeAreaInsetBottom:!0,style:{minHeight:"30%"}},{default:()=>[s(Ne,{paymentConfig:r.orderInfo,onClose:()=>r.paymentStatus=!1,onBackOut:ce,onConfirm:t=>V(t)},null)]}),s(_,{show:r.showQrcode,"onUpdate:show":t=>r.showQrcode=t,round:!0,onClose:()=>{clearInterval(r.orderTimer)}},{default:()=>[s(Ve,{url:r.qrCodeUrl,pay_channel:r.pay_channel,orderType:W.value},null)]}),s(Pe,{modelValue:r.authShow,"onUpdate:modelValue":t=>r.authShow=t},{default:()=>[s(Le,{onSuccess:pe,hideHeader:!x().isApp},null)]}),s(Oe,{show:e.showTips,message:e.showMessage,showButton:e.showButton,buttonText:"刷新",onConfirm:()=>window.location.reload()},null)])}});export{fs as default};