Commit 33fe72c3 authored by wildfirecode13's avatar wildfirecode13

1

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