Commit 33fe72c3 authored by wildfirecode13's avatar wildfirecode13

1

parent b2a31049
This diff is collapsed.
...@@ -7,7 +7,7 @@ import MD from '../MD'; ...@@ -7,7 +7,7 @@ import MD from '../MD';
MD(); MD();
//此处为spark-cli动态生成 //此处为spark-cli动态生成
import Loading from "./pages/loading/loading.jsx"; import Loading from "./pages/loading/loading.jsx";
import Main from "./pages/main/main.jsx"; import Mainpage from "./pages/mainpage/mainpage.jsx";
class App extends Component { class App extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
...@@ -25,7 +25,7 @@ class App extends Component { ...@@ -25,7 +25,7 @@ class App extends Component {
return ( return (
<div> <div>
{page=='loading' && <Loading data={pagedata} navigateTo={this.navigateTo}></Loading>} {page=='loading' && <Loading data={pagedata} navigateTo={this.navigateTo}></Loading>}
{page=='main' && <Main data={pagedata} navigateTo={this.navigateTo}></Main>} {page=='mainpage' && <Mainpage data={pagedata} navigateTo={this.navigateTo}></Mainpage>}
</div> </div>
); );
} }
......
...@@ -37,7 +37,7 @@ class Loading extends Component { ...@@ -37,7 +37,7 @@ class Loading extends Component {
} }
oncomplete(res) { oncomplete(res) {
this.props.navigateTo('main', { this.props.navigateTo('mainpage', {
info: res.data, info: res.data,
}); });
} }
......
'use strict'; 'use strict';
import React, { Component } from 'react'; import React, { Component } from 'react';
import resList from '../../resconfig/resList'; import resList from '../../resconfig/resList'; //import API from '../../api';
//import API from '../../api';
import './mainpage.less'; import './mainpage.less';
class Mainpage extends Component { class Mainpage extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { resList: resList }; this.state = {
resList: resList,
};
} }
render() { render() {
return ( return (
<div className="mainpage " uuid="1898b1e3-7737-449c-b7bf-0ee3cc1182bc"> <div className="mainpage " uuid="1898b1e3-7737-449c-b7bf-0ee3cc1182bc">
...@@ -84,4 +87,5 @@ class Mainpage extends Component { ...@@ -84,4 +87,5 @@ class Mainpage extends Component {
); );
} }
} }
export default Mainpage; export default Mainpage;
This diff is collapsed.
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