| 1 |
- import{E as ne,__tla as ce}from"./el-input.26169bdd.js";import{a as ue,E as me,__tla as de}from"./el-form.401432c4.js";import{u as _e,_ as pe,__tla as he}from"./index.vue.d45f596b.js";import{E as ge,__tla as fe}from"./el-image.bbfa5f50.js";import{E as ye,__tla as ve}from"./el-button.b9902edf.js";import{_ as be,__tla as xe}from"./nuxt-link.d06878a3.js";import{f as we,h as ke,a3 as Ae,a4 as Ve,j as p,J as B,a7 as Pe,l as g,m as c,u as l,F as Ce,t as qe,x as s,w as i,ag as L,aj as Se,o as f,q as Ue,v as h,a8 as C,a9 as q,a6 as r,aa as x,X as z,y as Ee,A as Re,B as je,ah as Be,ai as Le,__tla as ze}from"./entry.7ac74952.js";import{__tla as Fe}from"./el-image-viewer.6b094d65.js";import{t as Te}from"./test.b3688895.js";import{_ as Ge}from"./_plugin-vue_export-helper.c27b6911.js";import"./event.9519ab40.js";import{__tla as He}from"./index.4e8000c9.js";import{__tla as Je}from"./use-form-item.d93b2d81.js";import{__tla as Oe}from"./index.06247adb.js";import"./error.78e43d3e.js";import"./isNil.c75b1b34.js";import{__tla as Qe}from"./castArray.c7b38e0a.js";import{__tla as Ye}from"./el-dialog.8638bbbd.js";import{__tla as De}from"./el-overlay.6c5efcf9.js";import{__tla as Ie}from"./vnode.47700175.js";import{__tla as Me}from"./scroll.6ddd597d.js";import{__tla as Ne}from"./focus-trap.fbc9f3cd.js";import{__tla as Xe}from"./index.623d89cd.js";import{__tla as $e}from"./throttle.87b285fc.js";let F,Ke=Promise.all([(()=>{try{return ce}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return he}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return ve}catch{}})(),(()=>{try{return xe}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Je}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Ie}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Xe}catch{}})(),(()=>{try{return $e}catch{}})()]).then(async()=>{const S=v=>(Re("data-v-3035ab2c"),v=v(),je(),v),T={class:"w-full h-full bg-page flex items-center justify-center"},G={class:"flex bg-white"},H={key:0,class:"bg-white w-[380px] p-[30px] h-[686px]"},J={class:"flex items-end my-[30px]"},O=["onClick"],Q={class:"py-0 leading-none"},Y={class:"flex justify-end leading-none"},D={key:0,class:"text-xs py-[50rpx] flex justify-center w-full"},I={class:"text-primary"},M={class:"text-primary"},N={key:1,class:"mt-[20px] flex justify-center"},X={key:1,class:"flex flex-col items-center w-[380px] py-[100px] h-[556px]"},$=S(()=>c("div",{class:"title font-bold text-xl"},"\u6253\u5F00\u624B\u673A\u5FAE\u4FE1",-1)),K=S(()=>c("div",{class:"tips text-sm mt-[5px]"},"\u70B9\u51FB\u53F3\u4E0A\u89D2\u6253\u5F00\u626B\u4E00\u626B",-1)),W={class:"qrcode mt-[30px] border leading-none"},Z=we({__name:"register",setup(v){let ee=ke();const ae=Ae(),_=Ve();_.getLoginConfig();const n=p(""),le=B(()=>{const e=[];return _.login.is_username&&e.push({type:"username",title:r("usernameRegister")}),_.login.is_mobile&&!_.login.is_bind_mobile&&e.push({type:"mobile",title:r("mobileRegister")}),n.value=e[0]?e[0].type:"",e}),y=p(!1);let m=p(!0);const o=Pe({username:"",password:"",confirm_password:"",mobile:"",mobile_code:"",mobile_key:"",captcha_key:"",captcha_code:""}),te=B(()=>({username:{type:"string",required:n.value=="username",message:r("usernamePlaceholder"),trigger:["blur","change"]},password:{type:"string",required:n.value=="username",message:r("passwordPlaceholder"),trigger:["blur","change"]},confirm_password:[{type:"string",required:n.value=="username",message:r("confirmPasswordPlaceholder"),trigger:["blur","change"]},{validator(e,a,d){return a==o.password},message:r("confirmPasswordError"),trigger:["change","blur"]}],mobile:[{type:"string",required:n.value=="mobile"||_.login.is_bind_mobile,message:r("mobilePlaceholder"),trigger:["blur","change"]},{validator(e,a,d){return n.value!="mobile"&&!_.login.is_bind_mobile?!0:Te.mobile(a)},message:r("mobileError"),trigger:["change","blur"]}],mobile_code:{type:"string",required:n.value=="mobile"||_.login.is_bind_mobile,message:r("codePlaceholder"),trigger:["blur","change"]},captcha_code:{type:"string",required:n.value=="username",message:r("captchaPlaceholder"),trigger:["blur","change"]}})),w=p(),re=async()=>{var e;await((e=w.value)==null?void 0:e.validate(async(a,d)=>{if(a){if(y.value)return;y.value=!0,(n.value=="username"?Be:Le)(o).then(u=>{ae.setToken(u.data.token),ee.push({path:"/"})}).catch(()=>{y.value=!1,b.refresh()})}}))};let U=p(!1);Se().then(e=>{U.value=e.data});const b=_e(o);b.refresh();const E=p(null),se=async()=>{var e;await((e=w.value)==null?void 0:e.validateField("mobile",async(a,d)=>{var u;a&&((u=E.value)==null||u.send())}))},k=p(!0),A=p(!0),V=p(!0);return(e,a)=>{const d=ne,u=me,oe=pe,R=ge,j=ye,P=be,ie=ue;return f(),g("div",T,[c("div",G,[l(m)?(f(),g("div",H,[c("div",J,[(f(!0),g(Ce,null,qe(l(le),t=>(f(),g("div",{class:Ue(["mr-[20px] text-base cursor-pointer leading-none",{"font-bold":n.value==t.type}]),onClick:We=>n.value=t.type},h(t.title),11,O))),256))]),s(ie,{model:o,ref_key:"formRef",ref:w,rules:l(te),"validate-on-rule-change":!1},{default:i(()=>[C(c("div",null,[s(u,{prop:"username"},{default:i(()=>[s(d,{modelValue:o.username,"onUpdate:modelValue":a[0]||(a[0]=t=>o.username=t),placeholder:("t"in e?e.t:l(r))("usernamePlaceholder"),clearable:"","inline-message":!0,readonly:k.value,onClick:a[1]||(a[1]=t=>k.value=!1),onBlur:a[2]||(a[2]=t=>k.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1}),s(u,{prop:"password"},{default:i(()=>[s(d,{modelValue:o.password,"onUpdate:modelValue":a[3]||(a[3]=t=>o.password=t),placeholder:("t"in e?e.t:l(r))("passwordPlaceholder"),type:"password",clearable:"","show-password":!0,readonly:A.value,onClick:a[4]||(a[4]=t=>A.value=!1),onBlur:a[5]||(a[5]=t=>A.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1}),s(u,{prop:"confirm_password"},{default:i(()=>[s(d,{modelValue:o.confirm_password,"onUpdate:modelValue":a[6]||(a[6]=t=>o.confirm_password=t),placeholder:("t"in e?e.t:l(r))("confirmPasswordPlaceholder"),type:"password",clearable:"","show-password":!0,readonly:V.value,onClick:a[7]||(a[7]=t=>V.value=!1),onBlur:a[8]||(a[8]=t=>V.value=!0)},null,8,["modelValue","placeholder","readonly"])]),_:1})],512),[[q,n.value=="username"]]),C(c("div",null,[s(u,{prop:"mobile"},{default:i(()=>[s(d,{modelValue:o.mobile,"onUpdate:modelValue":a[9]||(a[9]=t=>o.mobile=t),placeholder:("t"in e?e.t:l(r))("mobilePlaceholder"),clearable:""},null,8,["modelValue","placeholder"])]),_:1}),s(u,{prop:"mobile_code"},{default:i(()=>[s(d,{modelValue:o.mobile_code,"onUpdate:modelValue":a[11]||(a[11]=t=>o.mobile_code=t),placeholder:("t"in e?e.t:l(r))("codePlaceholder")},{suffix:i(()=>[s(oe,{mobile:o.mobile,type:"login",modelValue:o.mobile_key,"onUpdate:modelValue":a[10]||(a[10]=t=>o.mobile_key=t),onClick:se,ref_key:"smsCodeRef",ref:E},null,8,["mobile","modelValue"])]),_:1},8,["modelValue","placeholder"])]),_:1})],512),[[q,n.value=="mobile"||l(_).login.is_bind_mobile]]),C(c("div",null,[s(u,{prop:"captcha_code"},{default:i(()=>[s(d,{modelValue:o.captcha_code,"onUpdate:modelValue":a[13]||(a[13]=t=>o.captcha_code=t),placeholder:("t"in e?e.t:l(r))("captchaPlaceholder")},{suffix:i(()=>[c("div",Q,[s(R,{src:l(b).image.value,class:"h-[30px] cursor-pointer",onClick:a[12]||(a[12]=t=>l(b).refresh())},null,8,["src"])])]),_:1},8,["modelValue","placeholder"])]),_:1})],512),[[q,n.value=="username"]]),c("div",Y,[s(P,{to:"/auth/login"},{default:i(()=>[s(j,{type:"primary",link:""},{default:i(()=>[x(h(("t"in e?e.t:l(r))("haveAccount"))+"\uFF0C"+h(("t"in e?e.t:l(r))("toLogin")),1)]),_:1})]),_:1})]),s(u,null,{default:i(()=>[s(j,{type:"primary",class:"mt-[20px] w-full",size:"large",onClick:re,loading:y.value},{default:i(()=>[x(h(y.value?("t"in e?e.t:l(r))("registering"):("t"in e?e.t:l(r))("register")),1)]),_:1},8,["loading"])]),_:1}),l(_).login.agreement_show?(f(),g("div",D,[x(h(("t"in e?e.t:l(r))("registerAgreeTips"))+" ",1),s(P,{to:"/auth/agreement?key=service"},{default:i(()=>[c("span",I,h(("t"in e?e.t:l(r))("userAgreement")),1)]),_:1}),x(" "+h(("t"in e?e.t:l(r))("and"))+" ",1),s(P,{to:"/auth/agreement?key=privacy"},{default:i(()=>[c("span",M,h(("t"in e?e.t:l(r))("privacyAgreement")),1)]),_:1})])):z("",!0),l(U)?(f(),g("div",N,[c("span",{class:"iconfont icon-weixin1 text-[#1AAD19] !text-[24px]",onClick:a[14]||(a[14]=t=>L(m)?m.value=!l(m):m=!l(m))})])):z("",!0)]),_:1},8,["model","rules"])])):(f(),g("div",X,[$,K,c("div",W,[s(R,{src:("img"in e?e.img:l(Ee))("https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQHU7zwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAySlJSbU1Sb0hiMlQxOEcwSGhBY1AAAgTSfStkAwRYAgAA"),class:"w-[120px]"},null,8,["src"])]),c("div",{class:"mt-[60px] text-base cursor-pointer leading-none",onClick:a[15]||(a[15]=t=>L(m)?m.value=!l(m):m=!l(m))},"\u8D26\u53F7\u6CE8\u518C")]))])])}}});F=Ge(Z,[["__scopeId","data-v-3035ab2c"]])});export{Ke as __tla,F as default};
|