import{i as g,c as u}from"./app-a6cKceqE.js";import{N as v}from"./app-DCd54JMo.js";import{N as p}from"./app-CabATHnR.js";import{C as k}from"./app-Biqm6MNM.js";import{C as x}from"./app-C14NbwKQ.js";import{_ as N}from"./app-uhTxLRnQ.js";import{T as y}from"./app-BbPGXKj1.js";import{o as a,g as e,b as i,w as r,u as _,c as m,h as c,F as f,D as b,f as l,a as s,n as o,t as n}from"./app-BYcXwl4U.js";import"./app-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-DPDEogA0.js";import"./app-DxjODhok.js";import"./app-BhzV4gWo.js";import"./app-CO4sV-Ic.js";import"./app-yt37eDzA.js";import"./app-BG60hdvp.js";import"./app-BQ5ggxk2.js";import"./app-SxAW7vhf.js";import"./app-D3zbrzdO.js";function w(){g(this)}const T={key:1},V={class:"text-xl"},B={class:"ml-2"},F={class:"mt-2"},D={class:"mt-2"},R={key:0,class:"mt-2"},j={key:1,class:"mt-2"},z={key:2,class:"mt-2"},A={key:0},E={key:1},L={class:"mt-2"},nt={__name:"index",setup(S){const d=u(new w);return($,q)=>(a(),e(f,null,[i(v,null,{tabs:r(()=>[i(p,{href:"/finance/coupons",active:"",name:"已领取优惠券"}),i(p,{separator:""}),i(p,{href:"/finance/coupons/coupons",name:"可领取优惠券"})]),_:1}),_(d).userCoupons.length==0?(a(),m(N,{key:0,"disable-spacing":""},{default:r(()=>[l("暂时还没有可用的优惠券。")]),_:1})):c("",!0),_(d).userCoupons.length>0?(a(),e("div",T,[(a(!0),e(f,null,b(_(d).userCoupons,t=>(a(),m(k,{class:"mb-4"},{default:r(()=>[i(x,{full:""},{value:r(()=>[s("div",V,[s("span",{class:o({gray:t.status!="normal"})},n(t.coupon.name),3),s("span",B,[t.status=="used"?(a(),m(y,{key:0,severity:"warn",rounded:""},{default:r(()=>[l("已使用")]),_:1})):c("",!0),t.status=="invalid"?(a(),m(y,{key:1,severity:"danger",rounded:""},{default:r(()=>[l("已失效")]),_:1})):c("",!0)])]),s("div",F,[t.coupon.description.length>0?(a(),e("span",{key:0,class:o({gray:t.status!="normal"})},"使用说明："+n(t.coupon.description),3)):(a(),e("span",{key:1,class:o({gray:t.status!="normal"})},"使用说明："+n(t.coupon.name),3))]),s("div",D,[s("span",{class:o({gray:t.status!="normal"})},"适用最低原价：满¥"+n(t.coupon.minAmount)+"元",3)]),t.coupon.type=="discount"?(a(),e("div",R,[s("span",{class:o({gray:t.status!="normal"})},"优惠："+n(t.coupon.discount)+"折",3)])):c("",!0),t.coupon.type=="reduce"?(a(),e("div",j,[s("span",{class:o({gray:t.status!="normal"})},"优惠：立减¥-"+n(t.coupon.reduce)+"元",3)])):c("",!0),t.coupon.category=="plan"?(a(),e("div",z,[s("span",{class:o({gray:t.status!="normal"})},[l("适用套餐： "),t.coupon.plans.length>0?(a(),e("span",A,n(t.coupon.plans.map(h=>h.name).join("、")),1)):(a(),e("span",E,"所有套餐"))],2)])):c("",!0),s("div",L,[s("span",{class:o({gray:t.status!="normal"})},"有效期："+n(t.dayFrom)+" - "+n(t.dayTo),3)])]),_:2},1024)]),_:2},1024))),256))])):c("",!0)],64))}};export{nt as default};
