var j=Object.defineProperty,A=Object.defineProperties;var B=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;var x=(o,a,e)=>a in o?j(o,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[a]=e,N=(o,a)=>{for(var e in a||(a={}))L.call(a,e)&&x(o,e,a[e]);if($)for(var e of $(a))D.call(a,e)&&x(o,e,a[e]);return o},I=(o,a)=>A(o,B(a));var z=(o,a,e)=>new Promise((_,g)=>{var n=l=>{try{s(e.next(l))}catch(r){g(r)}},p=l=>{try{s(e.throw(l))}catch(r){g(r)}},s=l=>l.done?_(l.value):Promise.resolve(l.value).then(n,p);s((e=e.apply(o,a)).next())});import{d as E,T as S,e as J,r as T,u as V,f as U,g as c,z as q,aB as H,B as d,D as f,aj as M,_ as O,o as F,h as t,j as R,F as u,P as y,J as X,aC as Y,X as k,Y as G,aD as K,aE as Q,aF as W,$ as C,q as Z}from"./index-C8qz7c0N.js";import{_ as ee}from"./wd-img.r8J420F3.js";import{_ as ae,a as te}from"./wd-cell-group.Lpf_90HK.js";import{_ as oe}from"./z-paging.Dxcf6OUf.js";const se=E({name:"MyProfile",__name:"myProfile",setup(o){const a=S(),e=J(()=>H()),_=T(!1);function g(){return z(this,null,function*(){var n,p;try{const s=yield new Promise((h,b)=>{Y({count:1,sourceType:["album","camera"],success:h,fail:b})});let l="",r=0;if(!s.tempFilePaths||s.tempFilePaths.length===0)return;l=s.tempFilePaths[0],r=((p=(n=s.tempFiles)==null?void 0:n[0])==null?void 0:p.size)||0;const w=5*1024*1024;if(r>w){k.error(y("myProfile.upload.sizeLimit"));return}_.value=!0,yield G({title:y("myProfile.upload.uploading"),mask:!0});const i=yield new Promise((h,b)=>{K({url:`${Q()}`,filePath:l,name:"file",success:h,fail:b})}),m=JSON.parse(i.data);if(m.code!=="200")throw new Error(m.message);const v=m.data;yield W({headPic:v});const P=I(N({},e.value),{headPic:v});a.setUserInfo(P),a.getUserInfo(),C(),k.success(y("myProfile.upload.success"))}catch(s){C(),k.error(s.message||y("myProfile.upload.error"))}finally{_.value=!1}})}return V(()=>{a.getUserInfo()}),(n,p)=>{const s=d(f("wd-img"),ee),l=d(f("wd-loading"),M),r=R,w=d(f("wd-icon"),O),i=d(f("wd-cell"),ae),m=d(f("wd-cell-group"),te),v=d(f("z-paging"),oe),P=q("layout-default-uni");return F(),U(P,null,{default:c(()=>[t(v,null,{default:c(()=>[t(r,{class:"py-20rpx"},{default:c(()=>[t(m,{"custom-class":"mb-20rpx",border:""},{default:c(()=>[t(i,{title:u(y)("myProfile.avatar"),center:""},{default:c(()=>[t(r,{class:"flex items-center justify-end",onClick:g},{default:c(()=>[t(r,{class:"relative flex items-center justify-center"},{default:c(()=>[t(s,{width:"64rpx",height:"64rpx",round:"",src:u(e).headPic},null,8,["src"]),u(_)?(F(),U(r,{key:0,class:"absolute inset-0 flex items-center justify-center rounded-full bg-black bg-opacity-50"},{default:c(()=>[t(l,{size:"20rpx",color:"#fff"})]),_:1})):X("",!0)]),_:1}),t(w,{name:"arrow-right","custom-class":"ml-10rpx",size:"36rpx"})]),_:1})]),_:1},8,["title"]),t(i,{title:n.$t("myProfile.userId"),value:u(e).userNo},null,8,["title","value"]),t(i,{title:n.$t("myProfile.userName"),value:u(e).name},null,8,["title","value"]),t(i,{title:n.$t("myProfile.mobileNumber"),value:u(e).phoneNo},null,8,["title","value"])]),_:1}),t(m,{"custom-class":"mb-20rpx",border:""},{default:c(()=>[t(i,{title:n.$t("myProfile.bankName"),value:u(e).bank},null,8,["title","value"]),t(i,{title:n.$t("myProfile.bankAccountName"),value:u(e).bankAccountName},null,8,["title","value"]),t(i,{title:n.$t("myProfile.bankAccountNo"),value:u(e).bankAccount},null,8,["title","value"])]),_:1})]),_:1})]),_:1})]),_:1})}}}),ue=Z(se,[["__scopeId","data-v-a1807df0"]]);export{ue as default};
