import React, { Component } from 'react';
import Img from '../../ImgLoad/index';
import { Sym } from '../../Icon/index';

import './style.styl';
class GoodsInfo extends Component<any> {
    constructor(props: any) {
        super(props);
    }

    render() {
        const { goods } = this.props;
        return (
            <div className="goodinfo">
                <div className="goodinfo-head">
                    <Img src={goods.productImage} />
                    <div className="text" />
                </div>
                <div className="goodinfo-msg">
                    <div>
                        <div className="goodinfo-msg-name">
                            {goods.productName}
                        </div>
                        <pre className="goodinfo-msg-text">
                            {goods.productDesc}
                        </pre>
                    </div>
                    <div className="price-box">
                        <div className="price-box-price">
                            <span className="f24">￥</span>
                            <span>{goods.salePrice}</span>
                            {/* <span className="f24">.00</span> */}
                        </div>
                        {goods.price != goods.salePrice ? (
                            <div className="price-box-maxprice">
                                <del>￥{goods.price}</del>
                            </div>
                        ) : null}
                    </div>
                    {goods.applyZone ? (
                        <div className="apply-area">
                            <div>适用地区</div>
                            <div>
                                <span>
                                    <Sym type="area" />
                                </span>
                                <span>{goods.applyZone}</span>
                            </div>
                        </div>
                    ) : null}
                </div>
            </div>
        );
    }
}

export default GoodsInfo;
