提交 88b58c02 authored 作者: yueweilu's avatar yueweilu

修正

上级 b1a3e7e4
......@@ -37,6 +37,10 @@ class CourseModel {
this.notesNum,
///
/// 笔记
this.wrongNum,
///
});
CourseModel.fromJson(dynamic json) {
......@@ -64,6 +68,10 @@ class CourseModel {
/// 笔记
notesNum = json['notes_num'];
///
/// 错题
wrongNum = json['wrong_num'];
///
}
num? bookId;
String? bookName;
......@@ -91,6 +99,10 @@ class CourseModel {
num? notesNum;
///
/// 错题
num? wrongNum;
///
......@@ -139,6 +151,10 @@ class CourseModel {
num? notesNum,
///
/// 错题
num? wrongNum,
///
}) => CourseModel( bookId: bookId ?? this.bookId,
bookName: bookName ?? this.bookName,
authors: authors ?? this.authors,
......@@ -162,6 +178,10 @@ class CourseModel {
/// 笔记
notesNum: notesNum ?? this.notesNum,
///
/// 错题
wrongNum: wrongNum ?? this.wrongNum,
///
);
Map<String, dynamic> toJson() {
......@@ -183,6 +203,7 @@ class CourseModel {
map['status'] = status;
map['cart_id'] = cartId;
map['notes_num'] = notesNum;
map['wrong_num'] = wrongNum;
return map;
}
......
......@@ -43,7 +43,7 @@ class BuildItem extends StatelessWidget {
Text(model.authors??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c6),),
],
),
Text(model.notesNum.toString(),style: const TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary)),
Text(model.wrongNum.toString(),style: const TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary)),
],
),
)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论