RegisterV4.js 21 KB

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