Login.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. /*
  2. * 登录
  3. */
  4. import React, { Component } from "react";
  5. import {
  6. Platform,
  7. StyleSheet,
  8. Text,
  9. View,
  10. Image,
  11. TouchableOpacity,
  12. ImageBackground,
  13. Button,
  14. StatusBar,
  15. Modal,
  16. TouchableHighlight,
  17. DeviceEventEmitter,
  18. TextInput,
  19. ScrollView
  20. } from "react-native";
  21. import BasePage from "./BasePage";
  22. import Dimensions from './utils/dimensions';
  23. import ShopBox from "./components/ShopBox";
  24. import TopicTitle from './components/TopicTitle';
  25. import ScrollRow from './components/ScrollRow';
  26. export default class Login extends BasePage {
  27. state = {
  28. };
  29. render() {
  30. return (
  31. <View style={styles.wrapper}>
  32. <View style={styles.jump}>
  33. <TouchableOpacity style={styles.jumpBtn}>
  34. <Text style={styles.jumpText}>跳过</Text>
  35. <Image source={require('./images/common/arrowRight.png')}></Image>
  36. </TouchableOpacity>
  37. </View>
  38. <View style={styles.phoneNumberBox}>
  39. <Text style={styles.phoneNumber}>手机号</Text>
  40. <TextInput
  41. style={styles.phoneText}
  42. onChangeText={(text) => this.setState({ text })}
  43. value={this.state.text}
  44. placeholder={'请输入手机号'}
  45. />
  46. </View>
  47. <View style={styles.signNumberBox}>
  48. <Text style={styles.phoneNumber}>验证码</Text>
  49. <View style={styles.signNumberLine2}>
  50. <TextInput
  51. style={styles.signText}
  52. onChangeText={(text) => this.setState({ text })}
  53. value={this.state.text}
  54. placeholder={'请输入验证码'}
  55. />
  56. <TouchableOpacity>
  57. <Text style={styles.getSign}>获取验证码</Text>
  58. </TouchableOpacity>
  59. </View>
  60. </View>
  61. <View style={styles.loginIn}>
  62. <Text style={styles.loginText}>登录</Text>
  63. </View>
  64. <View style={styles.wechatLogin}>
  65. <Image source={require('./images/common/wechat.png')}></Image>
  66. <Text style={styles.wechatLoginText}>微信登录</Text>
  67. <Image source={require('./images/common/arrowRight.png')}></Image>
  68. </View>
  69. </View>
  70. )
  71. }
  72. }
  73. const styles = StyleSheet.create({
  74. wrapper: {
  75. flex: 1
  76. },
  77. jumpText: {
  78. color: '#3e3e3e',
  79. fontSize: 16,
  80. marginRight: 4
  81. },
  82. jump: {
  83. // width: Dimensions.width,
  84. flex: 2,
  85. alignItems: 'flex-end',
  86. justifyContent: 'center',
  87. paddingHorizontal: '8%'
  88. },
  89. jumpBtn: {
  90. flexDirection: 'row',
  91. alignItems: 'center',
  92. justifyContent: 'center'
  93. },
  94. phoneNumberBox: {
  95. flex: 2,
  96. paddingHorizontal: '8%'
  97. },
  98. phoneNumber: {
  99. color: '#3e3e3e',
  100. fontSize: 18,
  101. marginBottom: 10
  102. },
  103. phoneText: {
  104. width: '100%',
  105. height: Dimensions.getHeight(50),
  106. borderRadius: 25,
  107. backgroundColor: '#f3f3f3'
  108. },
  109. signNumberBox: {
  110. flex: 2,
  111. paddingHorizontal: '8%'
  112. },
  113. signNumberLine2: {
  114. flexDirection: 'row',
  115. width: Dimensions.width,
  116. },
  117. signText: {
  118. width: '54%',
  119. height: Dimensions.getHeight(50),
  120. borderRadius: 25,
  121. backgroundColor: '#f3f3f3',
  122. marginRight: 9
  123. },
  124. getSign: {
  125. width: 105,
  126. height: Dimensions.getHeight(50),
  127. borderRadius: 25,
  128. backgroundColor: '#38da84',
  129. lineHeight: Dimensions.getHeight(50),
  130. color: '#fff',
  131. fontSize: 16,
  132. textAlign: 'center'
  133. },
  134. loginIn: {
  135. flex: 3,
  136. paddingHorizontal: '8%'
  137. },
  138. loginText: {
  139. width: '100%',
  140. height: Dimensions.getHeight(50),
  141. backgroundColor: '#63aeff',
  142. textAlign: 'center',
  143. lineHeight: Dimensions.getHeight(50),
  144. color: '#fff',
  145. fontSize: 20,
  146. borderRadius: 25
  147. },
  148. wechatLogin: {
  149. flex: 3,
  150. flexDirection: 'row',
  151. paddingHorizontal: '33.6%',
  152. alignItems: 'center',
  153. justifyContent: 'center',
  154. },
  155. wechatLoginText: {
  156. fontSize: 16,
  157. color: '#3e3e3e',
  158. marginHorizontal: 6
  159. }
  160. })