Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
bc4a24ea
提交
bc4a24ea
authored
3月 08, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
回复消息跳转 我的讨论详细列表
上级
8eb70e1f
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
30 行增加
和
15 行删除
+30
-15
library.dart
lib/models/library.dart
+8
-1
view.dart
lib/pages/user_msg/view.dart
+22
-14
没有找到文件。
lib/models/library.dart
浏览文件 @
bc4a24ea
...
...
@@ -223,6 +223,8 @@ class BookDetailModel {
this
.
chapterName
,
this
.
readChapterId
,
this
.
introduction
,
/// 笔记
this
.
commentNum
,
});
BookDetailModel
.
fromJson
(
dynamic
json
)
{
...
...
@@ -251,6 +253,7 @@ class BookDetailModel {
chapterName
=
json
[
'chapter_name'
];
readChapterId
=
json
[
'read_chapter_id'
];
introduction
=
json
[
'introduction'
];
commentNum
=
json
[
'comment_num'
];
}
num
?
bookId
;
String
?
bookName
;
...
...
@@ -277,6 +280,7 @@ class BookDetailModel {
String
?
chapterName
;
num
?
readChapterId
;
String
?
introduction
;
num
?
commentNum
;
BookDetailModel
copyWith
({
num
?
bookId
,
String
?
bookName
,
String
?
img
,
...
...
@@ -302,6 +306,7 @@ class BookDetailModel {
String
?
chapterName
,
num
?
readChapterId
,
String
?
introduction
,
num
?
commentNum
,
})
=>
BookDetailModel
(
bookId:
bookId
??
this
.
bookId
,
bookName:
bookName
??
this
.
bookName
,
img:
img
??
this
.
img
,
...
...
@@ -326,7 +331,8 @@ class BookDetailModel {
chapterId:
chapterId
??
this
.
chapterId
,
chapterName:
chapterName
??
this
.
chapterName
,
readChapterId:
readChapterId
??
this
.
readChapterId
,
introduction:
introduction
??
this
.
introduction
introduction:
introduction
??
this
.
introduction
,
commentNum:
commentNum
??
this
.
commentNum
,
);
Map
<
String
,
dynamic
>
toJson
()
{
final
map
=
<
String
,
dynamic
>{};
...
...
@@ -355,6 +361,7 @@ class BookDetailModel {
map
[
'chapter_name'
]
=
chapterName
;
map
[
'read_chapter_id'
]
=
readChapterId
;
map
[
'introduction'
]
=
introduction
;
map
[
'comment_num'
]
=
commentNum
;
return
map
;
}
...
...
lib/pages/user_msg/view.dart
浏览文件 @
bc4a24ea
...
...
@@ -107,22 +107,30 @@ class MsgPage extends StatelessWidget {
///TODO:
}
else
if
(
model
.
type
==
2
){
// 2 购买完成三天未评价(跳转订单列表--已完成)
//
final orderInfo = await controller.getOrderInfo(model.urlId?.orderNum??'');
//
//
final result = await context.pushNamed(Routes.orderEvaluate,extra:orderInfo,
//
queryParameters: {'orderNum':orderInfo.ordersnum});
//
final
result
=
await
context
.
pushNamed
(
Routes
.
order
);
if
(
result
==
true
){
// controller.onRefresh();
}
final
orderInfo
=
await
controller
.
getOrderInfo
(
model
.
urlId
?.
orderNum
??
''
);
final
result
=
await
context
.
pushNamed
(
Routes
.
orderEvaluate
,
extra:
orderInfo
,
queryParameters:
{
'orderNum'
:
orderInfo
.
ordersnum
});
//
final result = await context.pushNamed(Routes.order);
//
if (result == true){
//
// controller.onRefresh();
//
}
///TODO:
}
else
if
(
model
.
type
==
3
){
// 3 讨论有人回复的时候 (跳转对应书籍的讨论页面)
final
result
=
await
context
.
pushNamed
(
Routes
.
bookDetail
,
queryParameters:
{
'book_id'
:
model
.
urlId
?.
bookId
.
toString
()});
if
(
result
==
true
){
// controller.onRefresh();
}
// 3 讨论有人回复的时候 (跳转我的讨论详情也)
String
bookId
=
model
.
urlId
?.
bookId
.
toString
()??
''
;
BookDetailModel
bookDetails
=
await
LibraryAPI
.
details
(
bookId:
bookId
);
CourseModel
courseModel
=
CourseModel
(
img:
bookDetails
.
img
,
bookId:
bookDetails
.
bookId
,
bookName:
bookDetails
.
bookName
,
commentNum:
bookDetails
.
commentNum
);
context
.
pushNamed
(
Routes
.
discussDes
,
extra:
courseModel
);
}
else
if
(
model
.
type
==
4
){
// 4 订单完成后有新的积分增加(跳转用户积分记录页)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论