|
|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
|
import './App.css';
|
|
|
// import 'antd-mobile/dist/antd-mobile.css';
|
|
|
import HomePage from './components/HomePage/HomePage'
|
|
|
-import ShopCar from './components/ShopCarPage/shopCar'
|
|
|
+import ShopCarPage from './components/ShopCarPage/ShopCarPage'
|
|
|
import UserPage from './components/UserPage/userPage'
|
|
|
import {PageContext,NumContext} from './context/context'
|
|
|
import NavBars from './components/App/NavBar'
|
|
|
@@ -52,7 +52,7 @@ class ShopApp extends Component {
|
|
|
|
|
|
changePage(page,product_id){
|
|
|
console.log("onAppPage",page)
|
|
|
-
|
|
|
+
|
|
|
if(product_id){
|
|
|
this.setState({page,product_id})
|
|
|
}else{
|
|
|
@@ -63,6 +63,7 @@ class ShopApp extends Component {
|
|
|
|
|
|
|
|
|
renderPage(page=""){
|
|
|
+ console.log('renderPage',page)
|
|
|
const setNum=this.setNum.bind(this)
|
|
|
if(page==='detail'){
|
|
|
return(
|
|
|
@@ -91,7 +92,7 @@ class ShopApp extends Component {
|
|
|
return(
|
|
|
<div>
|
|
|
<div className="pageWrap">
|
|
|
- <ShopCar />
|
|
|
+ <ShopCarPage />
|
|
|
</div>
|
|
|
<TabBarBottom changePage={this.changePage}/>
|
|
|
</div>
|
|
|
@@ -106,20 +107,29 @@ class ShopApp extends Component {
|
|
|
<TabBarBottom changePage={this.changePage}/>
|
|
|
</div>
|
|
|
)
|
|
|
- }else{
|
|
|
+ }else if(page==='addressList'){
|
|
|
+
|
|
|
+ }else if(page==='editAddress'){
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ console(page){
|
|
|
+ this.console.log(page)
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
const changePage=this.changePage
|
|
|
+ console.log('APPrender')
|
|
|
return (
|
|
|
<PageContext.Provider value={changePage}>
|
|
|
<div className="AppWrap">
|
|
|
<div className="phone6s">
|
|
|
<div className="App">
|
|
|
<NavBars />
|
|
|
- {this.renderPage(this.state.page)}
|
|
|
+ {
|
|
|
+ this.renderPage(this.state.page)
|
|
|
+ }
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|