12345 |
- <<<<<<<< HEAD:dist/assets/index-b05340a7.js
- import{d as O,r as q,e as k,x as B,a as e,A as u,C as A,V as F,z as V,N as P,E as y,D as h,b2 as U,U as H,q as J,ae as X,y as Z,I as j,P as v,F as K,Q,G as I,J as G}from"./index-97a7fcfb.js";import{i as $}from"./icon-gift-94736468.js";import{M as ee}from"./index-53246976.js";import{M as te}from"./index-78f75e96.js";import{M as oe}from"./index-5471aa28.js";import{u as W}from"./student-register-store-8627120b.js";import{F as se}from"./index-92c2ff2f.js";import{R as ae,a as N}from"./index-4b8d29f4.js";import{T as L}from"./index-c96e4d80.js";import{C as ne,O as le}from"./index-20ba15fa.js";import{P as z}from"./index-18b485b7.js";import{F as S}from"./index-9896c754.js";import{d as ue}from"./deep-clone-c0d00fc2.js";import{O as re}from"./index-38145ed0.js";import{C as R}from"./index-0ee4d3a6.js";import{C as D}from"./index-2b5d6a04.js";import{S as ie}from"./index-315defd6.js";import{I as M}from"./index-4710abe7.js";import"./index-573131c2.js";/* empty css */import"./index-2a62b64e.js";import"./Checker-044519bc.js";const ce="_studentSection_1jl6o_7",de="_goodsSection_1jl6o_25",pe="_titleTool_1jl6o_36",me="_titleBuy_1jl6o_45",ge="_goodsCell_1jl6o_52",fe="_noSelected_1jl6o_57",he="_selected_1jl6o_58",ye="_img_1jl6o_78",Ce="_brandName_1jl6o_93",ve="_iconDateMember_1jl6o_104",Se="_model_1jl6o_108",be="_more_1jl6o_118",De="_moreBtn_1jl6o_122",Te="_sbtnGroup_1jl6o_129",Ae="_btnDetail_1jl6o_141",Fe="_btnVideo_1jl6o_142",_e="_priceCell_1jl6o_182",we="_sPriceGroup_1jl6o_185",Ee="_tg_1jl6o_193",xe="_giftCell_1jl6o_217",Pe="_gift_1jl6o_217",je="_iconGift_1jl6o_235",ke="_goodsEmpty_1jl6o_240",Be="_shopImg_1jl6o_248",Le="_goodsContainer_1jl6o_252",Ie="_tips_1jl6o_262",Ge="_goSelect_1jl6o_267",Ne="_addButton_1jl6o_286",ze="_paymentContainer_1jl6o_306",Re="_needPrice_1jl6o_316",Me="_allPrice_1jl6o_329",Oe="_videoPopup_1jl6o_349",o={"student-register":"_student-register_1jl6o_1",studentSection:ce,goodsSection:de,titleTool:pe,titleBuy:me,goodsCell:ge,noSelected:fe,selected:he,delete:"_delete_1jl6o_59",img:ye,brandName:Ce,iconDateMember:ve,model:Se,more:be,moreBtn:De,sbtnGroup:Te,btnDetail:Ae,btnVideo:Fe,priceCell:_e,sPriceGroup:we,tg:Ee,giftCell:xe,gift:Pe,iconGift:je,goodsEmpty:ke,shopImg:Be,goodsContainer:Le,tips:Ie,goSelect:Ge,addButton:Ne,paymentContainer:ze,needPrice:Re,allPrice:Me,videoPopup:Oe},We=""+new URL("shop-empty-6c02d334.png",import.meta.url).href,Ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAAoCAMAAACrbMTGAAAC+lBMVEX/exv/gCT/1n7/uF3/t13/p0v/03v/uF//1X3/umD/hyf/03z/wGb/w2r/vGL/vmT/x27/v2X/q1H/0nn/u2IAAAD/yG//0Hf/wWj/14D/xGv/z3f/ynD/rlT/zXT/13//xm3/wmj/vmT/y3P/0nr/03v/xWz/u2L/znT/iCn/0Hn/xW7/1Hz/y3H/wmr/znb/xm3/ul//1n//wGb/zXXCNALEOQX/0nv/0Xj/w2vDNgP/x2//y3P/u2HDNwPwqlv/y3TCMwHWZSf/ynL/y3P/1H3abSv/yG/QVhvPUhf/0HjEOgbJRA7GPgn/vWT/mTPFOQXVYiP/xWzDNgPENwPSXiHNTBLqkETefDfjgzv2u2jaaij5r1n/umDMTRPtmkzyplXKRxDGPgnnkknmjEPokEXifjjXZCPUWhvHQArXair9y3TNTxT8yXPLSBDkiED6vWffdzLlhTzxmkrFOwbbbizun1Lpk0f/znXTWRvVXiDifDTbaSfqij/9t1//ehz/exv/exv/eh//eyHMThXOURj/oETOTxbcdjLSWh7qmk7uo1X9yXPolErJRAzLSRDvpFb/ljjLSA/+x2//kzXvoV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UhAPmHZadjXFTFe57uckOG8Nm1f1EuzwDXPpTxlvC2JuBi1YekpUPspCFmnmIuBwiEPqmFz709ydG+gF/Tqmk6lnCLhgJhUdEZGeKSOF9kCgsptlgY7bkCFGi7thb986BN4axZiswNtUjSUAgCxqbGiTOfIvg2fi3kxWlshL+3tyjUaK5GTcOciqLDqnMou0YYCzAAwh7SDLV+KCHNh3eUd+VrnunYexd1mkFcz7WDjCWElF5h4gSzpUd0pyjYbw6VQ7AQw/XeuDxu7OC7KizgGdwbhYtzuOZdc5iOZ2jRIqTt3pGGh+EiVZS6KpAL0nXPTr7Thhb8bZ6W7G8xv4UPSIGGozpcVLFqCHkDxLxIWJfra38mlAKOXRFvF4vzuFNPDTujccrCMKt9XO9DMcW2Ji4tI6k2YcAtaeNetyYlvVyvBIP49HynhU2dgfGmqywsa6upq6mzUihECSKc/IAStIOOTzkMJwSrYgOm5aIgh/5DMcQTHQhwww2mWAgz/w39l421pCL45qUPBSIUQ7kGcbu4Ndvq5WWem60RImWeb+RIyYt8pukJJHkPBqGcqI3qVCypSUapKjeFA8OaqTmWm7MEJNEvwQ6LHNnzPivfbgv2pDPFWhIxqgDnKW+svqMf2FarDqsLIVCyyLS0umhZM5IR2cc9x33sRz5QtIhWZ4wP8GMwzER5WBC0yCwIvX/y1I4vNSoz6fN6TOapk0s52vnavEFjL3cXs2dN7h9/jYWR3b+1nOy9LnV7Zf6lxKljd9nTxG/N0rP74ivkYob+XOnhvxG8cwr+cVfqe1X/jK4evkqFgIRA8sZ6/j8ydDnf7WVznw1v6rdLhUvtF04CqTbsI7P886cDH2xtP381en/cv00/jnEH9aeodnklrpXAAAAAElFTkSuQmCC",qe="_registerModal_1koh8_1",Ve="_infoTitle_1koh8_7",Ue="_registerForm_1koh8_13",He="_tips_1koh8_20",Je="_codeText_1koh8_42",Xe="_codeTextDisabled_1koh8_47",Ze="_submitBtn_1koh8_50",Ke="_radioSection_1koh8_60",Qe="_radioItem_1koh8_67",m={registerModal:qe,infoTitle:Ve,registerForm:Ue,tips:He,codeText:Je,codeTextDisabled:Xe,submitBtn:Ze,radioSection:Ke,radioItem:Qe},$e=""+new URL("info-title-1f45c1de.png",import.meta.url).href,et=W(),Y=[];for(let p=1;p<=40;p++)Y.push({text:p+"班",value:p});const tt=O({name:"register-modal",props:{schoolId:{type:String,default:""},gradeYear:{type:String,default:""},schoolType:{type:String,default:""}},emits:["close","submit"],setup(p,{emit:r}){const g=q(),s=k(()=>{let n=[];const d=[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5}],c=[{text:"六年级",value:6}],b=[{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}];return p.gradeYear==="FIVE_YEAR_SYSTEM"?n.push([...d]):p.gradeYear==="SIX_YEAR_SYSTEM"?n.push([...d,...c]):p.gradeYear==="THREE_YEAR_SYSTEM"?n.push([...b]):p.gradeYear==="FORE_YEAR_SYSTEM"?n.push([...c,...b]):n.push([...d,...c,...b]),n}),a=B({countDownStatus:!0,countDownTime:1e3*120,modelValue:!1,imgCodeStatus:!1,gradeNumText:"",currentClassText:"",gradeStatus:!1,classStatus:!1,loading:!1}),l=B({autoRegister:!0,client_id:"cooleshow-student",client_secret:"cooleshow-student",extra:{nickname:"",currentGradeNum:"",currentClass:"",gender:1},grant_type:"password",loginType:"SMS",password:"",username:""}),_=()=>{a.countDownStatus=!1,V(()=>{g.value.start()})},C=()=>{if(!P(l.username))return y("请输入正确的手机号码");a.imgCodeStatus=!0},w=k(()=>!!P(l.username)),T=()=>{a.countDownStatus=!0,g.value.reset()},t=async()=>{try{if(i())return;a.loading=!0;const{extra:n,...d}=l,{data:c}=await h.post("/edu-app/userlogin",{hideLoading:!1,requestType:"form",data:{...d,extra:JSON.stringify({...n,schoolId:p.schoolId})}});et.setToken(c.token_type+" "+c.access_token),U(),r("close"),r("submit")}catch(n){}finally{a.loading=!1}},i=()=>{if(l.extra.nickname)if(l.extra.currentGradeNum)if(l.extra.currentClass)if(P(l.username)){if(!l.password)return y("请输入验证码"),!0}else return y("请输入正确的手机号码"),!0;else return y("请选择所在班级"),!0;else return y("请选择所在年级"),!0;else return y("请输入学生姓名"),!0;return!1};return()=>e("div",{class:m.registerModal},[e("img",{src:$e,class:m.infoTitle},null),e(se,{labelAlign:"top",class:m.registerForm},{default:()=>[e(S,{clearable:!0,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:l.extra.nickname,"onUpdate:modelValue":n=>l.extra.nickname=n},null),e(S,{clearable:!0,label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>e(ae,{"checked-color":"#ffcb75",modelValue:l.extra.gender,"onUpdate:modelValue":n=>l.extra.gender=n,direction:"horizontal"},{default:()=>[e(L,{size:"large",type:"primary",color:l.extra.gender!==1?"#EAEAEA":"#ffcb75",textColor:l.extra.gender!==1?"#AAA":"#5B2C03",class:m.radioSection,round:!0},{default:()=>[e(N,{class:m.radioItem,name:1},null),u("男")]}),e(L,{size:"large",type:"primary",color:l.extra.gender!==0?"#EAEAEA":"#ffcb75",textColor:l.extra.gender!==0?"#AAA":"#5B2C03",class:m.radioSection,round:!0},{default:()=>[e(N,{class:m.radioItem,name:0},null),u("女")]})]})}),e(S,{clearable:!0,label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:a.gradeNumText,onClick:()=>a.gradeStatus=!0},null),e(S,{clearable:!0,label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:a.currentClassText,onClick:()=>a.classStatus=!0},null),e(S,{clearable:!0,label:"联系方式(直接监护人)",placeholder:"请输入手机号码",type:"tel",autocomplete:"off",modelValue:l.username,"onUpdate:modelValue":n=>l.username=n,maxlength:11},{label:()=>e("div",null,[u("联系方式"),e("p",{class:m.tips},[u("手机号是音乐数字课堂的唯一登录账户")])])}),e(S,{center:!0,clearable:!0,label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:l.password,"onUpdate:modelValue":n=>l.password=n,maxlength:6},{button:()=>a.countDownStatus?e("span",{class:[m.codeText,w.value?"":m.codeTextDisabled],onClick:C},[u("获取验证码")]):e(ne,{ref:n=>g.value=n,"auto-start":!1,time:a.countDownTime,onFinish:T,format:"ss秒"},null)})]}),e(A,{type:"primary",class:m.submitBtn,color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",block:!0,onClick:t,disabled:a.loading,loading:a.loading},{default:()=>[u("确认")]}),a.imgCodeStatus?e(oe,{value:a.imgCodeStatus,"onUpdate:value":n=>a.imgCodeStatus=n,phone:l.username,onClose:()=>{a.imgCodeStatus=!1},onSendCode:_},null):null,e(F,{show:a.gradeStatus,"onUpdate:show":n=>a.gradeStatus=n,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[e(z,{showToolbar:!0,columns:s.value,onCancel:()=>a.gradeStatus=!1,onConfirm:n=>{const d=n.selectedOptions[0];l.extra.currentGradeNum=d.value,a.gradeNumText=d.text,a.gradeStatus=!1}},null)]}),e(F,{show:a.classStatus,"onUpdate:show":n=>a.classStatus=n,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(z,{showToolbar:!0,columns:Y,onCancel:()=>a.classStatus=!1,onConfirm:n=>{const d=n.selectedOptions[0];l.extra.currentClass=d.value,a.currentClassText=d.text,a.classStatus=!1}},null)]})])}}),At=O({name:"student-register",setup(){const p=H(),r=W(),g=J();r.setShoolId(p.query.sId);const s=B({schoolId:p.query.sId,paymentType:"",popupShow:!1,popupRegister:!1,details:[],schoolType:"",gradeYear:"",bugGoods:!1,submitLoading:!1,dialogStatus:!1,dialogMessage:"",countDownTime:60*1e3,dialogConfig:{},showMore:!0}),a=X({time:s.countDownTime,onChange(t){s.dialogMessage=`有待支付订单,请在${Math.ceil(t.total/1e3)}s后重试`},onFinish(){s.dialogStatus=!1}}),l=async()=>{let t=!1;try{const{data:i}=await h.get("/edu-app/userPaymentOrder/unpaid");if(!i.id)return!1;if(i.cancelPayment)return await h.post("/edu-app/userPaymentOrder/cancelPayment/"+i.orderNo),!1;s.countDownTime=i.cancelTimes,a.reset(Number(i.cancelTimes)),a.start(),s.dialogMessage=`有待支付订单,请在${Math.ceil(a.current.value.total/1e3)}s后重试`,s.dialogStatus=!0,s.dialogConfig=i,t=!0}catch(i){}return t},_=async()=>{try{const{data:t}=await h.get("/edu-app/open/userOrder/registerGoods/"+s.schoolId,{noAuthorization:!0});r.setVip(t.details||[]),s.details=ue(t.details||[]),s.bugGoods=t.bugGoods,s.schoolType=t.schoolType,s.gradeYear=t.gradeYear}catch(t){}},C=k(()=>{let t=0,i=0;return r.getVip.forEach(c=>{t+=Number(c.currentPrice),i+=Number(c.originalPrice)}),r.getGoods.forEach(c=>{t+=Number(c.price)*c.quantity,i+=Number(c.originalPrice)*c.quantity}),{amount:t,originAmount:i}}),w=t=>{Q({message:"是否删除该商品",confirmButtonColor:"#FF8633"}).then(()=>{r.deleteGoods(t.productSkuId)})},T=async()=>{try{s.submitLoading=!0;const t=I.get(G)||"";if(!(await h.post("/edu-app/open/user/verification",{noAuthorization:!0,data:{token:t}})).data){I.remove(G),r.deleteToken(),s.popupRegister=!0;return}if(await l())return;const d=await h.get("/edu-app/userPaymentOrder/registerStatus/"+s.schoolId),c=r.getVip,b=r.getGoods;if(d.data.hasBuyCourse&&c.length>0){setTimeout(()=>{y("您已购买乐器AI学练工具,请勿重复购买")},100);return}const E=[];c.forEach(f=>{E.push({goodsId:f.goodsId,goodsNum:1,goodsType:f.goodsType,paymentCashAmount:f.currentPrice,paymentCouponAmount:0})}),b.forEach(f=>{E.push({goodsId:f.productId,goodsNum:f.quantity,goodsType:"INSTRUMENTS",paymentCashAmount:f.price,paymentCouponAmount:0,goodsSkuId:f.productSkuId})});const{data:x}=await h.post("/edu-app/userPaymentOrder/executeOrder",{hideLoading:!1,data:{paymentType:s.paymentType,bizId:s.schoolId,orderType:"SCHOOL_REGISTER",paymentCashAmount:C.value.amount||0,paymentCouponAmount:0,goodsInfos:E,orderName:"学生登记",orderDesc:"学生登记"}});g.push({path:"/order-detail",query:{pm:1,config:JSON.stringify({...x.paymentConfig,paymentType:x.paymentType}),orderNo:x.orderNo}})}finally{s.submitLoading=!1}};return Z(async()=>{try{const{data:t}=await h.get("/edu-app/open/paramConfig/queryByParamName",{requestType:"form",params:{paramName:"payment_service_provider"}});t.id&&(s.paymentType=t.paramValue||""),_()}catch(t){}}),()=>e("div",{class:o["student-register"]},[e("div",{class:o.studentSection,style:{marginTop:"18px"}},[e("div",{class:o.titleTool},null),s.details.map(t=>e(R,{class:o.goodsSection,onClick:()=>{r.selectedVip(t.goodsId)?r.deleteVip(t.goodsId):r.setVip([t])}},{default:()=>[e(D,{border:!1,class:o.goodsCell},{icon:()=>e(M,{class:o.img,src:t.goodsUrl},null),title:()=>e("div",{class:o.section},[e("div",{class:o.sectionContent},[e("h2",null,[e("img",{src:Ye,class:o.iconDateMember},null)]),e("p",{class:[o.model,s.showMore?o.more:""]},[t.description]),t.description&&t.description.length>=36&&s.showMore?e("span",{class:o.moreBtn,onClick:i=>{i.stopPropagation(),s.showMore=!1}},[u("查看更多"),e(j,{name:"arrow-down",color:"#aaa"},null)]):""]),e("i",{class:r.selectedVip(t.goodsId)?o.selected:o.noSelected},null)])}),e(D,{border:!1,class:o.priceCell},{title:()=>e("div",{class:o.sPriceGroup},[e("div",{class:o.tg},[u("团购价:"),e("span",null,[e("i",null,[u("¥ ")]),v(t.currentPrice)])]),t.currentPrice<t.originalPrice&&e("del",null,[u("¥"),v(t.originalPrice)])])}),t.membershipDays>0&&e(D,{border:!1,class:o.giftCell},{title:()=>e("div",{class:o.gift},[e("img",{src:$,class:o.iconGift},null),u("现在购买赠送 "),e("span",null,[t.membershipDays||0]),u("天有效期")])})]}))]),s.bugGoods&&e(K,null,[e("div",{class:o.studentSection},[e("div",{class:o.titleBuy},null),r.getGoods&&r.getGoods.length<=0?e("div",{class:o.goodsEmpty},[e("img",{src:We,class:o.shopImg},null),e("div",{class:o.goodsContainer},[e("h2",null,[u("为你的"),e("span",null,[u("音乐之旅")]),u("做好准备")]),e("p",{class:o.tips},[u("快去选购乐器吧~")]),e(A,{class:o.goSelect,type:"primary",onClick:()=>{g.push("/goods-list")}},{default:()=>[u("进入商城选购"),e(j,{name:"arrow"},null)]})])]):r.getGoods.map(t=>e(R,{class:o.goodsSection},{default:()=>[e(D,{border:!1,class:o.goodsCell},{icon:()=>e(M,{class:o.img,src:t.pic},null),title:()=>e("div",{class:o.section},[e("div",{class:o.sectionContent},[e("h2",null,[t.name,e(L,{class:o.brandName},{default:()=>[t.brandName]})]),e("p",{class:[o.model]},[u("规格:"),t.spDataJson]),e("p",{class:[o.model]},[t.productSn]),e(ie,{min:1,max:99,modelValue:t.quantity,"onUpdate:modelValue":i=>t.quantity=i},null)]),e("i",{class:o.delete,onClick:()=>w(t)},null)])}),e(D,{border:!1,class:o.priceCell},{title:()=>e("div",{class:o.sPriceGroup},[e("div",{class:o.tg},[u("团购价:"),e("span",null,[e("i",null,[u("¥ ")]),v(t.price)])]),t.price<t.originalPrice&&e("del",null,[u("¥"),v(t.originalPrice)])])})]}))]),r.getGoods&&r.getGoods.length>0&&e(A,{class:o.addButton,block:!0,onClick:()=>{g.push("/goods-list")}},{default:()=>[e(j,{name:"add-o"},null),u("进入商城选购")]})]),e(ee,{position:"bottom"},{default:()=>[e("div",{class:o.paymentContainer},[e("div",{class:o.payemntPrice},[e("span",{class:o.needPrice},[e("i",{style:"font-style: normal"},[u("¥ ")]),e("span",null,[v(C.value.amount)])]),C.value.originAmount>C.value.amount?e("del",{class:o.allPrice},[u("¥ "),v(C.value.originAmount)]):""]),e("div",{class:o.paymentBtn,onClick:()=>{const t=r.getVip,i=r.getGoods;if(t.length<=0&&i.length<=0){setTimeout(()=>{y("请选择需要购买的商品")},100);return}r.getToken?T():s.popupRegister=!0}},[e(A,{disabled:s.submitLoading,loading:s.submitLoading},{default:()=>[u("确认购买")]})])])]}),e(F,{show:s.popupShow,"onUpdate:show":t=>s.popupShow=t,class:o.videoPopup},{default:()=>[s.popupShow&&e(te,{src:"https://daya.ks3-cn-beijing.ksyun.com/202105/SWmqmvW.mp4"},null)]}),e(F,{show:s.popupRegister,"onUpdate:show":t=>s.popupRegister=t,class:o.registerPopup,position:"bottom",round:!0},{default:()=>[e(tt,{schoolId:s.schoolId,schoolType:s.schoolType,gradeYear:s.gradeYear,onClose:()=>s.popupRegister=!1,onSubmit:T},null)]}),e(re,{title:"提示",show:s.dialogStatus,"onUpdate:show":t=>s.dialogStatus=t,message:s.dialogMessage,allowHtml:!0,confirmButtonText:"继续支付",onConfirm:()=>{const t=s.dialogConfig.paymentConfig;g.push({path:"/order-detail",query:{pm:1,config:JSON.stringify(t.paymentConfig),orderNo:t.orderNo}}),a.pause()},onCancel:t=>{a.pause()}},null),e(le,null,null)])}});export{At as default};
- ========
- import{d as O,r as q,e as k,x as B,a as e,A as u,C as A,V as F,z as V,N as P,E as y,D as h,b0 as U,U as H,q as J,ae as X,y as Z,I as j,P as v,F as K,Q,G as I,J as G}from"./index-db3b65ec.js";import{i as $}from"./icon-gift-94736468.js";import{M as ee}from"./index-e730435c.js";import{M as te}from"./index-ddbc9a45.js";import{M as oe}from"./index-31c9b7a0.js";import{u as W}from"./student-register-store-f9044ba5.js";import{F as se}from"./index-767dc13e.js";import{R as ae,a as N}from"./index-4b75500e.js";import{T as L}from"./index-4470ed14.js";import{C as ne,O as le}from"./index-57142fe1.js";import{P as z}from"./index-906061e1.js";import{F as S}from"./index-b6374ce8.js";import{d as ue}from"./deep-clone-c0d00fc2.js";import{O as re}from"./index-81fe0762.js";import{C as R}from"./index-cfef3a6f.js";import{C as D}from"./index-38badaed.js";import{S as ie}from"./index-9edb1478.js";import{I as M}from"./index-7d32d363.js";import"./index-82a211b0.js";/* empty css */import"./index-77b5cc86.js";import"./Checker-c908b6b7.js";const ce="_studentSection_1jl6o_7",de="_goodsSection_1jl6o_25",pe="_titleTool_1jl6o_36",me="_titleBuy_1jl6o_45",ge="_goodsCell_1jl6o_52",fe="_noSelected_1jl6o_57",he="_selected_1jl6o_58",ye="_img_1jl6o_78",Ce="_brandName_1jl6o_93",ve="_iconDateMember_1jl6o_104",Se="_model_1jl6o_108",be="_more_1jl6o_118",De="_moreBtn_1jl6o_122",Te="_sbtnGroup_1jl6o_129",Ae="_btnDetail_1jl6o_141",Fe="_btnVideo_1jl6o_142",_e="_priceCell_1jl6o_182",we="_sPriceGroup_1jl6o_185",Ee="_tg_1jl6o_193",xe="_giftCell_1jl6o_217",Pe="_gift_1jl6o_217",je="_iconGift_1jl6o_235",ke="_goodsEmpty_1jl6o_240",Be="_shopImg_1jl6o_248",Le="_goodsContainer_1jl6o_252",Ie="_tips_1jl6o_262",Ge="_goSelect_1jl6o_267",Ne="_addButton_1jl6o_286",ze="_paymentContainer_1jl6o_306",Re="_needPrice_1jl6o_316",Me="_allPrice_1jl6o_329",Oe="_videoPopup_1jl6o_349",o={"student-register":"_student-register_1jl6o_1",studentSection:ce,goodsSection:de,titleTool:pe,titleBuy:me,goodsCell:ge,noSelected:fe,selected:he,delete:"_delete_1jl6o_59",img:ye,brandName:Ce,iconDateMember:ve,model:Se,more:be,moreBtn:De,sbtnGroup:Te,btnDetail:Ae,btnVideo:Fe,priceCell:_e,sPriceGroup:we,tg:Ee,giftCell:xe,gift:Pe,iconGift:je,goodsEmpty:ke,shopImg:Be,goodsContainer:Le,tips:Ie,goSelect:Ge,addButton:Ne,paymentContainer:ze,needPrice:Re,allPrice:Me,videoPopup:Oe},We=""+new URL("shop-empty-6c02d334.png",import.meta.url).href,Ye="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAAoCAMAAACrbMTGAAAC+lBMVEX/exv/gCT/1n7/uF3/t13/p0v/03v/uF//1X3/umD/hyf/03z/wGb/w2r/vGL/vmT/x27/v2X/q1H/0nn/u2IAAAD/yG//0Hf/wWj/14D/xGv/z3f/ynD/rlT/zXT/13//x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PFWhIxqgDnKW+svqMf2FarDqsLIVCyyLS0umhZM5IR2cc9x33sRz5QtIhWZ4wP8GMwzER5WBC0yCwIvX/y1I4vNSoz6fN6TOapk0s52vnavEFjL3cXs2dN7h9/jYWR3b+1nOy9LnV7Zf6lxKljd9nTxG/N0rP74ivkYob+XOnhvxG8cwr+cVfqe1X/jK4evkqFgIRA8sZ6/j8ydDnf7WVznw1v6rdLhUvtF04CqTbsI7P886cDH2xtP381en/cv00/jnEH9aeodnklrpXAAAAAElFTkSuQmCC",qe="_registerModal_1koh8_1",Ve="_infoTitle_1koh8_7",Ue="_registerForm_1koh8_13",He="_tips_1koh8_20",Je="_codeText_1koh8_42",Xe="_codeTextDisabled_1koh8_47",Ze="_submitBtn_1koh8_50",Ke="_radioSection_1koh8_60",Qe="_radioItem_1koh8_67",m={registerModal:qe,infoTitle:Ve,registerForm:Ue,tips:He,codeText:Je,codeTextDisabled:Xe,submitBtn:Ze,radioSection:Ke,radioItem:Qe},$e=""+new URL("info-title-1f45c1de.png",import.meta.url).href,et=W(),Y=[];for(let p=1;p<=40;p++)Y.push({text:p+"班",value:p});const tt=O({name:"register-modal",props:{schoolId:{type:String,default:""},gradeYear:{type:String,default:""},schoolType:{type:String,default:""}},emits:["close","submit"],setup(p,{emit:r}){const g=q(),s=k(()=>{let n=[];const d=[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5}],c=[{text:"六年级",value:6}],b=[{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}];return p.gradeYear==="FIVE_YEAR_SYSTEM"?n.push([...d]):p.gradeYear==="SIX_YEAR_SYSTEM"?n.push([...d,...c]):p.gradeYear==="THREE_YEAR_SYSTEM"?n.push([...b]):p.gradeYear==="FORE_YEAR_SYSTEM"?n.push([...c,...b]):n.push([...d,...c,...b]),n}),a=B({countDownStatus:!0,countDownTime:1e3*120,modelValue:!1,imgCodeStatus:!1,gradeNumText:"",currentClassText:"",gradeStatus:!1,classStatus:!1,loading:!1}),l=B({autoRegister:!0,client_id:"cooleshow-student",client_secret:"cooleshow-student",extra:{nickname:"",currentGradeNum:"",currentClass:"",gender:1},grant_type:"password",loginType:"SMS",password:"",username:""}),_=()=>{a.countDownStatus=!1,V(()=>{g.value.start()})},C=()=>{if(!P(l.username))return y("请输入正确的手机号码");a.imgCodeStatus=!0},w=k(()=>!!P(l.username)),T=()=>{a.countDownStatus=!0,g.value.reset()},t=async()=>{try{if(i())return;a.loading=!0;const{extra:n,...d}=l,{data:c}=await h.post("/edu-app/userlogin",{hideLoading:!1,requestType:"form",data:{...d,extra:JSON.stringify({...n,schoolId:p.schoolId})}});et.setToken(c.token_type+" "+c.access_token),U(),r("close"),r("submit")}catch(n){}finally{a.loading=!1}},i=()=>{if(l.extra.nickname)if(l.extra.currentGradeNum)if(l.extra.currentClass)if(P(l.username)){if(!l.password)return y("请输入验证码"),!0}else return y("请输入正确的手机号码"),!0;else return y("请选择所在班级"),!0;else return y("请选择所在年级"),!0;else return y("请输入学生姓名"),!0;return!1};return()=>e("div",{class:m.registerModal},[e("img",{src:$e,class:m.infoTitle},null),e(se,{labelAlign:"top",class:m.registerForm},{default:()=>[e(S,{clearable:!0,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:l.extra.nickname,"onUpdate:modelValue":n=>l.extra.nickname=n},null),e(S,{clearable:!0,label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>e(ae,{"checked-color":"#ffcb75",modelValue:l.extra.gender,"onUpdate:modelValue":n=>l.extra.gender=n,direction:"horizontal"},{default:()=>[e(L,{size:"large",type:"primary",color:l.extra.gender!==1?"#EAEAEA":"#ffcb75",textColor:l.extra.gender!==1?"#AAA":"#5B2C03",class:m.radioSection,round:!0},{default:()=>[e(N,{class:m.radioItem,name:1},null),u("男")]}),e(L,{size:"large",type:"primary",color:l.extra.gender!==0?"#EAEAEA":"#ffcb75",textColor:l.extra.gender!==0?"#AAA":"#5B2C03",class:m.radioSection,round:!0},{default:()=>[e(N,{class:m.radioItem,name:0},null),u("女")]})]})}),e(S,{clearable:!0,label:"所在年级",placeholder:"请选择年级",isLink:!0,readonly:!0,clickable:!1,modelValue:a.gradeNumText,onClick:()=>a.gradeStatus=!0},null),e(S,{clearable:!0,label:"所在班级",placeholder:"请选择班级",isLink:!0,readonly:!0,clickable:!1,modelValue:a.currentClassText,onClick:()=>a.classStatus=!0},null),e(S,{clearable:!0,label:"联系方式(直接监护人)",placeholder:"请输入手机号码",type:"tel",autocomplete:"off",modelValue:l.username,"onUpdate:modelValue":n=>l.username=n,maxlength:11},{label:()=>e("div",null,[u("联系方式"),e("p",{class:m.tips},[u("手机号是音乐数字课堂的唯一登录账户")])])}),e(S,{center:!0,clearable:!0,label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:l.password,"onUpdate:modelValue":n=>l.password=n,maxlength:6},{button:()=>a.countDownStatus?e("span",{class:[m.codeText,w.value?"":m.codeTextDisabled],onClick:C},[u("获取验证码")]):e(ne,{ref:n=>g.value=n,"auto-start":!1,time:a.countDownTime,onFinish:T,format:"ss秒"},null)})]}),e(A,{type:"primary",class:m.submitBtn,color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",block:!0,onClick:t,disabled:a.loading,loading:a.loading},{default:()=>[u("确认")]}),a.imgCodeStatus?e(oe,{value:a.imgCodeStatus,"onUpdate:value":n=>a.imgCodeStatus=n,phone:l.username,onClose:()=>{a.imgCodeStatus=!1},onSendCode:_},null):null,e(F,{show:a.gradeStatus,"onUpdate:show":n=>a.gradeStatus=n,position:"bottom",round:!0,safeAreaInsetBottom:!0,lazyRender:!1,class:"popupBottomSearch"},{default:()=>[e(z,{showToolbar:!0,columns:s.value,onCancel:()=>a.gradeStatus=!1,onConfirm:n=>{const d=n.selectedOptions[0];l.extra.currentGradeNum=d.value,a.gradeNumText=d.text,a.gradeStatus=!1}},null)]}),e(F,{show:a.classStatus,"onUpdate:show":n=>a.classStatus=n,position:"bottom",round:!0,class:"popupBottomSearch"},{default:()=>[e(z,{showToolbar:!0,columns:Y,onCancel:()=>a.classStatus=!1,onConfirm:n=>{const d=n.selectedOptions[0];l.extra.currentClass=d.value,a.currentClassText=d.text,a.classStatus=!1}},null)]})])}}),At=O({name:"student-register",setup(){const p=H(),r=W(),g=J();r.setShoolId(p.query.sId);const s=B({schoolId:p.query.sId,paymentType:"",popupShow:!1,popupRegister:!1,details:[],schoolType:"",gradeYear:"",bugGoods:!1,submitLoading:!1,dialogStatus:!1,dialogMessage:"",countDownTime:60*1e3,dialogConfig:{},showMore:!0}),a=X({time:s.countDownTime,onChange(t){s.dialogMessage=`有待支付订单,请在${Math.ceil(t.total/1e3)}s后重试`},onFinish(){s.dialogStatus=!1}}),l=async()=>{let t=!1;try{const{data:i}=await h.get("/edu-app/userPaymentOrder/unpaid");if(!i.id)return!1;if(i.cancelPayment)return await h.post("/edu-app/userPaymentOrder/cancelPayment/"+i.orderNo),!1;s.countDownTime=i.cancelTimes,a.reset(Number(i.cancelTimes)),a.start(),s.dialogMessage=`有待支付订单,请在${Math.ceil(a.current.value.total/1e3)}s后重试`,s.dialogStatus=!0,s.dialogConfig=i,t=!0}catch(i){}return t},_=async()=>{try{const{data:t}=await h.get("/edu-app/open/userOrder/registerGoods/"+s.schoolId,{noAuthorization:!0});r.setVip(t.details||[]),s.details=ue(t.details||[]),s.bugGoods=t.bugGoods,s.schoolType=t.schoolType,s.gradeYear=t.gradeYear}catch(t){}},C=k(()=>{let t=0,i=0;return r.getVip.forEach(c=>{t+=Number(c.currentPrice),i+=Number(c.originalPrice)}),r.getGoods.forEach(c=>{t+=Number(c.price)*c.quantity,i+=Number(c.originalPrice)*c.quantity}),{amount:t,originAmount:i}}),w=t=>{Q({message:"是否删除该商品",confirmButtonColor:"#FF8633"}).then(()=>{r.deleteGoods(t.productSkuId)})},T=async()=>{try{s.submitLoading=!0;const t=I.get(G)||"";if(!(await h.post("/edu-app/open/user/verification",{noAuthorization:!0,data:{token:t}})).data){I.remove(G),r.deleteToken(),s.popupRegister=!0;return}if(await l())return;const d=await h.get("/edu-app/userPaymentOrder/registerStatus/"+s.schoolId),c=r.getVip,b=r.getGoods;if(d.data.hasBuyCourse&&c.length>0){setTimeout(()=>{y("您已购买乐器AI学练工具,请勿重复购买")},100);return}const E=[];c.forEach(f=>{E.push({goodsId:f.goodsId,goodsNum:1,goodsType:f.goodsType,paymentCashAmount:f.currentPrice,paymentCouponAmount:0})}),b.forEach(f=>{E.push({goodsId:f.productId,goodsNum:f.quantity,goodsType:"INSTRUMENTS",paymentCashAmount:f.price,paymentCouponAmount:0,goodsSkuId:f.productSkuId})});const{data:x}=await h.post("/edu-app/userPaymentOrder/executeOrder",{hideLoading:!1,data:{paymentType:s.paymentType,bizId:s.schoolId,orderType:"SCHOOL_REGISTER",paymentCashAmount:C.value.amount||0,paymentCouponAmount:0,goodsInfos:E,orderName:"学生登记",orderDesc:"学生登记"}});g.push({path:"/order-detail",query:{pm:1,config:JSON.stringify({...x.paymentConfig,paymentType:x.paymentType}),orderNo:x.orderNo}})}finally{s.submitLoading=!1}};return Z(async()=>{try{const{data:t}=await h.get("/edu-app/open/paramConfig/queryByParamName",{requestType:"form",params:{paramName:"payment_service_provider"}});t.id&&(s.paymentType=t.paramValue||""),_()}catch(t){}}),()=>e("div",{class:o["student-register"]},[e("div",{class:o.studentSection,style:{marginTop:"18px"}},[e("div",{class:o.titleTool},null),s.details.map(t=>e(R,{class:o.goodsSection,onClick:()=>{r.selectedVip(t.goodsId)?r.deleteVip(t.goodsId):r.setVip([t])}},{default:()=>[e(D,{border:!1,class:o.goodsCell},{icon:()=>e(M,{class:o.img,src:t.goodsUrl},null),title:()=>e("div",{class:o.section},[e("div",{class:o.sectionContent},[e("h2",null,[e("img",{src:Ye,class:o.iconDateMember},null)]),e("p",{class:[o.model,s.showMore?o.more:""]},[t.description]),t.description&&t.description.length>=36&&s.showMore?e("span",{class:o.moreBtn,onClick:i=>{i.stopPropagation(),s.showMore=!1}},[u("查看更多"),e(j,{name:"arrow-down",color:"#aaa"},null)]):""]),e("i",{class:r.selectedVip(t.goodsId)?o.selected:o.noSelected},null)])}),e(D,{border:!1,class:o.priceCell},{title:()=>e("div",{class:o.sPriceGroup},[e("div",{class:o.tg},[u("团购价:"),e("span",null,[e("i",null,[u("¥ ")]),v(t.currentPrice)])]),t.currentPrice<t.originalPrice&&e("del",null,[u("¥"),v(t.originalPrice)])])}),t.membershipDays>0&&e(D,{border:!1,class:o.giftCell},{title:()=>e("div",{class:o.gift},[e("img",{src:$,class:o.iconGift},null),u("现在购买赠送 "),e("span",null,[t.membershipDays||0]),u("天有效期")])})]}))]),s.bugGoods&&e(K,null,[e("div",{class:o.studentSection},[e("div",{class:o.titleBuy},null),r.getGoods&&r.getGoods.length<=0?e("div",{class:o.goodsEmpty},[e("img",{src:We,class:o.shopImg},null),e("div",{class:o.goodsContainer},[e("h2",null,[u("为你的"),e("span",null,[u("音乐之旅")]),u("做好准备")]),e("p",{class:o.tips},[u("快去选购乐器吧~")]),e(A,{class:o.goSelect,type:"primary",onClick:()=>{g.push("/goods-list")}},{default:()=>[u("进入商城选购"),e(j,{name:"arrow"},null)]})])]):r.getGoods.map(t=>e(R,{class:o.goodsSection},{default:()=>[e(D,{border:!1,class:o.goodsCell},{icon:()=>e(M,{class:o.img,src:t.pic},null),title:()=>e("div",{class:o.section},[e("div",{class:o.sectionContent},[e("h2",null,[t.name,e(L,{class:o.brandName},{default:()=>[t.brandName]})]),e("p",{class:[o.model]},[u("规格:"),t.spDataJson]),e("p",{class:[o.model]},[t.productSn]),e(ie,{min:1,max:99,modelValue:t.quantity,"onUpdate:modelValue":i=>t.quantity=i},null)]),e("i",{class:o.delete,onClick:()=>w(t)},null)])}),e(D,{border:!1,class:o.priceCell},{title:()=>e("div",{class:o.sPriceGroup},[e("div",{class:o.tg},[u("团购价:"),e("span",null,[e("i",null,[u("¥ ")]),v(t.price)])]),t.price<t.originalPrice&&e("del",null,[u("¥"),v(t.originalPrice)])])})]}))]),r.getGoods&&r.getGoods.length>0&&e(A,{class:o.addButton,block:!0,onClick:()=>{g.push("/goods-list")}},{default:()=>[e(j,{name:"add-o"},null),u("进入商城选购")]})]),e(ee,{position:"bottom"},{default:()=>[e("div",{class:o.paymentContainer},[e("div",{class:o.payemntPrice},[e("span",{class:o.needPrice},[e("i",{style:"font-style: normal"},[u("¥ ")]),e("span",null,[v(C.value.amount)])]),C.value.originAmount>C.value.amount?e("del",{class:o.allPrice},[u("¥ "),v(C.value.originAmount)]):""]),e("div",{class:o.paymentBtn,onClick:()=>{const t=r.getVip,i=r.getGoods;if(t.length<=0&&i.length<=0){setTimeout(()=>{y("请选择需要购买的商品")},100);return}r.getToken?T():s.popupRegister=!0}},[e(A,{disabled:s.submitLoading,loading:s.submitLoading},{default:()=>[u("确认购买")]})])])]}),e(F,{show:s.popupShow,"onUpdate:show":t=>s.popupShow=t,class:o.videoPopup},{default:()=>[s.popupShow&&e(te,{src:"https://daya.ks3-cn-beijing.ksyun.com/202105/SWmqmvW.mp4"},null)]}),e(F,{show:s.popupRegister,"onUpdate:show":t=>s.popupRegister=t,class:o.registerPopup,position:"bottom",round:!0},{default:()=>[e(tt,{schoolId:s.schoolId,schoolType:s.schoolType,gradeYear:s.gradeYear,onClose:()=>s.popupRegister=!1,onSubmit:T},null)]}),e(re,{title:"提示",show:s.dialogStatus,"onUpdate:show":t=>s.dialogStatus=t,message:s.dialogMessage,allowHtml:!0,confirmButtonText:"继续支付",onConfirm:()=>{const t=s.dialogConfig.paymentConfig;g.push({path:"/order-detail",query:{pm:1,config:JSON.stringify(t.paymentConfig),orderNo:t.orderNo}}),a.pause()},onCancel:t=>{a.pause()}},null),e(le,null,null)])}});export{At as default};
- >>>>>>>> temp-register:dist/assets/index-6e2eb8dc.js
|