mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-06 21:18:10 +00:00
2 lines
7.5 KiB
JavaScript
2 lines
7.5 KiB
JavaScript
import{u as W,E as ee,_ as ae,t as le,__tla as re}from"./test.f9d1f3c7.js";import{E as te,__tla as se}from"./el-input.6e95d1c0.js";import{E as oe,a as ie,__tla as ne}from"./el-overlay.471082ac.js";import{E as ce,__tla as de}from"./el-button.647c2baa.js";import{_ as me,__tla as ue}from"./nuxt-link.d2e57a6c.js";import{f as _e,h as pe,a5 as ge,x as b,i as S,a1 as he,o as y,k as v,l as c,m as t,u as a,Z as fe,$ as be,w as i,R as A,V as k,p as w,t as u,X as ye,ab as ve,ac as we,ad as xe,A as Ve,v as r,q as Ae,s as ke,__tla as Pe}from"./entry.9b92f05f.js";import{u as qe,__tla as Ue}from"./useLogin.277a65ff.js";import{_ as Se}from"./_plugin-vue_export-helper.c27b6911.js";import{__tla as Ce}from"./throttle.5a090da9.js";import{__tla as Ee}from"./debounce.e5e48a2d.js";import{__tla as Re}from"./system.ead60a57.js";import{__tla as Le}from"./use-form-item.2286029f.js";import{__tla as Te}from"./index.ad444b6c.js";import{__tla as je}from"./index.33eb77e2.js";import{__tla as ze}from"./vnode.ad035761.js";let C,Be=Promise.all([(()=>{try{return re}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return de}catch{}})(),(()=>{try{return ue}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return Ue}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Ee}catch{}})(),(()=>{try{return Re}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return je}catch{}})(),(()=>{try{return ze}catch{}})()]).then(async()=>{const P=h=>(Ae("data-v-42cee349"),h=h(),ke(),h),E={class:"w-full h-full bg-page flex items-center justify-center"},R={class:"flex bg-white"},L={class:"flex flex-col items-center w-[330px] py-[100px] border-r"},T=P(()=>c("div",{class:"title font-bold text-xl"},"\u6253\u5F00\u624B\u673A\u5FAE\u4FE1",-1)),j=P(()=>c("div",{class:"tips text-sm mt-[5px]"},"\u70B9\u51FB\u53F3\u4E0A\u89D2\u6253\u5F00\u626B\u4E00\u626B",-1)),z={class:"qrcode mt-[30px] border leading-none"},B={class:"bg-white w-[380px] p-[30px]"},F={class:"flex items-end my-[30px]"},G=["onClick"],H={class:"py-0 leading-none"},O={class:"flex justify-end leading-none"},Q={key:0,class:"text-xs py-[50rpx] flex justify-center w-full"},Y={class:"text-primary"},I={class:"text-primary"},J=_e({__name:"register",setup(h){const M=pe(),m=ge();m.getLoginConfig();const n=b(""),N=S(()=>{const e=[];return m.login.is_username&&e.push({type:"username",title:r("usernameRegister")}),m.login.is_mobile&&!m.login.is_bind_mobile&&e.push({type:"mobile",title:r("mobileRegister")}),n.value=e[0]?e[0].type:"",e}),g=b(!1),s=he({username:"",password:"",confirm_password:"",mobile:"",mobile_code:"",mobile_key:"",captcha_key:"",captcha_code:""}),X=S(()=>({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,l,p){return l==s.password},message:r("confirmPasswordError"),trigger:["change","blur"]}],mobile:[{type:"string",required:n.value=="mobile"||m.login.is_bind_mobile,message:r("mobilePlaceholder"),trigger:["blur","change"]},{validator(e,l,p){return n.value!="mobile"&&!m.login.is_bind_mobile?!0:le.mobile(l)},message:r("mobileError"),trigger:["change","blur"]}],mobile_code:{type:"string",required:n.value=="mobile"||m.login.is_bind_mobile,message:r("codePlaceholder"),trigger:["blur","change"]},captcha_code:{type:"string",required:n.value=="username",message:r("captchaPlaceholder"),trigger:["blur","change"]}})),x=b(),Z=async()=>{var e;await((e=x.value)==null?void 0:e.validate(async(l,p)=>{if(l){if(g.value)return;g.value=!0,(n.value=="username"?ve:we)(s).then(d=>{M.setToken(d.data.token),qe().handleLoginBack()}).catch(()=>{g.value=!1,f.refresh()})}}))},f=W(s);f.refresh();const q=b(null),$=async()=>{var e;await((e=x.value)==null?void 0:e.validateField("mobile",async(l,p)=>{var d;l&&((d=q.value)==null||d.send())}))};return(e,l)=>{const p=ee,d=te,_=oe,D=ae,U=ce,V=me,K=ie;return y(),v("div",E,[c("div",R,[c("div",L,[T,j,c("div",z,[t(p,{src:("img"in e?e.img:a(xe))("https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=gQHU7zwAAAAAAAAAAS5odHRwOi8vd2VpeGluLnFxLmNvbS9xLzAySlJSbU1Sb0hiMlQxOEcwSGhBY1AAAgTSfStkAwRYAgAA"),class:"w-[120px]"},null,8,["src"])])]),c("div",B,[c("div",F,[(y(!0),v(fe,null,be(a(N),o=>(y(),v("div",{class:Ve(["mr-[20px] text-base cursor-pointer leading-none",{"font-bold":a(n)==o.type}]),onClick:Fe=>n.value=o.type},u(o.title),11,G))),256))]),t(K,{model:a(s),ref_key:"formRef",ref:x,rules:a(X),"validate-on-rule-change":!1},{default:i(()=>[A(c("div",null,[t(_,{prop:"username"},{default:i(()=>[t(d,{modelValue:a(s).username,"onUpdate:modelValue":l[0]||(l[0]=o=>a(s).username=o),placeholder:("t"in e?e.t:a(r))("usernamePlaceholder"),clearable:"","inline-message":!0},null,8,["modelValue","placeholder"])]),_:1}),t(_,{prop:"password"},{default:i(()=>[t(d,{modelValue:a(s).password,"onUpdate:modelValue":l[1]||(l[1]=o=>a(s).password=o),placeholder:("t"in e?e.t:a(r))("passwordPlaceholder"),type:"password",clearable:"","show-password":!0},null,8,["modelValue","placeholder"])]),_:1}),t(_,{prop:"confirm_password"},{default:i(()=>[t(d,{modelValue:a(s).confirm_password,"onUpdate:modelValue":l[2]||(l[2]=o=>a(s).confirm_password=o),placeholder:("t"in e?e.t:a(r))("confirmPasswordPlaceholder"),type:"password",clearable:"","show-password":!0},null,8,["modelValue","placeholder"])]),_:1})],512),[[k,a(n)=="username"]]),A(c("div",null,[t(_,{prop:"mobile"},{default:i(()=>[t(d,{modelValue:a(s).mobile,"onUpdate:modelValue":l[3]||(l[3]=o=>a(s).mobile=o),placeholder:("t"in e?e.t:a(r))("mobilePlaceholder"),clearable:""},null,8,["modelValue","placeholder"])]),_:1}),t(_,{prop:"mobile_code"},{default:i(()=>[t(d,{modelValue:a(s).mobile_code,"onUpdate:modelValue":l[5]||(l[5]=o=>a(s).mobile_code=o),placeholder:("t"in e?e.t:a(r))("codePlaceholder")},{suffix:i(()=>[t(D,{mobile:a(s).mobile,type:"login",modelValue:a(s).mobile_key,"onUpdate:modelValue":l[4]||(l[4]=o=>a(s).mobile_key=o),onClick:$,ref_key:"smsCodeRef",ref:q},null,8,["mobile","modelValue"])]),_:1},8,["modelValue","placeholder"])]),_:1})],512),[[k,a(n)=="mobile"||a(m).login.is_bind_mobile]]),A(c("div",null,[t(_,{prop:"captcha_code"},{default:i(()=>[t(d,{modelValue:a(s).captcha_code,"onUpdate:modelValue":l[7]||(l[7]=o=>a(s).captcha_code=o),placeholder:("t"in e?e.t:a(r))("captchaPlaceholder")},{suffix:i(()=>[c("div",H,[t(p,{src:a(f).image.value,class:"h-[30px] cursor-pointer",onClick:l[6]||(l[6]=o=>a(f).refresh())},null,8,["src"])])]),_:1},8,["modelValue","placeholder"])]),_:1})],512),[[k,a(n)=="username"]]),c("div",O,[t(V,{to:"/auth/login"},{default:i(()=>[t(U,{type:"primary",link:""},{default:i(()=>[w(u(("t"in e?e.t:a(r))("haveAccount"))+"\uFF0C"+u(("t"in e?e.t:a(r))("toLogin")),1)]),_:1})]),_:1})]),t(_,null,{default:i(()=>[t(U,{type:"primary",class:"mt-[20px] w-full",size:"large",onClick:Z,loading:a(g)},{default:i(()=>[w(u(a(g)?("t"in e?e.t:a(r))("registering"):("t"in e?e.t:a(r))("register")),1)]),_:1},8,["loading"])]),_:1}),a(m).login.agreement_show?(y(),v("div",Q,[w(u(("t"in e?e.t:a(r))("registerAgreeTips"))+" ",1),t(V,{to:"/auth/agreement?key=service"},{default:i(()=>[c("span",Y,u(("t"in e?e.t:a(r))("userAgreement")),1)]),_:1}),w(" "+u(("t"in e?e.t:a(r))("and"))+" ",1),t(V,{to:"/auth/agreement?key=privacy"},{default:i(()=>[c("span",I,u(("t"in e?e.t:a(r))("privacyAgreement")),1)]),_:1})])):ye("",!0)]),_:1},8,["model","rules"])])])])}}});C=Se(J,[["__scopeId","data-v-42cee349"]])});export{Be as __tla,C as default};
|