import React from 'react'; import { t } from '@/i18n'; // Taro mini-program component /** * 分享卡片组件 * * 用于生成小程序分享图片/卡片 * 包含券信息 + 品牌 + 价格 + 小程序码 */ interface ShareCardProps { brand: string; name: string; price: string; faceValue: string; discount: string; } const ShareCard: React.FC = ({ brand, name, price, faceValue, discount, }) => { return ( {/* Header */} G Genex · {brand} {/* Coupon Info */} {name} {price} {faceValue} {discount} {/* Footer with QR */} {t('share_miniapp_code')} {t('share_scan_miniapp')} {t('share_buy_coupons')} ); }; export default ShareCard; /* CSS: .share-card { width: 560rpx; background: white; border-radius: 24rpx; overflow: hidden; box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.1); } .share-header { display: flex; align-items: center; padding: 24rpx 28rpx; background: linear-gradient(135deg, #6C5CE7, #9B8FFF); } .share-logo { width: 48rpx; height: 48rpx; background: rgba(255,255,255,0.2); border-radius: 10rpx; display: flex; align-items: center; justify-content: center; } .share-logo-text { color: white; font-weight: 700; font-size: 24rpx; } .share-brand { color: white; font-size: 26rpx; font-weight: 600; margin-left: 12rpx; } .share-body { padding: 28rpx; } .share-name { font-size: 32rpx; font-weight: 600; color: #141723; } .share-price-row { display: flex; align-items: flex-end; margin-top: 16rpx; } .share-price { font-size: 40rpx; font-weight: 700; color: #6C5CE7; } .share-face { font-size: 24rpx; color: #A0A8BE; text-decoration: line-through; margin-left: 12rpx; } .share-discount { margin-left: 12rpx; padding: 4rpx 12rpx; background: linear-gradient(135deg, #6C5CE7, #9B8FFF); border-radius: 999rpx; } .share-discount-text { color: white; font-size: 22rpx; font-weight: 700; } .share-footer { display: flex; align-items: center; padding: 20rpx 28rpx; border-top: 1rpx solid #F1F3F8; } .share-qr { width: 80rpx; height: 80rpx; background: #F3F1FF; border-radius: 8rpx; display: flex; align-items: center; justify-content: center; } .share-qr-placeholder { font-size: 16rpx; color: #A0A8BE; } .share-cta { margin-left: 16rpx; } .share-cta-title { font-size: 24rpx; font-weight: 600; color: #141723; } .share-cta-desc { font-size: 20rpx; color: #A0A8BE; } */