import React from 'react' import { View } from '@tarojs/components' import GiftCard from './GiftCard' const GiftCardExample: React.FC = () => { // 示例数据 const giftCardData = { id: 1, name: '星巴克咖啡礼品卡', description: '享受醇香咖啡时光,适用于全国星巴克门店', code: 'SB2024001234567890', goodsImages: [ 'https://example.com/starbucks-card-1.jpg', 'https://example.com/starbucks-card-2.jpg', 'https://example.com/starbucks-card-3.jpg' ], faceValue: '100', originalPrice: '120', type: 20, // 虚拟礼品卡 useStatus: 0, // 可用 expireTime: '2024-12-31 23:59:59', contactInfo: '400-800-8888', goodsInfo: { brand: '星巴克', specification: '电子礼品卡', category: '餐饮美食', stock: 999, rating: 4.8, reviewCount: 1256, tags: ['热门', '全国通用', '无需预约', '即买即用'], instructions: [ '出示兑换码至门店收银台即可使用', '可用于购买任意饮品和食品', '不可兑换现金,不设找零', '单次可使用多张礼品卡' ], notices: [ '礼品卡一经售出,不可退换', '请妥善保管兑换码,遗失不补', '部分特殊商品可能不适用', '具体使用规则以门店公告为准' ], applicableStores: [ '全国星巴克门店', '机场店', '高铁站店', '商场店' ] }, promotionInfo: { type: 'discount' as const, description: '限时优惠:满100减20,买2张送1张咖啡券', amount: '20', validUntil: '2024-09-30 23:59:59' }, showCode: true, showUseBtn: true, showDetailBtn: true, showGoodsDetail: true, theme: 'green' as const } const handleUse = () => { console.log('使用礼品卡') } const handleDetail = () => { console.log('查看详情') } const handleClick = () => { console.log('点击礼品卡') } return ( {/* 简化版本示例 */} {/* 已使用状态示例 */} ) } export default GiftCardExample