import React, { PureComponent } from "react";
import { connect } from "dva";
import { Icon, Checkbox, Select, Input } from "antd";
import styles from "./index.less";
import CartListComp from "@/components/CartListComp/index.js";

class CartList extends PureComponent {
  constructor(props) {
    super(props);
  }
  componentWillMount() {
    const { dispatch } = this.props;
    const additems = [
      {
        key: "/buyer/cartList",
        title: "购物车"
      }
    ];
    dispatch({
      type: "global/additems",
      additems: additems
    });
  }
  render() {
    const { cartListData } = this.props;
    return (
      <div className={styles.cartListBox}>
        {/* <div className={styles.classHead}>
          <span className={styles.nameIndex}>首页</span>
          <span className={styles.nameChild}>
            <Icon type="right" className={styles.nameIcon} />选品
          </span>
          <span className={styles.nameChild}>
            <Icon type="right" className={styles.nameIcon} />购物车
          </span>
        </div> */}
        {/* 购物车列表 */}
        <CartListComp cartListData={cartListData} {...this.props} />
        {/* 购物车列表 结束 */}
      </div>
    );
  }
}
export default connect(state => ({
  ...state
}))(CartList);
