10 lines
11 KiB
JavaScript
10 lines
11 KiB
JavaScript
import{_ as G,k as J,I as K,o as R,a as W,c as n,l as F,q as i,b as t,t as e,D,v as c,F as Y,x as H,n as L,m as Q,J as X,aj as Z,ai as $,r as p,S as b,u as tt,an as et,j as l,y as I}from"./index-CIAVq8iD-1776148658686.js";import{_ as x}from"./arrow-Cf0JWzXk-1776148658686.js";import{s as st}from"./applyStore-hrMPMjJv-1776148658686.js";import{w as it,a as ot}from"./lottery-BvmnIlAm-1776148658686.js";import{G as at}from"./GeneralHeader-ClI1i1Ud-1776148658686.js";import{m as nt}from"./MaskLayer-CMaJd7Gb-1776148658686.js";const lt={class:"fullPage"},rt={style:{padding:"16px"}},dt={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"10px"}},ct={style:{"font-weight":"600"}},ut={style:{color:"rgba(0, 0, 0, 0.4)"}},pt={class:"flipImg",src:x,alt:"",style:{width:"6vw"}},gt={style:{"background-color":"white",padding:"16px","border-radius":"12px","margin-bottom":"12px","box-shadow":"0 0 4px 0 rgba(0, 0, 0, 0.25)"}},ft={style:{"font-weight":"510","font-size":"0.8em"}},ht={style:{"font-weight":"700",color:"#333"}},vt={style:{display:"flex","align-items":"center","margin-bottom":"10px"}},_t={style:{"font-weight":"600"}},yt={key:0,style:{"font-weight":"600",margin:"0 4px"}},mt={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"}},wt={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"}},bt={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"}},xt={style:{"background-color":"white",padding:"16px","border-radius":"12px","margin-bottom":"12px","box-shadow":"0 0 4px 0 rgba(0, 0, 0, 0.25)"}},kt={style:{"font-weight":"510","font-size":"1em"}},Ct={src:x,alt:"",style:{width:"6vw"},class:"flipImg"},St={key:1,style:{width:"100%",display:"flex","flex-direction":"column",gap:"8px"}},Dt={style:{display:"flex","justify-content":"space-between","align-items":"center"}},It={style:{"font-weight":"510","font-size":"1em"}},zt={style:{display:"flex","align-items":"center",gap:"4px"}},At=["src"],Bt={style:{"font-weight":"500"}},jt={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.8em","overflow-wrap":"break-word"}},Ft={style:{"font-weight":"500"}},Lt={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.8em","overflow-wrap":"break-word"}},Nt={style:{display:"flex","justify-content":"center","align-items":"center"}},Ot={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"}},Pt={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.6em"}},Ut={style:{display:"flex","justify-content":"center","align-items":"center"}},Vt={style:{margin:"0","font-size":"18px","font-weight":"600",color:"#333"}},Mt={style:{"box-shadow":"0 0 4px 0 rgba(0, 0, 0, 0.25)","border-radius":"8px",padding:"12px"}},Tt={style:{"font-size":"0.9em","font-weight":"600","margin-bottom":"4px"}},qt={key:0,style:{"font-size":"0.9em","font-weight":"600","margin-bottom":"4px"}},Gt={key:0,style:{"font-size":"0.9em","font-weight":"600"}},Jt={key:1,style:{"font-size":"0.9em","font-weight":"600"}},Kt={style:{"box-shadow":"0 0 4px 0 rgba(0, 0, 0, 0.25)","border-radius":"8px",padding:"12px"}},Rt=["placeholder","value"],Wt={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.9em"}},Yt={style:{display:"flex","justify-content":"center","align-items":"center"}},Ht={style:{color:"rgba(0, 0, 0, 0.8)","font-weight":"800"}},Qt={style:{color:"rgba(0, 0, 0, 0.4)","font-weight":"600","font-size":"0.8em"}},Xt={__name:"CashOut",setup(Zt){const{t:s,locale:z}=J(),k=tt(),N=X();z.value&&K(z.value);const f=p(!1),h=p(!1),v=p(!1),_=p(null),O=b(()=>f.value||v.value||h.value),g=p(null),u=()=>{f.value=!1,v.value=!1,h.value=!1},C=N.query.activityId||"",y=p(0),A=b(()=>y.value.availableAmount||0),r=p(null),m=b(()=>r.value!=null),E=()=>{k.push("/bank-card")},P=()=>{k.push({path:"/cash-out-details",query:{activityId:C}})},S=()=>{k.push("/KYC")},U=()=>{m.value&&r.value?.status==="PASS"?h.value=!0:m.value||(f.value=!0)},B=b(()=>r.value?.status=="PASS"&&g.value?.id&&_.value>=10),V=async()=>{if(B.value)try{(await ot({activityId:C,amount:_.value,contactNumber:r.value.contactNumber,cardImages:JSON.stringify(r.value.previewUrls),description:r.value.otherDescription})).status&&(u(),await j(),v.value=!0)}catch(o){u(),console.log("提现失败:",o.response?.errorMsg),showError(s("something_went_wrong"))}},j=async()=>{const o=await it(C);o.status&&o.body?y.value=o.body:y.value=0},M=o=>{let a=o.target.value;a=a.replace(/[^\d.]/g,"");const d=a.split(".");d.length>2&&(a=d[0]+"."+d.slice(1).join("")),parseFloat(a)>A.value&&(a=A.value.toString()),o.target.value=a,_.value=parseFloat(a)||0},T=async()=>{try{const o=await Z();if(console.log("提现信息列表:",o),o.status&&o.body?.length>0){let d=JSON.parse(o.body[0].passportFrontUrl).map(w=>w);r.value={previewUrls:d,...o.body[0]}}}catch(o){console.error("获取提现信息列表失败:",o),showError(o.response?.errorMsg)}},q=async()=>{try{const o=await $();console.log("银行卡列表:",o),o.status&&o.body&&o.body.forEach(a=>{a.use&&(g.value=a)})}catch(o){console.error("获取银行卡列表失败:",o)}};return R(()=>{j(),T(),q()}),W(()=>{st()}),(o,a)=>{const d=et("smart-img");return l(),n("div",lt,[F(at,{showLanguageList:!0,title:i(s)("cash_out"),style:{width:"100%"},color:"rgba(0, 0, 0, 0.80)"},null,8,["title"]),t("div",rt,[t("div",null,[t("div",dt,[t("div",ct,e(i(s)("information")),1),t("div",{style:{display:"flex","align-items":"center"},onClick:P},[t("div",ut,e(i(s)("details")),1),D(t("img",pt,null,512),[[d]])])]),t("div",gt,[t("span",ft,e(i(s)("available_salaries")),1),t("span",ht,e(y.value.availableAmount||0),1)])]),t("div",null,[t("div",vt,[t("div",_t,e(i(s)("kyc")),1),m.value?(l(),n("div",yt,":")):c("",!0),r.value?.status==="PASS"?(l(),n("div",mt,e(i(s)("review_passed")),1)):c("",!0),r.value?.status==="NOT_PASS"?(l(),n("div",wt,e(i(s)("review_failed")),1)):c("",!0),r.value?.status==="PENDING"?(l(),n("div",bt,e(i(s)("awaiting_review")),1)):c("",!0)]),t("div",xt,[m.value?(l(),n("div",St,[t("div",Dt,[t("span",It,e(i(s)("passport_id_card_title")),1),D(t("img",{src:x,alt:"",style:{width:"6vw"},onClick:S,class:"flipImg"},null,512),[[d]])]),t("div",zt,[(l(!0),n(Y,null,H(r.value.previewUrls,w=>(l(),n("img",{src:w,alt:"",style:{width:"10vw","aspect-ratio":"1/1","border-radius":"4px"}},null,8,At))),256))]),t("div",Bt,e(i(s)("contact_number"))+":",1),t("div",jt,e(r.value.contactNumber),1),t("div",Ft,e(i(s)("other_description"))+":",1),t("div",Lt,e(r.value.otherDescription),1)])):(l(),n("div",{key:0,style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:S},[t("span",kt,e(i(s)("complete_information")),1),D(t("img",Ct,null,512),[[d]])]))])]),t("div",Nt,[t("div",{style:L([{"margin-top":"10px",width:"80%","border-radius":"32px",padding:"12px",color:"#fff","font-weight":"590","text-align":"center"},{background:r.value?.status==="PASS"?"linear-gradient(135deg, #BB92FF 2.82%, #8B45FF 99.15%), linear-gradient(135deg, #D1CED6 2.82%, #7C7882 99.15%)":"linear-gradient(135deg, #D1CED6 2.82%, #7C7882 99.15%)"}]),onClick:U},e(i(s)("cash_out")),5)])]),F(nt,{maskLayerShow:O.value,onClick:u},{default:Q(()=>[f.value?(l(),n("div",{key:0,style:{width:"100vw",height:"100vh",display:"flex","justify-content":"center","align-items":"center"},onClick:u},[t("div",{style:{width:"80%","border-radius":"12px",background:"#fff",padding:"12px",display:"flex","flex-direction":"column","align-items":"center",gap:"4px"},onClick:a[0]||(a[0]=I(()=>{},["stop"]))},[t("div",Ot,e(i(s)("tips")),1),t("div",Et,e(i(s)("fill_info_tips")),1),t("div",Pt,e(i(s)("card_issue_tips")),1),t("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},e(i(s)("receive")),1)])])):c("",!0),h.value?(l(),n("div",{key:1,style:{position:"fixed",bottom:"0",width:"100%"},onClick:u},[t("div",{style:{background:"white","border-radius":"16px 16px 0 0","max-height":"80vh",display:"flex","flex-direction":"column",gap:"10px",padding:"20px"},onClick:a[1]||(a[1]=I(()=>{},["stop"]))},[t("div",Ut,[t("div",Vt,e(i(s)("cash_out")),1)]),t("div",Mt,[t("div",Tt,e(i(s)("withdrawal_method"))+": "+e(g.value?.cardType||""),1),g.value?(l(),n("div",qt,e(i(s)("card_number"))+": "+e(g.value?.cardNo),1)):c("",!0),t("div",{style:{display:"flex","justify-content":"space-between","align-items":"center"},onClick:E},[g.value?(l(),n("div",Gt,e(i(s)("change_withdrawal_method")),1)):(l(),n("div",Jt,e(i(s)("please_select_bank_card")),1)),a[3]||(a[3]=t("img",{src:x,alt:"",style:{width:"6vw"},class:"flipImg"},null,-1))])]),t("div",Kt,[t("input",{name:"",id:"",placeholder:i(s)("enter_cash_out_amount"),style:{width:"100%",outline:"none",border:"none","background-color":"transparent",color:"black"},value:_.value,onInput:M,dir:"ltr",inputmode:"decimal"},null,40,Rt)]),t("div",Wt,e(i(s)("new_year_cash_out_minimum")),1),t("div",Yt,[t("div",{style:L([{"margin-top":"10px",width:"80%","border-radius":"32px",padding:"12px",color:"#fff","font-weight":"590","text-align":"center"},{background:B.value?"linear-gradient(135deg, #BB92FF 2.82%, #8B45FF 99.15%), linear-gradient(135deg, #D1CED6 2.82%, #7C7882 99.15%)":"linear-gradient(135deg, #D1CED6 2.82%, #7C7882 99.15%)"}]),onClick:V},e(i(s)("cash_out")),5)])])])):c("",!0),v.value?(l(),n("div",{key:2,style:{width:"100vw",height:"100vh",display:"flex","justify-content":"center","align-items":"center"},onClick:u},[t("div",{style:{width:"80%","border-radius":"12px",background:"#fff",padding:"12px",display:"flex","flex-direction":"column","align-items":"center",gap:"4px"},onClick:a[2]||(a[2]=I(()=>{},["stop"]))},[t("div",Ht,e(i(s)("tips")),1),t("div",Qt,e(i(s)("cash_withdrawal_tips")),1),t("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:u},e(i(s)("receive")),1)])])):c("",!0)]),_:1},8,["maskLayerShow"])])}}},ae=G(Xt,[["__scopeId","data-v-3ab866d5"]]);export{ae as default};
|