|
|
@@ -49,33 +49,9 @@ class ConversationAnalysisView
|
|
|
Widget _buildContentList() {
|
|
|
return Obx(() {
|
|
|
Widget contentWidget;
|
|
|
- // 上传页
|
|
|
- if (controller.isUploadPage.value) {
|
|
|
- contentWidget = Column(
|
|
|
- children: [
|
|
|
- // 上传聊天记录卡片
|
|
|
- _buildUploadCard(),
|
|
|
- SizedBox(height: 14.h),
|
|
|
- // 选项卡片
|
|
|
- _buildOptionCard(),
|
|
|
- // 距离底部有一定间距
|
|
|
- SizedBox(height: 90.h),
|
|
|
- ],
|
|
|
- );
|
|
|
- } else if (controller.isResultGenerating.value) {
|
|
|
- // 已出结果
|
|
|
- contentWidget = Column(
|
|
|
- children: [
|
|
|
- // 分析结果卡片
|
|
|
- _buildAnalysisResultCard(),
|
|
|
- SizedBox(height: 12.h),
|
|
|
- // 分析结果Markdown卡片
|
|
|
- _buildMarkdownAnalysisResultCard(),
|
|
|
- // 距离底部有一定间距
|
|
|
- SizedBox(height: 90.h),
|
|
|
- ],
|
|
|
- );
|
|
|
- } else {
|
|
|
+ // 是否例子阶段
|
|
|
+ bool isSample = controller.uploadInfoList.isEmpty;
|
|
|
+ if (isSample) {
|
|
|
// 例子列表
|
|
|
contentWidget = Column(
|
|
|
children: [
|
|
|
@@ -83,6 +59,34 @@ class ConversationAnalysisView
|
|
|
_buildChatRecordSampleCard(),
|
|
|
],
|
|
|
);
|
|
|
+ } else {
|
|
|
+ // 上传页
|
|
|
+ if (controller.isUploadPage.value) {
|
|
|
+ contentWidget = Column(
|
|
|
+ children: [
|
|
|
+ // 上传聊天记录卡片
|
|
|
+ _buildUploadCard(),
|
|
|
+ SizedBox(height: 14.h),
|
|
|
+ // 选项卡片
|
|
|
+ _buildOptionCard(),
|
|
|
+ // 距离底部有一定间距
|
|
|
+ SizedBox(height: 90.h),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ // 已出结果
|
|
|
+ contentWidget = Column(
|
|
|
+ children: [
|
|
|
+ // 分析结果卡片
|
|
|
+ _buildAnalysisResultCard(),
|
|
|
+ SizedBox(height: 12.h),
|
|
|
+ // 分析结果Markdown卡片
|
|
|
+ _buildMarkdownAnalysisResultCard(),
|
|
|
+ // 距离底部有一定间距
|
|
|
+ SizedBox(height: 90.h),
|
|
|
+ ],
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
return SingleChildScrollView(child: contentWidget);
|
|
|
});
|
|
|
@@ -422,18 +426,24 @@ class ConversationAnalysisView
|
|
|
/// 底部布局
|
|
|
Widget _buildBottomLayout(BuildContext context) {
|
|
|
Widget btn;
|
|
|
- // 已在上传阶段,则显示查看分析按钮
|
|
|
- if (controller.isUploadPage.value) {
|
|
|
+ // 是否例子阶段
|
|
|
+ bool isSample = controller.uploadInfoList.isEmpty;
|
|
|
+ // 例子阶段,则显示上传截图按钮
|
|
|
+ if (isSample) {
|
|
|
+ btn = _buildUploadScreenshotBtn(context);
|
|
|
+ } else {
|
|
|
// 已解锁,显示分析按钮
|
|
|
if (controller.userInfo.value?.isMember ?? false) {
|
|
|
- btn = _buildLookAnalyseBtn(context);
|
|
|
+ // 如果正在生成中,则不显示按钮
|
|
|
+ if (controller.isResultGenerating.value) {
|
|
|
+ return SizedBox.shrink();
|
|
|
+ } else {
|
|
|
+ btn = _buildLookAnalyseBtn(context);
|
|
|
+ }
|
|
|
} else {
|
|
|
// 未解锁,显示带锁的按钮
|
|
|
btn = _buildUnlockBtn(context);
|
|
|
}
|
|
|
- } else {
|
|
|
- // 例子阶段,则显示上传截图按钮
|
|
|
- btn = _buildUploadScreenshotBtn(context);
|
|
|
}
|
|
|
return Column(
|
|
|
// 高度包裹内容
|