uberVerificationPageComponent.tsx 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import { View, Text, Image, Pressable, Dimensions, ScrollView } from 'react-native';
  2. import { SafeAreaView } from 'react-native-safe-area-context';
  3. import { router } from 'expo-router';
  4. import { CrossLogoSvg } from '../global/SVG';
  5. import React from 'react';
  6. import NormalButton from '../global/normal_button';
  7. const UberVerificationPageComponent = () => {
  8. const screenWidth = Dimensions.get('window').width;
  9. const imageWidth = screenWidth;
  10. const aspectRatio = 210 / 375;
  11. const couponData = [
  12. {
  13. number: '1',
  14. title: 'Uber 獨家充電優惠',
  15. description: '我們提供Uber司機獨家充電優惠,驗證後即享折扣,讓您更省錢充電。'
  16. },
  17. {
  18. number: '2',
  19. title: '快速驗證',
  20. description: '只需通過簡單步驟,輕鬆開啟專屬帳戶訪問。'
  21. },
  22. {
  23. number: '3',
  24. title: '輕鬆合作拍檔',
  25. description: '成為Crazy Charge合作拍檔!為Uber司機提供便利充電服務,獲得豐厚節省和獎勵。'
  26. }
  27. ];
  28. const CouponComponent = () => {
  29. return (
  30. <View style={{ borderWidth: 1 }} className="border-[#EEEEEE] rounded-2xl my-[5%] mx-[5%]">
  31. <View className="mx-[5%] my-[3%]">
  32. {couponData.map((item, index) => (
  33. <React.Fragment key={index}>
  34. <View className="flex-row items-center">
  35. <Text className="text-5xl text-[#02677d] text-center w-10 mr-4">{item.number}</Text>
  36. <View className="flex-1">
  37. <Text className="text-lg text-[#222222]">{item.title}</Text>
  38. <Text className="text-base text-[#666666] mt-1">{item.description}</Text>
  39. </View>
  40. </View>
  41. {index < couponData.length - 1 && <View className="h-0.5 w-full my-4 bg-[#EEEEEE]" />}
  42. </React.Fragment>
  43. ))}
  44. </View>
  45. </View>
  46. );
  47. };
  48. const screenHeight = Dimensions.get('window').height;
  49. return (
  50. <SafeAreaView className="flex-1 bg-white" edges={['top', 'right', 'left']}>
  51. <ScrollView className="flex-1">
  52. <View
  53. style={{
  54. marginTop: 25,
  55. marginLeft: '5%',
  56. marginBottom: '5%'
  57. }}
  58. >
  59. <Pressable
  60. onPress={() => {
  61. if (router.canGoBack()) {
  62. router.back();
  63. } else {
  64. router.replace('/accountMainPage');
  65. }
  66. }}
  67. >
  68. <CrossLogoSvg />
  69. </Pressable>
  70. </View>
  71. <View>
  72. <Image
  73. source={require('../../assets/clearUberFinishCard.png')}
  74. resizeMode="contain"
  75. style={{ width: imageWidth, height: imageWidth * aspectRatio, alignSelf: 'center' }}
  76. />
  77. </View>
  78. <CouponComponent />
  79. <View className="mx-[5%]">
  80. <NormalButton
  81. title={<Text className="text-white text-xl">下一步</Text>}
  82. onPress={() => router.push('uberUploadPage')}
  83. />
  84. </View>
  85. </ScrollView>
  86. </SafeAreaView>
  87. );
  88. };
  89. export default UberVerificationPageComponent;