fix: 重定向cv
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
// 获取所有的图片链接
|
||||
|
||||
Reference in New Issue
Block a user