import{i as g,c as u}from"./app-DckefXYL.js";import{N as v}from"./app-C9iVkiu5.js";import{N as p}from"./app-CUPmXIij.js";import{C as k}from"./app-DR6MAZZy.js";import{C as x}from"./app-BQ_EeKjW.js";import{_ as N}from"./app-DezwSKU9.js";import{T as y}from"./app-xbpVC8gr.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-DnroACXc.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-B0NrURRk.js";import"./app-Co2SIBzr.js";import"./app-Cu6FD8m8.js";import"./app-R-vSvFIF.js";import"./app-HaDoyrq5.js";import"./app-CYYQ_Zep.js";import"./app-Cmxxk_WX.js";import"./app-CF8nmC-F.js";import"./app-B09rlSqG.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};
