import{u as e,aH as a,r as l,S as s,l as t}from"./common-utils-RDWuRZ1M.js";import{C as o,D as u,r as n,G as i,o as r,b as d,w as c,aL as p,h as m,P as v,v as b,q as y,u as x,y as f,f as g,E as _,V as h,R as w,a as j,a4 as V,I as A,t as C,aT as k,bo as I,bd as S,x as T}from"./vendor-jA_NIjzi.js";import{H as U}from"./Header-X_QfKFhH.js";import{_ as N,u as O,M as Q}from"./common-store-kFD1YPwN.js";import"./vendor-crypto-Vtl7-GZS.js";/* empty css              */import"./SvgIcon-a1Rg7hQY.js";import"./vendor-mqtt-lYGapirz.js";const q=["type"],H=N(Object.assign({name:"Custom-Input",inheritAttrs:!0},{__name:"Input",props:{modelValue:{type:[String,Number],required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){var a;const l=o(e,"modelValue"),s=u(),t=n(null!=(a=null==s?void 0:s.type)?a:"text"),w=i((()=>"password"===t.value)),j=n(!1),V=()=>{const e={...s};return delete e.class,e},A=()=>{setTimeout((()=>{j.value=!1}),0)},C=({target:{value:e}})=>{setTimeout((()=>{l.value=e.replace(/[\u4e00-\u9fa5]/g,"")}),0)};return(e,a)=>{const o=h;return r(),d("div",v({class:"custom-input h-10 border-solid border-[#363F49] rounded-md bg-[rgba(255,255,255,0.08)] px-[14px] flex items-center gap-2 [&:not(:last-child)]:mb-3"},x(s).class),[c(m("input",v({class:"!text-[#7C8288] !px-0 flex-1",style:{background:"none"}},V(),{type:t.value,"onUpdate:modelValue":a[0]||(a[0]=e=>l.value=e),onInput:C,onFocus:a[1]||(a[1]=e=>j.value=!0),onBlur:A}),null,16,q),[[p,l.value]]),c(y(o,{name:"clear",onClick:a[2]||(a[2]=e=>l.value="")},null,512),[[b,l.value&&j.value]]),"password"===x(s).type?(r(),f(o,{key:0,name:w.value?"closed-eye":"eye-o",onClick:a[3]||(a[3]=e=>t.value=w.value?"text":"password")},null,8,["name"])):g("",!0),_(e.$slots,"suffix",{},void 0,!0)],16)}}}),[["__scopeId","data-v-eeaa3819"],["__file","Input.vue"]]),P={class:"h-full"},B=["src"],D={class:"container"},F={class:"mb-[14px] input-label"},M={class:"mb-[14px] input-label"},R={class:"text-[14px]"},W={class:"mb-[14px] input-label"},E={class:"text-[14px]"},G=N(Object.assign({name:"addWithdrawalWays"},{__name:"index",setup(o){const{params:{type:u}}=w(),{theme:c}=e(),p={2:{title:"支付宝",params:1},3:{title:"微信",params:2}},{userinfo:v}=j(O()),b=n([]),f=n({alipayAccount:"",iconQrCode:""}),g=i((()=>!Object.values(f.value).every(Boolean))),_=e=>new Promise((async(l,s)=>{const t=k({duration:0});try{const{body:{code:t,data:o}}=await a({file:e});1===t?(f.value.iconQrCode=o.imageUrl,l(e)):s()}catch(o){s()}finally{t.close()}})),{back:h}=V(),N=n(!1),q=async()=>{N.value=!0;const e=k({duration:0});try{await l({url:"/gbw-user-api/userAlipayAccount/bindUserAlipayAccount",method:Q.POST,params:{alipayAccount:f.value.alipayAccount,bindType:u,iconQrCode:f.value.iconQrCode,realName:v.value.realName}}),I("绑定成功"),h()}finally{e.close(),N.value=!1}};return(e,a)=>{const l=S,o=s;return r(),d("div",P,[y(U,{title:p[x(u)].title,isRightShow:!1},{right:A((()=>[m("img",{src:x(t)("mine/fundDetails/kefu_".concat(x(c),".png")),alt:"service",class:"w-[18px]"},null,8,B)])),_:1},8,["title"]),m("div",D,[m("div",F,[a[2]||(a[2]=m("div",{class:"text-[14px]"},"真实姓名",-1)),y(H,{class:"border-1","model-value":x(v).realName,disabled:""},null,8,["model-value"])]),m("div",M,[m("div",R,C(p[x(u)].title)+"账户",1),y(H,{class:"border-1",modelValue:f.value.alipayAccount,"onUpdate:modelValue":a[0]||(a[0]=e=>f.value.alipayAccount=e)},null,8,["modelValue"])]),m("div",W,[m("div",E,C(p[x(u)].title)+"收款码",1),y(l,{accept:"image/*","max-count":1,"before-read":_,modelValue:b.value,"onUpdate:modelValue":a[1]||(a[1]=e=>b.value=e)},null,8,["modelValue"])]),y(o,{type:"primary",block:"",disabled:g.value,onClick:q},{default:A((()=>a[3]||(a[3]=[T("确认")]))),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-45d7b4ee"],["__file","index.vue"]]);export{G as default};
