fix: 重定向cv

This commit is contained in:
guozhigq
2024-09-28 17:24:23 +08:00
parent ea61501e8b
commit fbf327cb9a
3 changed files with 38 additions and 1 deletions

View File

@ -31,7 +31,16 @@ class OpusController extends GetxController {
Future fetchOpusData() async {
var res = await ReadHttp.parseArticleOpus(id: id);
if (res['status']) {
opusData.value = res['data'];
List<String> keys = res.keys.toList();
if (keys.contains('isCv') && res['isCv']) {
Get.offNamed('/read', parameters: {
'id': res['cvId'],
'title': title.value,
'articleType': 'cv',
});
} else {
opusData.value = res['data'];
}
}
return res;
}

View File

@ -107,6 +107,9 @@ class _OpusPageState extends State<OpusPage> {
}
Widget _buildContent(OpusDataModel opusData) {
if (opusData.detail == null) {
return const SizedBox();
}
final modules = opusData.detail!.modules!;
late ModuleContent moduleContent;
// 获取所有的图片链接