dx 5 лет назад
Родитель
Сommit
3940a76bf6
4 измененных файлов с 299 добавлено и 43 удалено
  1. 259 21
      js/navigator/AppNavigators.js
  2. 5 1
      js/page/GameLead.js
  3. 30 21
      js/page/RecommendGamer.js
  4. 5 0
      js/page/userCard.js

+ 259 - 21
js/navigator/AppNavigators.js

@@ -58,7 +58,7 @@ const BottomTabNavigator = createBottomTabNavigator(
                 tabBarIcon: ({ tintColor, focused }) => (
                     <MaterialCommunityIcons
                         name={"home-heart"}
-                        size={26}
+                        size={30}
                         style={{ color: tintColor }}
                     />
                 )
@@ -104,7 +104,25 @@ const BottomTabNavigator = createBottomTabNavigator(
             }
         }
 
-    }
+    }, {
+    initialRouteName: "", // 设置默认的页面
+    tabBarOptions: {
+        activeTintColor: Platform.OS === 'ios' ? '#FA788A' : '#fff',
+        style: {
+            paddingTop: 10,
+            paddingBottom: 10,
+            height: 60
+        },
+        labelStyle: {
+            marginTop: 6,
+            marginBottom: 6
+        },// 文字的样式
+    },
+
+    lazy: true, // 是否在app打开的时候将底部标签栏全部加载
+    backBehavior: null, // 点击返回退到上级界面
+
+}
 );
 
 const MainNavigator = createStackNavigator({
@@ -124,7 +142,18 @@ const MainNavigator = createStackNavigator({
     GamerList: {
         screen: GamerList,
         navigationOptions: {
-            headerTitle: "选择关卡"
+            headerTitle: "选择关卡",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     RecommendGamer: {
@@ -132,6 +161,17 @@ const MainNavigator = createStackNavigator({
         navigationOptions: ({ navigation }) => (
             {
                 headerTitle: "推荐关主",
+                headerTintColor: "#fff",
+                headerBackTitleStyle: {
+                    color: "#fff"
+                },
+                headerStyle: {
+                    backgroundColor: '#FA788A',
+                    color: '#fff',
+                },
+                headerTitleStyle: {
+                    color: '#fff',
+                },
                 headerRight: <TouchableOpacity onPress={() => navigation.navigate("CreatPass")}>
                     <Text style={{ fontSize: 15, color: "#FF4A6C", marginRight: 10 }}>创建关卡</Text>
                 </TouchableOpacity>
@@ -141,85 +181,239 @@ const MainNavigator = createStackNavigator({
     GameHome: {
         screen: GameHome,
         navigationOptions: {
-            headerTitle: "游戏大厅"
+            headerTitle: "游戏大厅",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     CreatPass: {
         screen: CreatPass,
         navigationOptions: {
-            headerTitle: "创建关卡"
+            headerTitle: "创建关卡",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     PassMode1: {
         screen: PassMode1,
         navigationOptions: {
-            headerTitle: "闯关模式"
+            headerTitle: "闯关模式",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     PassMode: {
         screen: PassMode,
         navigationOptions: {
-            headerTitle: "闯关模式"
+            headerTitle: "闯关模式",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     Attestation: {
         screen: Attestation,
         navigationOptions: {
-            headerTitle: "认证"
+            headerTitle: "认证",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     AttestationInfo: {
         screen: AttestationInfo,
         navigationOptions: {
-            headerTitle: "实名认证"
+            headerTitle: "实名认证",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     WaitAttestation: {
         screen: WaitAttestation,
         navigationOptions: {
-            headerTitle: "实名认证"
+            headerTitle: "实名认证",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     MyGift: {
         screen: MyGift,
         navigationOptions: {
-            headerTitle: "我的礼物"
+            headerTitle: "我的礼物",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     MyInfo: {
         screen: MyInfo,
         navigationOptions: {
-            headerTitle: "我的资料"
+            headerTitle: "我的资料",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     Setting: {
         screen: Setting,
         navigationOptions: {
-            headerTitle: "设置"
+            headerTitle: "设置",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     Suggestion: {
         screen: Suggestion,
         navigationOptions: {
-            headerTitle: "意见反馈"
+            headerTitle: "意见反馈",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     UserAgree: {
         screen: UserAgree,
         navigationOptions: {
-            headerTitle: "用户协议"
+            headerTitle: "用户协议",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     GiftPay: {
         screen: GiftPay,
         navigationOptions: {
-            headerTitle: "收银台"
+            headerTitle: "收银台",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     GirlFrienfTerm: {
         screen: GirlFrienfTerm,
         navigationOptions: {
-            headerTitle: "择偶条件"
+            headerTitle: "择偶条件",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     UserCard: {
@@ -231,25 +425,69 @@ const MainNavigator = createStackNavigator({
     Meet: {
         screen: Meet,
         navigationOptions: {
-            headerTitle: "偶遇"
+            headerTitle: "偶遇",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     Register3: {
         screen: Register3,
         navigationOptions: {
-            headerTitle: "完善资料"
+            headerTitle: "完善资料",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     Register2: {
         screen: Register2,
         navigationOptions: {
-            headerTitle: "完善资料"
+            headerTitle: "完善资料",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     Register1: {
         screen: Register1,
         navigationOptions: {
-            headerTitle: "完善资料"
+            headerTitle: "完善资料",
+            headerTintColor: "#fff",
+            headerBackTitleStyle: {
+                color: "#fff"
+            },
+            headerStyle: {
+                backgroundColor: '#FA788A',
+                color: '#fff',
+            },
+            headerTitleStyle: {
+                color: '#fff',
+            },
         }
     },
     ForgetPassWord: {

+ 5 - 1
js/page/GameLead.js

@@ -8,6 +8,10 @@ export default class GameLead extends Component {
         const { navigation } = this.props;
         navigation.navigate("BottomTabNavigator")
     }
+    toGamePage = () => {
+        const { navigation } = this.props;
+        navigation.navigate("BottomTabNavigator")
+    }
     render() {
         return (
 
@@ -26,7 +30,7 @@ export default class GameLead extends Component {
                         style={{ fontSize: unitWidth * 32 }}
                     />
                     <MyButtom
-                        onPress={this.toHomePage}
+                        onPress={this.toGamePage}
                         text={"回主页"}
                         width={unitWidth * 502}
                         height={unitHeight * 84}

+ 30 - 21
js/page/RecommendGamer.js

@@ -1,5 +1,5 @@
 import React, { Component } from "react"
-import { StyleSheet, Text, View, Image} from "react-native"
+import { StyleSheet, Text, View, Image, TouchableOpacity } from "react-native"
 import { unitWidth, unitHeight } from "../utils/AdapterUtil";
 import FontAwesome from "react-native-vector-icons/FontAwesome"
 import MyButtom from '../component/MyButton'
@@ -13,35 +13,44 @@ export default class RecommendGamer extends Component {
         const { navigation } = this.props;
         navigation.navigate("PassMode1")
     }
+    toUserCard = () => {
+        const { navigation } = this.props;
+        navigation.navigate("UserCard", { status: 1 })
+    }
     render() {
         return (
             <View style={styles.container}>
                 <View style={styles.gamerList}>
                     <View style={styles.itemArea}>
-                        <View style={styles.itemTop}>
-                            <Image
-                                source={require("../../static/bannerBgc.png")}
-                                style={styles.phone}
-                            />
-                            <View style={styles.userInfo}>
-                                <View style={styles.userTit}>
-                                    <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>萱萱</Text>
-                                    <Text>{"<500m"}</Text>
-                                </View>
-                                <Text style={{ fontSize: unitWidth * 24, color: "#333333" }}>26岁/163/本科/7000-10000</Text>
-                                <View style={styles.userTips}>
-                                    <View style={styles.tipsOnce}>
-                                        <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>身材苗条</Text>
-                                    </View>
-                                    <View style={styles.tipsOnce}>
-                                        <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>文艺</Text>
+                        <TouchableOpacity onPress={this.toUserCard}>
+                            <View style={styles.itemTop}>
+                                <Image
+                                    source={require("../../static/bannerBgc.png")}
+                                    style={styles.phone}
+                                    onPress={this.toGamerList}
+                                />
+                                <View style={styles.userInfo}>
+                                    <View style={styles.userTit}>
+                                        <Text style={{ fontSize: unitWidth * 28, color: "#333333" }}>萱萱</Text>
+                                        <Text>{"<500m"}</Text>
                                     </View>
-                                    <View style={styles.tipsOnce}>
-                                        <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>旅行</Text>
+                                    <Text style={{ fontSize: unitWidth * 24, color: "#333333" }}>26岁/163/本科/7000-10000</Text>
+                                    <View style={styles.userTips}>
+                                        <View style={styles.tipsOnce}>
+                                            <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>身材苗条</Text>
+                                        </View>
+                                        <View style={styles.tipsOnce}>
+                                            <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>文艺</Text>
+                                        </View>
+                                        <View style={styles.tipsOnce}>
+                                            <Text style={{ fontSize: unitWidth * 24, color: "#FDB1B1" }}>旅行</Text>
+                                        </View>
                                     </View>
                                 </View>
                             </View>
-                        </View>
+
+                        </TouchableOpacity>
+
                         <View style={styles.itemBottom}>
                             <View style={styles.itemBottomLeft}>
                                 <FontAwesome

+ 5 - 0
js/page/userCard.js

@@ -9,6 +9,11 @@ export default class UserCard extends React.Component {
     state = {
         pageStatus: 0
     };
+    componentDidMount() {
+        this.setState({
+            pageStatus: this.props.navigation.state.params.status
+        })
+    }
     toCheckName = () => {
         const { navigation } = this.props;
         navigation.navigate("Attestation", { status: 4 })