RewardRiderScreen.jsx 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. /* eslint-disable global-require */
  2. import * as WebBrowser from 'expo-web-browser';
  3. import * as React from 'react';
  4. import { Div, Button, Image, Text } from 'react-native-magnus';
  5. import { ScrollView } from 'react-native-gesture-handler';
  6. import { useTranslation } from 'react-i18next';
  7. import useModel from 'flooks';
  8. import Order from './model'; // Order模块通用方法
  9. import Header from '../../components/Header';
  10. export default function RewardRiderScreen({ navigation }) {
  11. const { rewardRider } = useModel(Order, []);
  12. const { t } = useTranslation();
  13. const reward = () => {
  14. rewardRider().then(() => {
  15. navigation.goBack();
  16. });
  17. };
  18. return (
  19. <>
  20. <Header title={t('da-shang-qi-shou')} />
  21. <ScrollView
  22. contentContainerStyle={{
  23. flexGrow: 1,
  24. backgroundColor: '#eee',
  25. }}
  26. >
  27. <Div bg="white" p={10} mx={10} mt={10} rounded="xs">
  28. <Div row alignItems="center">
  29. <Div bg="gray200" w={53} h={53} />
  30. <Text fontSize="2xl" fontWeight="bold" ml={10}>
  31. 胖肥肥
  32. </Text>
  33. <Text fontSize="xs" ml={5} flex={1}>
  34. 等级
  35. </Text>
  36. <Div>
  37. <Button
  38. borderColor="brand500"
  39. borderWidth={1}
  40. w={100}
  41. fontSize="xs"
  42. bg="white"
  43. color="black"
  44. >
  45. {t('lian-xi-qi-shou')}
  46. </Button>
  47. </Div>
  48. </Div>
  49. <Div row mt={5}>
  50. <Div flex={1} row>
  51. <Text fontSize="xs">{t('zhun-shi-shuai')}</Text>
  52. <Text fontSize="xs" ml={13}>
  53. 100%
  54. </Text>
  55. </Div>
  56. <Div flex={1} row>
  57. <Text fontSize="xs">{t('ri-jun-song-dan')}</Text>
  58. <Text fontSize="xs" ml={13}>
  59. 99
  60. </Text>
  61. </Div>
  62. </Div>
  63. <Div row flexWrap="wrap">
  64. <Div w="33.33%" px={3} mt={5}>
  65. <Button
  66. fontSize="xs"
  67. color="black"
  68. bg="white"
  69. borderColor="brand500"
  70. borderWidth={1}
  71. rounded="xs"
  72. block
  73. >
  74. 颜值一流 999+
  75. </Button>
  76. </Div>
  77. <Div w="33.33%" px={3} mt={5}>
  78. <Button
  79. fontSize="xs"
  80. color="black"
  81. bg="white"
  82. borderColor="brand500"
  83. borderWidth={1}
  84. rounded="xs"
  85. block
  86. >
  87. 穿着得体 999+
  88. </Button>
  89. </Div>
  90. <Div w="33.33%" px={3} mt={5}>
  91. <Button
  92. fontSize="xs"
  93. color="black"
  94. bg="white"
  95. borderColor="brand500"
  96. borderWidth={1}
  97. rounded="xs"
  98. block
  99. >
  100. 穿着得体 999+
  101. </Button>
  102. </Div>
  103. <Div w="33.33%" px={3} mt={5}>
  104. <Button
  105. fontSize="xs"
  106. color="black"
  107. bg="white"
  108. borderColor="brand500"
  109. borderWidth={1}
  110. rounded="xs"
  111. >
  112. 穿着得体 999+
  113. </Button>
  114. </Div>
  115. <Div w="33.33%" px={3} mt={5}>
  116. <Button
  117. fontSize="xs"
  118. color="black"
  119. bg="white"
  120. borderColor="brand500"
  121. borderWidth={1}
  122. rounded="xs"
  123. >
  124. 穿着得体 999+
  125. </Button>
  126. </Div>
  127. </Div>
  128. </Div>
  129. <Div bg="white" mt={10} mx={10} px={10} pt={10} pb={30}>
  130. <Text fontSize="xl" fontWeight="bold">
  131. {t('da-shang-qi-shou')}
  132. </Text>
  133. <Text fontSize="xs" color="gray500" mt={10}>
  134. {t('da-shang-jiang-quanezhuan-gei-qi-shou')}
  135. </Text>
  136. <Text fontSize="xs" color="gray500" mt={10}>
  137. 上次为您提前12:02分钟送达订单哦
  138. </Text>
  139. <Div row mt={10}>
  140. <Div w="33.33%" px={3} alignItems="center">
  141. <Image
  142. w={66}
  143. h={66}
  144. source={require('../../assets/images/jinbi1.png')}
  145. />
  146. <Button
  147. fontSize="xs"
  148. color="black"
  149. bg="white"
  150. borderColor="brand500"
  151. borderWidth={1}
  152. rounded="xs"
  153. block
  154. onPress={reward}
  155. >
  156. {t('da-shang')}
  157. </Button>
  158. </Div>
  159. <Div w="33.33%" px={3} alignItems="center">
  160. <Image
  161. w={66}
  162. h={66}
  163. source={require('../../assets/images/jinbi2.png')}
  164. />
  165. <Button
  166. fontSize="xs"
  167. color="black"
  168. bg="white"
  169. borderColor="brand500"
  170. borderWidth={1}
  171. rounded="xs"
  172. block
  173. onPress={reward}
  174. >
  175. {t('da-shang')}
  176. </Button>
  177. </Div>
  178. <Div w="33.33%" px={3} alignItems="center">
  179. <Image
  180. w={66}
  181. h={66}
  182. source={require('../../assets/images/jinbi3.png')}
  183. />
  184. <Button
  185. fontSize="xs"
  186. color="black"
  187. bg="white"
  188. borderColor="brand500"
  189. borderWidth={1}
  190. rounded="xs"
  191. block
  192. onPress={reward}
  193. >
  194. {t('da-shang')}
  195. </Button>
  196. </Div>
  197. </Div>
  198. </Div>
  199. </ScrollView>
  200. </>
  201. );
  202. }