tg_web_dist/js/pay.Dl4fLWw7.js

2 lines
3.1 KiB
JavaScript
Raw Normal View History

2025-07-04 16:16:27 +08:00
import{bf as e,bw as a,ad as t,D as s,r as l,o,aB as r,c as d,e as i,N as n,w as p,l as u,ag as c,O as y,t as _,m as f,g as m,bz as g,E as v,bA as h,ak as w,b9 as D,bB as C}from"./index.CX5tbBpq.js";import{E as x}from"./el-text.D7PGSWoH.js";import{p as T}from"./custom.DOgxY1CG.js";const b={class:"pay-code"},k={style:{margin:"10px 0"}},I={key:0,style:{margin:"10px 0"}},j={key:1},z={class:"dialog-footer"},H=e({__name:"pay",props:{showDialog:{type:Boolean,default:!1},current_order:{type:Object,default:{}}},emits:["update:showDialog","handleConfrimPay"],setup(e,{emit:H}){const{copy:N}=a({legacy:!0}),B=e,E=H,O=t({payCode:"/img/pay-code.DPIhp-36.jpeg",payHash:"",activeName:"first"}),P=h((e=>{N(e).then((()=>{C.success("复制成功")}))}),300);s((()=>B.showDialog),(e=>{B.showDialog&&(M(),F())}));const U=l(""),$=l(!1);var A=null;const M=()=>{clearInterval(A);let e=B.current_order.order_created_at,a=B.current_order.expired_at;new Date(e).getTime()<new Date(a).getTime()?($.value=!0,A=setInterval((()=>((e,a)=>{const t=new Date(a).getTime()-(new Date).getTime();t<=0&&(clearInterval(A),$.value=!1,U.value="");const s=Math.floor(t%36e5/6e4),l=Math.floor(t%6e4/1e3);U.value=` ${s}分钟 ${l}`})(0,a)),1e3)):($.value=!1,clearInterval(A))},R=()=>{O.hash="",E("update:showDialog",!1)},S=()=>{E("handleConfrimPay"),E("update:showDialog",!1)};o((()=>{O.activeName="first"}));const F=()=>{T().then((e=>{O.payHash=e.USDT_ACCOUNT}))};return(a,t)=>{const s=x,l=g,o=r("DocumentCopy"),h=v,C=w,T=D;return i(),d("div",null,[n(T,{"model-value":e.showDialog,title:"支付",width:"600",onClose:R},{header:p((({close:e,titleId:a,titleClass:s})=>t[1]||(t[1]=[u("div",{class:"my-header"},[u("div",null,"充值网络USDT-TRC20"),u("div",{style:{"font-size":"12px",color:"#999"}},"请选择TRC20网络充值否则可能造成资产丢失")],-1)]))),footer:p((()=>[u("div",z,[n(C,{onClick:R},{default:p((()=>t[7]||(t[7]=[y("关闭")]))),_:1,__:[7]}),n(C,{type:"primary",onClick:S},{default:p((()=>t[8]||(t[8]=[y(" 支付完成 ")]))),_:1,__:[8]})])])),default:p((()=>[u("div",b,[u("div",k,[t[2]||(t[2]=y("支付金额:")),n(s,{type:"danger",style:{"font-size":"16px","font-weight":"600"}},{default:p((()=>[y(" $"+_(e.current_order.pay_usdt_amount),1)])),_:1})]),u("div",null,[m($)?(i(),f(l,{key:0,src:m(O).payCode,class:"pay-code-img"},null,8,["src"])):c("",!0),m($)?c("",!0):(i(),f(s,{key:1,type:"warning"},{default:p((()=>t[3]||(t[3]=[y("订单已过期")]))),_:1,__:[3]}))]),m($)?(i(),d("div",I,[n(s,null,{default:p((()=>t[4]||(t[4]=[y("订单有效期:")]))),_:1,__:[4]}),n(s,{type:"primary",style:{"font-size":"16px","font-weight":"600"}},{default:p((()=>[y(_(m(U)),1)])),_:1}),u("div",null,[n(s,{type:"danger"},{default:p((()=>t[5]||(t[5]=[y("超过有效期订单自动取消,请尽快完成支付")]))),_:1,__:[5]})])])):c("",!0),m($)?(i(),d("div",j,[n(s,null,{default:p((()=>[t[6]||(t[6]=y("钱包地址:")),n(s,{type:"primary",style:{margin:"0 10px"}},{default:p((()=>[y(_(m(O).payHash),1)])),_:1}),n(h,{onClick:t[0]||(t[0]=e=>m(P)(m(O).payHash))},{default:p((()=>[n(o)])),_:1})])),_:1,__:[6]})])):c("",!0)])])),_:1},8,["model-value"])])}}},[["__scopeId","data-v-df611be5"]]);export{H as default};