Authored by 李奇

奖品页加lazyload优化

... ... @@ -6,6 +6,7 @@ import * as config from '../../../../config';
import wx from 'weixin-js-sdk';
import TipModal from '../components/tip-modal';
import dayjs from 'dayjs';
import LazyLoad from 'react-lazy-load';
export default class Prize extends PureComponent {
constructor(props) {
... ... @@ -85,7 +86,9 @@ export default class Prize extends PureComponent {
return (
<div className="prize-item" key={prize.id}>
<div className="item-top">
<img src={prize.img} className="prize-img"/>
<LazyLoad offset={1000}>
<img src={`${prize.img}?imageMogr2/2/w/200/h/140`} className="prize-img"/>
</LazyLoad>
<div className="prize-info">
<div className="prize-name">{prize.name}</div>
<div className="got-time">中奖时间:{fmtTime(prize.createTime)}</div>
... ...