|
@@ -23,7 +23,7 @@ import {
|
|
|
import Swiper from "react-native-swiper";
|
|
|
import AndroidUtil from "../../util/AndroidUtil";
|
|
|
import BasePage from "../BasePage";
|
|
|
-
|
|
|
+import Header from "./Header";
|
|
|
const instructions = Platform.select({
|
|
|
ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
|
|
|
android:
|
|
@@ -241,263 +241,14 @@ export default class MainPage extends BasePage {
|
|
|
|
|
|
headerorfooterComponent() {
|
|
|
return (
|
|
|
- <ImageBackground
|
|
|
- style={{
|
|
|
- width: "100%",
|
|
|
- height: 130
|
|
|
- }}
|
|
|
- >
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 2,
|
|
|
- width: "90%",
|
|
|
- flexDirection: "column",
|
|
|
- justifyContent: "center",
|
|
|
- alignItems: "stretch"
|
|
|
- }}
|
|
|
- >
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 1,
|
|
|
- flexDirection: "row",
|
|
|
- alignItems: "stretch",
|
|
|
- justifyContent: "center",
|
|
|
- backgroundColor: "#FFFFFF"
|
|
|
- }}
|
|
|
- >
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 1
|
|
|
- }}
|
|
|
- />
|
|
|
- <TouchableOpacity
|
|
|
- activeOpacity={1}
|
|
|
- style={{
|
|
|
- flex: 1,
|
|
|
- justifyContent: "center",
|
|
|
- height: "100%"
|
|
|
- }}
|
|
|
- onPress={() => this.toNextPage("MainActivity")}
|
|
|
- >
|
|
|
- <Image
|
|
|
- // source={{
|
|
|
- // uri:
|
|
|
- // "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=532481250,2026274152&fm=15&gp=0.jpg"
|
|
|
- // }}
|
|
|
- style={{
|
|
|
- width: 56,
|
|
|
- justifyContent: "center",
|
|
|
- height: 56,
|
|
|
- borderRadius: 50,
|
|
|
- backgroundColor: "#828282"
|
|
|
- }}
|
|
|
- />
|
|
|
- </TouchableOpacity>
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 0.5
|
|
|
- }}
|
|
|
- />
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 9,
|
|
|
- marginLeft: 20,
|
|
|
- flexDirection: "column",
|
|
|
- alignItems: "center",
|
|
|
- justifyContent: "center",
|
|
|
- height: "100%"
|
|
|
- }}
|
|
|
- >
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 1,
|
|
|
- alignItems: "center",
|
|
|
- justifyContent: "center",
|
|
|
- height: "100%",
|
|
|
- justifyContent: "center",
|
|
|
- width: "100%"
|
|
|
- }}
|
|
|
- >
|
|
|
- <Text
|
|
|
- style={{
|
|
|
- textAlign: "left",
|
|
|
- height: 20,
|
|
|
- justifyContent: "center",
|
|
|
- width: "100%",
|
|
|
- fontSize: 18
|
|
|
- }}
|
|
|
- >
|
|
|
- 用户昵称
|
|
|
- </Text>
|
|
|
- </View>
|
|
|
-
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 1,
|
|
|
- alignItems: "center",
|
|
|
- flexDirection: "row",
|
|
|
- justifyContent: "center",
|
|
|
- width: "100%"
|
|
|
- }}
|
|
|
- >
|
|
|
- <Image
|
|
|
- source={{
|
|
|
- uri:
|
|
|
- "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=532481250,2026274152&fm=15&gp=0.jpg"
|
|
|
- }}
|
|
|
- style={{
|
|
|
- width: 22,
|
|
|
- justifyContent: "center",
|
|
|
- alignItems: "center",
|
|
|
- height: 22
|
|
|
- }}
|
|
|
- />
|
|
|
-
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 9,
|
|
|
- alignItems: "center",
|
|
|
- justifyContent: "center",
|
|
|
- height: "100%",
|
|
|
- width: "100%"
|
|
|
- }}
|
|
|
- >
|
|
|
- <Text
|
|
|
- style={{
|
|
|
- textAlign: "left",
|
|
|
- justifyContent: "center",
|
|
|
- width: "100%",
|
|
|
- fontSize: 18
|
|
|
- }}
|
|
|
- >
|
|
|
- 6548
|
|
|
- </Text>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
-
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 3,
|
|
|
- flexDirection: "row",
|
|
|
- alignItems: "center",
|
|
|
- justifyContent: "center"
|
|
|
- }}
|
|
|
- >
|
|
|
- <TouchableOpacity
|
|
|
- activeOpacity={1}
|
|
|
- onPress={() => this.toNextPage("MainActivity")}
|
|
|
- >
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flexDirection: "row",
|
|
|
- alignItems: "center",
|
|
|
- justifyContent: "center",
|
|
|
- height: "80%",
|
|
|
- width: "100%"
|
|
|
- }}
|
|
|
- >
|
|
|
- <Image
|
|
|
- source={{
|
|
|
- uri:
|
|
|
- "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=532481250,2026274152&fm=15&gp=0.jpg"
|
|
|
- }}
|
|
|
- style={{
|
|
|
- width: 16,
|
|
|
- justifyContent: "center",
|
|
|
- alignItems: "center",
|
|
|
- marginRight: 5,
|
|
|
- height: 15
|
|
|
- }}
|
|
|
- />
|
|
|
- <View>
|
|
|
- <Text style={{}}>我的课程</Text>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </TouchableOpacity>
|
|
|
- </View>
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 0.5
|
|
|
- }}
|
|
|
- />
|
|
|
- </View>
|
|
|
-
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 0.1,
|
|
|
- backgroundColor: "#F8F8F8"
|
|
|
- }}
|
|
|
- />
|
|
|
- <View
|
|
|
- //这里要改成活的
|
|
|
- style={{
|
|
|
- flex: 1,
|
|
|
- flexDirection: "column",
|
|
|
- alignItems: "center",
|
|
|
- justifyContent: "center",
|
|
|
- width: "100%"
|
|
|
- }}
|
|
|
- >
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flexDirection: "row",
|
|
|
- flex: 1,
|
|
|
- width: "90%",
|
|
|
- backgroundColor: "#FFFFFF",
|
|
|
- alignItems: "center"
|
|
|
- }}
|
|
|
- >
|
|
|
- <Text
|
|
|
- style={{
|
|
|
- flex: 1.5,
|
|
|
- fontSize: 18,
|
|
|
- fontWeight: "bold",
|
|
|
- color: "black"
|
|
|
- }}
|
|
|
- >
|
|
|
- 学前
|
|
|
- </Text>
|
|
|
-
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 9
|
|
|
- }}
|
|
|
- />
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 2,
|
|
|
- alignItems: "center",
|
|
|
- justifyContent: "center",
|
|
|
- flexDirection: "row"
|
|
|
- }}
|
|
|
- >
|
|
|
- <Image
|
|
|
- source={{
|
|
|
- uri:
|
|
|
- "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=532481250,2026274152&fm=15&gp=0.jpg"
|
|
|
- }}
|
|
|
- style={{
|
|
|
- width: 14,
|
|
|
- justifyContent: "center",
|
|
|
- alignItems: "center",
|
|
|
- height: 13,
|
|
|
- marginRight: 5
|
|
|
- }}
|
|
|
- />
|
|
|
- <Text style={{}}>切换学龄</Text>
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- <View
|
|
|
- style={{
|
|
|
- flex: 0.1,
|
|
|
- width: "90%",
|
|
|
- backgroundColor: "#F8F8F8"
|
|
|
- }}
|
|
|
- />
|
|
|
- </View>
|
|
|
- </View>
|
|
|
- </ImageBackground>
|
|
|
+ <Header
|
|
|
+ uri="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1295208965,3056573814&fm=26&gp=0.jpg"
|
|
|
+ width={400}
|
|
|
+ height={150}
|
|
|
+ username="卡通笨笨熊"
|
|
|
+ flowerNumber="123234"
|
|
|
+ onPress={() => this.toNextPage("MainActivity")}
|
|
|
+ />
|
|
|
);
|
|
|
}
|
|
|
|