ApplyScreen.jsx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import * as WebBrowser from 'expo-web-browser';
  2. import * as React from 'react';
  3. import { Div, Button, Image, Text, Avatar } from 'react-native-magnus';
  4. import { ScrollView } from 'react-native-gesture-handler';
  5. import useModel from 'flooks';
  6. import User from '../../flooks/User'; // detail模块通用方法
  7. import Header from '../../components/Header';
  8. const info = new Map([
  9. [
  10. '商家',
  11. {
  12. title: '商家入驻',
  13. next: 'MerchatApply',
  14. },
  15. ],
  16. [
  17. '骑手',
  18. {
  19. title: '骑手招募',
  20. next: 'RiderApply',
  21. },
  22. ],
  23. [
  24. '商务',
  25. {
  26. title: '商务合作',
  27. next: 'CompanyApply',
  28. },
  29. ],
  30. ]);
  31. export default function ApplyScreen({ navigation, route }) {
  32. const { userInfo } = useModel(User, ['id']);
  33. const { params } = route;
  34. const { type } = params;
  35. const nowInfo = info.get(type);
  36. return (
  37. <>
  38. <Header title={nowInfo.title} />
  39. <Div />
  40. <Button
  41. my={20}
  42. mx={10}
  43. bg="brand500"
  44. onPress={() => navigation.navigate(nowInfo.next)}
  45. >
  46. 立即申请
  47. </Button>
  48. </>
  49. );
  50. }