123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- import React, { Component } from 'react';
- import { connect } from "react-redux";
- import './videoList.css'
- const mapStateToProps = (state) => ({
- });
- const mapDispatchToProps = (dispatch) => ({
- });
- class VideoListViews 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 (
- <div className="container">
- <div className="list">
- {
- this.state.list.map((item, index) => {
- return (<div className="list-item" key={index}>
- <img src={item.image} alt="图片" />
- <span className="list-item-text top54 ">{item.title}</span>
- <span className="list-item-text top128 left40">《视频讲解》</span>
- </div>)
- })
- }
- </div>
- </div>
- )
- }
- componentWillUnmount() {
- }
- }
- export default connect(mapStateToProps, mapDispatchToProps)(VideoListViews);
|