index-59dc24df.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 g,y as v,N as O}from"./index-7efc3749.js";import{E as c}from"./constant-a400d214.js";import{C as T,I as Y}from"./index-5a3e9dcc.js";import{C as I}from"./index-a1fc7980.js";import{C as M}from"./index-4a491eda.js";import{F as i}from"./index-1b5fff5b.js";import"./index-c0dcca95.js";import"./index-8bbe635b.js";const L="_codeText_1tajy_4",P="_banner_1tajy_7",N="_bannerContainer_1tajy_14",x="_bannerTitle_1tajy_19",V="_bannerSchool_1tajy_25",z="_iconSchool_1tajy_31",H="_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:L,banner:P,bannerContainer:N,bannerTitle:x,bannerSchool:V,iconSchool:z,schoolName:H,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+YIjYT6WdG2hVro0kF3ya4L4Z5kPnLWwDAA3XlmbRrA7ZTaOaAx6f6qgXacDgX0NQF7cP5j8A72Cahw49c0dugHUH4fn34DzFDHbAp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rZfXR3OxZPrVRzTdIiBl7Z8+oaVUPfEA8uon71VARZcxoOfnj1k9Arve7xb2bUf++gr/3zibmmei/OpTrROUQYjECz/Hzoafd7m99ds1TRVWxs0vv8n09dwAyYqkL0AAAAASUVORK5CYII=",ee=""+new URL("banner-popup-e91718c1.png",import.meta.url).href,ce=_({name:"school-register",setup(){const p=U(),f=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,btnLoading:!1}),r=E(),b=async()=>{try{const{data:s}=await C.get("/api-web/open/school/cooperation",{params:{id:e.id}});e.schoolDetail=s||{}}catch(s){}},h=async()=>{if(!e.username){u("请输入真实姓名");return}if(!e.nameReg.test(e.username)){u("姓名必须为中文");return}if(!g(e.phone)){u("请输入正确的手机号");return}if(!e.smsCode){u("请输入验证码");return}try{e.btnLoading=!0,(await C.post("/api-web/open/school/staffSave",{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(s){}finally{e.btnLoading=!1}},j=()=>{e.registerStatus=!1,f.push("/download")},y=()=>{e.countDownStatus=!1,v(()=>{r.value.start()})},F=()=>{if(!g(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]+"注册",b()}),()=>{var s,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=(s=e.schoolDetail)==null?void 0:s.cooperation)==null?void 0:A.name])])])]),o(I,{inset:!0},{default:()=>[o(i,{labelAlign:"top",class:"border",modelValue:e.username,"onUpdate:modelValue":a=>e.username=a,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":a=>e.phone=a,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":a=>e.smsCode=a,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:a=>r.value=a,"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:h,disabled:e.btnLoading,loading:e.btnLoading},{default:()=>[t("提交")]})]),o(w,{show:e.registerStatus,"onUpdate:show":a=>e.registerStatus=a,class:n.popup,closeOnClickOverlay:!1},{default:()=>{var a,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=(a=e.schoolDetail)==null?void 0:a.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":a=>e.imgCodeStatus=a,phone:e.phone,onClose:()=>{e.imgCodeStatus=!1},onSendCode:y},null):null])}}});export{ce as default};