import{_ as b}from"./index.f2c29013.js";import{F as w,a4 as y,C as V,t as k,I as x,w as q,D as R}from"./element-plus.5df6f736.js";import{g as U,s as S}from"./user.2299f8ae.js";import{d as C,r as W,_ as B,ae as L,o as g,c as N,T as t,K as l,L as P,J as I,a as u,S as _,R as a}from"./@vue.108c970a.js";import"./index.1f78e617.js";import"./@vueuse.d3d080b7.js";import"./lodash.33f675f2.js";import"./axios.c2a2014a.js";import"./vue-router.ed788fee.js";import"./pinia.eff1ffd5.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.5d5b8bda.js";import"./color.da05fa89.js";import"./clone.06747a68.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.1c707d7b.js";import"./ms.a9ae1d6d.js";import"./@element-plus.d6eabd08.js";import"./nprogress.fc605139.js";import"./vue-clipboard3.dc900a40.js";import"./clipboard.6beb87aa.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.241b9b5d.js";import"./lodash-es.29c53eac.js";import"./dayjs.50c3b6f7.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";const T={class:"login-register"},j=u("div",{class:"font-medium mb-7"},"\u901A\u7528\u8BBE\u7F6E",-1),G=a("\u8D26\u53F7\u5BC6\u7801\u767B\u5F55"),J=a("\u624B\u673A\u9A8C\u8BC1\u7801\u767B\u5F55"),K=u("div",{class:"form-tips"},"\u7CFB\u7EDF\u901A\u7528\u767B\u5F55\u65B9\u5F0F\uFF0C\u81F3\u5C11\u9009\u62E9\u4E00\u9879",-1),z={class:"mt-1 ml-2"},H=u("div",{class:"form-tips"},[a(" 1\u3001\u5982\u679C\u5F00\u542F\uFF0C\u5219\u65B0\u7528\u6237\u5728\u6CE8\u518C\u5B8C\u6210\u4E4B\u540E\u8981\u5F3A\u5236\u7ED1\u5B9A\u624B\u673A\u53F7"),u("br"),a(" 2\u3001\u8001\u7528\u6237\u767B\u5F55\u65F6\u5982\u679C\u68C0\u6D4B\u5230\u6CA1\u6709\u7ED1\u5B9A\u624B\u673A\uFF0C\u5219\u8981\u91CD\u65B0\u7ED1\u5B9A\u624B\u673A\u53F7 ")],-1),M={class:"mt-1 ml-2"},O=u("div",{class:"form-tips"},"\u767B\u5F55/\u6CE8\u518C\u4F1A\u5458\u65F6\uFF0C\u662F\u5426\u663E\u793A\u670D\u52A1\u534F\u8BAE\u548C\u9690\u79C1\u653F\u7B56",-1),Q=u("div",{class:"font-medium mb-7"},"\u7B2C\u4E09\u65B9\u8BBE\u7F6E",-1),X={class:"mt-1 ml-2"},Y=u("div",{class:"form-tips"},"\u767B\u5F55\u65F6\u652F\u6301\u7B2C\u4E09\u65B9\u767B\u5F55\uFF0C\u65B0\u7528\u6237\u6388\u6743\u5373\u81EA\u52A8\u6CE8\u518C\u8D26\u53F7",-1),Z=a(" \u5FAE\u4FE1\u767B\u5F55 "),$={href:"https://open.weixin.qq.com/",target:"_blank"},uu=a(" \u524D\u5F80\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0 "),eu=u("div",{class:"form-tips"},[a(" 1\u3001\u5728\u5404\u6E20\u9053\u4F7F\u7528\u5FAE\u4FE1\u6388\u6743\u767B\u5F55\u65F6\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u914D\u7F6E\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0"),u("br"),a(" 2\u3001\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0\u5173\u8054\u516C\u4F17\u53F7\u3001\u5C0F\u7A0B\u5E8F\u548CAPP\u540E\uFF0C\u53EF\u5B9E\u73B0\u5404\u7AEF\u7528\u6237\u8D26\u53F7\u7EDF\u4E00\uFF0C\u8BC6\u522B\u4E70\u5BB6\u552F\u4E00\u5FAE\u4FE1\u8EAB\u4EFD"),u("br"),a(" 3\u3001\u6CA1\u6709\u914D\u7F6E\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0\uFF0C\u540C\u4E00\u5FAE\u4FE1\u53F7\u4F1A\u751F\u6210\u591A\u4E2A\u7528\u6237\uFF0C\u914D\u7F6E\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0\u540E\u5DF2\u751F\u6210\u7684\u7528\u6237\u8D26\u53F7\u65E0\u6CD5\u5408\u5E76 ")],-1),tu=a("\u4FDD\u5B58"),ou=C({name:"loginRegister"}),ju=C({...ou,setup(lu){const F=W(),e=B({login_way:[],coerce_mobile:0,login_agreement:0,third_auth:0,wechat_auth:0,qq_auth:0}),f=B({loginWay:[{required:!0,validator:(i,o,s)=>{if(e.login_way.join("").length===0)s(new Error("\u767B\u5F55\u65B9\u5F0F\u81F3\u5C11\u9009\u62E9\u4E00\u9879\uFF01"));else{if(e.login_way!==""){if(!F.value)return;F.value.validateField("checkPass",()=>null)}s()}},trigger:"change"}],coerce_mobile:[{required:!0,trigger:"blur"}],login_agreement:[{required:!0,trigger:"blur"}],third_auth:[{required:!0,trigger:"blur"}]}),d=async()=>{try{const i=await U();for(const o in e)e[o]=i[o]}catch(i){console.log("\u83B7\u53D6=>",i)}},h=async()=>{var i;await((i=F.value)==null?void 0:i.validate());try{await S(e),d()}catch(o){console.log("\u4FDD\u5B58=>",o)}};return d(),(i,o)=>{const s=w,c=y,n=V,m=k,E=x,p=q,A=R,v=b,D=L("perms");return g(),N("div",T,[t(A,{ref_key:"formRef",ref:F,rules:f,model:e,"label-width":"120px"},{default:l(()=>[t(E,{shadow:"never",class:"!border-none"},{default:l(()=>[j,t(n,{label:"\u767B\u5F55\u65B9\u5F0F",prop:"loginWay"},{default:l(()=>[u("div",null,[t(c,{modelValue:e.login_way,"onUpdate:modelValue":o[0]||(o[0]=r=>e.login_way=r)},{default:l(()=>[t(s,{label:"1"},{default:l(()=>[G]),_:1}),t(s,{label:"2"},{default:l(()=>[J]),_:1})]),_:1},8,["modelValue"]),K])]),_:1}),t(n,{label:"\u5F3A\u5236\u7ED1\u5B9A\u624B\u673A",prop:"coerce_mobile"},{default:l(()=>[u("div",null,[t(m,{modelValue:e.coerce_mobile,"onUpdate:modelValue":o[1]||(o[1]=r=>e.coerce_mobile=r),"active-value":1,"inactive-value":0},null,8,["modelValue"]),u("span",z,_(e.coerce_mobile?"\u5F00\u542F":"\u5173\u95ED"),1),H])]),_:1}),t(n,{label:"\u653F\u7B56\u534F\u8BAE",prop:"login_agreement"},{default:l(()=>[u("div",null,[t(m,{modelValue:e.login_agreement,"onUpdate:modelValue":o[2]||(o[2]=r=>e.login_agreement=r),"active-value":1,"inactive-value":0},null,8,["modelValue"]),u("span",M,_(e.login_agreement?"\u5F00\u542F":"\u5173\u95ED"),1),O])]),_:1})]),_:1}),t(E,{shadow:"never",class:"!border-none mt-4"},{default:l(()=>[Q,t(n,{label:"\u7B2C\u4E09\u65B9\u767B\u5F55",prop:"third_auth"},{default:l(()=>[u("div",null,[t(m,{modelValue:e.third_auth,"onUpdate:modelValue":o[3]||(o[3]=r=>e.third_auth=r),"active-value":1,"inactive-value":0},null,8,["modelValue"]),u("span",X,_(e.third_auth?"\u5F00\u542F":"\u5173\u95ED"),1),Y,u("div",null,[t(s,{modelValue:e.wechat_auth,"onUpdate:modelValue":o[4]||(o[4]=r=>e.wechat_auth=r),"true-label":1,"false-label":0},{default:l(()=>[Z]),_:1},8,["modelValue"])])])]),_:1}),t(n,{label:"\u5FAE\u4FE1\u5F00\u653E\u5E73\u53F0"},{default:l(()=>[u("div",null,[u("a",$,[t(p,{type:"primary",link:"",class:"underline"},{default:l(()=>[uu]),_:1})]),eu])]),_:1})]),_:1})]),_:1},8,["rules","model"]),P((g(),I(v,null,{default:l(()=>[t(p,{type:"primary",onClick:h},{default:l(()=>[tu]),_:1})]),_:1})),[[D,["setting.user.user/setRegisterConfig"]]])])}}});export{ju as default};