|
|
@@ -59,19 +59,19 @@ class ShopCarPage extends Component{
|
|
|
}
|
|
|
|
|
|
|
|
|
- // renderShopCarList(){
|
|
|
- // return this.state.shopCarList||[].map((item)=>{
|
|
|
- // return (<div>
|
|
|
- // <ShopCarCard car={item} key={item.id} deleteCarById={this.deleteCarById}/>
|
|
|
- // </div>)
|
|
|
- // })
|
|
|
- // }
|
|
|
-
|
|
|
render(){
|
|
|
return(
|
|
|
<div className="shopCarPage">
|
|
|
<ActivityIndicator toast text="loading" animating={this.state.loading}/>
|
|
|
<NavBars navBarText="购物车" changePage={this.props.changePage} page="detail"/>
|
|
|
+ {
|
|
|
+ this.state.shopCarList.length===0 ?
|
|
|
+ <div style={{marginTop:'200px',padding:'1px',position:'relative',zIndex:'10',display:'flex',justifyContent:'center'}}>
|
|
|
+ <div>购物车空空如也<span onClick={()=>this.props.changePage('index')} style={{color:'#108ee9'}}>去购物</span></div>
|
|
|
+ </div>
|
|
|
+ :
|
|
|
+ ''
|
|
|
+ }
|
|
|
<div className="ShopCarList">
|
|
|
{/*this.renderShopCarList()*/}
|
|
|
<ShopCarCard shopCarList={this.state.shopCarList} deleteCarById={this.deleteCarById}/>
|