提交 bc4a24ea authored 作者: yueweilu's avatar yueweilu

回复消息跳转 我的讨论详细列表

上级 8eb70e1f
......@@ -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;
}
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论