2 lines
4.1 KiB
JavaScript
2 lines
4.1 KiB
JavaScript
|
import{_ as R}from"./index.vue_vue_type_script_setup_true_lang.8c1aff80.js";import{a as U,w as j,b as N,r as T,e as q,s as L,f as O,o as _,h as $,i as o,j as u,k as a,u as e,E as f,t as B,l as z,m as w,c as y,p as C,q as F,v as G,x as M,y as W,P as X,z as H}from"./entry.834fe740.js";import{u as J}from"./asyncData.ac40d117.js";import{u as K}from"./useLockFn.f5d46391.js";import{E as Q}from"./index.f614cb9b.js";import{E as Y,a as c}from"./index.31a46a9e.js";import{_ as Z}from"./_plugin-vue_export-helper.a1a6add7.js";import"./_getTag.02a17137.js";const E=i=>(G("data-v-329000e7"),i=i(),M(),i),ee={class:"px-[30px] py-5 user-info"},se=E(()=>o("div",{class:"border-b border-br pb-5"},[o("span",{class:"text-2xl font-medium"},"\u8D26\u53F7\u5B89\u5168")],-1)),ue={class:"mt-5"},oe={class:"info-item leading-10 flex justify-between"},ae=E(()=>o("div",{class:"item-name"},"\u767B\u5F55\u5BC6\u7801",-1)),te={class:"info-item leading-10 flex justify-between"},le=E(()=>o("div",{class:"item-name"},"\u7ED1\u5B9A\u5FAE\u4FE1",-1)),re={class:"px-5"},de={class:"flex justify-between"},ne={class:"text-4xl"},ie=U({__name:"security",async setup(i){let p,h;const{data:r,refresh:v}=([p,h]=j(()=>J(()=>W(),{default:()=>({}),initialCache:!1},"$aylh5XbgmP")),p=await p,h(),p),x=N(),d=T(!1),{setPopupType:D,toggleShowPopup:k}=q(),g=L(),V={old_password:[{required:!0,message:"\u8BF7\u8F93\u5165\u539F\u5BC6\u7801",trigger:["change","blur"]}],password:[{required:!0,message:"\u8BF7\u8F93\u51656-20\u4F4D\u6570\u5B57+\u5B57\u6BCD\u6216\u7B26\u53F7\u7EC4\u5408",trigger:["change","blur"]},{min:6,max:20,message:"\u5BC6\u7801\u957F\u5EA6\u5E94\u4E3A6-20",trigger:["change","blur"]}],password_confirm:[{validator(m,s,n){s===""?n(new Error("\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801")):s!==t.password?n(new Error("\u4E24\u6B21\u8F93\u5165\u7684\u5BC6\u7801\u4E0D\u4E00\u81F4")):n()},trigger:["change","blur"]}]},t=O({old_password:"",password:"",password_confirm:""}),b=()=>{d.value=!1,D(X.FORGOT_PWD),k(!0)},A=async()=>{var m;await((m=g.value)==null?void 0:m.validate()),await H(t),x.logout(),d.value=!1,v()},{lockFn:I,isLock:P}=K(A);return(m,s)=>{const n=R,S=z;return _(),$("div",ee,[se,o("div",ue,[o("div",oe,[ae,o("div",null,[u(e(f),{link:"",type:"primary",onClick:s[0]||(s[0]=l=>d.value=!0)},{default:a(()=>[w(B(e(r).has_password?"\u70B9\u51FB\u4FEE\u6539":"\u70B9\u51FB\u8BBE\u7F6E")+" ",1),u(n,{name:"el-icon-ArrowRight"})]),_:1})])]),o("div",te,[le,o("div",null,B(e(r).has_auth?"\u5DF2\u7ED1\u5B9A":"\u672A\u7ED1\u5B9A"),1)])]),u(S,null,{default:a(()=>[u(e(Q),{modelValue:d.value,"onUpdate:modelValue":s[4]||(s[4]=l=>d.value=l),width:400,"close-on-click-modal":!1},{default:a(()=>[o("div",re,[o("div",de,[o("span",ne,B(e(r).has_password?"\u4FEE\u6539\u767B\u5F55\u5BC6\u7801":"\u8BBE\u7F6E\u767B\u5F55\u5BC6\u7801"),1),e(r).has_password?(_(),y(e(f),{key:0,type:"primary",link:"",onClick:b},{default:a(()=>[w(" \u5FD8\u8BB0\u539F\u5BC6\u7801 ")]),_:1})):C("",!0)]),u(e(Y),{ref_key:"formRef",ref:g,class:"mt-[35px]",size:"large",model:t,rules:V},{default:a(()=>[e(r).has_password?(_(),y(e(c),{key:0,prop:"old_password"},{default:a(()=>[u(e(F),{modelValue:t.old_password,"onUpdate:modelValue":s[1]||(s[1]=l=>t.old_password=l),placeholder:"\u8BF7\u8F93\u5165\u539F\u5BC6\u7801",type:"password","show-password":""},null,8,["modelValue"])]),_:1})):C("",!0),u(e(c),{prop:"password"},{default:a(()=>[u(e(F),{modelValue:t.password,"onUpdate:modelValue":s[2]||(s[2]=l=>t.password=l),placeholder:"\u8BF7\u8F93\u51656-20\u4F4D\u6570\u5B57+\u5B57\u6BCD\u6216\u7B26\u53F7\u7EC4\u5408",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),u(e(c),{prop:"password_confirm"},{default:a(()=>[u(e(F),{modelValue:t.password_confirm,"onUpdate:modelValue":s[3]||(s[3]=l=>t.password_confirm=l),placeholder:"\u8BF7\u518D\u6B21\u8F93\u5165\u5BC6\u7801",type:"password","show-password":""},null,8,["modelValue"])]),_:1}),u(e(c),{class:"mt-[60px]"},{default:a(()=>[u(e(f),{class:"w-full",type:"primary",onClick:e(I),loading:e(P)},{default:a(()=>[w(" \u786E\u8BA4 ")]),_:1},8,["onClick","loading"])]),_:1})]),_:1},8,["model"]
|