import React, { Component } from 'react'; import { connect } from "react-redux"; import './videoKindList.css' const mapStateToProps = (state) => ({ }); const mapDispatchToProps = (dispatch) => ({ }); class VideoKindListViews extends Component { /* * 构造函数 * * */ constructor() { super(); this.state = { list: [{ image: require('./../../assets/images/kemu1.png'), title: "科目一" }, { image: require('./../../assets/images/kemu2.png'), title: "科目二" }, { image: require('./../../assets/images/kemu3.png'), title: "科目三" }, { image: require('./../../assets/images/kemu4.png'), title: "科目四" }] }; } /* * * 生命周期一 * * */ componentWillMount() { /* * * 如果是ios设备默认第一次不是播放状态,android没事 * * */ /* * * 请求数据 * * * */ } /* * * 生命周期二 * * */ componentDidMount() { } /* * 渲染 * */ render() { return (
{ this.state.list.map((item, index) => { return (
图片 {item.title} 《视频讲解》
) }) }
) } componentWillUnmount() { } } export default connect(mapStateToProps, mapDispatchToProps)(VideoKindListViews);