home.tsx 2.18 KB
Newer Older
1 2
import * as React from "react";
// import { Component } from "react";
mayi's avatar
mayi committed
3
import {withTranslation,WithTranslation} from 'react-i18next'
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import {
  Header,
  Footer,
  SideMenu,
  Carouseee,
  ProductCollection,
  Bussiness,
} from "../../components";
import styles from "./home.module.css";
import { productList1, productList2, productList3 } from "./mockups";
import sideImage1 from "../../assets/images/sider_2019_02-04-2.png";
import sideImage2 from "../../assets/images/sider_2019_02-04.png";
import sideImage3 from "../../assets/images/sider_2019_12-09.png";
import { Row, Col, Typography } from "antd";

mayi's avatar
mayi committed
19
export class HomePageComponent extends React.Component<WithTranslation> {
20 21 22 23 24
  // constructor(props: HomePageProps) {
  //     super(props);
  //     this.state = { :  };
  // }
  render() {
mayi's avatar
mayi committed
25
    const {t} = this.props
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
    return (
      <>
        <Header />
        {/* 页面内容 */}
        <div className={styles["page-content"]}>
          <Row style={{ marginTop: 20 }}>
            <Col span={6}>
              <div>
                <SideMenu />
              </div>
            </Col>
            <Col span={18}>
              <div>
                <Carouseee />
              </div>
            </Col>
          </Row>

          <ProductCollection
            title={
              <Typography.Title level={3} type="warning">
mayi's avatar
mayi committed
47
                {t("home_page.hot_recommended")}
48 49 50 51 52 53 54 55
              </Typography.Title>
            }
            sideImage={sideImage1}
            products={productList1}
          />
          <ProductCollection
            title={
              <Typography.Title level={3} type="danger">
mayi's avatar
mayi committed
56
              {t("home_page.new_arrival")}
57 58 59 60 61 62 63 64
              </Typography.Title>
            }
            sideImage={sideImage2}
            products={productList2}
          />
          <ProductCollection
            title={
              <Typography.Title level={3} type="success">
mayi's avatar
mayi committed
65
                  {t("home_page.domestic_travel")}
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
              </Typography.Title>
            }
            sideImage={sideImage3}
            products={productList3}
          />
          <Bussiness />
        </div>

        <Footer />
      </>
    );
  }
}


mayi's avatar
mayi committed
81
export const HomePage =withTranslation()(HomePageComponent)