2 lines
828 B
JavaScript
2 lines
828 B
JavaScript
"use strict";const e=require("../../common/vendor.js"),t=0,n=10,r=20,T=31,s={WAIT_START:"即将开始",STARTED:"进行中",END:"已结束"};exports.CouponTemplateValidityTypeEnum={DATE:{type:1,name:"固定日期可用"},TERM:{type:2,name:"领取之后可用"}},exports.PromotionDiscountTypeEnum={PRICE:{type:1,name:"满减"},PERCENT:{type:2,name:"折扣"}},exports.TimeStatusEnum=s,exports.WxaSubscribeTemplate={TRADE_ORDER_DELIVERY:"订单发货通知",PROMOTION_COMBINATION_SUCCESS:"拼团结果通知",PAY_WALLET_RECHARGER_SUCCESS:"充值成功通知"},exports.getTerminal=()=>{switch(e.index.getSystemInfoSync().uniPlatform){case"app":return T;case"web":return r;case"mp-weixin":return n;default:return t}},exports.getTimeStatusEnum=(t,n)=>{const r=e.dayjs();return r.isBefore(t)?s.WAIT_START:r.isAfter(n)?s.END:s.STARTED};
|