杜鑫 5 лет назад
Родитель
Сommit
b220ad1963
7 измененных файлов с 218 добавлено и 74 удалено
  1. 7 0
      js/navigator/AppNavigators.js
  2. 1 1
      js/page/LoginPage.js
  3. 1 1
      js/page/forgetPassWord.js
  4. 1 9
      js/page/register.js
  5. 194 0
      js/page/register1.js
  6. 1 0
      package.json
  7. 13 63
      yarn.lock

+ 7 - 0
js/navigator/AppNavigators.js

@@ -3,10 +3,17 @@ import {createStackNavigator} from "react-navigation-stack"
 import WelcomePage from"../page/WelcomePage"
 import LoginPage from"../page/LoginPage"
 import register from "../page/register"
+import register1 from "../page/register1"
 import forgetPassWord from "../page/forgetPassWord"
 import HomePage from "../page/HomePage"
 
 const InitNavigator = createStackNavigator({
+    register1:{
+        screen:register1,
+        navigationOptions:{
+            headerTitle:"完善资料"
+        }
+    },
     forgetPassWord:{
         screen:forgetPassWord,
         navigationOptions:{

+ 1 - 1
js/page/LoginPage.js

@@ -74,7 +74,7 @@ export default class Loginpage extends Component {
 const styles = StyleSheet.create({
 	container: {
 		flex: 1,
-		paddingTop: getStatusBarHeight() + unitWidth * 138,
+		paddingTop: getStatusBarHeight() + unitHeight * 138,
 		paddingLeft: unitWidth * 60,
 		paddingRight: unitWidth * 60,
 	},

+ 1 - 1
js/page/forgetPassWord.js

@@ -79,7 +79,7 @@ export default class Loginpage extends Component {
 const styles = StyleSheet.create({
     container: {
         flex: 1,
-        paddingTop: getStatusBarHeight() + unitWidth * 138,
+        paddingTop: getStatusBarHeight() + unitHeight * 138,
         paddingLeft: unitWidth * 60,
         paddingRight: unitWidth * 60,
     },

+ 1 - 9
js/page/register.js

@@ -9,14 +9,6 @@ export default class Loginpage extends Component {
         pageTitle: "手机号登录注册",
         btnText: "下一步"
     };
-    componentDidMount() {
-        this.timer = setTimeout(() => {
-            // NavigationUtil.resetToHomePage(this.props)
-        }, 5000)
-    }
-    componentWillMount() {
-        this.timer && clearTimeout(this.timer)
-    }
     render() {
         return (
             <View style={styles.container}>
@@ -78,7 +70,7 @@ export default class Loginpage extends Component {
 const styles = StyleSheet.create({
     container: {
         flex: 1,
-        paddingTop: getStatusBarHeight() + unitWidth * 138,
+        paddingTop: getStatusBarHeight() + unitHeight * 138,
         paddingLeft: unitWidth * 60,
         paddingRight: unitWidth * 60,
     },

+ 194 - 0
js/page/register1.js

@@ -0,0 +1,194 @@
+import React, { Component } from "react"
+import { StyleSheet, Text, View, TextInput } from "react-native"
+import Ionicons from "react-native-vector-icons/Ionicons"
+import RNPickerSelect from 'react-native-picker-select';
+import { unitWidth, unitHeight, getStatusBarHeight } from "../utils/AdapterUtil";
+import MyButtom from '../component/MyButton'
+
+export default class Loginpage extends Component {
+    state = {
+        placeholderText: {
+            label: '1990-01-01',
+            value: null,
+            color: '#333333',
+        },
+        placeholderText2: {
+            label: '山东-烟台-莱山区',
+            value: null,
+            color: '#333333',
+        },
+        placeholderText3: {
+            label: '165',
+            value: null,
+            color: '#333333',
+        },
+
+    };
+    render() {
+        return (
+            <View style={styles.container}>
+                <View style={styles.itemArea}>
+                    <Text style={styles.itemTitle}>请选择您的性别</Text>
+                    <View style={styles.item}>
+                        <View style={styles.itemOnceColor}>
+                            <Text style={styles.itemOnceTextColor}>
+                                男
+                            </Text>
+                        </View>
+                        <View style={styles.itemOnce}>
+                            <Text style={styles.itemOnceText}>
+                                女
+                            </Text>
+                        </View>
+                    </View>
+                </View>
+                <View style={styles.itemArea}>
+                    <Text style={styles.itemTitle}>请输入您的昵称</Text>
+                    <View style={styles.item}>
+                        <TextInput
+                            placeholder="请输入手机号"
+                            placeholderTextColor={"#999999"}
+                            style={styles.TextInput}
+                        />
+                    </View>
+                </View>
+                <View style={styles.itemArea}>
+                    <Text style={styles.itemTitle}>请选择您的生日</Text>
+                    <View style={styles.selectItem}>
+                        <RNPickerSelect
+                            placeholder={this.state.placeholderText}
+                            placeholderTextColor={"#333333"}
+                            onValueChange={(value) => console.log(value)}
+                            items={[
+                                { label: 'Football', value: 'football' },
+                                { label: 'Baseball', value: 'baseball' },
+                                { label: 'Hockey', value: 'hockey' },
+                            ]}
+                        />
+                    </View>
+                </View>
+                <View style={styles.itemArea}>
+                    <Text style={styles.itemTitle}>请选择您的常居地</Text>
+                    <View style={styles.selectItem}>
+                        <RNPickerSelect
+                            placeholder={this.state.placeholderText2}
+                            placeholderTextColor={"#333333"}
+                            onValueChange={(value) => console.log(value)}
+                            items={[
+                                { label: 'Football', value: 'football' },
+                                { label: 'Baseball', value: 'baseball' },
+                                { label: 'Hockey', value: 'hockey' },
+                            ]}
+                        />
+                    </View>
+                </View>
+                <View style={styles.itemArea}>
+                    <Text style={styles.itemTitle}>请选择您的身高</Text>
+                    <View style={styles.selectItem}>
+                        <RNPickerSelect
+                            placeholder={this.state.placeholderText3}
+                            placeholderTextColor={"#333333"}
+                            onValueChange={(value) => console.log(value)}
+                            items={[
+                                { label: 'Football', value: 'football' },
+                                { label: 'Baseball', value: 'baseball' },
+                                { label: 'Hockey', value: 'hockey' },
+                            ]}
+                        />
+                    </View>
+                </View>
+                <View style={styles.loginBtnArea}>
+                    <MyButtom
+                        text={"下一步"}
+                        width={unitWidth * 502}
+                        height={unitHeight * 84}
+                        borderRadius={unitHeight * 84}
+                        bgColor="#FA788A"
+                        shadowBgc="rgba(250,120,138,1)"
+                        style={{ fontSize: unitWidth * 32 }}
+                    />
+                </View>
+            </View>
+        )
+    }
+}
+const styles = StyleSheet.create({
+    container: {
+        flex: 1,
+        paddingTop: getStatusBarHeight() + unitHeight * 30,
+        paddingLeft: unitWidth * 60,
+        paddingRight: unitWidth * 60,
+    },
+    itemArea: {
+        width: "100%"
+    },
+    itemTitle: {
+        fontSize: unitWidth * 28,
+        color: "#333333"
+    },
+    item: {
+        flexDirection: "row",
+        justifyContent: "space-between",
+        marginTop: unitHeight * 35,
+        marginBottom: unitHeight * 46
+    },
+    selectItem: {
+        width: "100%",
+        height: unitHeight * 68,
+        marginTop: unitHeight * 35,
+        borderRadius: unitHeight * 68,
+        justifyContent: "center",
+        paddingLeft: unitWidth * 50,
+        borderWidth: unitWidth * 1,
+        borderColor: "#ccc",
+        marginBottom: unitHeight * 46
+    },
+    itemOnce: {
+        width: unitWidth * 252,
+        height: unitHeight * 68,
+        borderRadius: unitHeight * 68,
+        justifyContent: "center",
+        alignItems: "center",
+        backgroundColor: "#fff",
+        borderWidth: unitWidth * 1,
+        borderColor: "#ccc"
+    },
+    itemOnceColor: {
+        borderRadius: unitHeight * 68,
+        backgroundColor: "#FA788A",
+        width: unitWidth * 252,
+        height: unitHeight * 68,
+        justifyContent: "center",
+        alignItems: "center"
+    },
+    itemOnceTextColor: {
+        fontSize: unitWidth * 28,
+        color: "#fff"
+    },
+    itemOnceText: {
+        fontSize: unitWidth * 28,
+        color: "#333333"
+    },
+    TextInput: {
+        width: "100%",
+        height: unitHeight * 78,
+        borderRadius: unitHeight * 78,
+        fontSize: unitWidth * 28,
+        paddingLeft: unitWidth * 50,
+        borderWidth: unitWidth * 1,
+        borderColor: "#ccc"
+    },
+    seletItem: {
+        width: "100%",
+        height: unitHeight * 78,
+        backgroundColor: "#f00"
+    },
+    loginBtnArea: {
+        width: "100%",
+        marginTop: unitHeight * 80,
+        height: unitHeight * 84,
+        justifyContent: 'center',
+        alignItems: 'center'
+    }
+
+})

+ 1 - 0
package.json

@@ -14,6 +14,7 @@
     "react": "16.9.0",
     "react-native": "0.61.5",
     "react-native-gesture-handler": "^1.6.0",
+    "react-native-picker-select": "^6.5.0",
     "react-native-reanimated": "^1.7.0",
     "react-native-safe-area-context": "^0.7.3",
     "react-native-screens": "^2.0.0-beta.13",

+ 13 - 63
yarn.lock

@@ -1291,11 +1291,6 @@ anymatch@^2.0.0:
     micromatch "^3.1.4"
     normalize-path "^2.1.1"
 
-app-root-path@^2.1.0:
-  version "2.2.1"
-  resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.2.1.tgz#d0df4a682ee408273583d43f6f79e9892624bc9a"
-  integrity sha512-91IFKeKk7FjfmezPKkwtaRvSpnUc4gDwPAjA1YZ9Gn0q0PPeW+vbeUsZuyDwjI7+QTHhcLen2v25fi/AmhvbJA==
-
 argparse@^1.0.7:
   version "1.0.10"
   resolved "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -1699,11 +1694,6 @@ camelcase@^5.0.0, camelcase@^5.3.1:
   resolved "https://registry.npm.taobao.org/camelcase/download/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
   integrity sha1-48mzFWnhBoEd8kL3FXJaH0xJQyA=
 
-camelize@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b"
-  integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=
-
 capture-exit@^2.0.0:
   version "2.0.0"
   resolved "https://registry.npm.taobao.org/capture-exit/download/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4"
@@ -2025,44 +2015,6 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5:
     shebang-command "^1.2.0"
     which "^1.2.9"
 
-css-color-keywords@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05"
-  integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=
-
-css-mediaquery@^0.1.2:
-  version "0.1.2"
-  resolved "https://registry.yarnpkg.com/css-mediaquery/-/css-mediaquery-0.1.2.tgz#6a2c37344928618631c54bd33cedd301da18bea0"
-  integrity sha1-aiw3NEkoYYYxxUvTPO3TAdoYvqA=
-
-css-to-react-native-transform@^1.8.1:
-  version "1.9.0"
-  resolved "https://registry.yarnpkg.com/css-to-react-native-transform/-/css-to-react-native-transform-1.9.0.tgz#63369f479048ab7662f5320f8010840ad91344e7"
-  integrity sha512-darzotx5xx+Q0bzASkvNBasztLCssNerzf9jpMZx0H4CTY6J/y2Wh50ZtYAJ3FmESEux1bJcGa6T0zfISTuFqw==
-  dependencies:
-    css "^2.2.4"
-    css-mediaquery "^0.1.2"
-    css-to-react-native "^2.3.0"
-
-css-to-react-native@^2.3.0:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/css-to-react-native/-/css-to-react-native-2.3.2.tgz#e75e2f8f7aa385b4c3611c52b074b70a002f2e7d"
-  integrity sha512-VOFaeZA053BqvvvqIA8c9n0+9vFppVBAHCp6JgFTtTMU3Mzi+XnelJ9XC9ul3BqFzZyQ5N+H0SnwsWT2Ebchxw==
-  dependencies:
-    camelize "^1.0.0"
-    css-color-keywords "^1.0.0"
-    postcss-value-parser "^3.3.0"
-
-css@^2.2.4:
-  version "2.2.4"
-  resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
-  integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==
-  dependencies:
-    inherits "^2.0.3"
-    source-map "^0.6.1"
-    source-map-resolve "^0.5.2"
-    urix "^0.1.0"
-
 cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0":
   version "0.3.8"
   resolved "https://registry.npm.taobao.org/cssom/download/cssom-0.3.8.tgz?cache=0&sync_timestamp=1573719337707&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcssom%2Fdownload%2Fcssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a"
@@ -4121,6 +4073,11 @@ locate-path@^5.0.0:
   dependencies:
     p-locate "^4.1.0"
 
+lodash.isequal@^4.5.0:
+  version "4.5.0"
+  resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
+  integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=
+
 lodash.sortby@^4.7.0:
   version "4.7.0"
   resolved "https://registry.npm.taobao.org/lodash.sortby/download/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
@@ -5085,11 +5042,6 @@ posix-character-classes@^0.1.0:
   resolved "https://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
   integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=
 
-postcss-value-parser@^3.3.0:
-  version "3.3.1"
-  resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz#9ff822547e2893213cf1c30efa51ac5fd1ba8281"
-  integrity sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==
-
 prelude-ls@~1.1.2:
   version "1.1.2"
   resolved "https://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@@ -5234,6 +5186,13 @@ react-native-iphone-x-helper@^1.2.1:
   resolved "https://registry.npm.taobao.org/react-native-iphone-x-helper/download/react-native-iphone-x-helper-1.2.1.tgz#645e2ffbbb49e80844bb4cbbe34a126fda1e6772"
   integrity sha1-ZF4v+7tJ6AhEu0y740oSb9oeZ3I=
 
+react-native-picker-select@^6.5.0:
+  version "6.5.0"
+  resolved "https://registry.yarnpkg.com/react-native-picker-select/-/react-native-picker-select-6.5.0.tgz#67f18de0cc88060e0ad03a495b7ecb716e31a00d"
+  integrity sha512-VuzQAzs3h1PvKH91OAomWqCqzimSttUFHj1jNzC9K2FZ5OG/OuTo2ri3KkBdPU1PjtakPg6OMxxNBANAXgmceA==
+  dependencies:
+    lodash.isequal "^4.5.0"
+
 react-native-reanimated@^1.7.0:
   version "1.7.0"
   resolved "https://registry.npm.taobao.org/react-native-reanimated/download/react-native-reanimated-1.7.0.tgz#896db2576552ac59d288a1f6c7f00afc171f240c"
@@ -5251,15 +5210,6 @@ react-native-safe-area-view@^0.14.6, react-native-safe-area-view@^0.14.8:
   dependencies:
     hoist-non-react-statics "^2.3.1"
 
-react-native-sass-transformer@^1.4.0:
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/react-native-sass-transformer/-/react-native-sass-transformer-1.4.0.tgz#1b6a1ed6f2b6338ba42f2a46afd1f23f9ada3439"
-  integrity sha512-PlRiaJIcDzYpIVDH0OQuabkMGy/zp7N/A14rqhBrFqhADXC0xR2W53Cb7CicL9CsOL4y7Sh2dv4pgMvqgMdwqQ==
-  dependencies:
-    app-root-path "^2.1.0"
-    css-to-react-native-transform "^1.8.1"
-    semver "^5.6.0"
-
 react-native-screens@^2.0.0-beta.13:
   version "2.0.0-beta.13"
   resolved "https://registry.npm.taobao.org/react-native-screens/download/react-native-screens-2.0.0-beta.13.tgz#ada338c3b46d016b06d0416e59d4aa0b9b39c731"
@@ -5906,7 +5856,7 @@ snapdragon@^0.8.1:
     source-map-resolve "^0.5.0"
     use "^3.1.0"
 
-source-map-resolve@^0.5.0, source-map-resolve@^0.5.2:
+source-map-resolve@^0.5.0:
   version "0.5.3"
   resolved "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a"
   integrity sha1-GQhmvs51U+H48mei7oLGBrVQmho=