mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-04 12:18:14 +00:00
2 lines
5.2 KiB
JavaScript
2 lines
5.2 KiB
JavaScript
/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as E}from"./index-82132406.js";import{t as a}from"./index-5f4ce139.js";import{w as g}from"./index-aae906bf.js";/* empty css */import{a as x,E as I}from"./index-624573cc.js";import{E as U}from"./index-95693143.js";import{E as P}from"./index-acd12562.js";import{E as C}from"./index-4862d1b3.js";import{v as N}from"./directive-a07a10ed.js";import{E as F}from"./index-23f09bd2.js";import{d as k,M as B,r as f,L as H,e as M,q as t,p,f as _,b as R,u as e,x as w,v as q}from"./runtime-core.esm-bundler-7c3fd514.js";import{_ as D}from"./_plugin-vue_export-helper-c27b6911.js";/* empty css */import"./index.vue_vue_type_style_index_0_lang-a42d8a18.js";/* empty css */import"./el-overlay-f7f710bd.js";import"./plugin-vue_export-helper-edbdb6f8.js";import"./index-f02197a7.js";import"./index-868cd458.js";import"./index-a3cf5375.js";import"./event-9519ab40.js";import"./focus-trap-bb1e8c7a.js";import"./index-7b0897f9.js";import"./error-492b6a5b.js";import"./attachment-51c3470b.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./index-be5dc120.js";import"./index-2083be2e.js";import"./index-be5868d6.js";import"./index-cf47f151.js";import"./sys-aa893c6b.js";import"./common-465e36b3.js";import"./index-548a7823.js";import"./validator-62f68fe3.js";import"./index-c656f08b.js";import"./index-2f0b1bf3.js";import"./index-9bac81c5.js";import"./index-f97852b4.js";import"./el-switch-3d36d31d.js";import"./index-47617222.js";import"./index-381e0c1f.js";import"./index-470ade69.js";import"./isEqual-f40f939e.js";import"./_Uint8Array-de4f83bb.js";import"./flatten-b3585bb8.js";import"./index-800b62de.js";import"./index-9fbce820.js";import"./index-2804b007.js";import"./index-4683bff4.js";import"./common-cc37bda4.js";import"./common-2cf17469.js";import"./vue-router-b5675730.js";import"./el-radio-c9a1047c.js";import"./el-avatar-7d17482e.js";import"./_baseClone-cf40e5b2.js";import"./_initCloneObject-bc5ed9bb.js";function L(u){return g.get("auth/get")}function S(u){return g.put("auth/update",u,{showErrorMessage:!0,showSuccessMessage:!0})}const T={class:"main-container attachment-container"},$={class:"form-tip"},j={class:"fixed-footer-wrap"},z={class:"fixed-footer"},A=k({__name:"personal",setup(u){let o=B({head_img:"",real_name:"",original_password:"",password:"",password_copy:""});const c=f(),l=f(!0);(()=>{l.value=!0,L().then(d=>{l.value=!1;let r=d.data;o.head_img=r.head_img,o.real_name=r.real_name,o.original_password=r.original_password,o.password=r.password,o.password_copy=r.password}).catch(()=>{l.value=!1})})();const h=d=>{l.value||!d||d.validate(r=>{if(r){let i="";if(o.password&&!o.original_password&&(i=a("originalPasswordHint")),o.password&&o.original_password&&!o.password_copy&&(i=a("newPasswordHint")),o.password&&o.original_password&&o.password_copy&&o.password!=o.password_copy&&(i=a("doubleCipherHint")),i){F({type:"error",message:i});return}l.value=!0,S(o).then(m=>{l.value=!1}).catch(m=>{l.value=!1})}else return console.log("error submit!"),!1})};return(d,r)=>{const i=E,m=x,n=U,v=I,b=P,y=C,V=N;return H((R(),M("div",T,[t(b,{class:"box-card !border-none",shadow:"never"},{default:p(()=>[t(v,{model:e(o),"label-width":"90px",ref_key:"formRef",ref:c,rules:d.formRules,class:"page-form"},{default:p(()=>[t(m,{label:e(a)("headImg")},{default:p(()=>[t(i,{modelValue:e(o).head_img,"onUpdate:modelValue":r[0]||(r[0]=s=>e(o).head_img=s),limit:1},null,8,["modelValue"])]),_:1},8,["label"]),t(m,{label:e(a)("realName")},{default:p(()=>[t(n,{modelValue:e(o).real_name,"onUpdate:modelValue":r[1]||(r[1]=s=>e(o).real_name=s),placeholder:e(a)("realNamePlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(m,{label:e(a)("originalPassword")},{default:p(()=>[t(n,{modelValue:e(o).original_password,"onUpdate:modelValue":r[2]||(r[2]=s=>e(o).original_password=s),type:"password",placeholder:e(a)("originalPasswordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t(m,{label:e(a)("password")},{default:p(()=>[t(n,{modelValue:e(o).password,"onUpdate:modelValue":r[3]||(r[3]=s=>e(o).password=s),type:"password",placeholder:e(a)("passwordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"]),_("div",$,w(e(a)("passwordTip")),1)]),_:1},8,["label"]),t(m,{label:e(a)("passwordCopy")},{default:p(()=>[t(n,{modelValue:e(o).password_copy,"onUpdate:modelValue":r[4]||(r[4]=s=>e(o).password_copy=s),type:"password",placeholder:e(a)("passwordPlaceholder"),clearable:"",class:"input-width"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1}),_("div",j,[_("div",z,[t(y,{type:"primary",onClick:r[5]||(r[5]=s=>h(c.value))},{default:p(()=>[q(w(e(a)("save")),1)]),_:1})])])])),[[V,l.value]])}}});const ie=D(A,[["__scopeId","data-v-9b33dbc0"]]);export{ie as default};
|