import type { AppInfo, AppCategory } from '~/types' // 应用分类 export const categories: AppCategory[] = [ { id: 'all', name: { 'zh-CN': '全部', 'en-US': 'All' } }, { id: 'finance', name: { 'zh-CN': '金融', 'en-US': 'Finance' } }, { id: 'social', name: { 'zh-CN': '社交', 'en-US': 'Social' } }, { id: 'tools', name: { 'zh-CN': '工具', 'en-US': 'Tools' } }, { id: 'entertainment', name: { 'zh-CN': '娱乐', 'en-US': 'Entertainment' } }, ] // 应用列表 export const apps: AppInfo[] = [ { id: 'riwa-app', name: 'Riwa', icon: '/icons/riwa.svg', shortDescription: { 'zh-CN': '数字资产交易平台', 'en-US': 'Digital Asset Trading Platform', }, description: { 'zh-CN': 'Riwa 是一个安全、快速的数字资产交易平台,提供专业的交易工具和实时行情数据。', 'en-US': 'Riwa is a secure and fast digital asset trading platform with professional trading tools and real-time market data.', }, category: 'finance', version: '1.0.0', buildNumber: '100', releaseDate: '2025-12-30', releaseNotes: { 'zh-CN': [ '🎉 首次发布', '✨ 全新的用户界面设计', '🔐 增强的安全特性', '⚡ 性能优化,响应速度提升 30%', '🌍 支持多语言切换', '🌙 深色模式支持', ], 'en-US': [ '🎉 Initial Release', '✨ Brand new user interface', '🔐 Enhanced security features', '⚡ Performance optimization, 30% faster response', '🌍 Multi-language support', '🌙 Dark mode support', ], }, downloads: { ios: 'https://example.com/riwa-ios-1.0.0.ipa', android: 'https://example.com/riwa-android-1.0.0.apk', h5: 'https://app.riwa.com', }, size: { ios: '45.2 MB', android: '38.6 MB', }, stats: { total: 12580, today: 156, ios: 7234, android: 5346, }, }, { id: 'riwa-wallet', name: 'Riwa Wallet', icon: '/icons/wallet.svg', shortDescription: { 'zh-CN': '安全的数字资产钱包', 'en-US': 'Secure Digital Asset Wallet', }, description: { 'zh-CN': 'Riwa Wallet 是一个去中心化的数字资产钱包,支持多链资产管理,私钥由您掌控。', 'en-US': 'Riwa Wallet is a decentralized digital asset wallet supporting multi-chain asset management with your keys under your control.', }, category: 'finance', version: '2.1.5', buildNumber: '215', releaseDate: '2025-12-28', releaseNotes: { 'zh-CN': [ '🔐 增强了安全性', '✨ 支持更多区块链网络', '🐛 修复了若干已知问题', '⚡ 交易速度优化', ], 'en-US': [ '🔐 Enhanced security', '✨ Support for more blockchain networks', '🐛 Fixed several known issues', '⚡ Transaction speed optimization', ], }, downloads: { ios: 'https://example.com/wallet-ios-2.1.5.ipa', android: 'https://example.com/wallet-android-2.1.5.apk', }, size: { ios: '32.8 MB', android: '28.3 MB', }, stats: { total: 8920, today: 89, ios: 5230, android: 3690, }, }, { id: 'riwa-chat', name: 'Riwa Chat', icon: '/icons/chat.svg', shortDescription: { 'zh-CN': '加密即时通讯工具', 'en-US': 'Encrypted Instant Messaging', }, description: { 'zh-CN': 'Riwa Chat 提供端到端加密的即时通讯服务,保护您的隐私安全。', 'en-US': 'Riwa Chat provides end-to-end encrypted instant messaging to protect your privacy.', }, category: 'social', version: '3.0.2', buildNumber: '302', releaseDate: '2025-12-25', releaseNotes: { 'zh-CN': [ '💬 优化了消息同步机制', '📎 支持发送更多类型的文件', '🎨 界面美化', '🔊 新增语音消息功能', ], 'en-US': [ '💬 Optimized message sync', '📎 Support for more file types', '🎨 UI improvements', '🔊 Added voice message feature', ], }, downloads: { ios: 'https://example.com/chat-ios-3.0.2.ipa', android: 'https://example.com/chat-android-3.0.2.apk', h5: 'https://chat.riwa.com', }, size: { ios: '52.1 MB', android: '46.8 MB', }, stats: { total: 15430, today: 203, ios: 8920, android: 6510, }, }, ] // 获取所有应用 export function getAllApps(): AppInfo[] { return apps } // 根据ID获取应用 export function getAppById(id: string): AppInfo | undefined { return apps.find(app => app.id === id) } // 根据分类获取应用 export function getAppsByCategory(categoryId: string): AppInfo[] { if (categoryId === 'all') { return apps } return apps.filter(app => app.category === categoryId) } // 搜索应用 export function searchApps(keyword: string, locale: 'zh-CN' | 'en-US' = 'zh-CN'): AppInfo[] { const lowerKeyword = keyword.toLowerCase() return apps.filter(app => app.name.toLowerCase().includes(lowerKeyword) || app.shortDescription[locale].toLowerCase().includes(lowerKeyword) || app.description[locale].toLowerCase().includes(lowerKeyword), ) }