|
|
@@ -0,0 +1,69 @@
|
|
|
+import React, { Component } from 'react';
|
|
|
+import { Card, WingBlank, WhiteSpace } from 'antd-mobile';
|
|
|
+//import { Item } from 'antd-mobile/lib/tab-bar';
|
|
|
+import './Cards.css'
|
|
|
+
|
|
|
+class Cards extends Component{
|
|
|
+ constructor(props){
|
|
|
+ console.log('111',props)
|
|
|
+ super(props)
|
|
|
+ this.state={
|
|
|
+ product_id:''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /*
|
|
|
+
|
|
|
+ address: "合肥蜀山那长江路545号"
|
|
|
+ admin_id: null
|
|
|
+ class: "美甲"
|
|
|
+ createdAt: "2018/3/12"
|
|
|
+ describle: "只属于你一个人的浪漫"
|
|
|
+ id: "12312"
|
|
|
+ img: "https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/recommend_img_02.png"
|
|
|
+ name: "一个人美容"
|
|
|
+ recommended: "1"
|
|
|
+ telephone: "18355093647"
|
|
|
+ updatedAt: "String"
|
|
|
+ */
|
|
|
+
|
|
|
+ render(){
|
|
|
+ const item =this.props.item
|
|
|
+ const changePage=this.props.changePage
|
|
|
+ return(
|
|
|
+ <WingBlank size="lg" className="Card">
|
|
|
+ {/*<Link to={"/detail?product_id="+item.id}>*/}
|
|
|
+ <Card onClick={(e)=>{changePage('detail',item.id)}}>
|
|
|
+ <Card.Header
|
|
|
+ title={<span className="title">{item.name}</span>}
|
|
|
+ extra={<span className="hot">热门</span>}
|
|
|
+ />
|
|
|
+ <Card.Body>
|
|
|
+ <div className="bodyWrap">
|
|
|
+ <div className="imgWrap">
|
|
|
+ <img src={item.img} alt="xxx" height="100px" width="100px"/>
|
|
|
+ </div>
|
|
|
+ <div className="sidebar">
|
|
|
+ <p style={{fontSize:"10px"}}>{item.class}</p>
|
|
|
+ <p style={{fontSize:"10px"}}>{item.describle}</p>
|
|
|
+ <p style={{fontSize:"10px"}}>{item.address}</p>
|
|
|
+ <button style={{border:"none",padding:"5px 11px",background:"green",borderRadius:"3px",color:"#fff",fontSize:"10px",marginTop:"16px"}}>了解更多</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Card.Body>
|
|
|
+ <Card.Footer content="" extra={<div></div>} />
|
|
|
+ </Card>
|
|
|
+ {/*</Link>*/}
|
|
|
+ <WhiteSpace size="lg" />
|
|
|
+ </WingBlank>
|
|
|
+ )
|
|
|
+ }
|
|
|
+}
|
|
|
+export default Cards
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|