BackPasswordScreen.jsx 2.7 KB

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