import{_ as e}from"./vendor-DJUGQ7Dr.js";import{_ as t}from"./vendor-DKh56KT7.js";import{c as s,e as a}from"./vendor-BJZ6tUoe.js";import{d as l}from"./vendor-CB_mu4eO.js";import{E as o,P as r}from"./souav-BTAG2baT.js";import{p as n}from"./vendor-Nz4M5R8X.js";import{r as i,c as d,ag as c,q as p,x,a4 as u,a5 as v,a2 as m,a3 as f,v as h,bH as y,ad as g,K as b,b1 as j,bf as w,aL as k,aW as L}from"./vendor-BXdGExd0.js";import"./vendor-BCo6x5W8.js";import"./vendor-Dm4oB1Pn.js";import"./vendor-DN37M9Hi.js";import"./vendor-DBhUxCDU.js";import"./vendor-CDxkAdJH.js";import"./vendor-Cv8m7sE6.js";import"./vendor-bo_0oRCG.js";import"./vendor-Dos3PyFQ.js";import"./vendor-Dwl46Tfs.js";import"./vendor-BHR_E30J.js";import"./vendor-DzK633Zd.js";import"./vendor-CfyHAoLP.js";const F=l("orderList",()=>{const e=i([]),t=i(!0),s=i(!1),a=i(!1),l=i(!1),r=i(0),c=i(20),p=d(()=>!t.value&&0===e.value.length);async function x(e){try{const t={pageNo:e,pageSize:c.value},s=await n.queryOrderList(t);if(s.code===o.Success&&s.data)return s.data.rechargeOrderList||[];throw new Error(s.msg||"Request failed")}catch(t){throw t}}return{dataList:e,loading:t,loadingMore:s,finished:a,error:l,isListEmpty:p,refresh:async function(){t.value=!0,l.value=!1,a.value=!1;try{r.value=0;const t=await x(0);e.value=t,t.length<c.value&&(a.value=!0)}catch(s){l.value=!0}finally{t.value=!1}},loadMore:async function(){if(!(s.value||a.value||t.value)){s.value=!0,l.value=!1;try{const t=r.value+1,s=await x(t);e.value.push(...s),r.value=t,s.length<c.value&&(a.value=!0)}catch(o){l.value=!0}finally{s.value=!1}}},reset:function(){e.value=[],r.value=0,t.value=!1,s.value=!1,a.value=!1,l.value=!1}}}),E={class:"min-h-dvh bg-[#0E0F12] flex flex-col"},B={class:"sticky top-0 z-50 flex items-center justify-center h-12 border-b border-[#1D1E22]"},_={class:"flex-1 overflow-y-auto flex flex-col items-center justify-center"},C={class:"flex mb-[3px]"},D={class:"text-[12px] text-[#6B6F80] truncate"},M={class:"flex mb-[3px]"},q={class:"text-[12px] text-[#6B6F80] truncate"},z={class:"flex mb-[3px]"},I={class:"text-[12px] text-[#FFDF98]"},V={class:"flex items-center mb-[3px]"},N={class:"flex mb-[3px]"},O={class:"text-[12px] text-[#6B6F80]"},R=["onClick"],S={key:1,class:"w-full h-full flex items-center justify-center"},T=c({__name:"index",emits:["ppw-close"],setup(l){const o=F(),n=i(!1),d=async()=>{await o.refresh(),n.value=!1};return p(()=>{o.refresh()}),x(()=>{o.reset()}),(l,i)=>{const c=a,p=s,x=t,F=e;return L(),u("div",E,[v("header",B,[v("button",{onClick:i[0]||(i[0]=e=>l.$emit("ppw-close")),class:"absolute left-4 p-2 -ml-2"},[...i[3]||(i[3]=[v("i",{class:"icon-sprite icon-back"},null,-1)])]),i[4]||(i[4]=v("h1",{class:"text-lg font-medium text-white font-sans"},"充值记录",-1))]),v("main",_,[h(o).isListEmpty?f("",!0):(L(),m(p,{key:0,modelValue:n.value,"onUpdate:modelValue":i[2]||(i[2]=e=>n.value=e),onRefresh:d,class:"min-h-full"},{default:y(()=>[g(c,{loading:h(o).loadingMore,"onUpdate:loading":i[1]||(i[1]=e=>h(o).loadingMore=e),finished:h(o).finished,onLoad:h(o).loadMore,class:"p-[17px] py-[10px]"},{default:y(()=>[(L(!0),u(b,null,j(h(o).dataList,(e,t)=>(L(),u("div",{key:e.orderId||t,class:"bg-[#1D1E22] rounded-[5px] p-[14px] mb-[10px] flex flex-col"},[v("div",C,[i[5]||(i[5]=v("span",{class:"text-[12px] text-white shrink-0"},"订单号：",-1)),v("span",D,w(e.orderId),1)]),v("div",M,[i[6]||(i[6]=v("span",{class:"text-[12px] text-white shrink-0"},"订单名称：",-1)),v("span",q,w(e.orderDesc||e.goodsName),1)]),v("div",z,[i[7]||(i[7]=v("span",{class:"text-[12px] text-white shrink-0"},"订单金额：",-1)),v("span",I,"￥"+w(e.amount),1)]),v("div",V,[i[8]||(i[8]=v("span",{class:"text-[12px] text-white shrink-0"},"订单状态：",-1)),v("div",{class:k(["px-[7px] rounded-[15px] text-[12px] text-white",0===e.status?"bg-[#DB2639]":"bg-[#09A0F8]"])},w(0===e.status?"未支付":"已支付"),3)]),i[11]||(i[11]=v("div",{class:"flex mb-[3px]"},[v("span",{class:"text-[12px] text-white shrink-0"},"支付方式："),v("span",{class:"text-[12px] text-[#6B6F80]"},"支付宝支付①")],-1)),v("div",N,[i[9]||(i[9]=v("span",{class:"text-[12px] text-white shrink-0"},"创建时间：",-1)),v("span",O,w(e.createTime||e.orderTime),1)]),v("button",{onClick:t=>(e.orderId,void r.open("Feedback",{transition:"slide-fade"})),class:"w-full h-[32px] mt-[9px] rounded-[16px] bg-gradient-to-r from-[#33415C] to-[#564B75] flex items-center justify-center active:opacity-90 transition-opacity"},[...i[10]||(i[10]=[v("span",{class:"text-[12px] text-[#B095C0] font-normal"},"已支付未到账?反馈给小编",-1)])],8,R)]))),128))]),_:1},8,["loading","finished","onLoad"])]),_:1},8,["modelValue"])),h(o).isListEmpty?(L(),u("div",S,[h(o).loading?(L(),m(x,{key:0})):(L(),m(F,{key:1,tip:"暂无充值记录"}))])):f("",!0)])])}}});export{T as default};
