| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- import { StackScreenProps } from '@react-navigation/stack';
- import * as React from 'react';
- import { Div, Button, Image, Text, Avatar, Icon } from 'react-native-magnus';
- import { ScrollView } from 'react-native-gesture-handler';
- import { RootStackParamList } from '../types';
- import useModel from 'flooks';
- import User from '../stores/User';
- import { connect } from '../utils/SystemUtils';
- const logo = require('../assets/images/logo.png');
- export default function RegisterScreen({ navigation }: StackScreenProps) {
- const { userInfo, riderInfo } = useModel(User, ['userInfo']);
- const { avatar, nickname, money } = userInfo;
- const { jobNumber } = riderInfo;
- return (
- <Div bg="yellow500" flex={1}>
- <ScrollView
- contentContainerStyle={{ flexGrow: 1, backgroundColor: '#f2f2f2' }}
- >
- <Div h={112} bg="yellow500" justifyContent="flex-end" p={20}>
- <Button
- p={0}
- bg="transparent"
- onPress={() =>
- navigation.navigate('MineStack', {
- screen: 'MineInfo',
- })
- }
- >
- <Div flex={1} row alignItems="center">
- <Image w={53} h={53} source={avatar || logo} />
- <Div flex={1} ml={14}>
- <Div row alignItems="center">
- <Text fontSize="xl" fontWeight="bold" flex={1}>
- {nickname}
- </Text>
- <Icon color="black" name="right" ml={10} fontSize="xl" />
- </Div>
- <Text fontSize="sm" mt={5}>
- 工号:{jobNumber}
- </Text>
- </Div>
- </Div>
- </Button>
- </Div>
- <Div bg="gray100" p={10}>
- <Button
- block
- bg="white"
- p={10}
- rounded="sm"
- onPress={() =>
- navigation.navigate('MineStack', { screen: 'Wallet' })
- }
- >
- <Div flex={1} row>
- <Div flex={1}>
- <Text>我的叮咚币</Text>
- <Div row alignItems="center" mt={5}>
- <Text fontSize="xl" color="yellow400">
- 578.63
- </Text>
- <Text fontSize="sm" color="gray700" ml={6}>
- 今日收入
- </Text>
- <Text fontSize="xl" color="yellow400" ml={35}>
- 578.63
- </Text>
- <Text fontSize="sm" color="gray700" ml={6}>
- 今日收入
- </Text>
- </Div>
- </Div>
- <Icon name="right" />
- </Div>
- </Button>
- </Div>
- <Button block bg="white" p={20} rounded="sm" mb={10}>
- <Div flex={1} row>
- <Text flex={1}>单量热力图</Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button
- block
- bg="white"
- p={20}
- rounded="sm"
- mb={10}
- onPress={() =>
- navigation.navigate('MineStack', {
- screen: 'MineAppraisal',
- })
- }
- >
- <Div flex={1} row>
- <Text flex={1}>我的评价</Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button
- block
- bg="white"
- p={20}
- rounded="sm"
- mb={10}
- onPress={() =>
- navigation.navigate('MineStack', {
- screen: 'MineComplaint',
- })
- }
- >
- <Div flex={1} row>
- <Text flex={1}>我的投诉</Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button block bg="white" p={20} rounded="sm" mb={10}>
- <Div flex={1} row>
- <Text flex={1}>培训中心</Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button
- block
- bg="white"
- p={20}
- rounded="sm"
- mb={10}
- onPress={() => {
- connect(navigation);
- }}
- >
- <Div flex={1} row>
- <Text flex={1}>联系客服</Text>
- <Icon name="right" />
- </Div>
- </Button>
- <Button block bg="white" p={20} rounded="sm" mb={10}>
- <Div flex={1} row>
- <Text flex={1}>设置</Text>
- <Icon name="right" />
- </Div>
- </Button>
- </ScrollView>
- </Div>
- );
- }
|