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