fix: 视频总结
This commit is contained in:
@ -39,11 +39,11 @@ class ModelResult {
|
||||
ModelResult.fromJson(Map<String, dynamic> json) {
|
||||
resultType = json['result_type'];
|
||||
summary = json['summary'];
|
||||
outline = json['result_type'] == 2
|
||||
? json['outline']
|
||||
outline = json['result_type'] == 0
|
||||
? <OutlineItem>[]
|
||||
: json['outline']
|
||||
.map<OutlineItem>((e) => OutlineItem.fromJson(e))
|
||||
.toList()
|
||||
: <OutlineItem>[];
|
||||
.toList();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ class VideoIntroController extends GetxController {
|
||||
|
||||
// ai总结
|
||||
Future aiConclusion() async {
|
||||
SmartDialog.showLoading(msg: '正在生产ai总结');
|
||||
SmartDialog.showLoading(msg: '正在生成ai总结');
|
||||
final res = await VideoHttp.aiConclusion(
|
||||
bvid: bvid,
|
||||
cid: lastPlayCid.value,
|
||||
@ -551,7 +551,7 @@ class VideoIntroController extends GetxController {
|
||||
if (res['status']) {
|
||||
modelResult = res['data'].modelResult;
|
||||
} else {
|
||||
SmartDialog.showToast("当前视频可能暂不支持AI视频总结");
|
||||
SmartDialog.showToast("当前视频暂不支持AI视频总结");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
@ -49,15 +49,18 @@ class AiDetail extends StatelessWidget {
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
SelectableText(
|
||||
modelResult!.summary!,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
height: 1.5,
|
||||
if (modelResult!.resultType != 0 &&
|
||||
modelResult!.summary != '') ...[
|
||||
SelectableText(
|
||||
modelResult!.summary!,
|
||||
style: const TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.bold,
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
ListView.builder(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
|
Reference in New Issue
Block a user