Commit 23e35a50 by zhanghaozhe

购物车命名

parent 3b1fa6e0
......@@ -152,10 +152,11 @@
}
}
.cart-footer{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
position: absolute;
bottom: 0;
justify-content: space-between;
border-top:1px solid #eee;
background-color:rgba(255,255,255,.7);
......
......@@ -3,7 +3,7 @@ import { Checkbox } from 'antd-mobile';
import OrderList from '@/common/OrderList';
class CardItem extends Component {
class CartItem extends Component {
// 构造函数
constructor(props) {
super(props)
......@@ -62,4 +62,4 @@ class CardItem extends Component {
)
}
}
export default CardItem;
\ No newline at end of file
export default CartItem;
\ No newline at end of file
import React, { Component } from 'react'
import CardItem from './cardItem'
import CartItem from './cartItem'
class ShopCard extends Component {
render() {
......@@ -12,17 +12,17 @@ class ShopCard extends Component {
this.props.data.length > 0 ?
this.props.data.map((item, i) => {
return (
<CardItem
index={i}
<CartItem
index={i}
changeStock={(id, val) => {
this.props.changeStock(id, val)
}}
}}
checkChange={(id, val) => {
this.props.checkChange(id, val)
}}
}}
getCartList={() => {
this.props.getCartList()
}} key={i} item={item}></CardItem>
}} key={i} item={item}/>
)
})
: <div className="cart-tip">暂无商品</div>
......
......@@ -2,7 +2,7 @@ import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Checkbox, NavBar } from 'antd-mobile'
//组件
import ShopCard from './cardList.js'
import ShopCart from './cartList.js'
import Loading from '@common/Loading'
//css
......@@ -144,7 +144,7 @@ class Cart extends Component {
this.state.loading ?
<Loading />
:
<ShopCard getCartList={this.getCartList} changeStock={this.changeStock} checkChange={this.checkChange} data={this.state.data}/>
<ShopCart getCartList={this.getCartList} changeStock={this.changeStock} checkChange={this.checkChange} data={this.state.data}/>
}
......
......@@ -11,7 +11,7 @@ import Search from '@/components/search/index'
import SearchResult from '@/components/search/search-result'
import Detail from '@/components/detail/index'
import Examination from '@/components/examination'
import ShopCard from '@/components/shopCard/index';
import ShopCart from '@/components/shopCart';
import BargainMiddlePage from '@/components/bargainMiddlePage';
import Passport from '@/components/passport'
......@@ -70,8 +70,8 @@ export default [
component: Coupons
},
{
path: '/shopcard',
component: ShopCard
path: '/shopcart',
component: ShopCart
},
{
path: '/bargain-middle-page',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment