RegisterV4.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798
  1. /**
  2. * 带OTP的注册页面
  3. * @邠心vbe on 2023/02/06
  4. */
  5. import React from 'react';
  6. import { View, Text, ScrollView, StyleSheet, TextInput, Pressable, Image } from 'react-native';
  7. import apiUser from '../../api/apiUser';
  8. import Button from '../../components/Button';
  9. import { PageList } from '../Router';
  10. import Dialog from '../../components/Dialog';
  11. import Modal from 'react-native-modal';
  12. import { RegisterDialog } from '../charge/InfoDialog';
  13. import Dropdown from '../../components/Dropdown';
  14. import ImagePicker from 'react-native-image-crop-picker';
  15. import apiUpload from '../../api/apiUpload';
  16. import { host } from '../../api/http';
  17. import { ModalProps } from '../../components/BottomModal';
  18. import { CountryDropNum, GetCountryList } from '../../components/CountryIcon';
  19. import StrengthView from './StrengthView';
  20. import CheckBox from '../../components/CheckBox';
  21. import { UploadThemes } from '../../components/ThemesConfig';
  22. const options = {
  23. width: 300,
  24. height: 200,
  25. cropping: true,
  26. multiple: false,
  27. mediaType: 'photo',
  28. writeTempFile: false,
  29. compressImageQuality: 0.8,
  30. compressImageMaxWidth: 720,
  31. compressImageMaxHeight: 1280,
  32. ...UploadThemes
  33. }
  34. export default class RegisterV4 extends React.Component {
  35. constructor(props) {
  36. super(props);
  37. this.StrengthView = StrengthView.V2
  38. this.state = {
  39. agree: true,
  40. strength: 0,
  41. countryNum: '65',
  42. countryShow: false,
  43. userInfo: {
  44. email: "",
  45. verificationCode: ""
  46. },
  47. countryNums: [],
  48. wrongCount: 0,
  49. params: {...this.props.route.params},
  50. email: '',
  51. password: '',
  52. fleetCompanyId: '',
  53. sendMinutes: 0,
  54. visible: false,
  55. isFleetDriver: false,
  56. pdvImages: ['', ''],
  57. companyList: []
  58. };
  59. }
  60. componentDidMount() {
  61. //console.log(this.state.params);
  62. if (this.state.params.isFleetUser) {
  63. this.setState({
  64. isFleetDriver: true
  65. })
  66. this.props.navigation.setOptions({
  67. headerTitle: "Fleet / PHV Registration"
  68. })
  69. }
  70. this.getCountryList();
  71. this.getCompanyList();
  72. }
  73. applyStrength(text) {
  74. this.StrengthView.apply(text, strength => {
  75. if (this.state.strength != strength) {
  76. this.setState({
  77. password: text,
  78. strength: strength
  79. });
  80. } else {
  81. this.setState({
  82. password: text
  83. });
  84. }
  85. });
  86. }
  87. changeInfo(key, value) {
  88. var info = this.state.userInfo;
  89. info[key] = value;
  90. this.setState({
  91. 'userInfo': info
  92. });
  93. }
  94. getCountryList() {
  95. GetCountryList(list => {
  96. this.setState({
  97. countryNums: list
  98. })
  99. })
  100. }
  101. getCompanyList() {
  102. apiUser.getConmpany().then(res => {
  103. if (res.data) {
  104. this.setState({
  105. companyList: res.data
  106. })
  107. }
  108. }).catch(err => [
  109. toastShort(err)
  110. ])
  111. }
  112. sendVerification() {
  113. var info = this.state.userInfo;
  114. if (!info.email) {
  115. toastShort('Please enter email address');
  116. return;
  117. }
  118. if (!/^[a-zA-Z0-9]+[\S]+@[a-zA-Z0-9_-]+[\.][\Sa-zA-Z]+$/.test(info.email)) {
  119. toastShort('Email is incorrect format');
  120. return;
  121. }
  122. Dialog.showProgressDialog()
  123. apiUser.sendVerificationCodeV2({email: info.email, type: "register"}).then(res => {
  124. Dialog.dismissLoading()
  125. //this.state.sendMinutes = 60;
  126. this.state.sendMinutes = res.data?.resendTime ?? 60;
  127. toastShort('Send verification code successfully');
  128. this.contdownTime();
  129. }).catch(err => {
  130. Dialog.dismissLoading()
  131. toastShort(err);
  132. });
  133. }
  134. contdownTime() {
  135. if (this.state.sendMinutes > 0) {
  136. this.setState({
  137. sendMinutes: this.state.sendMinutes - 1
  138. })
  139. setTimeout(() => {
  140. this.contdownTime();
  141. }, 1000);
  142. }
  143. }
  144. onRegister() {
  145. Dialog.showProgressDialog();
  146. setTimeout(() => {
  147. Dialog.dismissLoading();
  148. //toastShort('Sign up successfully!');
  149. this.setState({
  150. visible: true
  151. });
  152. }, 1000);
  153. }
  154. onRegisterT() {
  155. //console.log('sign up', this.state);
  156. var info = this.state.userInfo;
  157. if (!info.nickName) {
  158. toastShort('Please enter display name');
  159. return;
  160. }
  161. if (!info.email) {
  162. toastShort('Please enter email address');
  163. return;
  164. }
  165. if (!/^[a-zA-Z0-9]+[\S]+@[a-zA-Z0-9_-]+[\.][\Sa-zA-Z]+$/.test(info.email)) {
  166. toastShort('Email is incorrect format');
  167. return;
  168. }
  169. if (!info.phone) {
  170. toastShort('Please enter contact number');
  171. return;
  172. }
  173. if (!/^\d{6,15}$/.test(info.phone)) {
  174. toastShort('Phone Number is incorrect format');
  175. return;
  176. }
  177. if (!this.state.password) {
  178. toastShort('Please enter password');
  179. return;
  180. }
  181. if (this.state.strength < this.StrengthView.maxStrength) {
  182. toastShort('Password is not strong');
  183. return;
  184. }
  185. if (!info.password) {
  186. toastShort('Please enter confirm password');
  187. return;
  188. }
  189. if (info.password != this.state.password) {
  190. toastShort('The twice passwords are inconsistent');
  191. if (this.state.wrongCount < 3) {
  192. this.setState({
  193. wrongCount: this.state.wrongCount + 1
  194. })
  195. }
  196. return;
  197. }
  198. if (this.state.isFleetDriver) {
  199. if (!info.pdvLicence) {
  200. toastShort('Please enter PDV Licence');
  201. return;
  202. }
  203. if (this.state.pdvImages[0] == '' || this.state.pdvImages[1] == '') {
  204. toastShort('Please upload PDV Licence Photos');
  205. return;
  206. }
  207. }
  208. let param = Object.assign({}, info);
  209. //param.phone = this.state.countryNum + info.phone
  210. param.callingCode = this.state.countryNum;
  211. if (this.state.isFleetDriver) {
  212. param.userType = 'Driver';
  213. param.pdvLicencePictures = this.state.pdvImages;
  214. param.fleetCompanyId = this.state.fleetCompanyId;
  215. } else {
  216. param.userType = 'Public';
  217. }
  218. param.otp = param.verificationCode;
  219. console.log('params', param);
  220. Dialog.showProgressDialog();
  221. apiUser.register(param).then(res => {
  222. Dialog.dismissLoading();
  223. //toastShort('Sign up successfully!');
  224. this.setState({
  225. email: param.email,
  226. visible: true
  227. });
  228. //this.backToLogin();
  229. }).catch(err => {
  230. toastShort(err);
  231. Dialog.dismissLoading();
  232. });
  233. }
  234. getBackTopPosition() {
  235. return isIOS ? statusHeight - 16 : 8;
  236. }
  237. backToLogin() {
  238. if (this.state.params.actionLogin) {
  239. goBack()
  240. startPage(PageList.login);
  241. } else {
  242. goBack();
  243. }
  244. }
  245. uploadImage(index) {
  246. ImagePicker.openPicker(options).then(image => {
  247. if (image.path) {
  248. apiUpload.uploadImage(image.path, image.mime, 'PDVL').then(res => {
  249. if (res.success && res.data.picturePath) {
  250. let imageUrl = this.state.pdvImages;
  251. imageUrl[index] = res.data.picturePath;
  252. this.setState({
  253. pdvImages: imageUrl
  254. });
  255. } else {
  256. toastShort('Upload failed, please retry');
  257. }
  258. }).catch(err => {
  259. toastShort(err);
  260. });
  261. }
  262. }).catch(err => {
  263. //console.log(err);
  264. });
  265. }
  266. changeAgree(ag) {
  267. this.setState({
  268. agree: ag
  269. })
  270. }
  271. hideDialog() {
  272. this.setState({
  273. visible: false
  274. });
  275. this.backToLogin();
  276. }
  277. render() {
  278. return (
  279. <View style={styles.container}>
  280. <ScrollView
  281. style={styles.scollView}
  282. keyboardShouldPersistTaps={'handled'}>
  283. <View style={styles.signView}>
  284. {/* <View style={styles.tabView}>
  285. <Text
  286. style={[
  287. styles.tabText,
  288. this.state.isFleetDriver ? {} : styles.tabActive
  289. ]}
  290. onPress={() => this.changeTab(false)}
  291. >Public Users</Text>
  292. <Text
  293. style={[
  294. styles.tabText,
  295. this.state.isFleetDriver ? styles.tabActive: {}
  296. ]}
  297. onPress={() => this.changeTab(true)}
  298. >Fleet/PH Drivers</Text>
  299. </View> */}
  300. <View style={styles.signInput}>
  301. <Text style={styles.inputLabel}>Display Name</Text>
  302. <TextInput
  303. style={styles.inputView}
  304. placeholder='Display Name'
  305. placeholderTextColor={textPlacehoder}
  306. maxLength={50}
  307. onChangeText={v => this.changeInfo('nickName', v)}
  308. />
  309. </View>
  310. <View style={styles.signInput}>
  311. <Text style={styles.inputLabel}>Email Address</Text>
  312. <TextInput
  313. style={styles.inputView}
  314. placeholder='Email Address'
  315. placeholderTextColor={textPlacehoder}
  316. maxLength={50}
  317. keyboardType="email-address"
  318. textContentType='emailAddress'
  319. onChangeText={v => this.changeInfo('email', v)}
  320. />
  321. </View>
  322. <View style={styles.signInput}>
  323. <Text style={[styles.inputLabel, {flex: 2}]}>Validate Email</Text>
  324. <TextInput
  325. style={[styles.inputView, {flex: 2.2, marginLeft: 2}]}
  326. placeholder='OTP'
  327. placeholderTextColor={textPlacehoder}
  328. maxLength={6}
  329. keyboardType="number-pad"
  330. textContentType="telephoneNumber"
  331. onChangeText={v => this.changeInfo('verificationCode', v)}
  332. />
  333. <Button
  334. text={this.state.sendMinutes > 0 ? (this.state.sendMinutes + " s") : 'EMAIL OTP'}
  335. style={styles.sendBtn}
  336. disabled={this.state.sendMinutes > 0}
  337. viewStyle={styles.sendBtnView}
  338. textStyle={styles.sendBtnText}
  339. onClick={() => this.sendVerification()}
  340. />
  341. </View>
  342. <View style={styles.signInput}>
  343. <Text style={styles.inputLabel}>Phone Number</Text>
  344. <View style={styles.mobileView}>
  345. <View style={styles.dropView}>
  346. <TextInput style={styles.dropInput} editable={false}/>
  347. <Text style={styles.countryText}>{"+" + this.state.countryNum}</Text>
  348. <MaterialIcons name={'arrow-drop-down'} size={24} color={colorDark}/>
  349. <Dropdown
  350. style={styles.dropLayer}
  351. title='Country'
  352. prefixText="+"
  353. list={this.state.countryNums}
  354. value={this.state.countryNum}
  355. nameKey='countryNum'
  356. valueKey='countryNum'
  357. onChange={(value, index)=> {
  358. this.setState({
  359. countryNum: value
  360. })
  361. }}
  362. customerItemView={
  363. (item, index, onClick) =>
  364. <CountryDropNum
  365. key={index}
  366. country={item}
  367. value={this.state.countryNum}
  368. onClick={onClick}/>
  369. }/>
  370. </View>
  371. <TextInput
  372. style={styles.contactView}
  373. placeholder='Mobile Number'
  374. placeholderTextColor={textPlacehoder}
  375. keyboardType='phone-pad'
  376. maxLength={15}
  377. onChangeText={v => this.changeInfo('phone', v)}
  378. />
  379. </View>
  380. </View>
  381. <View style={styles.signInput}>
  382. <Text style={styles.inputLabel}>Create Password</Text>
  383. <TextInput
  384. secureTextEntry={this.state.wrongCount < 3}
  385. style={styles.inputView}
  386. placeholder='Password'
  387. placeholderTextColor={textPlacehoder}
  388. maxLength={20}
  389. onChangeText={(value) => {
  390. this.applyStrength(value);
  391. }}
  392. />
  393. </View>
  394. <View style={styles.signInput}>
  395. <Text style={styles.inputLabel}></Text>
  396. <View style={styles.passwordView}>
  397. <this.StrengthView.VIEW strength={this.state.strength}/>
  398. </View>
  399. </View>
  400. <View style={styles.signInput}>
  401. <Text style={styles.inputLabel}>Confirm Password</Text>
  402. <TextInput
  403. secureTextEntry={this.state.wrongCount < 3}
  404. style={styles.inputView}
  405. placeholder='Password'
  406. placeholderTextColor={textPlacehoder}
  407. maxLength={20}
  408. onChangeText={v => this.changeInfo('password', v)}
  409. />
  410. </View>
  411. { this.state.isFleetDriver &&
  412. <>
  413. <View style={styles.signInput}>
  414. <Text style={styles.inputLabel}>Your Company</Text>
  415. <Dropdown
  416. style={[styles.inputView, ui.flexc]}
  417. title='Company'
  418. list={this.state.companyList}
  419. value={this.state.fleetCompanyId}
  420. valueKey='fleetCompanyId'
  421. nameKey='fleetCompanyName'
  422. onChange={(value, index)=> {
  423. this.setState({
  424. fleetCompanyId: value
  425. })
  426. }}/>
  427. </View>
  428. <View style={styles.signInput}>
  429. <Text style={styles.inputLabel}>{'PDV Licence'}</Text>
  430. <TextInput
  431. style={styles.inputView}
  432. placeholder='PH Driver Vocational Licence'
  433. placeholderTextColor={textPlacehoder}
  434. maxLength={20}
  435. onChangeText={v => this.changeInfo('pdvLicence', v)}
  436. />
  437. </View>
  438. <View style={styles.signInput}>
  439. <Text style={styles.inputLabel}>{' PDV Photos\n(Front & Back)'}</Text>
  440. <View style={styles.uploadGroup}>
  441. { this.state.pdvImages.map((item, index) => (
  442. <UploadView
  443. key={index}
  444. onPress={() => this.uploadImage(index)}
  445. url={item}/>
  446. ))
  447. }
  448. </View>
  449. </View>
  450. </>
  451. }
  452. {/* <View style={styles.referView}>
  453. <Text style={styles.referTitle}>Have a referral code?</Text>
  454. <View style={styles.referText}>
  455. <Text>You'll get</Text>
  456. <Text style={styles.weight}>$5</Text>
  457. <Text>Credit as registration bonus!</Text>
  458. </View>
  459. <View style={styles.codeView}>
  460. <Text style={{ color: textPrimary, fontSize: 16 }}>Referral Code</Text>
  461. <TextInput
  462. style={styles.codeText}
  463. maxLength={6}
  464. placeholder='Referral Code'
  465. placeholderTextColor={textPlacehoder}
  466. onChangeText={v => this.changeInfo('referralCode', v)}
  467. />
  468. </View>
  469. </View> */}
  470. <View style={styles.agreeView}>
  471. <CheckBox
  472. value={this.state.agree}
  473. onValueChange={v => this.changeAgree(v)}
  474. />
  475. <View style={styles.agreeTextRow}>
  476. <Text style={styles.agreeText} onPress={() => this.changeAgree(!this.state.agree)}>
  477. {'I have read and I agree with the '}
  478. </Text>
  479. <Text style={styles.agreeLink} onPress={() => startPage(PageList.condition)}>Terms of Use</Text>
  480. <Text style={styles.agreeText}>{' '}</Text>
  481. <Text style={styles.agreeText}>{'and '}</Text>
  482. <Text style={styles.agreeLink} onPress={() => startPage(PageList.privacy)}>Privacy Policy</Text>
  483. <Text style={styles.agreeText}>.</Text>
  484. </View>
  485. </View>
  486. <Button
  487. style={styles.signButton}
  488. elevation={1.5}
  489. disabled={!this.state.agree}
  490. text='SIGN UP'
  491. fontSize={14}
  492. onClick={() => {
  493. this.onRegister();
  494. }}
  495. />
  496. </View>
  497. </ScrollView>
  498. <Modal
  499. isVisible={this.state.visible}
  500. onBackButtonPress={() => this.hideDialog()}
  501. {...ModalProps}>
  502. <RegisterDialog
  503. address={this.state.email}
  504. onClose={() => this.hideDialog()}
  505. />
  506. </Modal>
  507. </View>
  508. );
  509. }
  510. }
  511. const UploadView = ({url, onPress}) => (
  512. <Pressable
  513. style={styles.uploadView}
  514. onPress={onPress}>
  515. { url == ''
  516. ? <Image
  517. style={styles.uploadIcon}
  518. source={require('../../images/icon/ic-add-photo.png')}/>
  519. : <Image
  520. style={styles.uploadIcon}
  521. defaultSource={require('../../images/icon/icon-upload-default.png')}
  522. source={{uri: host + url}}/>
  523. }
  524. </Pressable>
  525. )
  526. const styles = StyleSheet.create({
  527. container: {
  528. flex: 1,
  529. backgroundColor: colorLight
  530. },
  531. header: {
  532. paddingTop: 56,
  533. backgroundColor: colorAccent
  534. },
  535. backView: {
  536. top: 12,
  537. zIndex: 5,
  538. padding: 16,
  539. position: 'absolute',
  540. flexDirection: 'row'
  541. },
  542. backButton: {
  543. borderRadius: 60,
  544. backgroundColor: colorLight
  545. },
  546. backButtonView: {
  547. height: 43,
  548. paddingLeft: 16,
  549. paddingRight: 16,
  550. alignItems: 'center',
  551. flexDirection: 'row'
  552. },
  553. scollView: {
  554. flex: 1
  555. },
  556. logoView: {
  557. paddingTop: 32,
  558. paddingBottom: 56,
  559. alignItems: 'center'
  560. },
  561. logoImg: {
  562. width:165.09,
  563. height: 51.94,
  564. },
  565. signView: {
  566. flex: 1,
  567. padding: 16,
  568. //marginTop: -30,
  569. borderTopLeftRadius: 20,
  570. borderTopRightRadius: 20,
  571. backgroundColor: colorLight
  572. },
  573. tabView: {
  574. marginBottom: 4,
  575. borderWidth: 1,
  576. borderRadius: 6,
  577. overflow: 'hidden',
  578. alignItems: 'center',
  579. flexDirection: 'row',
  580. borderColor: colorAccent,
  581. },
  582. tabText: {
  583. flex: 1,
  584. color: textPrimary,
  585. fontSize: 15,
  586. textAlign: 'center',
  587. ...$padding(10, 0),
  588. },
  589. tabActive: {
  590. fontWeight: 'bold',
  591. backgroundColor: colorAccent
  592. },
  593. title: {
  594. color: textPrimary,
  595. fontSize: 18,
  596. fontWeight: '700',
  597. paddingTop: 4,
  598. paddingBottom: 6,
  599. },
  600. signInput: {
  601. marginTop: 16,
  602. alignItems: 'center',
  603. flexDirection: 'row'
  604. },
  605. inputLabel: {
  606. flex: 1,
  607. color: textPrimary,
  608. fontSize: 14,
  609. marginRight: 4
  610. },
  611. inputView: {
  612. flex: 2,
  613. color: textPrimary,
  614. fontSize: 14,
  615. borderRadius: 5,
  616. minHeight: 40,
  617. paddingTop: 6,
  618. paddingLeft: 12,
  619. paddingRight: 12,
  620. paddingBottom: 6,
  621. backgroundColor: '#F5F5F5'
  622. },
  623. mobileView: {
  624. flex: 2,
  625. marginLeft: -12,
  626. alignItems: 'center',
  627. flexDirection: 'row'
  628. },
  629. dropView: {
  630. fontSize: 16,
  631. borderRadius: 4,
  632. paddingRight: 4,
  633. flexDirection: 'row',
  634. alignItems: 'center',
  635. backgroundColor: '#F5F5F5'
  636. },
  637. dropInput: {
  638. width: 12,
  639. padding: 6,
  640. color: textPrimary,
  641. minHeight: 40,
  642. },
  643. countryText: {
  644. color: textPrimary,
  645. fontSize: 14,
  646. paddingRight: 4
  647. },
  648. dropLayer: {
  649. left: 0,
  650. right: 0,
  651. opacity: 0,
  652. position: 'absolute'
  653. },
  654. contactView: {
  655. flex: 1,
  656. color: textPrimary,
  657. fontSize: 15,
  658. borderRadius: 4,
  659. minHeight: 40,
  660. paddingTop: 6,
  661. paddingLeft: 12,
  662. paddingRight: 12,
  663. paddingBottom: 6,
  664. marginLeft: 10,
  665. backgroundColor: '#F5F5F5'
  666. },
  667. passwordView: {
  668. flex: 2,
  669. marginTop: -8,
  670. },
  671. referView: {
  672. padding: 16,
  673. marginTop: 24,
  674. borderRadius: 6,
  675. alignItems: 'center',
  676. backgroundColor: '#F5F5F5'
  677. },
  678. referTitle: {
  679. color: textPrimary,
  680. fontSize: 18,
  681. fontWeight: 'bold'
  682. },
  683. referText: {
  684. color: textPrimary,
  685. paddingTop: 4,
  686. alignItems: 'flex-end',
  687. flexDirection: 'row'
  688. },
  689. weight: {
  690. fontSize: 18,
  691. paddingLeft: 4,
  692. paddingRight: 4,
  693. color: colorAccent,
  694. fontWeight: 'bold'
  695. },
  696. codeView: {
  697. paddingTop: 16,
  698. alignItems: 'center',
  699. flexDirection: 'row'
  700. },
  701. codeText: {
  702. color: textPrimary,
  703. fontSize: 16,
  704. paddingTop: 6,
  705. paddingLeft: 12,
  706. paddingRight: 12,
  707. paddingBottom: 6,
  708. minHeight: 40,
  709. marginLeft: 16,
  710. borderRadius: 6,
  711. textAlign: 'center',
  712. backgroundColor: colorLight
  713. },
  714. signButton: {
  715. marginTop: 24,
  716. marginBottom: 8,
  717. },
  718. uploadGroup: {
  719. flex: 2,
  720. alignItems: 'center',
  721. flexDirection: 'row',
  722. justifyContent: 'center'
  723. },
  724. uploadView: {
  725. flex: 1,
  726. alignItems: 'center'
  727. },
  728. uploadIcon: {
  729. width: $vw(28),
  730. height: $vw(28),
  731. borderRadius: 6
  732. },
  733. agreeView: {
  734. marginTop: 24,
  735. marginBottom: 16,
  736. flexDirection: 'row',
  737. alignItems: 'flex-start',
  738. },
  739. agreeTextRow: {
  740. flex: 1,
  741. paddingTop: 4,
  742. paddingLeft: 8,
  743. flexWrap: 'wrap',
  744. flexDirection: 'row'
  745. },
  746. agreeText: {
  747. color: textPrimary,
  748. fontSize: 14,
  749. paddingTop: 2,
  750. paddingBottom: 2
  751. },
  752. agreeLink: {
  753. ...ui.link,
  754. fontSize: 14,
  755. paddingTop: 2,
  756. paddingBottom: 2,
  757. textDecorationLine: 'underline'
  758. },
  759. sendBtn: {
  760. flex: 1.8,
  761. marginLeft: 6,
  762. marginRight: 0,
  763. borderRadius: 6
  764. },
  765. sendBtnView: {
  766. flex: 1,
  767. height: 40,
  768. paddingLeft: 4,
  769. paddingRight: 4,
  770. alignItems: 'center',
  771. justifyContent: 'center'
  772. },
  773. sendBtnText: {
  774. color: colorLight,
  775. fontSize: 13,
  776. fontWeight: 'bold'
  777. },
  778. });