feat: Implement character avatar upload and refactor character form fields and API calls.

This commit is contained in:
liqupan
2026-02-02 22:48:11 +08:00
parent 6c32d845a7
commit dec5748cca
15 changed files with 369 additions and 197 deletions

View File

@@ -2,30 +2,17 @@ import 'dart:io';
/// Supabase 配置
///
/// 这里配置了本地 Docker 部署的 Supabase 连接信息
/// 生产环境部署时需要替换为实际的 URL 和 Key
/// 这里配置了 Wei AI 线上项目的连接信息
class SupabaseConfig {
SupabaseConfig._();
/// Supabase API URL
///
/// - Android 模拟器: 使用 10.0.2.2 访问主机
/// - iOS 模拟器/macOS: 使用 localhost
/// - 真机测试: 需要替换为电脑的局域网 IP 地址
static String get url {
// 真机测试: Android 和 iOS 都使用电脑的局域网 IP 地址
// 模拟器测试: Android 用 10.0.2.2iOS 用 localhost
if (Platform.isAndroid || Platform.isIOS) {
return 'http://192.168.3.118:8000';
}
// macOS 使用 localhost
return 'http://localhost:8000';
}
static const String url = 'https://ovkwghuaorazlhijhmpj.supabase.co';
/// Supabase Anon Key
/// 这个 key 是公开的,用于客户端访问
/// Supabase Anon Key (Publishable Key)
/// 这个 key 是公开的,用于客户端安全访问
static const String anonKey =
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlzcyI6InN1cGFiYXNlIiwiaWF0IjoxNzY5NTk1NjI4LCJleHAiOjE5MjcyNzU2Mjh9.moV0JpCSx3Y1QTZmKZ5K-tQLaWcshxtxFlCoIBQFsEU';
'sb_publishable_CXBzerv3x8xYMSV0hnfk6w_nuy5pWtE';
/// 是否启用调试模式
static const bool debug = true;