BackPasswordScreen.jsx 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import * as WebBrowser from 'expo-web-browser'
  2. import * as React from 'react'
  3. import { StyleSheet, View } from 'react-native'
  4. import { WingBlank, InputItem } from '@ant-design/react-native'
  5. import { Caption, Paragraph } from 'react-native-paper'
  6. import Header from '../../components/Header'
  7. import Button from '../../components/Button'
  8. export default function BackPasswordScreen() {
  9. const [phone, setphone] = React.useState()
  10. const [code, setCode] = React.useState()
  11. const [password, setPassword] = React.useState()
  12. const [password2, setPassword2] = React.useState()
  13. return (
  14. <>
  15. <Header />
  16. <View style={styles.list}>
  17. <WingBlank>
  18. <View>
  19. <InputItem
  20. clear
  21. type="phone"
  22. value={phone}
  23. onChange={setphone}
  24. placeholder="输入手机号"
  25. style={{ fontSize: 14 }}
  26. >
  27. <Paragraph>手机号</Paragraph>
  28. </InputItem>
  29. <InputItem
  30. type="number"
  31. value={code}
  32. onChange={setCode}
  33. extra={<Caption style={{ color: '#FFC21C' }}>发送验证码</Caption>}
  34. placeholder="输入验证码"
  35. maxLength={6}
  36. style={{ fontSize: 14 }}
  37. onExtraClick={() => {
  38. console.log('发送验证码')
  39. }}
  40. >
  41. <Paragraph>验证码</Paragraph>
  42. </InputItem>
  43. <InputItem
  44. clear
  45. type="password"
  46. value={password}
  47. onChange={setPassword}
  48. placeholder="输入新密码"
  49. style={{ fontSize: 14 }}
  50. >
  51. <Paragraph>新密码</Paragraph>
  52. </InputItem>
  53. <InputItem
  54. clear
  55. type="password"
  56. value={password2}
  57. onChange={setPassword2}
  58. placeholder="再次输入密码"
  59. style={{ fontSize: 14 }}
  60. >
  61. <Paragraph>确认密码</Paragraph>
  62. </InputItem>
  63. <View style={[styles.btn]}>
  64. <Button size="normal" style={styles.btn} onPress={() => {}} block>
  65. 确定
  66. </Button>
  67. </View>
  68. </View>
  69. </WingBlank>
  70. </View>
  71. </>
  72. )
  73. }
  74. const styles = StyleSheet.create({
  75. list: {
  76. backgroundColor: '#fff',
  77. borderWidth: 0,
  78. flex: 1,
  79. paddingTop: 20,
  80. },
  81. btn: {
  82. marginTop: 40,
  83. },
  84. })