zhangmengjie 5 years ago
parent
commit
ce86997031
2 changed files with 12 additions and 5 deletions
  1. 7 3
      App.js
  2. 5 2
      pages/MainActivity.js

+ 7 - 3
App.js

@@ -21,6 +21,8 @@ import { createStackNavigator, createAppContainer } from "react-navigation";
 import MainActivity from "./pages/MainActivity";
 import SchoolAge from "./pages/components/SchoolAge";
 import MainPage from "./pages/components/MainPage";
+import SchedulePage from "./pages/components/SchedulePage";
+import PersonalInfo from "./pages/components/PersonalInfo";
 const instructions = Platform.select({
   ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
   android:
@@ -32,11 +34,13 @@ const RootNavigator = createStackNavigator(
   {
     MainActivity: { screen: MainActivity },
     SchoolAge: { screen: SchoolAge },
-    MainPage: { screen: MainPage }
+    MainPage: { screen: MainPage },
+    SchedulePage: { screen: SchedulePage },
+    PersonalInfo: { screen: PersonalInfo }
   },
   {
-    initialRouteName: "SchoolAge",
-    headerMode: "none"
+    initialRouteName: "PersonalInfo",
+    headerMode: "null"
   }
 );
 const App = createAppContainer(RootNavigator);

+ 5 - 2
pages/MainActivity.js

@@ -20,7 +20,7 @@ import BasePage from "./BasePage";
 import Header from "./components/Header";
 import RevisionAge from "./components/RevisionAge";
 import CourseTitle from "./components/CourseTitle";
-
+import ScheduleFlatItem from "./components/ScheduleFlatItem";
 const instructions = Platform.select({
   ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
   android:
@@ -59,7 +59,10 @@ export default class MainActivity extends BasePage {
           textss="学前"
           onPress={() => this.toWebPage("这里写json......")}
         />
-        <CourseTitle width={150} height={50} title="学前" />
+
+        <Text style={styles.instructions}>To get started, edit App.js</Text>
+        <Text style={styles.instructions}>To get started, edit App.js</Text>
+        <ScheduleFlatItem width={this.getWindowWidth()} height={30} />
       </View>
     );
   }