RegisterV4.js 21 KB

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