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.4 KiB
1 lines
3.4 KiB
import{_ as e}from"./u-tabs.ea263673.js";import{q as t,u as s,o as a,c as l,w as o,n,i,a as u,b as r,d as c,F as p,y as m,k as d,f,t as _,e as y,l as b}from"./index-4ddb689d.js";import{r as h}from"./uni-app.es.24af5d4f.js";import{M as x,_ as T}from"./mescroll-mixins.a7931123.js";import{l as C}from"./myCoupon.49a23600.js";import{C as g}from"./CouponType.eb6d2fde.js";import{_ as v}from"./_plugin-vue_export-helper.1b428a4d.js";const k=["red","blue","violet","yellow"],U=[{name:"未使用",value:"isUnused"},{name:"已使用",value:"isUse"},{name:"已过期",value:"isExpire"}];const j=v({mixins:[x],data:()=>({CouponTypeEnum:g,color:k,tabs:U,curTab:0,list:t(),upOption:{auto:!0,page:{size:15},noMoreSize:4,empty:{tip:"亲,暂无相关优惠券"}}}),onLoad(e){},methods:{upCallback(e){const t=this;t.getCouponList(e.num).then((e=>{const s=e.data.length,a=e.data.total;t.mescroll.endBySize(s,a)})).catch((()=>t.mescroll.endErr()))},getCouponList(e=1){const t=this;return new Promise(((a,l)=>{C({dataType:t.getTabValue(),page:e},{load:!1}).then((l=>{const o=l.data.list;t.list.data=s(o,t.list,e),a(o)}))}))},getTabValue(){return this.tabs[this.curTab].value},onChangeTab(e){this.curTab=e,this.onRefreshList()},onRefreshList(){this.list=t(),setTimeout((()=>{this.mescroll.resetUpScroll()}),120)}}},[["render",function(t,s,x,C,g,v){const k=h(m("u-tabs"),e),U=i,j=b,L=h(m("mescroll-body"),T);return a(),l(U,{class:"container",style:n(t.appThemeStyle)},{default:o((()=>[u(L,{ref:"mescrollRef",sticky:!0,onInit:t.mescrollInit,down:{use:!1},up:g.upOption,onUp:v.upCallback},{default:o((()=>[u(k,{list:g.tabs,"is-scroll":!1,current:g.curTab,"active-color":t.appTheme.mainBg,duration:.2,onChange:v.onChangeTab},null,8,["list","current","active-color","duration","onChange"]),u(U,{class:"coupon-list"},{default:o((()=>[(a(!0),r(p,null,c(g.list.data,((e,t)=>(a(),l(U,{class:"coupon-item",key:t},{default:o((()=>[u(U,{class:d(["item-wrapper",["color-"+(e.state.value?g.color[t%g.color.length]:"gray")]])},{default:o((()=>[u(U,{class:"coupon-type"},{default:o((()=>[f(_(g.CouponTypeEnum[e.coupon_type].name),1)])),_:2},1024),u(U,{class:"tip dis-flex flex-dir-column flex-x-center"},{default:o((()=>[e.coupon_type==g.CouponTypeEnum.FULL_DISCOUNT.value?(a(),l(U,{key:0},{default:o((()=>[u(j,{class:"f-30"},{default:o((()=>[f("¥")])),_:1}),u(j,{class:"money"},{default:o((()=>[f(_(e.reduce_price),1)])),_:2},1024)])),_:2},1024)):y("",!0),e.coupon_type==g.CouponTypeEnum.DISCOUNT.value?(a(),l(j,{key:1,class:"money"},{default:o((()=>[f(_(e.discount)+"折",1)])),_:2},1024)):y("",!0),u(j,{class:"pay-line"},{default:o((()=>[f("满"+_(e.min_price)+"元可用",1)])),_:2},1024)])),_:2},1024),u(U,{class:"split-line"}),u(U,{class:"content dis-flex flex-dir-column flex-x-between"},{default:o((()=>[u(U,{class:"title"},{default:o((()=>[f(_(e.name),1)])),_:2},1024),u(U,{class:"bottom dis-flex flex-y-center"},{default:o((()=>[u(U,{class:"time flex-box"},{default:o((()=>[e.start_time===e.end_time?(a(),r(p,{key:0},[f(_(e.start_time)+" 当天有效",1)],64)):(a(),r(p,{key:1},[f(_(e.start_time)+"~"+_(e.end_time),1)],64))])),_:2},1024),u(U,{class:"receive state"},{default:o((()=>[u(j,null,{default:o((()=>[f(_(e.state.text),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["class"])])),_:2},1024)))),128))])),_:1})])),_:1},8,["onInit","up","onUp"])])),_:1},8,["style"])}],["__scopeId","data-v-90b4b808"]]);export{j as default};
|
|
|