index-4a2e074a.js 20 KB

1
  1. import{d as O,r as V,e as k,x as B,a as e,A as r,C as T,V as F,z as U,N as P,E as y,D as h,a$ as H,U as J,q as X,ai as Z,y as K,I as j,P as v,F as Q,Q as $,G as I,J as G}from"./index-9cdd7dec.js";import{i as ee}from"./icon-gift-94736468.js";import{M as te}from"./index-b827e10a.js";import{M as oe}from"./index-0b1fa8d8.js";import{M as se}from"./index-27984e21.js";import{u as W}from"./student-register-store-52fd1003.js";import{F as ae}from"./index-7e42fd24.js";import{R as ne,a as N}from"./index-a1b7df06.js";import{T as L}from"./index-c028787a.js";import{C as le,O as ue}from"./index-f7c8058a.js";import{P as z}from"./index-e87fe0da.js";import{F as S}from"./index-2590bb23.js";import{O as re}from"./index-d5d38411.js";import{C as R}from"./index-0eb800fe.js";import{C as b}from"./index-f3d1468b.js";import{S as ie}from"./index-8fefe589.js";import{I as M}from"./index-229868b6.js";import"./index-1400b111.js";/* empty css */import"./index-ea9f1c37.js";import"./Checker-10afc597.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",De="_more_1jl6o_118",be="_moreBtn_1jl6o_122",Ae="_sbtnGroup_1jl6o_129",Te="_btnDetail_1jl6o_141",Fe="_btnVideo_1jl6o_142",_e="_priceCell_1jl6o_182",Ee="_sPriceGroup_1jl6o_185",we="_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:De,moreBtn:be,sbtnGroup:Ae,btnDetail:Te,btnVideo:Fe,priceCell:_e,sPriceGroup:Ee,tg:we,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//kzXvoVL+xW3XZSXecy7um0zheDH/umD4pU7+qE3/r1TRWB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lvC2JuBi1YekpUPspCFmnmIuBwiEPqmFz709ydG+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",g={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 i=1;i<=40;i++)Y.push({text:i+"班",value:i});const tt=O({name:"register-modal",props:{schoolId:{type:String,default:""},gradeYear:{type:String,default:""},schoolType:{type:String,default:""}},emits:["close","submit"],setup(i,{emit:l}){const m=V(),s=k(()=>{let n=[];const p=[{text:"一年级",value:1},{text:"二年级",value:2},{text:"三年级",value:3},{text:"四年级",value:4},{text:"五年级",value:5}],d=[{text:"六年级",value:6}],D=[{text:"七年级",value:7},{text:"八年级",value:8},{text:"九年级",value:9}];return i.gradeYear==="FIVE_YEAR_SYSTEM"?n.push([...p]):i.gradeYear==="SIX_YEAR_SYSTEM"?n.push([...p,...d]):i.gradeYear==="THREE_YEAR_SYSTEM"?n.push([...D]):i.gradeYear==="FORE_YEAR_SYSTEM"?n.push([...d,...D]):n.push([...p,...d,...D]),n}),a=B({countDownStatus:!0,countDownTime:1e3*120,modelValue:!1,imgCodeStatus:!1,gradeNumText:"",currentClassText:"",gradeStatus:!1,classStatus:!1,loading:!1}),u=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,U(()=>{m.value.start()})},C=()=>{if(!P(u.username))return y("请输入正确的手机号码");a.imgCodeStatus=!0},E=k(()=>!!P(u.username)),A=()=>{a.countDownStatus=!0,m.value.reset()},t=async()=>{try{if(c())return;a.loading=!0;const{extra:n,...p}=u,{data:d}=await h.post("/edu-app/userlogin",{hideLoading:!1,requestType:"form",data:{...p,extra:JSON.stringify({...n,schoolId:i.schoolId})}});et.setToken(d.token_type+" "+d.access_token),H(),l("close"),l("submit")}catch(n){}finally{a.loading=!1}},c=()=>{if(u.extra.nickname)if(u.extra.currentGradeNum)if(u.extra.currentClass)if(P(u.username)){if(!u.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:g.registerModal},[e("img",{src:$e,class:g.infoTitle},null),e(ae,{labelAlign:"top",class:g.registerForm},{default:()=>[e(S,{clearable:!0,label:"学生姓名",placeholder:"请输入学生姓名",autocomplete:"off",maxlength:14,modelValue:u.extra.nickname,"onUpdate:modelValue":n=>u.extra.nickname=n},null),e(S,{clearable:!0,label:"学生性别",placeholder:"请选择性别",autocomplete:"off"},{input:()=>e(ne,{"checked-color":"#ffcb75",modelValue:u.extra.gender,"onUpdate:modelValue":n=>u.extra.gender=n,direction:"horizontal"},{default:()=>[e(L,{size:"large",type:"primary",color:u.extra.gender!==1?"#EAEAEA":"#ffcb75",textColor:u.extra.gender!==1?"#AAA":"#5B2C03",class:g.radioSection,round:!0},{default:()=>[e(N,{class:g.radioItem,name:1},null),r("男")]}),e(L,{size:"large",type:"primary",color:u.extra.gender!==0?"#EAEAEA":"#ffcb75",textColor:u.extra.gender!==0?"#AAA":"#5B2C03",class:g.radioSection,round:!0},{default:()=>[e(N,{class:g.radioItem,name:0},null),r("女")]})]})}),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:u.username,"onUpdate:modelValue":n=>u.username=n,maxlength:11},{label:()=>e("div",null,[r("联系方式"),e("p",{class:g.tips},[r("手机号是音乐数字课堂的唯一登录账户")])])}),e(S,{center:!0,clearable:!0,label:"验证码",placeholder:"请输入验证码",autocomplete:"off",type:"number",modelValue:u.password,"onUpdate:modelValue":n=>u.password=n,maxlength:6},{button:()=>a.countDownStatus?e("span",{class:[g.codeText,E.value?"":g.codeTextDisabled],onClick:C},[r("获取验证码")]):e(le,{ref:n=>m.value=n,"auto-start":!1,time:a.countDownTime,onFinish:A,format:"ss秒"},null)})]}),e(T,{type:"primary",class:g.submitBtn,color:"linear-gradient(121deg, #FFD892 0%, #FFCB75 100%)",block:!0,onClick:t,disabled:a.loading,loading:a.loading},{default:()=>[r("确认")]}),a.imgCodeStatus?e(se,{value:a.imgCodeStatus,"onUpdate:value":n=>a.imgCodeStatus=n,phone:u.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 p=n.selectedOptions[0];u.extra.currentGradeNum=p.value,a.gradeNumText=p.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 p=n.selectedOptions[0];u.extra.currentClass=p.value,a.currentClassText=p.text,a.classStatus=!1}},null)]})])}}),q=i=>{if(i===null)return null;const l=Object.assign({},i);return Object.keys(l).forEach(m=>l[m]=typeof i[m]=="object"?q(i[m]):i[m]),Array.isArray(i)?(l.length=i.length,Array.from(l)):l},At=O({name:"student-register",setup(){const i=J(),l=W(),m=X();l.setShoolId(i.query.sId);const s=B({schoolId:i.query.sId,paymentType:"",popupShow:!1,popupRegister:!1,details:[],schoolType:"",gradeYear:"",bugGoods:!1,submitLoading:!1,dialogStatus:!1,dialogMessage:"",countDownTime:60*1e3,dialogConfig:{},showMore:!0}),a=Z({time:s.countDownTime,onChange(t){s.dialogMessage=`有待支付订单,请在${Math.ceil(t.total/1e3)}s后重试`},onFinish(){s.dialogStatus=!1}}),u=async()=>{let t=!1;try{const{data:c}=await h.get("/edu-app/userPaymentOrder/unpaid");if(!c.id)return!1;if(c.cancelPayment)return await h.post("/edu-app/userPaymentOrder/cancelPayment/"+c.orderNo),!1;s.countDownTime=c.cancelTimes,a.reset(Number(c.cancelTimes)),a.start(),s.dialogMessage=`有待支付订单,请在${Math.ceil(a.current.value.total/1e3)}s后重试`,s.dialogStatus=!0,s.dialogConfig=c,t=!0}catch(c){}return t},_=async()=>{try{const{data:t}=await h.get("/edu-app/open/userOrder/registerGoods/"+s.schoolId,{noAuthorization:!0});l.setVip(t.details||[]),s.details=q(t.details||[]),s.bugGoods=t.bugGoods,s.schoolType=t.schoolType,s.gradeYear=t.gradeYear}catch(t){}},C=k(()=>{let t=0,c=0;return l.getVip.forEach(d=>{t+=Number(d.currentPrice),c+=Number(d.originalPrice)}),l.getGoods.forEach(d=>{t+=Number(d.price)*d.quantity,c+=Number(d.originalPrice)*d.quantity}),{amount:t,originAmount:c}}),E=t=>{$({message:"是否删除该商品",confirmButtonColor:"#FF8633"}).then(()=>{l.deleteGoods(t.productSkuId)})},A=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),l.deleteToken(),s.popupRegister=!0;return}if(await u())return;const p=await h.get("/edu-app/userPaymentOrder/registerStatus/"+s.schoolId),d=l.getVip,D=l.getGoods;if(p.data.hasBuyCourse&&d.length>0){setTimeout(()=>{y("您已购买乐器AI学练工具,请勿重复购买")},100);return}const w=[];d.forEach(f=>{w.push({goodsId:f.goodsId,goodsNum:1,goodsType:f.goodsType,paymentCashAmount:f.currentPrice,paymentCouponAmount:0})}),D.forEach(f=>{w.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:w,orderName:"学生登记",orderDesc:"学生登记"}});m.push({path:"/order-detail",query:{pm:1,config:JSON.stringify({...x.paymentConfig,paymentType:x.paymentType}),orderNo:x.orderNo}})}finally{s.submitLoading=!1}};return K(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:()=>{l.selectedVip(t.goodsId)?l.deleteVip(t.goodsId):l.setVip([t])}},{default:()=>[e(b,{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:c=>{c.stopPropagation(),s.showMore=!1}},[r("查看更多"),e(j,{name:"arrow-down",color:"#aaa"},null)]):""]),e("i",{class:l.selectedVip(t.goodsId)?o.selected:o.noSelected},null)])}),e(b,{border:!1,class:o.priceCell},{title:()=>e("div",{class:o.sPriceGroup},[e("div",{class:o.tg},[r("团购价:"),e("span",null,[e("i",null,[r("¥ ")]),v(t.currentPrice)])]),t.currentPrice<t.originalPrice&&e("del",null,[r("¥"),v(t.originalPrice)])])}),t.membershipDays>0&&e(b,{border:!1,class:o.giftCell},{title:()=>e("div",{class:o.gift},[e("img",{src:ee,class:o.iconGift},null),r("现在购买赠送 "),e("span",null,[t.membershipDays||0]),r("天有效期")])})]}))]),s.bugGoods&&e(Q,null,[e("div",{class:o.studentSection},[e("div",{class:o.titleBuy},null),l.getGoods&&l.getGoods.length<=0?e("div",{class:o.goodsEmpty},[e("img",{src:We,class:o.shopImg},null),e("div",{class:o.goodsContainer},[e("h2",null,[r("为你的"),e("span",null,[r("音乐之旅")]),r("做好准备")]),e("p",{class:o.tips},[r("快去选购乐器吧~")]),e(T,{class:o.goSelect,type:"primary",onClick:()=>{m.push("/goods-list")}},{default:()=>[r("进入商城选购"),e(j,{name:"arrow"},null)]})])]):l.getGoods.map(t=>e(R,{class:o.goodsSection},{default:()=>[e(b,{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]},[r("规格:"),t.spDataJson]),e("p",{class:[o.model]},[t.productSn]),e(ie,{min:1,max:99,modelValue:t.quantity,"onUpdate:modelValue":c=>t.quantity=c},null)]),e("i",{class:o.delete,onClick:()=>E(t)},null)])}),e(b,{border:!1,class:o.priceCell},{title:()=>e("div",{class:o.sPriceGroup},[e("div",{class:o.tg},[r("团购价:"),e("span",null,[e("i",null,[r("¥ ")]),v(t.price)])]),t.price<t.originalPrice&&e("del",null,[r("¥"),v(t.originalPrice)])])})]}))]),l.getGoods&&l.getGoods.length>0&&e(T,{class:o.addButton,block:!0,onClick:()=>{m.push("/goods-list")}},{default:()=>[e(j,{name:"add-o"},null),r("进入商城选购")]})]),e(te,{position:"bottom"},{default:()=>[e("div",{class:o.paymentContainer},[e("div",{class:o.payemntPrice},[e("span",{class:o.needPrice},[e("i",{style:"font-style: normal"},[r("¥ ")]),e("span",null,[v(C.value.amount)])]),C.value.originAmount>C.value.amount?e("del",{class:o.allPrice},[r("¥ "),v(C.value.originAmount)]):""]),e("div",{class:o.paymentBtn,onClick:()=>{const t=l.getVip,c=l.getGoods;if(t.length<=0&&c.length<=0){setTimeout(()=>{y("请选择需要购买的商品")},100);return}l.getToken?A():s.popupRegister=!0}},[e(T,{disabled:s.submitLoading,loading:s.submitLoading},{default:()=>[r("确认购买")]})])])]}),e(F,{show:s.popupShow,"onUpdate:show":t=>s.popupShow=t,class:o.videoPopup},{default:()=>[s.popupShow&&e(oe,{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:A},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;m.push({path:"/order-detail",query:{pm:1,config:JSON.stringify(t.paymentConfig),orderNo:t.orderNo}}),a.pause()},onCancel:t=>{a.pause()}},null),e(ue,null,null)])}});export{At as default};