import{_ as e,b as a,aI as s,d as l,e as o,f as t,w as u,i as n,o as r,h as d,j as m,N as i,aB as f,p as c,aL as h,m as p}from"./index-BxaAJ7WT.js";import{_ as I}from"./next-watermark.CZ5RikWk.js";import{_ as g}from"./image-upload.xjsWPFEU.js";import{a as _,_ as b,b as S}from"./uni-forms.CCFlSk6R.js";import"./uni-icons.CRGr2P-m.js";const k=e({data:()=>({userInfo:{}}),methods:{onSexchange(e){this.userInfo.sex=e.detail.value},onUnloadImageSuccess(e,a){this.userInfo.headImage=a.data.originUrl,this.userInfo.headImageThumb=a.data.originUrl},onSubmit(){this.$http({url:"/user/update",method:"PUT",data:this.userInfo}).then((()=>{this.userStore.setUserInfo(this.userInfo),a({title:"修改成功",icon:"none"}),setTimeout((()=>{s()}),1e3)}))}},onLoad(){let e=this.userStore.userInfo;this.userInfo=JSON.parse(JSON.stringify(e))}},[["render",function(e,a,s,k,x,V){const N=l(o("next-watermark"),I),U=n,y=i,w=l(o("image-upload"),g),j=l(o("uni-forms-item"),_),v=l(o("uni-easyinput"),b),T=f,C=c,J=h,L=l(o("uni-forms"),S),O=p;return r(),t(U,{class:"page mine-edit"},{default:u((()=>[d(U,null,{default:u((()=>[d(N,{watermark:String(e.userStore.watermark)},null,8,["watermark"])])),_:1}),d(L,{ref:"form",modelValue:x.userInfo,"label-position":"top","label-width":"100%"},{default:u((()=>[d(j,{label:"头像:",name:"headImage"},{default:u((()=>[d(w,{onSuccess:V.onUnloadImageSuccess},{default:u((()=>[d(y,{src:x.userInfo.headImageThumb,class:"head-image"},null,8,["src"])])),_:1},8,["onSuccess"])])),_:1}),d(j,{label:"用户名:",name:"userName"},{default:u((()=>[d(v,{type:"text",modelValue:x.userInfo.userName,"onUpdate:modelValue":a[0]||(a[0]=e=>x.userInfo.userName=e),disabled:!0},null,8,["modelValue"])])),_:1}),d(j,{label:"昵称:",name:"nickName"},{default:u((()=>[d(v,{modelValue:x.userInfo.nickName,"onUpdate:modelValue":a[1]||(a[1]=e=>x.userInfo.nickName=e),type:"text",placeholder:x.userInfo.userName},null,8,["modelValue","placeholder"])])),_:1}),d(j,{label:"性别:",name:"sex"},{default:u((()=>[d(J,{onChange:V.onSexchange},{default:u((()=>[d(C,{class:"radio"},{default:u((()=>[d(T,{value:"0",checked:0==x.userInfo.sex},null,8,["checked"]),m("男 ")])),_:1}),d(C,{class:"radio"},{default:u((()=>[d(T,{value:"1",checked:1==x.userInfo.sex},null,8,["checked"]),m("女 ")])),_:1})])),_:1},8,["onChange"])])),_:1}),d(j,{label:"签名:",name:"signature"},{default:u((()=>[d(v,{type:"textarea",modelValue:x.userInfo.signature,"onUpdate:modelValue":a[2]||(a[2]=e=>x.userInfo.signature=e),placeholder:"编辑个性标签,展示我的独特态度"},null,8,["modelValue"])])),_:1})])),_:1},8,["modelValue"]),d(O,{type:"primary",onClick:a[3]||(a[3]=e=>V.onSubmit())},{default:u((()=>[m("提交")])),_:1})])),_:1})}],["__scopeId","data-v-aaa00c38"]]);export{k as default};
