import React, {useEffect} from 'react' import {View, Text} from '@tarojs/components' import {Popup} from '@nutui/nutui-react-taro' import {Close, QrCode} from '@nutui/icons-react-taro' export interface SimpleQRCodeModalProps { /** 是否显示弹窗 */ visible: boolean /** 关闭弹窗回调 */ onClose: () => void /** 二维码内容(礼品卡code码) */ qrContent: string /** 礼品卡名称 */ giftName?: string /** 礼品卡面值 */ faceValue?: string } const SimpleQRCodeModal: React.FC = ({ visible, onClose, qrContent, giftName, faceValue }) => { // const copyToClipboard = () => { // if (qrContent) { // Taro.setClipboardData({ // data: qrContent, // success: () => { // Taro.showToast({ // title: '兑换码已复制', // icon: 'success' // }) // } // }) // } // } useEffect(() => { }, []) return ( } onClose={onClose} style={{ width: '90%' }} > {/* 标题 */} 核销码 {/* 礼品卡信息 */} {(giftName || faceValue) && ( {giftName && ( {giftName} )} {faceValue && ( ¥{faceValue} )} )} {/* 二维码区域 */} {qrContent ? ( 二维码 请向商家出示此二维码 ) : ( 生成中... )} ) } export default SimpleQRCodeModal