import{e as p,r as v,P as o,Q as r,f,a7 as g,ab as n,I as h,a9 as l,a8 as y}from"./vue-bf422dc1.js";import{g as I}from"./order-ea430276.js";import{l as k}from"./ui-ba7aaa7e.js";import{_ as w}from"./index-8db2df2c.js";import"./icons-a8498fb6.js";import"./libs-51817cd7.js";import"./plugins-ca970193.js";import"./others-9f318174.js";import"./echarts-bf9d612c.js";const b={class:"result-success"},x={class:"result-success-title"},P={key:0,class:"result-success-describe"},S={key:1},B={name:"PayResult"},N=p({...B,setup(O){const i=y(),d=window.location.search.slice(1),s=new URLSearchParams(d).get("out_trade_no"),u=async()=>await I({trade_no:s}),e=v({ico:"loading",loading:!1,title:"请稍等。。。"}),a=setInterval(async()=>{if(!s){clearInterval(a);return}const t=await u();if(t.code===0){e.value.ico="close-circle",e.value.loading=!1,e.value.title=t.msg,clearInterval(a);return}t.code===1&&(e.value={ico:"check-circle",loading:!1,title:"支付成功"},clearInterval(a),setTimeout(()=>{_(t.data.path,{orderId:s})},2e3))},2e3),_=(t,c={})=>{i.push({path:t,query:c})};return(t,c)=>{const m=k;return o(),r("div",b,[f(m,{class:"result-success-icon",name:e.value.ico},null,8,["name"]),g("div",x,n(e.value.title),1),e.value.loading?(o(),r("div",P,"订单号："+n(h(s)),1)):l("",!0),e.value.loading?(o(),r("div",S,"正在为您跳转")):l("",!0)])}}});const U=w(N,[["__scopeId","data-v-007d1d28"]]);export{U as default};
