12 lines
15 KiB
JavaScript
12 lines
15 KiB
JavaScript
import{_ as H,k as Z,I as q,o as W,a as $,c as a,l as v,m as _,q as o,b as e,t,ag as M,D as g,v as u,n as T,ap as ee,aj as te,ai as ie,r as f,S as Y,aM as se,u as oe,J as ne,an as ae,j as l,F as z,x as O,y as E,aS as le}from"./index-CIAVq8iD-1776148658686.js";import{_ as I}from"./arrow-Cf0JWzXk-1776148658686.js";import{_ as U,a as K}from"./USDT-n55NL1Y8-1776148658686.js";import{s as re}from"./applyStore-hrMPMjJv-1776148658686.js";import{u as de}from"./identity-TzakE_vG-1776148658686.js";import{G as ce}from"./GeneralHeader-ClI1i1Ud-1776148658686.js";import{G as D}from"./GradientBorder-CfwSeIMB-1776148658686.js";import{m as ue}from"./MaskLayer-CMaJd7Gb-1776148658686.js";const pe="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEMAAABDCAYAAADHyrhzAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAOdEVYdFNvZnR3YXJlAEZpZ21hnrGWYwAABClJREFUeAHlnItxnDAQhn9nUsB1YKUCu4MoFeQ6OFJB3AFKBTlXcHTgSQW4gzgVQCo4d5CwPjRHzqyQhB44fDPrhwAhfq1WICSuYGbT2baz586eOmvhB+Vz29lN//u2T9Omee6t7Y3O+av//YyMiM6azv701vRpLseXndWDPOYY5fMVbmUIRoXXBdpPHEO1TAUOJYBJmB0SUjOFGINEKDs7Iq4Il9YgkSi2YpAnpBYhiijv4Y/o7NCZhDst/g2Kvzu7HuSrA65LWarOis6+wD/Qs5g8w8UbjjgHP5cLJCTcYxCdb7aXXMKJ8d2yUFqADcIgcKr5xvL8JQLiUhuXIkjEpYCdKA8IVBmuYlDhJNJSYFqUnwggiIsYe4RrDq4IjN8TBRXEVgyFk0cMLQd3MJfzgBn4xgzdZATScwtzsynhyRwxdCC1RSAcAmZBtvBgrhiNxTl2ON+v0P6u9yEcAvx90BEe4u8R1zMEU9BQgfh2RtkwVtgG8WLGljk2lHcQpqAqL3c2PZu0nX2AX+9gMxizcUz3gbz7I8bjxAGn61sEBSxrbCYkLhc/dsMd3+H/hzz0G7NNDf9ZgxgENZd2JF1g4IlrEYPgvKPUf6xJjArjQV2iD9prEoO4Z9Jfepu1iVEx6dT9rk6MFuOBdJWeQfwYSaOYIdYoxhOTLtcoxiOTvkrPaDHexV5rMajNFMg3ZJeaMTEEPbXSIzM93+unRWpTn5B5CkBkWrweYtiQZ9Cj7PCxmcQpkI/PyMOLGGODKTeID+d5NCBTIgM5A+gjeEEUMghCYuSKDaZxBkIhrSAt/aDxytkDpjNQMI+nxhCEveYafsP8IVFIK8jYOagjYd9Tpn53qpBGEO4VgqKN3HC6RHoU4gtSMHm/dOmS2XiHPCjEFaRi8hW0cYNAb50CohBPkAYTMbLGMuLGEIXwgkgYgqeGixsKeVEwC+L6KrKCIV5ouKbSID8KvBgF7KFrbEbyOI7tXGM5vcolCvPLVsCiiWi4t+I1loHCvCY85hVGQbkXtLm62UsETpXmGitKeFS0Yg4KOYkkNQJ8zNmZDuSCDNkD3ibc9dQ2B0vwSi6ludjCNQ8yYZtJbchE4m1A89a5a9i7ZCRgni3nGsBSI8EL0cAj/m0nMlyqIBLm5R8CnihDpkcsr8nswJc3SMyrJk5QYhlMrYNRCEQ9cSLqdgXyIDBdPqeAOcXG4oTUbFJ2vbYrJitEwmYKdYO4yytdlo0qREZZFEKLckC4XkfiVBm2CwWTeamE27xyLYztQ5Zeyln0x7msm23gWQFX8Efg5CU7+NHi9fwq/aEAAT/u+zLlekvo7CUxrMbC7nkKpBdlcSJcIjF9ozbHKH7s8cZmGekPkVSY7zF0vBYg2iDTnADqisD5qyrXOAdJMdinxfnrKk84fTDgEYkC4l+64v+9m6jB0AAAAABJRU5ErkJggg==",ge={class:"fullPage"},fe={style:{padding:"16px",display:"flex","flex-direction":"column",gap:"2vw"}},he={style:{display:"flex","flex-direction":"column",gap:"2vw"}},ye={style:{display:"flex","justify-content":"space-between","align-items":"center"}},ve={style:{"font-weight":"600"}},_e={style:{padding:"16px"}},we=["value"],xe={style:{color:"#f00","font-weight":"500","font-size":"0.8em"}},me={style:{display:"flex","flex-direction":"column",gap:"2vw"}},be={style:{display:"flex","justify-content":"space-between","align-items":"center"}},ke={style:{"font-weight":"600"}},Ae={key:0,style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.4)"}},Ce={key:1,style:{display:"flex","align-items":"center",gap:"2vw"}},Be={style:{width:"4.5em"}},Se={key:0,src:U,alt:"",style:{width:"100%",display:"block"}},Ye={key:1,src:K,alt:"",style:{width:"100%",display:"block"}},Ee={style:{flex:"1","min-width":"0",display:"flex","flex-direction":"column","justify-content":"space-around"}},De={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.8)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},Ie={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.4)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},je={style:{display:"flex","flex-direction":"column",gap:"2vw"}},Ne={style:{display:"flex","justify-content":"space-between","align-items":"center"}},Fe={style:{display:"flex","align-items":"center"}},Le={style:{"font-weight":"600"}},Me={key:0,style:{"font-weight":"600",margin:"0 4px"}},Te={key:1,style:{"font-weight":"510","font-size":"0.9em",background:"linear-gradient(248deg, #75ff98 5.66%, #3dff54 42.49%)","background-clip":"text","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}},ze={key:2,style:{"font-weight":"510","font-size":"0.9em",background:"linear-gradient(248deg, #ff7578 5.66%, #ff3d40 42.49%)","background-clip":"text","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}},Oe={key:3,style:{"font-weight":"510","font-size":"0.9em",background:"linear-gradient(248deg, #ffe675 5.66%, #ffc53d 42.49%)","background-clip":"text","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}},Ue={style:{padding:"16px"}},Ke={style:{"font-weight":"510","font-size":"1em"}},Re={src:I,alt:"",style:{width:"6vw"},class:"flipImg"},Je={key:1,style:{width:"100%",display:"flex","flex-direction":"column",gap:"8px"}},Qe={style:{display:"flex","justify-content":"space-between","align-items":"center"}},Ge={style:{"font-weight":"510","font-size":"1em"}},Pe={style:{display:"flex","align-items":"center",gap:"4px"}},Ve=["src"],Xe={style:{"font-weight":"500"}},He={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.8em","overflow-wrap":"break-word"}},Ze={style:{"font-weight":"500"}},qe={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.8em","overflow-wrap":"break-word"}},We={style:{display:"flex","justify-content":"center","align-items":"center"}},$e={style:{color:"rgba(0, 0, 0, 0.8)","font-weight":"800"}},et={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.8em"}},tt={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.6em"}},it={style:{display:"flex","justify-content":"center","align-items":"center"}},st={style:{margin:"0","font-size":"18px","font-weight":"600",color:"#333"}},ot={style:{width:"100%",height:"80vw",padding:"16px",display:"flex","flex-direction":"column",gap:"3vw"},class:"overflow-y-auto"},nt={key:0,style:{"border-radius":"8px",background:"#fff",padding:"12px","box-shadow":"0 0 4px 0 rgba(0, 0, 0, 0.25)"}},at={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.4)"}},lt=["onClick"],rt={style:{display:"flex","align-items":"center",gap:"2vw"}},dt={style:{width:"4.5em"}},ct={key:0,src:U,alt:"",style:{width:"100%",display:"block"}},ut={key:1,src:K,alt:"",style:{width:"100%",display:"block"}},pt={style:{flex:"1","min-width":"0",display:"flex","flex-direction":"column",gap:"4px"}},gt={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.8)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},ft={style:{"font-weight":"510",color:"rgba(0, 0, 0, 0.4)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},ht={style:{width:"1.5em","aspect-ratio":"1/1","border-radius":"50%",border:"1px solid gray","box-sizing":"border-box",position:"relative",display:"flex","justify-content":"center","align-items":"center"}},yt={key:0,style:{width:"0.9em","aspect-ratio":"1/1","border-radius":"50%","background-color":"#3dff54"}},vt={style:{color:"rgba(0, 0, 0, 0.8)","font-weight":"700","font-size":"1.2em"}},_t={style:{color:"rgba(0, 0, 0, 0.8)","font-weight":"600"}},wt={__name:"CashWithdraw",setup(xt){const{t:s,locale:j}=Z(),A=oe();ne(),j.value&&q(j.value);const w=f(!1),x=f(!1),m=f(!1),b=f(null),C=de(),R=Y(()=>w.value||m.value||x.value),k=f([]),c=f(null),h=()=>{w.value=!1,m.value=!1,x.value=!1},y=f(0),p=f(null),B=Y(()=>p.value!=null),J=()=>{A.push("/bank-card")},Q=()=>{A.push("/information-details")},S=()=>{A.push("/KYC")},N=Y(()=>p.value?.status=="PASS"&&c.value?.id&&b.value>=50),G=async()=>{if(B.value){if(N.value)try{console.log("当前身份:",C.identity);let i=C.identity=="ADMIN"?"ADMIN_SALARY":["BD_LEADER","BD"].includes(C.identity)?"BD_SALARY":"HOST_SALARY";(await se({amount:b.value,acceptBankCardId:c.value.id,salaryType:i})).status&&(h(),await F(),m.value=!0)}catch(i){h(),console.log("提现失败:",i.response?.errorMsg),showError(s("something_went_wrong"))}}else{w.value=!0;return}},F=async()=>{try{const i=await ee();i.status&&typeof i.body=="number"?y.value=i.body.toFixed(2):y.value=0}catch(i){console.error("Failed to fetch bank balance:",i),y.value=0,showError(s("failed_to_load_balance"))}},P=i=>{let n=i.target.value;n=n.replace(/[^\d.]/g,"");const r=n.split(".");r.length>2&&(n=r[0]+"."+r.slice(1).join("")),parseFloat(n)>y.value&&(n=y.value.toString()),i.target.value=n,b.value=parseFloat(n)||0},V=async()=>{try{const i=await te();if(console.log("提现信息列表:",i),i.status&&i.body?.length>0){let r=JSON.parse(i.body[0].passportFrontUrl).map(d=>d);p.value={previewUrls:r,...i.body[0]}}}catch(i){console.error("获取提现信息列表失败:",i),showError(i.response?.errorMsg)}},L=async()=>{try{const i=await ie();if(console.log("银行卡列表:",i),i.status&&i.body){k.value=i.body;const n=k.value.find(r=>r.use);n?c.value=n:c.value=null}}catch(i){console.error("获取银行卡列表失败:",i)}},X=async i=>{if(c.value?.id!==i)try{(await le({id:i})).status&&L()}catch(n){showError(n.response?.errorMsg||"")}};return W(()=>{F(),V(),L()}),$(()=>{re()}),(i,n)=>{const r=ae("smart-img");return l(),a("div",ge,[v(ce,{title:o(s)("cash_withdraw"),style:{width:"100%"},color:"rgba(0, 0, 0, 0.80)"},{extraFunction:_(()=>[g(e("img",{src:pe,alt:"",style:{},class:"extra-icon-btn",onClick:Q},null,512),[[r]])]),_:1},8,["title"]),e("div",fe,[e("div",he,[e("div",ye,[e("div",ve,t(o(s)("salary_balance",{amount:y.value})),1)]),v(D,null,{default:_(()=>[e("div",_e,[e("input",{name:"",id:"",placeholder:"50",style:{width:"100%",outline:"none",border:"none","background-color":"transparent",color:"black"},value:b.value,onInput:P,dir:"ltr",inputmode:"decimal"},null,40,we)])]),_:1}),e("div",xe,[M(t(o(s)("withdrawal_rule_1"))+" ",1),n[4]||(n[4]=e("br",null,null,-1)),M(" "+t(o(s)("withdrawal_rule_2")),1)])]),e("div",me,[e("div",be,[e("div",ke,t(o(s)("currently_in_use")),1),g(e("img",{src:I,alt:"",style:{width:"6vw"},class:"flipImg",onClick:J},null,512),[[r]])]),v(D,null,{default:_(()=>[e("div",{style:T([{padding:"12px"},c.value?"border-radius: 11.75px;border: 0.5px solid rgba(255, 255, 255, 0.08);":""]),onClick:n[0]||(n[0]=d=>c.value?x.value=!0:"")},[c.value?(l(),a("div",Ce,[e("div",Be,[c.value?.cardType=="BANK"?g((l(),a("img",Se,null,512)),[[r]]):u("",!0),c.value?.cardType=="USDT"?g((l(),a("img",Ye,null,512)),[[r]]):u("",!0)]),e("div",Ee,[e("div",De,t(o(s)("payee"))+": "+t(c.value?.payee),1),e("div",Ie,t(o(s)("card_number"))+": "+t(c.value?.cardNo),1)])])):(l(),a("div",Ae,t(o(s)("no_bank_cards_in_use")),1))],4)]),_:1})]),e("div",je,[e("div",Ne,[e("div",Fe,[e("div",Le,t(o(s)("kyc")),1),B.value?(l(),a("div",Me,":")):u("",!0),p.value?.status==="PASS"?(l(),a("div",Te,t(o(s)("review_passed")),1)):u("",!0),p.value?.status==="NOT_PASS"?(l(),a("div",ze,t(o(s)("review_failed")),1)):u("",!0),p.value?.status==="PENDING"?(l(),a("div",Oe,t(o(s)("awaiting_review")),1)):u("",!0)]),g(e("img",{src:I,alt:"",style:{width:"6vw"},class:"flipImg",onClick:S},null,512),[[r]])]),v(D,{style:{"margin-bottom":"12px"}},{default:_(()=>[e("div",Ue,[B.value?(l(),a("div",Je,[e("div",Qe,[e("span",Ge,t(o(s)("passport_id_card_title"))+":",1)]),e("div",Pe,[(l(!0),a(z,null,O(p.value.previewUrls,d=>(l(),a("img",{src:d,alt:"",style:{display:"block",width:"15vw","aspect-ratio":"1/1","object-fit":"cover","border-radius":"5vw"}},null,8,Ve))),256))]),e("div",Xe,t(o(s)("contact_number"))+":",1),e("div",He,t(p.value.contactNumber),1),e("div",Ze,t(o(s)("other_description"))+":",1),e("div",qe,t(p.value.otherDescription),1)])):(l(),a("div",{key:0,style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:S},[e("span",Ke,t(o(s)("complete_information")),1),g(e("img",Re,null,512),[[r]])]))])]),_:1})]),e("div",We,[e("div",{style:T([{"margin-top":"10px",width:"80%","border-radius":"112px",padding:"8px 12px",color:"#fff","font-size":"1.5em","font-weight":"500","text-align":"center","box-shadow":`-1px 0 5px 0 rgba(255, 255, 255, 0.7) inset,
|
|
-3.5px 0 7.5px 0 rgba(255, 255, 255, 0.2) inset,
|
|
1px 0 5px 0 rgba(255, 255, 255, 0.7) inset,
|
|
3.5px 0 7.5px 0 rgba(255, 255, 255, 0.2) inset`,"backdrop-filter":"blur(5000px)"},{background:N.value?"linear-gradient(269deg, #FEB219 7.04%, #FF9326 96.78%)":"linear-gradient(180deg, #E5E2E6 0%, rgba(197, 196, 199, 0.00) 58.38%), linear-gradient(135deg, #A2A2A2 2.82%, #646464 99.15%), #D587FF"}]),onClick:G},t(o(s)("cash_out")),5)])]),v(ue,{maskLayerShow:R.value,onClick:h},{default:_(()=>[w.value?(l(),a("div",{key:0,style:{width:"100vw",height:"100vh",display:"flex","justify-content":"center","align-items":"center"},onClick:h},[e("div",{style:{width:"80%","border-radius":"12px",background:"#fff",padding:"12px",display:"flex","flex-direction":"column","align-items":"center",gap:"4px"},onClick:n[1]||(n[1]=E(()=>{},["stop"]))},[e("div",$e,t(o(s)("tips")),1),e("div",et,t(o(s)("fill_info_tips")),1),e("div",tt,t(o(s)("card_issue_tips")),1),e("div",{style:{display:"flex","justify-content":"center","align-items":"center","border-radius":"12px",background:`linear-gradient(
|
|
152deg,
|
|
rgba(198, 112, 255, 0.8) 7.01%,
|
|
rgba(119, 38, 255, 0.8) 92.99%
|
|
)`,color:"#fff","font-weight":"800",padding:"8px 12px",width:"50%"},onClick:S},t(o(s)("receive")),1)])])):u("",!0),x.value?(l(),a("div",{key:1,style:{position:"fixed",bottom:"0",width:"100%"},onClick:h},[e("div",{style:{background:"white","border-radius":"16px 16px 0 0","max-height":"80vh",display:"flex","flex-direction":"column",gap:"2vw",padding:"20px 0"},onClick:n[2]||(n[2]=E(()=>{},["stop"]))},[e("div",it,[e("div",st,t(o(s)("bank_card")),1)]),e("div",ot,[k.value.length===0?(l(),a("div",nt,[e("div",at,t(o(s)("no_bank_cards_added")),1)])):(l(!0),a(z,{key:1},O(k.value,d=>(l(),a("div",{key:d.id,style:{"border-radius":"8px",background:"#fff",padding:"12px","box-shadow":"0 0 4px 0 rgba(0, 0, 0, 0.25)",display:"flex","flex-direction":"column",gap:"2vw"},onClick:mt=>X(d.id)},[e("div",rt,[e("div",dt,[d.cardType=="BANK"?g((l(),a("img",ct,null,512)),[[r]]):u("",!0),d.cardType=="USDT"?g((l(),a("img",ut,null,512)),[[r]]):u("",!0)]),e("div",pt,[e("div",gt,t(o(s)("payee"))+": "+t(d.payee),1),e("div",ft,t(o(s)("card_number"))+": "+t(d.cardNo),1)]),e("div",ht,[d.use?(l(),a("div",yt)):u("",!0)])])],8,lt))),128))])])])):u("",!0),m.value?(l(),a("div",{key:2,style:{width:"100vw",height:"100vh",display:"flex","justify-content":"center","align-items":"center"},onClick:h},[e("div",{style:{width:"80%","border-radius":"12px",background:"#fff",padding:"12px",display:"flex","flex-direction":"column","align-items":"center",gap:"2vw"},onClick:n[3]||(n[3]=E(()=>{},["stop"]))},[e("div",vt,t(o(s)("tips")),1),e("div",_t,t(o(s)("cash_withdrawal_tips")),1),e("div",{style:{display:"flex","justify-content":"center","align-items":"center","border-radius":"999999px",background:"linear-gradient(269deg, #feb219 7.04%, #ff9326 96.78%)","box-shadow":`-1px 0 5px 0 rgba(255, 255, 255, 0.7) inset,
|
|
-3.5px 0 7.5px 0 rgba(255, 255, 255, 0.2) inset,
|
|
1px 0 5px 0 rgba(255, 255, 255, 0.7) inset,
|
|
3.5px 0 7.5px 0 rgba(255, 255, 255, 0.2) inset`,color:"#fff","font-weight":"700",padding:"8px 12px",width:"50%"},onClick:h},t(o(s)("receive")),1)])])):u("",!0)]),_:1},8,["maskLayerShow"])])}}},Dt=H(wt,[["__scopeId","data-v-eb601721"]]);export{Dt as default};
|