index.js 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. import React from 'react';
  2. import { Image, ScrollView, Alert ,StyleSheet, Text, View,TextInput } from 'react-native';
  3. import Button from 'antd-mobile-rn/lib/button';
  4. import { List,Switch,SearchBar } from 'antd-mobile-rn';
  5. import {Icon,Device} from '../../../tool'
  6. const Item = List.Item;
  7. const Brief = Item.Brief;
  8. export default class AddFriend extends React.Component {
  9. constructor(props) {
  10. super(props);
  11. this. state = {
  12. //value: '美食',
  13. };
  14. }
  15. static navigationOptions ={
  16. title:'添加朋友'
  17. }
  18. onBlur = (value) => {
  19. //跳转
  20. }
  21. render() {
  22. return (
  23. <View style={{backgroundColor:"#f0f0f0" }}>
  24. <View style={styles.searchBarWrap}>
  25. <View style={styles.serchWrap}>
  26. <Image style={styles.searchImg} source={Icon.Contact.search}/>
  27. <TextInput
  28. style={[styles.searchBar,{padding:0}]}
  29. placeholder="手机号/ID号搜索"
  30. // onFocus
  31. />
  32. </View>
  33. </View>
  34. <View style={styles.idTitle}>
  35. <Text style={styles.idLabel}>我的ID号:12345</Text>
  36. <Image style={styles.idEWM} source={Icon.Contact.code}/>
  37. </View>
  38. <View style={styles.listWrap}>
  39. <View style={styles.list}>
  40. <Image style={styles.scanImg} source={Icon.Contact.scan}/>
  41. <View style={styles.listTitle}>
  42. <Text style={styles.listOne}>扫一扫</Text>
  43. <Text style={styles.listTwo}>扫描二维码名片</Text>
  44. </View>
  45. <Image style={styles.inImg} source={Icon.in}/>
  46. </View>
  47. <View style={styles.list}>
  48. <Image style={styles.scanImg} source={Icon.Contact.phoneCall}/>
  49. <View style={styles.listTitle}>
  50. <Text style={styles.listOne}>手机联系人</Text>
  51. <Text style={styles.listTwo}>添加或邀请通讯录中的朋友</Text>
  52. </View>
  53. <Image style={styles.inImg} source={Icon.in}/>
  54. </View>
  55. </View>
  56. </View>
  57. );
  58. }
  59. }
  60. const styles = StyleSheet.create({
  61. view:{
  62. backgroundColor:"#000",
  63. height:50,
  64. },
  65. container: {
  66. flex: 1,
  67. backgroundColor: '#fff',
  68. alignItems: 'center',
  69. justifyContent: 'center',
  70. },
  71. searchBarWrap:{
  72. backgroundColor:'#f0f0f0',
  73. height:58,
  74. // paddingLeft:8,
  75. // paddingRight:8,
  76. // paddingTop:11,
  77. // paddingBottom:11,
  78. },
  79. serchWrap:{
  80. borderRadius:8,
  81. height:36,
  82. backgroundColor:"#fff",
  83. flexDirection:"row",
  84. alignItems:"center",
  85. marginBottom:11,
  86. marginTop:11,
  87. marginLeft:8,
  88. marginRight:8,
  89. },
  90. searchImg:{
  91. width:17,
  92. height:17,
  93. marginLeft:8,
  94. marginRight:6,
  95. },
  96. searchBar:{
  97. width:320,
  98. paddingBottom:0,
  99. padding:0,
  100. height:36,
  101. },
  102. idTitle:{
  103. flexDirection:"row",
  104. justifyContent:"center",
  105. alignItems:"center",
  106. height:58,
  107. paddingBottom:24
  108. },
  109. idLabel:{
  110. fontSize:10,
  111. color:"#9b9a9a",
  112. paddingRight:5
  113. },
  114. idEWM:{
  115. width:17,
  116. height:17,
  117. },
  118. phoneImg:{
  119. width:23,
  120. height:32,
  121. marginBottom:8,
  122. marginTop:23,
  123. },
  124. phoneCont:{
  125. height:99,
  126. backgroundColor:"#fff",
  127. flexDirection:"column",
  128. alignItems: 'center',
  129. borderTopColor:'#000',
  130. borderBottomColor:'#000',
  131. borderTopWidth:1,
  132. borderBottomWidth:1,
  133. borderTopColor:"#d8d8d8",
  134. borderBottomColor:"#d8d8d8",
  135. },
  136. labelName:{
  137. fontSize:11,
  138. color:'#858484',
  139. },
  140. listWrap:{
  141. paddingLeft:10,
  142. marginTop:10,
  143. backgroundColor:"#FFF",
  144. borderBottomColor:"#e5e5e5",
  145. borderBottomWidth:1,
  146. borderTopColor:"#e5e5e5",
  147. borderTopWidth:1,
  148. },
  149. list:{
  150. height:55,
  151. borderBottomColor:"#e5e5e5",
  152. borderBottomWidth:1,
  153. flexDirection:"row",
  154. justifyContent:"center",
  155. alignItems:"center",
  156. paddingRight:10,
  157. },
  158. scanImg:{
  159. width:38,
  160. height:38,
  161. },
  162. inImg:{
  163. width:9,
  164. height:14,
  165. },
  166. listTitle:{
  167. flex:1,
  168. paddingLeft:10,
  169. },
  170. listOne:{
  171. fontSize:14,
  172. color:"#000",
  173. },
  174. listTwo:{
  175. fontSize:10,
  176. color:"#000",
  177. marginTop:8,
  178. opacity:0.6
  179. },
  180. isAdd:{
  181. width:55,
  182. height:26,
  183. backgroundColor:"#1bc3fa",
  184. borderRadius:5,
  185. fontSize:13,
  186. color:"#fff",
  187. lineHeight:26,
  188. textAlign:"center"
  189. }
  190. });