PersonalInfo.js 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. /**
  2. * Sample React Native App
  3. * https://github.com/facebook/react-native
  4. *
  5. * @format
  6. * @flow
  7. */
  8. import React, { Component } from "react";
  9. import {
  10. Platform,
  11. StyleSheet,
  12. Text,
  13. View,
  14. Image,
  15. TouchableOpacity,
  16. ImageBackground,
  17. Button,
  18. StatusBar,
  19. DeviceEventEmitter
  20. } from "react-native";
  21. import AndroidUtil from "../../util/AndroidUtil";
  22. import BasePage from "../BasePage";
  23. import CourseTitle from "./CourseTitle";
  24. import Header from "./Header";
  25. type Props = {};
  26. export default class PersonalInfo extends BasePage {
  27. render() {
  28. return (
  29. <View style={{ flex: 1 }}>
  30. <StatusBar
  31. // backgroundColor={"transparent"}
  32. barStyle={"dark-content"}
  33. backgroundColor={"white"}
  34. translucent={false}
  35. />
  36. <ImageBackground style={{ flex: 1, backgroundColor: "blue" }}>
  37. <View
  38. style={{
  39. flex: 1,
  40. flexDirection: "column"
  41. }}
  42. >
  43. <View
  44. style={{
  45. width: "100%",
  46. flex: 1
  47. }}
  48. >
  49. <CourseTitle
  50. width={this.getWindowWidth()}
  51. title="个人信息"
  52. backPress={() => this.goBack()}
  53. lefttype={2}
  54. righttype={2}
  55. textcolor={"white"}
  56. backPress={() => alert("点击左侧")}
  57. rightPress={() => alert("点击分享")}
  58. />
  59. </View>
  60. <View
  61. style={{
  62. width: "100%",
  63. flex: 3,
  64. alignItems: "center",
  65. justifyContent: "center"
  66. }}
  67. >
  68. <View
  69. style={{
  70. backgroundColor: "white",
  71. width: "90%",
  72. height: "90%",
  73. alignItems: "center",
  74. justifyContent: "center",
  75. borderRadius: 20
  76. }}
  77. />
  78. </View>
  79. <View
  80. style={{
  81. width: "100%",
  82. flex: 4,
  83. alignItems: "center",
  84. justifyContent: "center"
  85. }}
  86. >
  87. <View
  88. style={{
  89. backgroundColor: "#F3F3F3",
  90. width: "90%",
  91. alignItems: "center",
  92. justifyContent: "center",
  93. height: "90%",
  94. overflow: "hidden",
  95. borderRadius: 20
  96. }}
  97. >
  98. {this.userInfo123()}
  99. </View>
  100. </View>
  101. <View
  102. style={{
  103. width: "100%",
  104. alignItems: "center",
  105. justifyContent: "center",
  106. flex: 4
  107. }}
  108. >
  109. <View
  110. style={{
  111. backgroundColor: "#F3F3F3",
  112. width: "90%",
  113. height: "90%",
  114. overflow: "hidden",
  115. borderRadius: 20
  116. }}
  117. >
  118. {this.userInfo456()}
  119. </View>
  120. </View>
  121. <View
  122. style={{
  123. width: "100%",
  124. flex: 4,
  125. alignItems: "center",
  126. justifyContent: "center"
  127. }}
  128. >
  129. <View
  130. style={{
  131. width: "80%",
  132. height: "35%"
  133. }}
  134. >
  135. <ImageBackground
  136. source={{
  137. uri:
  138. "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"
  139. }}
  140. style={{
  141. flex: 1,
  142. alignItems: "center",
  143. borderRadius: 40,
  144. justifyContent: "center",
  145. width: "100%",
  146. height: "100%"
  147. }}
  148. imageStyle={{ borderRadius: 40 }}
  149. >
  150. <Text
  151. style={{
  152. fontSize: 30,
  153. color: "white",
  154. width: "100%",
  155. textAlign: "center"
  156. }}
  157. >
  158. 退出登录
  159. </Text>
  160. </ImageBackground>
  161. </View>
  162. </View>
  163. </View>
  164. </ImageBackground>
  165. </View>
  166. );
  167. }
  168. userInfo123() {
  169. return (
  170. <View
  171. style={{
  172. width: "100%",
  173. alignItems: "center",
  174. justifyContent: "center",
  175. height: "100%"
  176. }}
  177. >
  178. <View style={styles.item}>
  179. <View
  180. style={{
  181. flex: 2,
  182. alignItems: "center",
  183. justifyContent: "center"
  184. }}
  185. >
  186. <Image
  187. style={{
  188. backgroundColor: "yellow",
  189. width: "50%",
  190. height: "50%"
  191. }}
  192. />
  193. </View>
  194. <Text style={styles.item_text}>头像</Text>
  195. <View
  196. style={{
  197. flex: 2,
  198. alignItems: "center",
  199. justifyContent: "center"
  200. }}
  201. >
  202. <Image
  203. style={{
  204. backgroundColor: "yellow",
  205. width: "50%",
  206. height: "50%"
  207. }}
  208. />
  209. </View>
  210. </View>
  211. <View style={{ flex: 0.05 }} />
  212. <View style={styles.item}>
  213. <View
  214. style={{
  215. flex: 2,
  216. alignItems: "center",
  217. justifyContent: "center"
  218. }}
  219. >
  220. <Image
  221. style={{
  222. backgroundColor: "yellow",
  223. width: "50%",
  224. height: "50%"
  225. }}
  226. />
  227. </View>
  228. <Text style={styles.item_text}>昵称</Text>
  229. <View
  230. style={{
  231. flex: 2,
  232. alignItems: "center",
  233. justifyContent: "center"
  234. }}
  235. >
  236. <Image
  237. style={{
  238. backgroundColor: "yellow",
  239. width: "50%",
  240. height: "50%"
  241. }}
  242. />
  243. </View>
  244. </View>
  245. <View style={{ flex: 0.05 }} />
  246. <View style={styles.item}>
  247. <View
  248. style={{
  249. flex: 2,
  250. alignItems: "center",
  251. justifyContent: "center"
  252. }}
  253. >
  254. <Image
  255. style={{
  256. backgroundColor: "yellow",
  257. width: "50%",
  258. height: "50%"
  259. }}
  260. />
  261. </View>
  262. <Text style={styles.item_text}>生日</Text>
  263. <View
  264. style={{
  265. flex: 2,
  266. alignItems: "center",
  267. justifyContent: "center"
  268. }}
  269. >
  270. <Image
  271. style={{
  272. backgroundColor: "yellow",
  273. width: "50%",
  274. height: "50%"
  275. }}
  276. />
  277. </View>
  278. </View>
  279. </View>
  280. );
  281. }
  282. userInfo456() {
  283. return (
  284. <View
  285. style={{
  286. width: "100%",
  287. alignItems: "center",
  288. justifyContent: "center",
  289. height: "100%"
  290. }}
  291. >
  292. <View style={styles.item}>
  293. <View
  294. style={{
  295. flex: 2,
  296. alignItems: "center",
  297. justifyContent: "center"
  298. }}
  299. >
  300. <Image
  301. style={{
  302. backgroundColor: "yellow",
  303. width: "50%",
  304. height: "50%"
  305. }}
  306. />
  307. </View>
  308. <Text style={styles.item_text}>所在地区</Text>
  309. <View
  310. style={{
  311. flex: 2,
  312. alignItems: "center",
  313. justifyContent: "center"
  314. }}
  315. >
  316. <Image
  317. style={{
  318. backgroundColor: "yellow",
  319. width: "50%",
  320. height: "50%"
  321. }}
  322. />
  323. </View>
  324. </View>
  325. <View style={{ flex: 0.05 }} />
  326. <View style={styles.item}>
  327. <View
  328. style={{
  329. flex: 2,
  330. alignItems: "center",
  331. justifyContent: "center"
  332. }}
  333. >
  334. <Image
  335. style={{
  336. backgroundColor: "yellow",
  337. width: "50%",
  338. height: "50%"
  339. }}
  340. />
  341. </View>
  342. <Text style={styles.item_text}>我的学习</Text>
  343. <View
  344. style={{
  345. flex: 2,
  346. alignItems: "center",
  347. justifyContent: "center"
  348. }}
  349. >
  350. <Image
  351. style={{
  352. backgroundColor: "yellow",
  353. width: "50%",
  354. height: "50%"
  355. }}
  356. />
  357. </View>
  358. </View>
  359. <View style={{ flex: 0.05 }} />
  360. <View style={styles.item}>
  361. <View
  362. style={{
  363. flex: 2,
  364. alignItems: "center",
  365. justifyContent: "center"
  366. }}
  367. >
  368. <Image
  369. style={{
  370. backgroundColor: "yellow",
  371. width: "50%",
  372. height: "50%"
  373. }}
  374. />
  375. </View>
  376. <Text style={styles.item_text}>我的年级</Text>
  377. <View
  378. style={{
  379. flex: 2,
  380. alignItems: "center",
  381. justifyContent: "center"
  382. }}
  383. >
  384. <Image
  385. style={{
  386. backgroundColor: "yellow",
  387. width: "50%",
  388. height: "50%"
  389. }}
  390. />
  391. </View>
  392. </View>
  393. </View>
  394. );
  395. }
  396. }
  397. const styles = StyleSheet.create({
  398. item: {
  399. flex: 1,
  400. width: "100%",
  401. flexDirection: "row",
  402. backgroundColor: "white"
  403. },
  404. item_text: {
  405. flex: 10,
  406. textAlignVertical: "center",
  407. color: "black",
  408. fontSize: 20
  409. }
  410. });