mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
14 KiB
2 lines
14 KiB
2 years ago
|
var ye=Object.defineProperty,ke=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var te=Object.getOwnPropertySymbols;var Ee=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var ae=(_,v,g)=>v in _?ye(_,v,{enumerable:!0,configurable:!0,writable:!0,value:g}):_[v]=g,V=(_,v)=>{for(var g in v||(v={}))Ee.call(v,g)&&ae(_,g,v[g]);if(te)for(var g of te(v))Ae.call(v,g)&&ae(_,g,v[g]);return _},j=(_,v)=>ke(_,be(v));import{_ as Ie}from"./main-nav.9110259b.js";import{d as oe,V as r,W as h,Y as d,ah as $e,r as c,Z as Pe,ca as se,a1 as Ue,ae as xe,a3 as u,a4 as s,a5 as k,a6 as f,cw as ne,az as Re,a2 as t,a9 as U,aY as Se,aZ as qe,a8 as p,bj as x,a7 as R,bM as ze,bN as Ne,cx as Ke,cy as Me,cz as Ve,cA as je,cB as Te,cC as Le,ad as Oe,J as We,_ as Ge,cD as Je,cE as Ye,cF as Ze,cG as He}from"./index.f480f018.js";import{c as Qe}from"./Upload.efe3adfd.js";import{_ as Xe}from"./Alert.a854329b.js";import{_ as eu}from"./InputGroup.f69c4956.js";const uu={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},tu=d("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[d("path",{d:"M9 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3"}),d("path",{d:"M9 15h3l8.5-8.5a1.5 1.5 0 0 0-3-3L9 12v3"}),d("path",{d:"M16 5l3 3"})],-1),au=[tu];var su=oe({name:"Edit",render:function(v,g){return r(),h("svg",uu,au)}});const T=_=>(ze("data-v-6eb93a4d"),_=_(),Ne(),_),nu={class:"base-line avatar"},ou=p("\u66F4\u6539\u5934\u50CF"),lu={class:"base-line"},ru=T(()=>d("span",{class:"base-label"},"\u6635\u79F0",-1)),iu={key:0},du={class:"base-line"},cu=T(()=>d("span",{class:"base-label"},"\u7528\u6237\u540D",-1)),pu={key:0},_u=p(" \u6362\u7ED1\u624B\u673A "),vu={key:1},mu=p(" \u6210\u529F\u7ED1\u5B9A\u624B\u673A\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u6362\u5934\u50CF\u3001\u53D1\u52A8\u6001\u3001\u56DE\u590D\u7B49\u4EA4\u4E92~"),fu=T(()=>d("br",null,null,-1)),hu={key:2,class:"phone-bind-wrap"},gu={class:"captcha-img-wrap"},Fu={class:"captcha-img"},Cu=["src"],wu={class:"form-submit-wrap"},Bu=p(" \u53D6\u6D88 "),Du=p(" \u7ED1\u5B9A "),yu={key:0},ku=p(" \u91CD\u65B0\u6FC0\u6D3B "),bu={key:1},Eu=p(" \u6210\u529F\u6FC0\u6D3B\u540E\u540E\uFF0C\u624D\u80FD\u53D1\uFF08\u516C\u5F00/\u597D\u53CB\u53EF\u89C1\uFF09\u52A8\u6001\u3001\u56DE\u590D~"),Au=T(()=>d("br",null,null,-1)),Iu={key:2,class:"phone-bind-wrap"},$u={class:"captcha-img-wrap"},Pu={class:"captcha-img"},Uu=["src"],xu={class:"form-submit-wrap"},Ru=p(" \u53D6\u6D88 "),Su=p(" \u6FC0\u6D3B "),qu=p(" \u60A8\u5DF2\u8BBE\u7F6E\u5BC6\u7801 "),zu=p(" \u91CD\u7F6E\u5BC6\u7801 "),Nu={key:1,class:"phone-bind-wrap"},Ku={class:"form-submit-wrap"},Mu=p(" \u53D6\u6D88 "),Vu=p(" \u66F4\u65B0 "),ju=oe({setup(_){const v="/v1/attachment",g="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),S=c("public/avatar"),A="true".toLowerCase()==="true",le="false".toLowerCase()==="true",o=Pe(),I=c(!1),q=c(!1),z=c(!1),Y=c(),Z=c(),b=c(!1),N=c(!1),$=c(!1),P=c(!1),E=c(60),D=c(!1),y=c(!1),H=c(),Q=c(),X=c(),ee=c(),a=se({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=se({id:"",b64s:"",imgCaptcha:"",activate_code:""}),re=async n=>{var e,F;return S.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("\u5934\u50CF\u4EC5\u5141\u8BB8 png/jpg \u683C\u5F0F"),!1):S.value==="image"&&((F=n.file.file)==null?void 0:F.size)>1048576?(window.$message.warning("\u5934\u50CF\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71MB"),!1):!0},ie=({file:n,event:e})=>{var F;try{let C=JSON.parse((F=e.target)==null?void 0:F.response);C.code===0&&S.value==="public/avatar"&&Ke({avatar:C.data.content}).then(m=>{var K;window.$message.success("\u5934\u50CF\u66F4\u65B0\u6210\u529F"),(K=Y.value)==null||K.clear(),o.commit("updateUserinfo",j(V({},o.state.userInfo),{avatar:C.data.content}))}).catch(m=>{console.log(m)})}catch{window.$message.error("\u4E0A\u4F20\u5931\u8D25")}},de=(n,e)=>!!a.password&&a.password.startsWith(e)&&a.passwo
|