Activities.jsx 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import QueueAnim from 'rc-queue-anim';
  2. import PropTypes from 'prop-types';
  3. let dataArray = [
  4. { image: 'http://questnet.cn/image/sthd/21.png' },
  5. { image: 'http://questnet.cn/image/sthd/22.png' },
  6. { image: 'http://questnet.cn/image/sthd/23.png' },
  7. { image: 'http://questnet.cn/image/sthd/24.png' },
  8. { image: 'http://questnet.cn/image/sthd/25.png' },
  9. { image: 'http://questnet.cn/image/sthd/26.png' },
  10. { image: 'http://questnet.cn/image/sthd/27.png' },
  11. { image: 'http://questnet.cn/image/sthd/28.png' },
  12. { image: 'http://questnet.cn/image/sthd/29.png' },
  13. { image: 'http://questnet.cn/image/sthd/30.png' },
  14. { image: 'http://questnet.cn/image/sthd/31.png' },
  15. { image: 'http://questnet.cn/image/sthd/32.png' },
  16. { image: 'http://questnet.cn/image/sthd/33.png' },
  17. { image: 'http://questnet.cn/image/sthd/34.png' },
  18. { image: 'http://questnet.cn/image/sthd/35.png' },
  19. ];
  20. class Activities extends React.Component {
  21. static propTypes = {
  22. className: PropTypes.string,
  23. };
  24. static defaultProps = {
  25. className: 'pic-details-demo',
  26. };
  27. constructor(props) {
  28. super(props);
  29. this.state = {
  30. picOpen: {},
  31. };
  32. }
  33. render() {
  34. return (
  35. <div>
  36. <QueueAnim type="bottom" className={`${this.props.className}-title`}>
  37. <h1 key="h1">社团活动</h1>
  38. <p>公司有羽毛球社,摄影社,兵乓球社等各种社团,不定期举办比赛,各种奖品等着大家</p>
  39. </QueueAnim>
  40. <QueueAnim
  41. component="div"
  42. className={`${this.props.className}-image-wrapper`}
  43. interval={0}
  44. type="bottom"
  45. >
  46. {
  47. dataArray.map((item, index) => {
  48. if(this.props.isMobile && index + 1 === 15) {
  49. return null
  50. }
  51. return <img src={item.image} key={index}/>
  52. })
  53. }
  54. </QueueAnim>
  55. </div>
  56. );
  57. }
  58. }
  59. export default Activities