提交 3b87f4b9 authored 作者: yueweilu's avatar yueweilu

1、讨论详情界面完成

2、app名称修改
上级 c89ec33a
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</queries> </queries>
<application <application
android:label="紫荆云书" android:label="紫荆数智学堂"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<activity <activity
......
...@@ -479,7 +479,7 @@ ...@@ -479,7 +479,7 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "紫荆云书"; INFOPLIST_KEY_CFBundleDisplayName = "紫荆数智学堂";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.books"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.books";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
...@@ -646,7 +646,7 @@ ...@@ -646,7 +646,7 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "紫荆云书"; INFOPLIST_KEY_CFBundleDisplayName = "紫荆数智学堂";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.books"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.books";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
...@@ -666,7 +666,7 @@ ...@@ -666,7 +666,7 @@
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "紫荆云书"; INFOPLIST_KEY_CFBundleDisplayName = "紫荆数智学堂";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.books"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.books";
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
......
...@@ -227,6 +227,29 @@ abstract class MineAPI { ...@@ -227,6 +227,29 @@ abstract class MineAPI {
}); });
} }
/// 12、笔记详情列表
///
static Future <List<DiscussModel>> discussList({
int page = 1,
int limit = 10,
required String bookId,
required String types
}) async {
final result = await HttpService.to.post(
'/v1/members/Information/myBookComment',
params: {
'page': page,
'page_size': limit,
'book_id':bookId,
'types': types
},
);
if (result.data is! Map && result.data['list'] is! List) return [];
return List.generate(result.data['list'].length, (index){
return DiscussModel.fromJson(result.data['list'][index]);
});
}
......
...@@ -40,7 +40,7 @@ class MyApp extends StatelessWidget { ...@@ -40,7 +40,7 @@ class MyApp extends StatelessWidget {
builder: (context, child) => GetBuilder<ConfigStore>( builder: (context, child) => GetBuilder<ConfigStore>(
builder: (config) => MaterialApp.router( builder: (config) => MaterialApp.router(
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
title: '紫荆云书', title: '紫荆数智学堂',
theme: AppTheme.light, theme: AppTheme.light,
darkTheme: AppTheme.dark, darkTheme: AppTheme.dark,
themeMode: ThemeMode.light, themeMode: ThemeMode.light,
......
...@@ -205,7 +205,7 @@ class VersionModel { ...@@ -205,7 +205,7 @@ class VersionModel {
} }
/// 用户信息模型
class UserInfoModel { class UserInfoModel {
UserInfoModel({ UserInfoModel({
this.name, this.name,
...@@ -309,6 +309,7 @@ class UserInfoModel { ...@@ -309,6 +309,7 @@ class UserInfoModel {
} }
/// 笔记详情模型
class NoteModel { class NoteModel {
NoteModel({ NoteModel({
this.types, this.types,
...@@ -363,3 +364,126 @@ class NoteModel { ...@@ -363,3 +364,126 @@ class NoteModel {
} }
} }
/// 讨论模型
class DiscussModel {
DiscussModel({
this.id,
this.chapterId,
this.chapterName,
this.content,
this.quoteContent,
this.title,
this.replyId,
this.personType,
this.personId,
this.goodNum,
this.replyNum,
this.createTime,
this.replacePersonName,
this.replacePersonPic,
this.personName,
this.commentAll,
this.personPic,});
DiscussModel.fromJson(dynamic json) {
id = json['id'];
chapterId = json['chapter_id'];
chapterName = json['chapter_name'];
content = json['content'];
quoteContent = json['quote_content'];
title = json['title'];
replyId = json['reply_id'];
personType = json['person_type'];
personId = json['person_id'];
goodNum = json['good_num'];
replyNum = json['reply_num'];
createTime = json['create_time'];
replacePersonName = json['replace_person_name'];
replacePersonPic = json['replace_person_pic'];
personName = json['person_name'];
personPic = json['person_pic'];
if (json['comment_all'] != null) {
commentAll = [];
json['comment_all'].forEach((v) {
commentAll?.add(DiscussModel.fromJson(v));
});
}
}
num? id;
num? chapterId;
String? chapterName;
String? content;
String? quoteContent;
String? title;
num? replyId;
num? personType;
num? personId;
num? goodNum;
num? replyNum;
String? createTime;
String? replacePersonName;
String? replacePersonPic;
String? personName;
String? personPic;
List<DiscussModel>? commentAll;
DiscussModel copyWith({ num? id,
num? chapterId,
String? chapterName,
String? content,
String? quoteContent,
String? title,
num? replyId,
num? personType,
num? personId,
num? goodNum,
num? replyNum,
String? createTime,
String? replacePersonName,
String? replacePersonPic,
String? personName,
String? personPic,
List<DiscussModel>? commentAll,
}) => DiscussModel( id: id ?? this.id,
chapterId: chapterId ?? this.chapterId,
chapterName: chapterName ?? this.chapterName,
content: content ?? this.content,
quoteContent: quoteContent ?? this.quoteContent,
title: title ?? this.title,
replyId: replyId ?? this.replyId,
personType: personType ?? this.personType,
personId: personId ?? this.personId,
goodNum: goodNum ?? this.goodNum,
replyNum: replyNum ?? this.replyNum,
createTime: createTime ?? this.createTime,
replacePersonName: replacePersonName ?? this.replacePersonName,
replacePersonPic: replacePersonPic ?? this.replacePersonPic,
personName: personName ?? this.personName,
personPic: personPic ?? this.personPic,
commentAll: commentAll ?? this.commentAll,
);
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = id;
map['chapter_id'] = chapterId;
map['chapter_name'] = chapterName;
map['content'] = content;
map['quote_content'] = quoteContent;
map['title'] = title;
map['reply_id'] = replyId;
map['person_type'] = personType;
map['person_id'] = personId;
map['good_num'] = goodNum;
map['reply_num'] = replyNum;
map['create_time'] = createTime;
map['replace_person_name'] = replacePersonName;
map['replace_person_pic'] = replacePersonPic;
map['person_name'] = personName;
map['person_pic'] = personPic;
if (commentAll != null) {
map['comment_all'] = commentAll?.map((v) => v.toJson()).toList();
}
return map;
}
}
\ No newline at end of file
...@@ -43,7 +43,7 @@ class _SplashPageState extends State<SplashPage> { ...@@ -43,7 +43,7 @@ class _SplashPageState extends State<SplashPage> {
url: 'assets/images/logo.png', url: 'assets/images/logo.png',
fit: BoxFit.contain, fit: BoxFit.contain,
), ),
title: Text('云书'), title: Text('紫荆数智学堂'),
), ),
) )
), ),
......
...@@ -24,8 +24,8 @@ class AboutPage extends StatelessWidget { ...@@ -24,8 +24,8 @@ class AboutPage extends StatelessWidget {
child: const CustomImage.asset(url: 'assets/images/banner.png'), child: const CustomImage.asset(url: 'assets/images/banner.png'),
), ),
Gaps.hGaps15, Gaps.hGaps15,
const Text('云教材',style: TextStyle(fontSize: 17,fontWeight: Fonts.medium,color: Colours.c3),), const Text('紫荆数智学堂',style: TextStyle(fontSize: 17,fontWeight: Fonts.medium,color: Colours.c3),),
const Text('V1.0.1',style: TextStyle(fontSize: 13,color: Colours.c9)), const Text('V1.0.0',style: TextStyle(fontSize: 13,color: Colours.c9)),
], ],
), ),
SafeArea( SafeArea(
......
...@@ -13,6 +13,13 @@ class UserDiscussController extends GetxController { ...@@ -13,6 +13,13 @@ class UserDiscussController extends GetxController {
int _page = 1; int _page = 1;
bool _noMore = false; bool _noMore = false;
@override
void onReady() {
onRefresh();
super.onReady();
}
@override @override
void onClose() { void onClose() {
refreshController.dispose(); refreshController.dispose();
...@@ -29,7 +36,6 @@ class UserDiscussController extends GetxController { ...@@ -29,7 +36,6 @@ class UserDiscussController extends GetxController {
); );
// 如果是刷新 清理数据 // 如果是刷新 清理数据
if (isRefresh) discuss.clear(); if (isRefresh) discuss.clear();
discuss.addAll(_test());
discuss.addAll(result); discuss.addAll(result);
_page ++; _page ++;
_noMore = result.length < _limit; _noMore = result.length < _limit;
......
...@@ -8,8 +8,10 @@ import 'package:flutter_book/theme.dart'; ...@@ -8,8 +8,10 @@ import 'package:flutter_book/theme.dart';
import 'package:flutter_book/widgets/index.dart'; import 'package:flutter_book/widgets/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:go_router/go_router.dart';
import '../../models/index.dart'; import '../../models/index.dart';
import '../../routes/index.dart';
import '../../utils/index.dart'; import '../../utils/index.dart';
......
...@@ -18,10 +18,10 @@ class _UserDiscussPageState extends State<UserDiscussPage> { ...@@ -18,10 +18,10 @@ class _UserDiscussPageState extends State<UserDiscussPage> {
title: const Text('讨论'), title: const Text('讨论'),
), ),
body: Container( body: Container(
color: Colors.white, color: Colors.transparent,
child: CustomPullScrollView( child: CustomPullScrollView(
controller: controller.refreshController, controller: controller.refreshController,
onRefresh: controller.onRefresh, // onRefresh: controller.onRefresh,
onLoading: controller.onLoading, onLoading: controller.onLoading,
child:SingleChildScrollView( child:SingleChildScrollView(
child: Container( child: Container(
...@@ -42,7 +42,12 @@ class _UserDiscussPageState extends State<UserDiscussPage> { ...@@ -42,7 +42,12 @@ class _UserDiscussPageState extends State<UserDiscussPage> {
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext context, int index){ itemBuilder: (BuildContext context, int index){
return BuildItem(model: controller.discuss[index],index: index,num: controller.discuss.length,); return GestureDetector(
onTap: (){
context.pushNamed(Routes.discussDes,extra: controller.discuss[index]);
},
child: BuildItem(model: controller.discuss[index],index: index,num: controller.discuss.length,)
);
}, },
itemCount: controller.discuss.length, itemCount: controller.discuss.length,
), ),
......
...@@ -14,6 +14,7 @@ class BuildItem extends StatelessWidget { ...@@ -14,6 +14,7 @@ class BuildItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
color: Colors.transparent,
// margin: const EdgeInsets.symmetric(horizontal: 10), // margin: const EdgeInsets.symmetric(horizontal: 10),
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
// color: Colors.red, // color: Colors.red,
......
part of user_discuss_des;
class UserDiscussDesController extends GetxController {
final String tag;
final CourseModel model;
UserDiscussDesController(this.tag,this.model);
List<DiscussModel> discuss = [];
final EasyRefreshController refreshController = EasyRefreshController(
controlFinishLoad: true,
controlFinishRefresh: true,
);
final int _limit = 10;
int _page = 1;
bool _noMore = false;
@override
void onReady() {
onRefresh();
super.onReady();
}
@override
void onClose() {
refreshController.dispose();
super.onClose();
}
/// 获取讨论详情
Future<void> _getDiscuss([bool isRefresh = false]) async {
if (isRefresh) _page = 1;
// 网路请求
final result = await MineAPI.discussList(
page: _page,
limit: _limit,
bookId: model.bookId.toString(),
types: tag
);
// 如果是刷新 清理数据
if (isRefresh) discuss.clear();
discuss.addAll(result);
_page ++;
_noMore = result.length < _limit;
update();
}
void onRefresh() async {
try {
await _getDiscuss(true);
refreshController.finishRefresh(IndicatorResult.success);
refreshController.resetFooter();
} catch (error) {
refreshController.finishRefresh(IndicatorResult.fail);
}
}
void onLoading() async {
if (_noMore) {
refreshController.finishLoad(IndicatorResult.noMore);
return;
}
try {
await _getDiscuss();
refreshController.finishLoad();
} catch (error) {
refreshController.finishLoad(IndicatorResult.fail);
}
}
}
\ No newline at end of file
library user_discuss_des;
import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';
import 'package:flutter_book/widgets/index.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import '../../apis/index.dart';
import '../../models/index.dart';
import '../../theme.dart';
import '../../utils/index.dart';
part 'view.dart';
part 'controller.dart';
part 'widgets/list.dart';
part 'widgets/discuss.dart';
part 'widgets/item.dart';
part of user_discuss_des;
class UserDiscussDesPage extends StatefulWidget {
final CourseModel model;
const UserDiscussDesPage({
Key? key,
required this.model
}) : super(key: key);
@override
State<UserDiscussDesPage> createState() => _UserDiscussDesPageState();
}
class _UserDiscussDesPageState extends State<UserDiscussDesPage> {
List<Tab> tabs = [
const Tab(text: '全部',),
const Tab(text: '发起',),
const Tab(text: '参与',),
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
title: const Text('讨论详情'),
),
body: DefaultTabController(
length: tabs.length,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
BuildItem(model: widget.model),
ClipRRect(
borderRadius:const BorderRadius.only(topLeft: Radius.circular(5),topRight: Radius.circular(5)),
child: Container(
width: double.infinity,
color: Colors.white,
height: 35,
child: TabBar(
indicator: UnderlineTabIndicator(
borderRadius: BorderRadius.circular(0.75),
borderSide: const BorderSide(width: 1.5,color: AppTheme.primary),
insets: const EdgeInsets.symmetric(horizontal: 22), // 设置标签下面指示器的水平内边距
),
labelPadding: const EdgeInsets.symmetric(horizontal: 20),
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: AppTheme.primary,
indicatorWeight: 1.5,
labelStyle: const TextStyle(color: AppTheme.primary,fontSize: 15,height: 1.5,fontWeight: Fonts.medium),
unselectedLabelColor: Colours.c9,
unselectedLabelStyle: const TextStyle(color: Colours.c9,fontSize: 15,height: 1.5),
isScrollable: true,
tabs: tabs
),
),
),
Expanded(
child: TabBarView(
children: List.generate(tabs.length, (index){
return BuildListPage(tag:'$index',model:widget.model);
})
),
)
],
)
),
);
}
}
part of user_discuss_des;
class BuildDiscuss extends StatelessWidget {
final DiscussModel model;
const BuildDiscuss({
Key? key,
required this.model
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.only(left: 10,right: 10,top: 10),
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
color: Colors.white,
boxShadow: [
BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(1.5, 0),
blurRadius: 7.w,
spreadRadius: 0.w,
),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
RichText(text: TextSpan(
children: [
const TextSpan(text: '话题:',style: TextStyle(
fontSize: 14,
height: 1.5,
color: Colours.c3,
)),
TextSpan(text: model.title,style: const TextStyle(
fontSize: 14,
height: 1.5,
color: Colours.c3,
fontWeight: Fonts.medium
)),
]
)),
Gaps.vGaps10,
Container(
height: 0.5,
color: Colours.cF2,
),
_buildItem(model),
Container(
margin:const EdgeInsets.only(left: 15),
child: _buildListView(model.commentAll != null ? model.commentAll!:[])
),
Gaps.vGaps13,
Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(vertical: 5,horizontal: 10),
color: Colours.cF8,
child:Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(model.chapterName??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),),
Text('内容:${model.quoteContent??''}',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),),
],
)
)
],
),
);
}
Widget _buildItem(DiscussModel model,{int type =0}){
return Row(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(17.5),
child: Container(
width: 35,
height: 35,
color: Colors.red,
child: CustomImage.network(url: model.personPic??''),
),
),
Expanded(
child: Container(
margin: const EdgeInsets.only(left: 10,top: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
children: [
Text(model.personName??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),),
Gaps.hGaps10,
type ==0?const SizedBox():const Text('发起人',style: TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary),)
],
),
Text(model.createTime??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c9),)
],
),
Text(model.content??'',style: const TextStyle(fontSize: 13,height: 1.5,color: Colours.c3),),
Row(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 15,
width: 15,
// color: Colors.green,
child: Image.asset('assets/images/love.png'),
),
Text(model.goodNum.toString(),style: const TextStyle(fontSize:12,height: 1.5,color: Colours.c9))
],
),
Gaps.hGaps15,
Row(
children: [
SizedBox(
height: 15,
width: 15,
// color: Colors.yellow,
child: Image.asset('assets/images/discuss_big.png'),
),
Text(model.replyNum.toString(),style: const TextStyle(fontSize:12,height: 1.5,color: Colours.c9))
],
)
],
)
],
),
),
)
],
);
}
Widget _buildListView(List<DiscussModel> data){
return ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (BuildContext context,int index){
return _buildItem(data[index]);
},
itemCount: data.length,
);
}
}
part of user_discuss_des;
class BuildItem extends StatelessWidget {
final CourseModel model;
const BuildItem({
Key? key,
required this.model,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.white,
boxShadow: [
BoxShadow(
color: const Color(0xFFC7C7C7).withOpacity(0.5),
offset: const Offset(3, 0),
blurRadius: 10.w,
spreadRadius: 0.w,
),
],
),
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Column(
children: [
Container(
padding: const EdgeInsets.only(top: 12,bottom: 15),
// color: Colors.red,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 87,
width: 73,
color: Colors.cyan,
),
Container(
height: 87,
margin: const EdgeInsets.only(left: 13),
// color: Colors.green,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(model.bookName??'',style: const TextStyle(fontSize: 14,height: 1.5,fontWeight: Fonts.medium,color: Colours.c3),),
Text(model.authors??'',style: const TextStyle(fontSize: 12,height: 1.5,color: Colours.c6),),
],
),
Text('${model.commentNum.toString()}个讨论',style: const TextStyle(fontSize: 11,height: 1.5,color: AppTheme.primary)),
],
),
)
],
),
)
],
),
);
}
}
part of user_discuss_des;
class BuildListPage extends StatefulWidget {
final String tag;
final CourseModel model;
const BuildListPage({
Key? key,
required this.tag,
required this.model
}) : super(key: key);
@override
State<BuildListPage> createState() => _BuildListPageState();
}
class _BuildListPageState extends State<BuildListPage> with AutomaticKeepAliveClientMixin{
@override
Widget build(BuildContext context) {
return GetBuilder<UserDiscussDesController>(
tag: widget.tag,
init: UserDiscussDesController(widget.tag,widget.model),
builder: (controller) =>CustomPullScrollView(
controller: controller.refreshController,
onLoading: controller.onLoading,
child: ListView.builder(
itemBuilder: (BuildContext context,int index){
DiscussModel model = controller.discuss[index];
return BuildDiscuss(model: model,);
},
itemCount: controller.discuss.length,
),
),
);
}
@override
bool get wantKeepAlive => true;
}
...@@ -21,6 +21,7 @@ import 'package:flutter_book/pages/study_report/index.dart'; ...@@ -21,6 +21,7 @@ import 'package:flutter_book/pages/study_report/index.dart';
import 'package:flutter_book/pages/user_coin/index.dart'; import 'package:flutter_book/pages/user_coin/index.dart';
import 'package:flutter_book/pages/user_coupon/index.dart'; import 'package:flutter_book/pages/user_coupon/index.dart';
import 'package:flutter_book/pages/user_discuss/index.dart'; import 'package:flutter_book/pages/user_discuss/index.dart';
import 'package:flutter_book/pages/user_discuss_des/index.dart';
import 'package:flutter_book/pages/user_feedback/index.dart'; import 'package:flutter_book/pages/user_feedback/index.dart';
import 'package:flutter_book/pages/user_info/index.dart'; import 'package:flutter_book/pages/user_info/index.dart';
import 'package:flutter_book/pages/user_love/index.dart'; import 'package:flutter_book/pages/user_love/index.dart';
......
...@@ -80,6 +80,8 @@ abstract class Routes { ...@@ -80,6 +80,8 @@ abstract class Routes {
static const wrong = 'wrong'; static const wrong = 'wrong';
// 讨论 // 讨论
static const discuss = 'discuss'; static const discuss = 'discuss';
// 讨论详情
static const discussDes = 'discuss_des';
// 优惠券 // 优惠券
static const coupon = 'coupon'; static const coupon = 'coupon';
// 账号安全 // 账号安全
...@@ -423,6 +425,15 @@ abstract class Routes { ...@@ -423,6 +425,15 @@ abstract class Routes {
child: UserNotesDesPage(model: state.extra as CourseModel,) child: UserNotesDesPage(model: state.extra as CourseModel,)
) )
), ),
GoRoute(
path: '/$discussDes',
name: discussDes,
pageBuilder: (context, state) =>CupertinoPage(
name: state.uri.toString(),
key: state.pageKey,
child: UserDiscussDesPage(model: state.extra as CourseModel,)
)
),
] ]
); );
......
差异被折叠。
name: flutter_book name: flutter_book
description: 紫荆云书 description: 紫荆数智学堂
# The following line prevents the package from being accidentally published to # The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages. # pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论