This commit is contained in:
2026-08-03 10:29:31 +08:00
parent 2535d8b9be
commit 55aa30214c
8 changed files with 130 additions and 133 deletions
+2 -3
View File
@@ -41,9 +41,8 @@ class AvatarViewerPage extends ConsumerWidget {
fontSize: 15, fontWeight: FontWeight.bold)),
const SizedBox(height: 8),
const Text(
'化身由脸型(20 档)× 体型(6 档)× 肤色(5 档)模板组合而成'
'依据大头照、全身照与身形参数自动匹配'
'3D 渲染在预烘焙 GLB 资产接入后启用。',
'化身基于你的三视角全身照(正面/侧面/背面)由 AI 生成 3D 形象'
'构建过程通常需要 1-3 分钟',
style: TextStyle(fontSize: 13, color: Colors.grey),
),
const SizedBox(height: 12),
+2 -2
View File
@@ -7,7 +7,7 @@ import 'package:image_picker/image_picker.dart';
import '../../shared/widgets/loading_view.dart';
import 'photo_upload_provider.dart';
/// 拍照引导:4 类照片(大头照/正面/侧面/背面)逐一上传
/// 拍照引导:3 视角全身照(正面/侧面/背面)逐一上传,用于 Tripo 构建 3D 化身
class PhotoGuidePage extends ConsumerStatefulWidget {
const PhotoGuidePage({super.key});
@@ -74,7 +74,7 @@ class _PhotoGuidePageState extends ConsumerState<PhotoGuidePage> {
return ListView(
padding: const EdgeInsets.all(16),
children: [
const Text('按提示拍摄 4照片,用于构建你的 3D 形象',
const Text('拍摄 3全身照(正面/侧面/背面),用于构建你的 3D 形象',
style: TextStyle(color: Colors.grey, fontSize: 13)),
const SizedBox(height: 12),
for (final type in PhotoType.all) ...[
@@ -23,7 +23,8 @@ class PhotoType {
fullBack: '站立背面全身,露出轮廓',
};
static const List<int> all = [headshot, fullFront, fullSide, fullBack];
/// 构建 3D 化身所需视角(Tripo 多视角转 3D)
static const List<int> all = [fullFront, fullSide, fullBack];
}
class UserPhotoInfo {
@@ -42,7 +43,8 @@ class PhotoNotifier extends AsyncNotifier<List<UserPhotoInfo>> {
@override
Future<List<UserPhotoInfo>> build() async {
final api = ref.read(apiClientProvider);
final list = await api.get<List<dynamic>>('/user-photo/list');
final data = await api.get<Map<String, dynamic>>('/user-photo/list');
final list = data['list'] as List<dynamic>? ?? [];
return list
.map((e) => UserPhotoInfo(
id: (e['id'] as num).toInt(),