/** * 支付组件 * @邠心vbe on 2021/04/23 */ import React, { useState } from 'react'; import { useEffect } from 'react'; import { View, Text, StyleSheet, Image } from 'react-native'; import Button from '../../components/Button'; import TextRadius from '../../components/TextRadius'; import utils from '../../utils/utils'; import { LowCreditDialog } from '../charge/InfoDialog'; import { PageList } from '../Router'; const Payment = ({topup, balance, payType="Credit Wallet", onMethodChange, isWallet = true, refreshId = 0}) => { const [visible, showDialog] = useState(false) /*useEffect(() => { if (balance == undefined) { if (userInfo.credit <= 5 && refreshId > 0) { showDialog(true) } } }, [refreshId])*/ return ( { isWallet ? {payType} : Visa/Mastercard Credit/Debit Card } {isWallet ? currency + (balance ?? userInfo.credit) : ''} { topup ?