| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- import * as WebBrowser from 'expo-web-browser';
- import * as React from 'react';
- import { Div, Button, Image, Text, Avatar } from 'react-native-magnus';
- import { ScrollView } from 'react-native-gesture-handler';
- import { useCreation, useRequest } from '@umijs/hooks';
- import useModel from 'flooks';
- import Detail from './model';
- import { navigate } from '../../navigation/RootNavigation';
- export default function Merchant() {
- const { merchantInfo } = useModel(Detail, ['merchantInfo']);
- const {
- img,
- name,
- introduction,
- category,
- address,
- phone,
- endTime,
- startTime,
- } = merchantInfo;
- const imgList = useCreation(() => {
- return img ? img.split(',') : [];
- }, [img]);
- const categoryName = useCreation(() => {
- return category && category.length > 0 ? category[0].name : '';
- }, [category]);
- return (
- <>
- <Div bg="white" py={20} px={15}>
- <Div row>
- {imgList.map((item, index) => {
- return (
- <Image
- mr={3}
- mb={10}
- h={87}
- w={87}
- key={index}
- source={{ uri: item }}
- />
- );
- })}
- </Div>
- <Text fontSize="xl" fontWeight="bold" textAlign="left">
- 商家名称 -{name}
- </Text>
- <Text p={10} fontSize="xs" textAlign="left">
- {introduction}
- </Text>
- </Div>
- <Div bg="white" mt={10} py={5} px={15}>
- <Div row py={12}>
- <Text flex={1} fontSize="sm" textAlign="left">
- 商家品类
- </Text>
- <Text fontSize="sm" color="gray300" textAlign="left">
- {categoryName}
- </Text>
- </Div>
- <Div row py={12}>
- <Text flex={1} fontSize="sm" textAlign="left">
- 商家地址
- </Text>
- <Text fontSize="sm" color="gray300" textAlign="left">
- {address}
- </Text>
- </Div>
- <Div row py={12}>
- <Text flex={1} fontSize="sm" textAlign="left">
- 商家电话
- </Text>
- <Text fontSize="sm" color="gray300" textAlign="left">
- {phone}
- </Text>
- </Div>
- <Div row py={12}>
- <Text flex={1} fontSize="sm" textAlign="left">
- 营业时间
- </Text>
- <Text fontSize="sm" color="gray300" textAlign="left">
- {startTime}~{endTime}
- </Text>
- </Div>
- </Div>
- <Button
- bg="brand500"
- block
- mx={15}
- mt={10}
- mb={20}
- onPress={() => navigate('ReportBusiness')}
- >
- 举报商家
- </Button>
- </>
- );
- }
|