import * as WebBrowser from 'expo-web-browser'; import * as React from 'react'; import { Div, Button, Text, Icon } from 'react-native-magnus'; import { Modal, Portal } from 'react-native-paper'; import { useTranslation } from 'react-i18next'; import useModel from 'flooks'; import Detail from '../Detail/model'; const payMap = new Map([ [ 'ALI_PAY', { name: '支付宝', icon: 'alipay-square', iconColor: 'blue500', }, ], [ 'CASH_DELIVERY', { name: '货到付款', icon: 'wallet', iconColor: 'green500', }, ], [ 'CREDIT_CARD', { name: '信用卡', icon: 'creditcard', iconColor: 'red500', }, ], ]); const PayImtem = ({ mapKey, isChoose, changePay }) => { const info = payMap.get(mapKey); return ( <>
); }; export default function PayCom() { const { t } = useTranslation(); const [visible, changeVisible] = React.useState(false); const { payMethod, merchantInfo, changePay } = useModel(Detail, [ 'payMethod', 'merchantInfo', ]); const { showName } = merchantInfo; return ( <> changeVisible(false)} contentContainerStyle={{ position: 'absolute', left: 0, right: 0, bottom: 0, maxHeight: '70%', zIndex: 2, justifyContent: 'flex-end', }} >
{showName}
{[...payMap.keys()].map((item) => { return ( { changePay(method); changeVisible(false); }} /> ); })}
); }