fix: 动态数据类型
This commit is contained in:
@ -28,6 +28,7 @@ class DynamicsHttp {
|
|||||||
'data': DynamicsDataModel.fromJson(res.data['data']),
|
'data': DynamicsDataModel.fromJson(res.data['data']),
|
||||||
};
|
};
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
print(err);
|
||||||
return {
|
return {
|
||||||
'status': false,
|
'status': false,
|
||||||
'data': [],
|
'data': [],
|
||||||
|
@ -244,7 +244,9 @@ class Vote {
|
|||||||
choiceCnt = json['choice_cnt'];
|
choiceCnt = json['choice_cnt'];
|
||||||
share = json['share'];
|
share = json['share'];
|
||||||
defaultShare = json['default_share'];
|
defaultShare = json['default_share'];
|
||||||
endTime = json['end_time'];
|
endTime = json['end_time'] is int
|
||||||
|
? json['end_time']
|
||||||
|
: int.parse(json['end_time']);
|
||||||
joinNum = json['join_num'];
|
joinNum = json['join_num'];
|
||||||
status = json['status'];
|
status = json['status'];
|
||||||
type = json['type'];
|
type = json['type'];
|
||||||
|
@ -27,8 +27,9 @@ InlineSpan richNode(item, context) {
|
|||||||
} else {
|
} else {
|
||||||
for (var i in richTextNodes) {
|
for (var i in richTextNodes) {
|
||||||
/// fix 渲染专栏时内容会重复
|
/// fix 渲染专栏时内容会重复
|
||||||
if (item.modules.moduleDynamic.major.opus.title == null &&
|
// if (item.modules.moduleDynamic.major.opus.title == null &&
|
||||||
i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
|
// i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
|
||||||
|
if (i.type == 'RICH_TEXT_NODE_TYPE_TEXT') {
|
||||||
spanChilds.add(
|
spanChilds.add(
|
||||||
TextSpan(text: i.origText, style: const TextStyle(height: 1.65)));
|
TextSpan(text: i.origText, style: const TextStyle(height: 1.65)));
|
||||||
}
|
}
|
||||||
@ -109,6 +110,7 @@ InlineSpan richNode(item, context) {
|
|||||||
alignment: PlaceholderAlignment.middle,
|
alignment: PlaceholderAlignment.middle,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
try {
|
||||||
String dynamicId = item.basic['comment_id_str'];
|
String dynamicId = item.basic['comment_id_str'];
|
||||||
Get.toNamed(
|
Get.toNamed(
|
||||||
'/webview',
|
'/webview',
|
||||||
@ -119,6 +121,7 @@ InlineSpan richNode(item, context) {
|
|||||||
'pageTitle': '投票'
|
'pageTitle': '投票'
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
} catch (_) {}
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'投票:${i.text}',
|
'投票:${i.text}',
|
||||||
|
Reference in New Issue
Block a user