123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422 |
- /**
- * Sample React Native App
- * https://github.com/facebook/react-native
- *
- * @format
- * @flow
- */
- import React, { Component } from "react";
- import {
- Platform,
- StyleSheet,
- Text,
- View,
- Image,
- TouchableOpacity,
- ImageBackground,
- Button,
- StatusBar,
- DeviceEventEmitter
- } from "react-native";
- import AndroidUtil from "../../util/AndroidUtil";
- import BasePage from "../BasePage";
- import CourseTitle from "./CourseTitle";
- import Header from "./Header";
- type Props = {};
- export default class PersonalInfo extends BasePage {
- render() {
- return (
- <View style={{ flex: 1 }}>
- <StatusBar
- // backgroundColor={"transparent"}
- barStyle={"dark-content"}
- backgroundColor={"white"}
- translucent={false}
- />
- <ImageBackground style={{ flex: 1, backgroundColor: "blue" }}>
- <View
- style={{
- flex: 1,
- flexDirection: "column"
- }}
- >
- <View
- style={{
- width: "100%",
- flex: 1
- }}
- >
- <CourseTitle
- width={this.getWindowWidth()}
- title="个人信息"
- backPress={() => this.goBack()}
- lefttype={2}
- righttype={2}
- textcolor={"white"}
- backPress={() => alert("点击左侧")}
- rightPress={() => alert("点击分享")}
- />
- </View>
- <View
- style={{
- width: "100%",
- flex: 3,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <View
- style={{
- backgroundColor: "white",
- width: "90%",
- height: "90%",
- alignItems: "center",
- justifyContent: "center",
- borderRadius: 20
- }}
- />
- </View>
- <View
- style={{
- width: "100%",
- flex: 4,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <View
- style={{
- backgroundColor: "#F3F3F3",
- width: "90%",
- alignItems: "center",
- justifyContent: "center",
- height: "90%",
- overflow: "hidden",
- borderRadius: 20
- }}
- >
- {this.userInfo123()}
- </View>
- </View>
- <View
- style={{
- width: "100%",
- alignItems: "center",
- justifyContent: "center",
- flex: 4
- }}
- >
- <View
- style={{
- backgroundColor: "#F3F3F3",
- width: "90%",
- height: "90%",
- overflow: "hidden",
- borderRadius: 20
- }}
- >
- {this.userInfo456()}
- </View>
- </View>
- <View
- style={{
- width: "100%",
- flex: 4,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <View
- style={{
- width: "80%",
- height: "35%"
- }}
- >
- <ImageBackground
- source={{
- uri:
- "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg"
- }}
- style={{
- flex: 1,
- alignItems: "center",
- borderRadius: 40,
- justifyContent: "center",
- width: "100%",
- height: "100%"
- }}
- imageStyle={{ borderRadius: 40 }}
- >
- <Text
- style={{
- fontSize: 30,
- color: "white",
- width: "100%",
- textAlign: "center"
- }}
- >
- 退出登录
- </Text>
- </ImageBackground>
- </View>
- </View>
- </View>
- </ImageBackground>
- </View>
- );
- }
- userInfo123() {
- return (
- <View
- style={{
- width: "100%",
- alignItems: "center",
- justifyContent: "center",
- height: "100%"
- }}
- >
- <View style={styles.item}>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- <Text style={styles.item_text}>头像</Text>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- </View>
- <View style={{ flex: 0.05 }} />
- <View style={styles.item}>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- <Text style={styles.item_text}>昵称</Text>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- </View>
- <View style={{ flex: 0.05 }} />
- <View style={styles.item}>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- <Text style={styles.item_text}>生日</Text>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- </View>
- </View>
- );
- }
- userInfo456() {
- return (
- <View
- style={{
- width: "100%",
- alignItems: "center",
- justifyContent: "center",
- height: "100%"
- }}
- >
- <View style={styles.item}>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- <Text style={styles.item_text}>所在地区</Text>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- </View>
- <View style={{ flex: 0.05 }} />
- <View style={styles.item}>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- <Text style={styles.item_text}>我的学习</Text>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- </View>
- <View style={{ flex: 0.05 }} />
- <View style={styles.item}>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- <Text style={styles.item_text}>我的年级</Text>
- <View
- style={{
- flex: 2,
- alignItems: "center",
- justifyContent: "center"
- }}
- >
- <Image
- style={{
- backgroundColor: "yellow",
- width: "50%",
- height: "50%"
- }}
- />
- </View>
- </View>
- </View>
- );
- }
- }
- const styles = StyleSheet.create({
- item: {
- flex: 1,
- width: "100%",
- flexDirection: "row",
- backgroundColor: "white"
- },
- item_text: {
- flex: 10,
- textAlignVertical: "center",
- color: "black",
- fontSize: 20
- }
- });
|