Commit 23e35a50 by zhanghaozhe

购物车命名

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