You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
3.0 KiB
1 lines
3.0 KiB
import{$ as e,o as t,c as s,w as a,i as l,b as o,d as n,F as i,e as u,r as c,a as d,j as p,f as r,t as _,k as f}from"./index-ae8bbb19.js";import{r as m}from"./myCoupon.f3c77da5.js";import{C as y}from"./CouponType.a4f88c42.js";import{E as x}from"./index.97c7afee.js";import{_ as g}from"./_plugin-vue_export-helper.1b428a4d.js";const k="coupon/list",C=["red","blue","violet","yellow"];const h=g({components:{Empty:x},data:()=>({CouponTypeEnum:y,color:C,list:[],isLoading:!0}),onLoad(e){this.getCouponList()},methods:{getCouponList(t=!0){const s=this;s.isLoading=!0,((t,s)=>{const a={isPrompt:!0,load:!0,...s};return e.get(k,t,a)})({},{load:t}).then((e=>{s.list=e.data.list})).finally((()=>s.isLoading=!1))},receive(e){const t=this;m(e).then((e=>{t.$success(e.message),t.getCouponList(!1)}))}}},[["render",function(e,m,y,x,g,k){const C=l,h=f,L=c("empty");return t(),s(C,{class:"container"},{default:a((()=>[g.list.length?(t(),s(C,{key:0,class:"coupon-list"},{default:a((()=>[(t(!0),o(i,null,n(g.list,((l,n)=>(t(),s(C,{class:"coupon-item",key:n},{default:a((()=>[d(C,{class:p(["item-wrapper",[l.state.value?"color-"+g.color[n%g.color.length]:"color-gray"]])},{default:a((()=>[d(C,{class:"coupon-type"},{default:a((()=>[r(_(g.CouponTypeEnum[l.coupon_type].name),1)])),_:2},1024),d(C,{class:"tip dis-flex flex-dir-column flex-x-center"},{default:a((()=>[l.coupon_type==g.CouponTypeEnum.FULL_DISCOUNT.value?(t(),s(C,{key:0},{default:a((()=>[d(h,{class:"f-30"},{default:a((()=>[r("¥")])),_:1}),d(h,{class:"money"},{default:a((()=>[r(_(l.reduce_price),1)])),_:2},1024)])),_:2},1024)):u("",!0),l.coupon_type==g.CouponTypeEnum.DISCOUNT.value?(t(),s(h,{key:1,class:"money"},{default:a((()=>[r(_(l.discount)+"折",1)])),_:2},1024)):u("",!0),d(h,{class:"pay-line"},{default:a((()=>[r("满"+_(l.min_price)+"元可用",1)])),_:2},1024)])),_:2},1024),d(C,{class:"split-line"}),d(C,{class:"content dis-flex flex-dir-column flex-x-between"},{default:a((()=>[d(C,{class:"title oneline-hide"},{default:a((()=>[r(_(l.name),1)])),_:2},1024),d(C,{class:"bottom dis-flex flex-y-center"},{default:a((()=>[d(C,{class:"time flex-box"},{default:a((()=>[10==l.expire_type?(t(),s(h,{key:0},{default:a((()=>[r("领取"+_(l.expire_day)+"天内有效",1)])),_:2},1024)):u("",!0),20==l.expire_type?(t(),s(h,{key:1},{default:a((()=>[l.start_time===l.end_time?(t(),o(i,{key:0},[r(_(l.start_time)+" 当天有效",1)],64)):(t(),o(i,{key:1},[r(_(l.start_time)+"~"+_(l.end_time),1)],64))])),_:2},1024)):u("",!0)])),_:2},1024),e.$checkModule("market-coupon")&&l.state.value?(t(),s(C,{key:0,class:"receive",onClick:e=>k.receive(l.coupon_id)},{default:a((()=>[d(h,null,{default:a((()=>[r("立即领取")])),_:1})])),_:2},1032,["onClick"])):(t(),s(C,{key:1,class:"receive state"},{default:a((()=>[d(h,null,{default:a((()=>[r(_(l.state.text),1)])),_:2},1024)])),_:2},1024))])),_:2},1024)])),_:2},1024)])),_:2},1032,["class"])])),_:2},1024)))),128))])),_:1})):u("",!0),g.list.length?u("",!0):(t(),s(L,{key:1,isLoading:g.isLoading},null,8,["isLoading"]))])),_:1})}],["__scopeId","data-v-8f6470d3"]]);export{h as default};
|
|
|