index-83258b65.js 6.3 KB

1
  1. import{d as _,O as D,i as E,o as S,f as u,g as o,h as t,F as l,B as m,P as w,W as U,a as C,e as f,y as v,N as O}from"./index-1d4a9afa.js";import{E as c}from"./constant-a400d214.js";import{C as T,I as Y}from"./index-a934fb09.js";import{C as I}from"./index-b8090118.js";import{C as M}from"./index-a27d7671.js";import{F as i}from"./index-dbc03ded.js";import"./index-fd6c1051.js";import"./index-c272bcfa.js";const P="_codeText_1tajy_4",N="_banner_1tajy_7",x="_bannerContainer_1tajy_14",V="_bannerTitle_1tajy_19",z="_bannerSchool_1tajy_25",H="_iconSchool_1tajy_31",L="_schoolName_1tajy_38",R="_required_1tajy_44",Z="_tips_1tajy_60",q="_iconTips_1tajy_71",k="_popup_1tajy_76",G="_popupContainer_1tajy_82",K="_popupContent_1tajy_94",Q="_popupBtn_1tajy_103",X="_bannerPopup_1tajy_110",n={"school-register":"_school-register_1tajy_1",codeText:P,banner:N,bannerContainer:x,bannerTitle:V,bannerSchool:z,iconSchool:H,schoolName:L,required:R,tips:Z,iconTips:q,popup:k,popupContainer:G,popupContent:K,popupBtn:Q,bannerPopup:X},W=""+new URL("banner-b102b79e.png",import.meta.url).href,J="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAAZlBMVEUAAAALkHoOjnYNj3UOjnYOjnYOjnYOjncOjnYPjnMOjXYNjnYNjnYOjnYPjHQMj3YAk3ENj3YOjnYOjnYPjnYOjnYOkHQOjnYNj3cPjnYOjnUNkHYOj3YOj3cNj3gOj3cOjnYOjnb8Wfe0AAAAIXRSTlMAF5Y88OCy8eIcwvnotR9QCKrsu1auEtmZi4NfWUdBoaAwesabAAAA0UlEQVQ4y83RW26DMBBAUZOYocamNhDIO+3d/ybrBvXlYFDVn94vj+YIjYT6WdG2hVro0kF3ya4L4Z5kPnLWwDAA3XlmbRrA7ZTaOaAx6f6qgXacDgX0NQF7cP5j8A72Cahw49c0dugHUH4fn34DzFDHbApsHWtN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3OxZPrVRzTdIiBl7Z8+oaVUPfEA8uon71VARZcxoOfnj1k9Arve7xb2bUf++gr/3zibmmei/OpTrROUQYjECz/Hzoafd7m99ds1TRVWxs0vv8n09dwAyYqkL0AAAAASUVORK5CYII=",ee=""+new URL("banner-popup-e91718c1.png",import.meta.url).href,ce=_({name:"school-register",setup(){const p=U(),g=O(),e=D({id:p.query.id,imgCodeStatus:!1,type:p.query.type||"",username:"",nameReg:/^[\u4E00-\u9FA5]+$/,phone:"",isAgree:!1,smsCode:"",registerStatus:!1,countDownStatus:!0,schoolDetail:{},countDownTime:1e3*120}),r=E(),h=async()=>{try{const{data:a}=await C.get("/api-web/open/school/cooperation",{params:{id:e.id}});e.schoolDetail=a||{}}catch(a){}},b=async()=>{if(!e.username){u("请输入真实姓名");return}if(!e.nameReg.test(e.username)){u("姓名必须为中文");return}if(!f(e.phone)){u("请输入正确的手机号");return}if(!e.smsCode){u("请输入验证码");return}try{(await C.post("/api-web/open/school/staffSave",{hideLoading:!1,data:{schoolId:e.id,userType:e.type,username:e.username,mobile:e.phone,smsCode:e.smsCode}})).code===999?setTimeout(()=>{u("您已注册")},100):e.registerStatus=!0}catch(a){}},j=()=>{e.registerStatus=!1,g.push("/download")},y=()=>{e.countDownStatus=!1,v(()=>{r.value.start()})},F=()=>{if(!f(e.phone))return u("请输入正确的手机号码");e.imgCodeStatus=!0},B=()=>{e.countDownStatus=!0,r.value.reset()};return S(()=>{if(!e.id){u("链接有误");return}document.title=c[e.type]+"注册",h()}),()=>{var a,A;return o("div",{class:n["school-register"]},[o("div",{class:n.banner},[o("img",{src:W,alt:"banner"},null),o("div",{class:n.bannerContainer},[o("div",{class:n.bannerTitle},[c[e.type],t("注册")]),o("div",{class:n.bannerSchool},[o("img",{src:J,class:n.iconSchool},null),o("p",{class:n.schoolName},[(A=(a=e.schoolDetail)==null?void 0:a.cooperation)==null?void 0:A.name])])])]),o(I,{inset:!0},{default:()=>[o(i,{labelAlign:"top",class:"border",modelValue:e.username,"onUpdate:modelValue":s=>e.username=s,placeholder:"请填写您的真实姓名",autocomplete:"off",maxlength:8},{label:()=>o(l,null,[t("真实姓名"),o("i",{class:n.required},[t("*")])])}),o(i,{labelAlign:"top",modelValue:e.phone,"onUpdate:modelValue":s=>e.phone=s,placeholder:"请填写您的手机号码",autocomplete:"off",maxlength:11},{label:()=>o(l,null,[t("手机号码"),o("i",{class:n.required},[t("*")])])}),o(M,{border:!1},{default:()=>[o("div",{class:n.tips},[o("img",{src:$,class:n.iconTips},null),t("提示:手机号码将成为您管乐迷管理端登录账户")])]}),o(i,{labelAlign:"top",class:"border",modelValue:e.smsCode,"onUpdate:modelValue":s=>e.smsCode=s,placeholder:"请输入验证码",autocomplete:"off",maxlength:6},{label:()=>o(l,null,[t("验证码"),o("i",{class:n.required},[t("*")])]),button:()=>e.countDownStatus?o("span",{class:n.codeText,onClick:F},[t("获取验证码")]):o(T,{ref:s=>r.value=s,"auto-start":!1,time:e.countDownTime,onFinish:B,format:"ss秒"},null)})]}),o("div",{class:["btnGroupFixed"],style:{"margin-top":"18px"}},[o(m,{round:!0,block:!0,type:"primary",onClick:b},{default:()=>[t("提交")]})]),o(w,{show:e.registerStatus,"onUpdate:show":s=>e.registerStatus=s,class:n.popup,closeOnClickOverlay:!1},{default:()=>{var s,d;return[o("div",{class:n.popupContainer},[o("img",{src:ee,class:n.bannerPopup},null),o("h3",null,[t("注册成功")]),o("div",{class:n.popupContent},[t("恭喜您在"),(d=(s=e.schoolDetail)==null?void 0:s.cooperation)==null?void 0:d.name,t("成功注册为"),o("span",null,[t("【"),c[e.type],t("】")]),t(",请下载管乐迷管理端App进行乐团管理吧~")]),o(m,{type:"primary",round:!0,class:n.popupBtn,onClick:j},{default:()=>[t("立即下载")]})])]}}),e.imgCodeStatus?o(Y,{value:e.imgCodeStatus,"onUpdate:value":s=>e.imgCodeStatus=s,phone:e.phone,onClose:()=>{e.imgCodeStatus=!1},onSendCode:y},null):null])}}});export{ce as default};