import{i as _,A as x,_ as h}from"./index-c2dd6a24.js";import{_ as w}from"./index.vue_vue_type_script_setup_true_lang-188644c2.js";import{f as U}from"./date-20546ee0.js";import A from"./bindEmail-e253fdea.js";import{A as C,F as I,L as B,S as D,e as E,b as F}from"./ui-ba7aaa7e.js";import{e as N,d as R,r as T,P as r,Q as p,f as t,a4 as a,a9 as u,H as l,ab as i,I as V,a3 as $,n as L}from"./vue-bf422dc1.js";import"./libs-51817cd7.js";import"./plugins-ca970193.js";import"./others-9f318174.js";import"./echarts-bf9d612c.js";import"./icons-a8498fb6.js";import"./config-6561e667.js";import"./index-b02b5348.js";const z={key:0,class:"status"},H={name:"UserSetting"},P=N({...H,setup(Q){const f=_(),e=R(()=>f.userInfo),d=()=>{var o;(o=$refs.emailRef)==null||o.init()},v=async({name:o,url:s})=>{e[o]=s,(await x({avatar:s})).code===1&&_().setAvatar(s)},m=T(null),g=async o=>{var s;await L(),(s=m.value)==null||s.open(o)};return(o,s)=>{const c=C,n=I,b=B,y=D,k=E,S=F;return r(),p("div",null,[t(S,{title:"",bordered:!1,class:"basic-container",style:{"margin-top":"20px"}},{default:a(()=>[t(c,{style:{"margin-bottom":"20px"},theme:"warning",message:"请完善商户资料，以便更好的为您服务。【用户名/手机号/邮箱可以用来登录】"}),t(k,{"label-align":"left","label-width":150},{default:a(()=>[t(n,{label:"用户头像"},{default:a(()=>[t(w,{theme:"image",initial:e.value,app:"merchant",name:"avatar",data:{type:"image"},onUpdate:v},null,8,["initial"])]),_:1}),t(n,{label:"账号状态",tips:"账号审核状态"},{default:a(()=>[e.value.status?(r(),p("span",z)):u("",!0),l(" "+i(e.value.status?"已审核":"未审核"),1)]),_:1}),t(n,{label:"创建时间",tips:"账号创建时间"},{default:a(()=>[l(i(V(U)(e.value.create_at)),1)]),_:1}),t(n,{label:"用户名称",tips:"系统自动生成随机账号名"},{default:a(()=>[l(i(e.value.username??"未设置"),1)]),_:1}),t(n,{label:"手机号码",tips:"手机号码也是登录账号，不可更改，如需更改请联系管理员"},{default:a(()=>[l(i(e.value.mobile),1)]),_:1}),t(n,{label:"邮箱地址",tips:"邮箱地址可以用来登录账号及消息提醒"},{default:a(()=>[t(y,null,{default:a(()=>[l(i(e.value.email?e.value.email:"未绑定")+" ",1),e.value.email?u("",!0):(r(),$(b,{key:0,theme:"warning",size:"small",onClick:s[0]||(s[0]=j=>g(e.value.email))},{default:a(()=>[l(i(e.value.email?"修改邮箱":"点击绑定"),1)]),_:1}))]),_:1})]),_:1}),t(A,{ref_key:"emailRef",ref:m,onSuccess:d},null,512)]),_:1})]),_:1})])}}});const se=h(P,[["__scopeId","data-v-695ce14c"]]);export{se as default};
