chatapp-h5/h5/js/BankCard-DMajsnjz-1776148658686.js
2026-04-14 17:58:21 +08:00

2 lines
11 KiB
JavaScript

import{_ as G,r as y,k as P,I as Y,U as E,o as q,c as r,l as h,q as i,b as e,t as o,m as f,G as A,F as U,x as D,D as c,J as Z,aT as X,ai as J,an as O,j as d,n as B,v as m,y as $,Q as ee,Y as te,E as C,aU as oe,aS as se,aV as ae,S as ie}from"./index-CIAVq8iD-1776148658686.js";import{_ as H,a as L}from"./USDT-n55NL1Y8-1776148658686.js";import{_ as ne}from"./arrow-Cf0JWzXk-1776148658686.js";import{a as I}from"./toast-aIWCznBB-1776148658686.js";import{G as le}from"./GeneralHeader-ClI1i1Ud-1776148658686.js";import{G as _}from"./GradientBorder-CfwSeIMB-1776148658686.js";import{m as de}from"./MaskLayer-CMaJd7Gb-1776148658686.js";const re="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAN1SURBVHgB7ZvtUdwwEIb3GP7nOkAdhFSAU0HoIHQQUgHuAFIB0EFSgS8VHFTgo4IjFbxZId+MvCfZPlkyMnPPzA6nsb7Wu5IsaSE6cuRDsaCEAFjyn4LlnOWMRTWy49WSZ5YnLYvFYkNzgZVULDcsFcJZs9zpuihXuHPFSCV9VCzfKRcCFK0t2Q4v9pb/nN4LbnzJcot+62jXvESHe2pFmjw677qnzntM7eowVq09HdJWK2EmrND69Tzwo6ONejJrNx3xKRp9rHGdVx2KX1NKYGZfF3djLDqg3WXjNS5uKAUeZWuWgiYCZqzXyZWG24315KJoYmDG9zqZezdv1aVsMhce0KelR+mCxtC8zTonZa2+uZSuR/WNCz84KlSUCR6D3FIIHld+vy8dDzDfBONd2/HmSsoUmGXRpjq0givEHBuJgRnP22ArY38zkM9uxYPDSMOsDDMRtKxLkWnG3SVFxmFlNaSQHA9Rv1fR3mGVFBHsf36WQwqtD35Lh3WqTuU9MGN5uFs73HlNkUmpcFN/JXRoTbYnIr9cZ//S/HgW6Qs70afwYetZHqxE+oudkAp/FukXmh9PIn1mJ6TCLX/n82FZOHscZ9rKTpyKh7bCrxQIzIb8yvNY2b87Jq7f3PmfFMbGakd5c8WYQWFOH2NRUABdepxQfII9w8EniswpRYbdcMVv9Rf//ObJokR648n3yHX9oTCGDU25aFMCkPjDo2nDprW0Spd+EQUVzQzsH1L8sxNS4Y1Iy3V5DiiRbi2tJ10Pma80PwqRbu0HpMIrkZ6jhS9E+rkzN3p2G2NB2u1h727PtQ7LHVLsC6tH63fosuNDnqL07/Ycb2lLkYH5GisoMtg/aVVDC1ai4Mc9xGsKy8PtLfI/pq1HGclh5bArjAnA/lXu4ZMhYl1hJAYxr4Swf2RbI//LtHsKxTM2cr8uVTQGj2vneiEe53aTK7r2KK1oYpA65MFqqHQ0UmPCO2P448NKSgE6QoeQPmzJF/VXUko87r2zdqrANF9MZtrANKsTvnipneI6zElRII1FbzoU1W0UNCUwk8cDutnFPevNwnlPXbvg0qqnzqRRf730WNvFFu0Q4qFUyOlLD2asVYhPlZWiEhj3HBL33KekXhEURSb1P3koMlewWvT52NKSHZtG9BGxPkRc8QF8zNuLI0c+Mv8B6uLLezw4tUMAAAAASUVORK5CYII=",ce={class:"fullPage"},pe={style:{padding:"16px",display:"flex","flex-direction":"column",gap:"8px"}},ue={style:{"font-weight":"600"}},ye={key:0,style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.4)"}},fe={key:1,style:{display:"flex","align-items":"center",gap:"2vw"}},ve={style:{width:"4.5em"}},_e={key:0,src:H,alt:"",style:{width:"100%",display:"block"}},he={key:1,src:L,alt:"",style:{width:"100%",display:"block"}},me={style:{flex:"1","min-width":"0",display:"flex","flex-direction":"column","justify-content":"space-around"}},ge={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.8)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},we={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.4)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},xe={style:{"font-weight":"600"}},ke={style:{padding:"12px"}},be={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.4)"}},Ae={style:{padding:"12px",display:"flex","flex-direction":"column",gap:"2vw"}},Ce={style:{display:"flex","align-items":"center",gap:"2vw"}},Ne={style:{width:"4.5em"}},Fe={key:0,src:H,alt:"",style:{width:"100%",display:"block"}},ze={key:1,src:L,alt:"",style:{width:"100%",display:"block"}},Se={style:{flex:"1","min-width":"0",display:"flex","flex-direction":"column",gap:"4px"}},Ue={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.8)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},De={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.4)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},Be={style:{display:"flex","justify-content":"space-between",gap:"4vw"}},Ie=["onClick"],He=["onClick"],Le={key:1,style:{flex:"1","min-width":"0","font-size":"1em","font-weight":"700",padding:"12px 12px",color:"#fff","border-radius":"9999px",background:"linear-gradient(135deg, #d0d0d0 2.82%, #5b5b5b 99.15%)",display:"flex","justify-content":"center","align-items":"center"}},Me={style:{position:"fixed",width:"100%",bottom:"10px",display:"flex","justify-content":"center","align-items":"center"}},Re={style:{width:"5vw",display:"flex","justify-content":"center","align-items":"center"}},Te={src:re,alt:"",style:{display:"block",width:"100%","object-fit":"cover"}},We={style:{color:"#fff","font-size":"1.1em","font-weight":"500"}},Ve={style:{display:"flex","justify-content":"center","align-items":"center"}},je={style:{"font-size":"1.1em","font-weight":"600",color:"#333"}},Ke={style:{"font-size":"0.9em","font-weight":"600","margin-bottom":"4px"}},Qe={style:{padding:"12px"}},Ge={key:0,style:{"font-size":"0.9em","font-weight":"500"}},Pe={key:1,style:{"font-size":"0.9em","font-weight":"500",color:"rgba(0, 0, 0, 0.4)"}},Ye={style:{}},Ee={style:{"max-height":"50vw",padding:"12px","padding-top":"0",display:"flex","flex-direction":"column",gap:"6px"},class:"overflow-y-auto"},qe=["onClick"],Ze={key:0,style:{"font-size":"0.9em","font-weight":"600","margin-bottom":"4px"}},Xe={style:{padding:"12px"}},Je=["placeholder"],Oe={style:{"font-size":"0.9em","font-weight":"600","margin-bottom":"4px"}},$e={style:{padding:"12px"}},et=["placeholder"],tt={style:{"font-size":"0.9em","font-weight":"600","margin-bottom":"4px"}},ot={style:{padding:"12px"}},st=["placeholder"],at={style:{display:"flex","justify-content":"center","align-items":"center"}},it={__name:"BankCard",setup(nt){const M=Z(),R=y(M.query||null),{t:s,locale:N}=P();N.value&&Y(N.value);const k=y(!1),v=y(!1),g=y(!1),F=y([]),w=y([]),p=y({cardType:"",cardName:"",cardNo:"",payee:""}),l=y({userId:E(),cardType:"",cardName:"",cardNo:"",payee:""}),z=ie(()=>l.value.cardType&&l.value.cardName&&l.value.cardNo&&l.value.payee),b=()=>{k.value=!1,v.value=!1,g.value=!1},T=t=>{l.value.cardType=t,t==="USDT"?(l.value.cardName=t,g.value=!1):t==="BANK"&&(l.value.cardName="",g.value=!0),v.value=!v.value},W=async()=>{if(z.value){const t=await ae(l.value);t.status?(b(),l.value={...l.value,cardType:"",cardName:"",cardNo:"",payee:""},x()):console.log("添加银行卡失败:",t.message)}},V=async()=>{try{const t=await X();console.log("提现方式列表:",t),t.status&&t.body&&(F.value=t.body)}catch(t){console.error("获取提现方式列表失败:",t)}},x=async()=>{try{const t=await J();if(console.log("银行卡列表:",t),t.status&&t.body){w.value=t.body;const a=w.value.find(u=>u.use);a?p.value=a:p.value={cardType:"",cardName:"",cardNo:"",payee:""}}}catch(t){console.error("获取银行卡列表失败:",t)}},j=async t=>{try{(await oe({id:t})).status&&x()}catch(a){I(a.response?.errorMsg||"")}},K=async t=>{try{(await se({id:t})).status&&x()}catch(a){I(a.response?.errorMsg||"")}},Q=()=>{V(),x()};return q(()=>{Q()}),(t,a)=>{const u=O("smart-img");return d(),r("div",ce,[h(le,{showLanguageList:!0,title:i(s)("bank_card"),backQuery:R.value,style:{width:"100%"},color:"black"},null,8,["title","backQuery"]),e("div",pe,[e("div",ue,o(i(s)("currently_in_use")),1),h(_,null,{default:f(()=>[e("div",{style:B([{padding:"12px"},p.value.cardNo?"border-radius: 11.75px;border: 0.5px solid rgba(255, 255, 255, 0.08);":""])},[p.value.cardNo?(d(),r("div",fe,[e("div",ve,[p.value.cardType=="BANK"?c((d(),r("img",_e,null,512)),[[u]]):m("",!0),p.value.cardType=="USDT"?c((d(),r("img",he,null,512)),[[u]]):m("",!0)]),e("div",me,[e("div",ge,o(i(s)("payee"))+": "+o(p.value.payee),1),e("div",we,o(i(s)("card_number"))+": "+o(p.value.cardNo),1)])])):(d(),r("div",ye,o(i(s)("no_bank_cards_in_use")),1))],4)]),_:1}),e("div",xe,o(i(s)("all_bank_cards")),1),w.value.length===0?(d(),A(_,{key:0},{default:f(()=>[e("div",ke,[e("div",be,o(i(s)("no_bank_cards_added")),1)])]),_:1})):(d(!0),r(U,{key:1},D(w.value,n=>(d(),A(_,{key:n.id},{default:f(()=>[e("div",Ae,[e("div",Ce,[e("div",Ne,[n.cardType=="BANK"?c((d(),r("img",Fe,null,512)),[[u]]):m("",!0),n.cardType=="USDT"?c((d(),r("img",ze,null,512)),[[u]]):m("",!0)]),e("div",Se,[e("div",Ue,o(i(s)("payee"))+": "+o(n.payee),1),e("div",De,o(i(s)("card_number"))+": "+o(n.cardNo),1)])]),e("div",Be,[e("div",{style:{flex:"1","min-width":"0","font-size":"1em","font-weight":"700",padding:"12px 12px",color:"#fff","border-radius":"9999px",background:"linear-gradient(135deg, #ff9294 2.82%, #ff4548 99.15%)",display:"flex","justify-content":"center","align-items":"center"},onClick:S=>j(n.id)},o(i(s)("delete")),9,Ie),n.use?(d(),r("div",Le,o(i(s)("using")),1)):(d(),r("div",{key:0,style:{flex:"1","min-width":"0","font-size":"1em","font-weight":"700",padding:"12px 12px",color:"#fff","border-radius":"9999px",background:"linear-gradient(269deg, #feb219 7.04%, #ff9326 96.78%)",display:"flex","justify-content":"center","align-items":"center"},onClick:S=>K(n.id)},o(i(s)("use")),9,He))])])]),_:2},1024))),128))]),a[6]||(a[6]=e("div",{style:{height:"50px"}},null,-1)),e("div",Me,[e("div",{style:{padding:"8px 12px","border-radius":"8px",background:"linear-gradient(135deg, #a6f1b2 2.82%, #2fff3d 99.15%)",display:"flex","align-items":"center",gap:"4px"},onClick:a[0]||(a[0]=n=>k.value=!0)},[e("div",Re,[c(e("img",Te,null,512),[[u]])]),e("div",We,o(i(s)("add_new_payment_method")),1)])]),h(de,{maskLayerShow:k.value,onClick:b},{default:f(()=>[e("div",{style:{position:"fixed",bottom:"0",width:"100%"},onClick:b},[e("div",{style:{background:"white","border-radius":"16px 16px 0 0","max-height":"80vh",display:"flex","flex-direction":"column",gap:"10px",padding:"20px"},onClick:a[5]||(a[5]=$(()=>{},["stop"]))},[e("div",Ve,[e("div",je,o(i(s)("add_new_payment_method")),1)]),e("div",Ke,o(i(s)("withdrawal_method"))+": ",1),e("div",null,[h(_,null,{default:f(()=>[e("div",Qe,[e("div",{style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:a[1]||(a[1]=n=>v.value=!v.value)},[l.value.cardType?(d(),r("div",Ge,o(l.value.cardType),1)):(d(),r("div",Pe,o(i(s)("choose_withdrawal_method")),1)),c(e("img",{src:ne,alt:"",style:{display:"block",width:"6vw",transition:"transform 0.5s"},class:ee(["flipImg",{rotated:v.value}])},null,2),[[u]])])]),c(e("div",Ye,[e("div",Ee,[(d(!0),r(U,null,D(F.value,n=>(d(),r("div",{key:n,style:{"font-size":"0.8em"},onClick:S=>T(n)},o(n),9,qe))),128))])],512),[[te,v.value]])]),_:1})]),g.value?(d(),r("div",Ze,o(i(s)("card_name"))+": ",1)):m("",!0),g.value?(d(),A(_,{key:1},{default:f(()=>[e("div",Xe,[c(e("input",{type:"text",name:"",id:"",placeholder:i(s)("enter_card_name"),style:{width:"100%",outline:"none",border:"none","background-color":"transparent",color:"black"},"onUpdate:modelValue":a[2]||(a[2]=n=>l.value.cardName=n)},null,8,Je),[[C,l.value.cardName]])])]),_:1})):m("",!0),e("div",Oe,o(i(s)("card_number"))+": ",1),h(_,null,{default:f(()=>[e("div",$e,[c(e("input",{type:"text",name:"",id:"",placeholder:i(s)("enter_card_number"),style:{width:"100%",outline:"none",border:"none","background-color":"transparent",color:"black"},"onUpdate:modelValue":a[3]||(a[3]=n=>l.value.cardNo=n)},null,8,et),[[C,l.value.cardNo]])])]),_:1}),e("div",tt,o(i(s)("payee")),1),h(_,null,{default:f(()=>[e("div",ot,[c(e("input",{type:"text",name:"",id:"",placeholder:i(s)("enter_payee"),style:{width:"100%",outline:"none",border:"none","background-color":"transparent",color:"black"},"onUpdate:modelValue":a[4]||(a[4]=n=>l.value.payee=n)},null,8,st),[[C,l.value.payee]])])]),_:1}),e("div",at,[e("div",{style:B([{"margin-top":"10px","border-radius":"32px",padding:"12px 20px",color:"#fff","font-weight":"590","text-align":"center"},{background:z.value?"linear-gradient(269deg, #FEB219 7.04%, #FF9326 96.78%)":"linear-gradient(135deg, #D1CED6 2.82%, #7C7882 99.15%)"}]),onClick:W},o(i(s)("confirm")),5)])])])]),_:1},8,["maskLayerShow"])])}}},ft=G(it,[["__scopeId","data-v-17ccd59f"]]);export{ft as default};