Showing
1 changed file
with
4 additions
and
4 deletions
@@ -72,9 +72,9 @@ export default class Prize extends PureComponent { | @@ -72,9 +72,9 @@ export default class Prize extends PureComponent { | ||
72 | let couponLink = 'https://m.yohobuy.com/home/coupons?openby:yohobuy={"action":"go.coupon"}'; | 72 | let couponLink = 'https://m.yohobuy.com/home/coupons?openby:yohobuy={"action":"go.coupon"}'; |
73 | let redEnvelopeLink = 'https://activity.yoho.cn/feature/3221.html?title=我的红包&openby:yohobuy={"action":"go.mineredpackage"}'; | 73 | let redEnvelopeLink = 'https://activity.yoho.cn/feature/3221.html?title=我的红包&openby:yohobuy={"action":"go.mineredpackage"}'; |
74 | 74 | ||
75 | - this.state.prizes.map(prize => { | ||
76 | - prize.createTime = dayjs(new Date(prize.createTime).getTime()).format('YYYY-MM-DD HH:mm'); | ||
77 | - }); | 75 | + let fmtTime = time => { |
76 | + return dayjs(new Date(time).getTime()).format('YYYY-MM-DD HH:mm'); | ||
77 | + }; | ||
78 | 78 | ||
79 | return ( | 79 | return ( |
80 | pending ? '' : | 80 | pending ? '' : |
@@ -88,7 +88,7 @@ export default class Prize extends PureComponent { | @@ -88,7 +88,7 @@ export default class Prize extends PureComponent { | ||
88 | <img src={prize.img} className="prize-img"/> | 88 | <img src={prize.img} className="prize-img"/> |
89 | <div className="prize-info"> | 89 | <div className="prize-info"> |
90 | <div className="prize-name">{prize.name}</div> | 90 | <div className="prize-name">{prize.name}</div> |
91 | - <div className="got-time">中奖时间:{prize.createTime}</div> | 91 | + <div className="got-time">中奖时间:{fmtTime(prize.createTime)}</div> |
92 | </div> | 92 | </div> |
93 | </div> | 93 | </div> |
94 | <div className="item-bottom"> | 94 | <div className="item-bottom"> |
-
Please register or login to post a comment