Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
5aa4ad33
提交
5aa4ad33
authored
1月 22, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
学习报告接口
上级
b3d86fd9
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
117 行增加
和
0 行删除
+117
-0
library.dart
lib/apis/library.dart
+16
-0
library.dart
lib/models/library.dart
+99
-0
card.dart
lib/pages/study_report/widgets/card.dart
+2
-0
没有找到文件。
lib/apis/library.dart
浏览文件 @
5aa4ad33
...
...
@@ -125,5 +125,20 @@ abstract class LibraryAPI {
return
BookDetailModel
.
fromJson
(
result
.
data
);
}
/// 6、学习报告
///
static
Future
<
ReportModel
>
report
({
required
String
bookId
})
async
{
final
result
=
await
HttpService
.
to
.
post
(
'/v1/members/Information/myStudyReport'
,
params:
{
'book_id'
:
bookId
},
);
if
(
result
.
data
is
!
Map
)
return
ReportModel
();
return
ReportModel
.
fromJson
(
result
.
data
);
}
}
\ No newline at end of file
lib/models/library.dart
浏览文件 @
5aa4ad33
...
...
@@ -349,6 +349,7 @@ class BookDetailModel {
}
/// 删选模型
class
FilterModel
{
FilterModel
({
this
.
id
,
...
...
@@ -362,4 +363,102 @@ class FilterModel {
}
/// 学习报告模型
class
ReportModel
{
ReportModel
({
this
.
bookName
,
this
.
authors
,
this
.
img
,
this
.
progress
,
this
.
readSecond
,
this
.
maxSecond
,
this
.
lastChapter
,
this
.
commentPostNums
,
this
.
commentReplyNums
,
this
.
lineNums
,
this
.
colorNums
,
this
.
noteNums
,
this
.
questionAllNums
,
this
.
questionAccuracy
,});
ReportModel
.
fromJson
(
dynamic
json
)
{
bookName
=
json
[
'book_name'
];
authors
=
json
[
'authors'
];
img
=
json
[
'img'
];
progress
=
json
[
'progress'
];
readSecond
=
json
[
'read_second'
];
maxSecond
=
json
[
'max_second'
];
lastChapter
=
json
[
'last_chapter'
];
commentPostNums
=
json
[
'comment_post_nums'
];
commentReplyNums
=
json
[
'comment_reply_nums'
];
lineNums
=
json
[
'line_nums'
];
colorNums
=
json
[
'color_nums'
];
noteNums
=
json
[
'note_nums'
];
questionAllNums
=
json
[
'question_all_nums'
];
questionAccuracy
=
json
[
'question_accuracy'
];
}
String
?
bookName
;
String
?
authors
;
String
?
img
;
String
?
progress
;
String
?
readSecond
;
num
?
maxSecond
;
String
?
lastChapter
;
num
?
commentPostNums
;
num
?
commentReplyNums
;
num
?
lineNums
;
num
?
colorNums
;
num
?
noteNums
;
num
?
questionAllNums
;
String
?
questionAccuracy
;
ReportModel
copyWith
({
String
?
bookName
,
String
?
authors
,
String
?
img
,
String
?
progress
,
String
?
readSecond
,
num
?
maxSecond
,
String
?
lastChapter
,
num
?
commentPostNums
,
num
?
commentReplyNums
,
num
?
lineNums
,
num
?
colorNums
,
num
?
noteNums
,
num
?
questionAllNums
,
String
?
questionAccuracy
,
})
=>
ReportModel
(
bookName:
bookName
??
this
.
bookName
,
authors:
authors
??
this
.
authors
,
img:
img
??
this
.
img
,
progress:
progress
??
this
.
progress
,
readSecond:
readSecond
??
this
.
readSecond
,
maxSecond:
maxSecond
??
this
.
maxSecond
,
lastChapter:
lastChapter
??
this
.
lastChapter
,
commentPostNums:
commentPostNums
??
this
.
commentPostNums
,
commentReplyNums:
commentReplyNums
??
this
.
commentReplyNums
,
lineNums:
lineNums
??
this
.
lineNums
,
colorNums:
colorNums
??
this
.
colorNums
,
noteNums:
noteNums
??
this
.
noteNums
,
questionAllNums:
questionAllNums
??
this
.
questionAllNums
,
questionAccuracy:
questionAccuracy
??
this
.
questionAccuracy
,
);
Map
<
String
,
dynamic
>
toJson
()
{
final
map
=
<
String
,
dynamic
>{};
map
[
'book_name'
]
=
bookName
;
map
[
'authors'
]
=
authors
;
map
[
'img'
]
=
img
;
map
[
'progress'
]
=
progress
;
map
[
'read_second'
]
=
readSecond
;
map
[
'max_second'
]
=
maxSecond
;
map
[
'last_chapter'
]
=
lastChapter
;
map
[
'comment_post_nums'
]
=
commentPostNums
;
map
[
'comment_reply_nums'
]
=
commentReplyNums
;
map
[
'line_nums'
]
=
lineNums
;
map
[
'color_nums'
]
=
colorNums
;
map
[
'note_nums'
]
=
noteNums
;
map
[
'question_all_nums'
]
=
questionAllNums
;
map
[
'question_accuracy'
]
=
questionAccuracy
;
return
map
;
}
}
lib/pages/study_report/widgets/card.dart
浏览文件 @
5aa4ad33
...
...
@@ -10,6 +10,8 @@ class BuildCard extends StatelessWidget {
Container
(
child:
Image
.
asset
(
'assets/images/report_bg.png'
,
width:
double
.
infinity
,
fit:
BoxFit
.
contain
,
),
),
Positioned
(
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论