From a9a9b03deb4d0ff853e0d1f330183e8776ce2dab Mon Sep 17 00:00:00 2001 From: "1147192855@qq.com" <1147192855@qq.com> Date: Thu, 14 Mar 2024 16:06:23 +0800 Subject: [PATCH] no message --- .../homework_tasks_view_item.dart | 104 +++++++++--- .../lib/pages/homework_correction/index.dart | 40 +++-- .../pages/job_list_participate_in_class.dart | 158 +++++++++--------- .../lib/utils/request/rest_client.dart | 7 +- 4 files changed, 191 insertions(+), 118 deletions(-) diff --git a/marking_app/lib/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_item.dart b/marking_app/lib/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_item.dart index 0ac78a6..1b65bfd 100644 --- a/marking_app/lib/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_item.dart +++ b/marking_app/lib/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_item.dart @@ -1,5 +1,3 @@ -import 'package:achievement_view/achievement_view.dart'; -import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -7,7 +5,6 @@ import 'package:functional_widget_annotation/functional_widget_annotation.dart'; import 'package:marking_app/common/mixin/common.dart'; import 'package:marking_app/common/model/common/base_structure_result.dart'; import 'package:marking_app/common/model/job/job_concerned_with_student.dart'; -import 'package:marking_app/common/model/job/job_concerned_with_student_params.dart'; import 'package:marking_app/common/model/job/job_task_item.dart'; import 'package:marking_app/routes/RouterManager.dart'; import 'package:marking_app/utils/index.dart'; @@ -210,7 +207,7 @@ Widget $completedHomeworkView(BuildContext context, quickText( jobTaskItem.createTime.substring(0, 10), color: Color.fromRGBO(97, 97, 97, 1), - size: 14.sp, + size: 12.sp, fontWeight: FontWeight.w500, ), quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.w500), @@ -543,7 +540,7 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt children: [ SizedBox(height: 30.h), Container( - padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 10.w), + padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 10.w), width: double.infinity, decoration: BoxDecoration( borderRadius: BorderRadius.circular(6.r), @@ -564,16 +561,16 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt Row( children: [ Container( - width: 32.w, + width: isPad() ? 32.w : 38.w, height: 18.h, alignment: Alignment.center, - padding: EdgeInsets.only(left: 2.w), + padding: EdgeInsets.only(left: isPad() ? 2.w : 3.w), decoration: BoxDecoration( color: jobTaskItem.markingTypeEnum.name == '作业' ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1), borderRadius: BorderRadius.only( - topLeft: Radius.circular(18.r), + topLeft: Radius.circular(14.r), topRight: Radius.circular(3.r), bottomLeft: Radius.circular(4.r), bottomRight: Radius.circular(4.r), @@ -584,47 +581,43 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt ), quickText( jobTaskItem.title, - size: 16.sp, + size: isPad() ? 14.sp : 16.sp, color: Color.fromRGBO(70, 70, 70, 1), fontWeight: FontWeight.bold, ) ], ), - SizedBox(height: 22.h), + SizedBox(height: 10.h), Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ quickText( jobTaskItem.subjectName, color: Color.fromRGBO(97, 97, 97, 1), - size: 14.sp, - fontWeight: FontWeight.w600, + size: 12.sp, ), quickText(' / ', - color: Color.fromRGBO(130, 130, 130, 1), size: 12.sp, fontWeight: FontWeight.w500), + color: Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), Container( child: Row( crossAxisAlignment: CrossAxisAlignment.end, children: [ - quickText('题量:', color: Color.fromRGBO(130, 130, 130, 1), size: 13.sp), + quickText('题量:', color: Color.fromRGBO(130, 130, 130, 1), size: 11.sp), quickText( jobTaskItem.totalCount, color: Color.fromRGBO(97, 97, 97, 1), - size: 14.sp, - fontWeight: FontWeight.w500, + size: 13.sp, ), ], ), ), quickText(' / ', - color: Color.fromRGBO(130, 130, 130, 1), size: 12.sp, fontWeight: FontWeight.w500), - quickText( - jobTaskItem.createTime.substring(0, 16), - color: Color.fromRGBO(97, 97, 97, 1), - size: 12.sp, - ), + color: Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), + quickText(jobTaskItem.createTime.substring(0, 16), + color: Color.fromRGBO(97, 97, 97, 1), size: 12.sp), ], ), + FavoriteButton(jobTaskItem.id, jobTaskItem.title), ], ), ), @@ -679,3 +672,70 @@ typedef ShowStudentsCall = Future Function( bool? submitted, String? className, ]); + +/// 收藏夹按钮 +class FavoriteButton extends HookWidget with CommonMixin { + final int jobId; + final String jobName; + EdgeInsets? margin; + FavoriteButton(this.jobId, this.jobName, {this.margin, super.key}); + + Future getInvolveClasses() async { + try { + RestClient _client = await getClient(); + var result = await _client.getListOfJobFavoriteNumber(jobId); + + if (result.success && (result.data?.isNotEmpty ?? false)) { + return result.data!.map((e) => e.count).reduce((value, element) => value + element); + } + } catch (e) { + print(e); + } + return 0; + } + + // 收藏夹 + void bookmarks(BuildContext context) { + RouterManager.router.navigateTo( + context, + RouterManager.jobFavoritePagePath + '?jobId=$jobId&jobName=${Uri.encodeComponent(jobName)}', + transition: getTransition(), + ); + } + + @override + Widget build(BuildContext context) { + var favoriteNumber = useState(0); + useEffect(() { + getInvolveClasses().then((value) { + var favoriteCount = favoriteNumber.value; + if (favoriteCount != value) favoriteNumber.value = value; + }); + return () {}; + }, []); + if (favoriteNumber.value <= 0) return Container(); + margin ??= EdgeInsets.only(top: 15.h); + return Row( + children: [ + Container( + margin: margin, + child: Material( + color: Color.fromRGBO(244, 244, 244, 1), + borderRadius: BorderRadius.circular(20.r), + child: InkWell( + onTap: () => bookmarks(context), + borderRadius: BorderRadius.circular(8.r), + child: Container( + alignment: Alignment.center, + padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w), + decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), + child: quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)), + ), + ), + ), + ), + Expanded(child: SizedBox()) + ], + ); + } +} diff --git a/marking_app/lib/pages/homework_correction/index.dart b/marking_app/lib/pages/homework_correction/index.dart index dd50eea..e0c4d8b 100644 --- a/marking_app/lib/pages/homework_correction/index.dart +++ b/marking_app/lib/pages/homework_correction/index.dart @@ -356,11 +356,9 @@ Widget $easyRefresh({ crossAxisCount: 2, //横轴三个子widget mainAxisSpacing: 10.h, crossAxisSpacing: 6.w, - childAspectRatio: 2.2 //宽高比为1时,子widget + childAspectRatio: 2.0 //宽高比为1时,子widget ), - children: data.map((e) { - return $ReviewedItem(jobTaskItem: e); - }).toList(), + children: data.map((e) => $ReviewedItem(jobTaskItem: e)).toList(), ) : ListView.builder( padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w), @@ -408,6 +406,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) { Padding( padding: padEdg, child: Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( width: 32.w, @@ -419,7 +418,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) { ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1), borderRadius: BorderRadius.only( - topLeft: Radius.circular(18.r), + topLeft: Radius.circular(14.r), topRight: Radius.circular(3.r), bottomLeft: Radius.circular(4.r), bottomRight: Radius.circular(4.r), @@ -428,11 +427,9 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) { margin: EdgeInsets.only(right: 4.w), child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp), ), - quickText( - jobTaskItem.title, - size: 16.sp, - color: Color.fromRGBO(70, 70, 70, 1), - fontWeight: FontWeight.bold, + Expanded( + child: quickText(jobTaskItem.title, + size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2, fontWeight: FontWeight.w500), ) ], ), @@ -451,21 +448,32 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) { ), quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500), quickText( - '参与班级:${jobTaskItem.taskCount}', + '参与班级:', + color: Color.fromRGBO(76, 199, 147, 1), + size: 9.sp, + ), + quickText( + '${jobTaskItem.taskCount}', color: Color.fromRGBO(76, 199, 147, 1), size: 10.sp, - fontWeight: FontWeight.w600, ), quickText(' / ', color: Color.fromRGBO(116, 145, 253, 1), size: 10.sp, fontWeight: FontWeight.w500), quickText( '科目:' + jobTaskItem.subjectName, color: Color.fromRGBO(116, 145, 253, 1), - size: 10.sp, - fontWeight: FontWeight.w600, + size: 9.sp, ), ], ), ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 10.w), + child: FavoriteButton( + jobTaskItem.id, + jobTaskItem.title, + margin: EdgeInsets.only(top: 4.h, bottom: 6.h), + ), + ), GestureDetector( onTap: () => easyThrottle('go_to_homework_report', () { RouterManager.router.navigateTo( @@ -512,7 +520,7 @@ Widget $theTabBar({required TabController controller, ValueChanged? onTap, if (customTime != null) { customTimeStr = customTime.startDate?.toString().substring(0, 10) ?? ''; if (customTime.endDate != null) { - print(customTime.startDate!.year == customTime.endDate!.year); + // print(customTime.startDate!.year == customTime.endDate!.year); if (!isPad() && customTime.startDate!.year == customTime.endDate!.year) { customTimeStr = customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}'; @@ -605,7 +613,7 @@ Widget $completedJobConditionFilter(BuildContext context, } return Container( - height: 36.h, + height: 39.h, padding: EdgeInsets.only(left: 4.w, right: 12.w), decoration: BoxDecoration( color: Color.fromRGBO(244, 244, 244, 1), diff --git a/marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.dart b/marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.dart index 2172a8d..e3904bd 100644 --- a/marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.dart +++ b/marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.dart @@ -376,29 +376,44 @@ class _JobListParticipateInClassState extends State w @override Widget build(BuildContext context) { - return Scaffold( - backgroundColor: const Color.fromRGBO(245, 245, 245, 1), - appBar: AppBar( - leading: IconButton( - icon: Icon(Icons.arrow_back_ios, color: Color.fromRGBO(51, 51, 51, 1)), - onPressed: () => Navigator.of(context).pop()), - title: Container( - child: - quickText(widget.jobName, size: 16.sp, color: Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500), - alignment: Alignment.center, + return WillPopScope( + onWillPop: () async { + Navigator.of(context).pop(isRefresh); + return false; + }, + child: Scaffold( + backgroundColor: const Color.fromRGBO(245, 245, 245, 1), + appBar: AppBar( + leading: IconButton( + icon: Icon(Icons.arrow_back_ios, color: Color.fromRGBO(51, 51, 51, 1)), + onPressed: () => Navigator.of(context).pop(isRefresh)), + title: Container( + child: quickText(widget.jobName, + size: 14.sp, color: Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500), + alignment: Alignment.center, + ), + backgroundColor: Colors.white, ), - backgroundColor: Colors.white, - ), - body: MyFutureBuilder.buildFutureBuilderOfSingleInstance?>(context, _future, (value) { - if (value == null) return Container(); - value.forEach((e) { - e.collectNumber = favoriteMap['${e.dpcSchoolId}+${e.dpcGradeId}+${e.className}'] ?? 0; - }); - bool thePadTerminal = isPad(); - if (widget.completed) { - // 已完成 - if (thePadTerminal) - return TabletEndCompleted( + body: MyFutureBuilder.buildFutureBuilderOfSingleInstance?>(context, _future, (value) { + if (value == null) return Container(); + value.forEach((e) { + e.collectNumber = favoriteMap['${e.dpcSchoolId}+${e.dpcGradeId}+${e.className}'] ?? 0; + }); + bool thePadTerminal = isPad(); + if (widget.completed) { + // 已完成 + if (thePadTerminal) + return TabletEndCompleted( + data: value, + genderName: widget.genderName, + bookmarks: bookmarks, + jobViewReport: jobViewReport, + quickDataCheck: quickDataCheck, + showStudentList: showStudentList, + ); + + // 已完成手机端 + return MobileEndCompleted( data: value, genderName: widget.genderName, bookmarks: bookmarks, @@ -406,21 +421,23 @@ class _JobListParticipateInClassState extends State w quickDataCheck: quickDataCheck, showStudentList: showStudentList, ); + } - // 已完成手机端 - return MobileEndCompleted( - data: value, - genderName: widget.genderName, - bookmarks: bookmarks, - jobViewReport: jobViewReport, - quickDataCheck: quickDataCheck, - showStudentList: showStudentList, - ); - } + // 未完成页面 + if (thePadTerminal) + return TabletEnd( + data: value, + genderName: widget.genderName, + bookmarks: bookmarks, + endReview: endReview, + goToReview: goToReview, + jobViewReport: jobViewReport, + quickDataCheck: quickDataCheck, + oneClickReview: oneClickReview, + showStudentList: showStudentList, + ); - // 未完成页面 - if (thePadTerminal) - return TabletEnd( + return MobileEnd( data: value, genderName: widget.genderName, bookmarks: bookmarks, @@ -431,19 +448,8 @@ class _JobListParticipateInClassState extends State w oneClickReview: oneClickReview, showStudentList: showStudentList, ); - - return MobileEnd( - data: value, - genderName: widget.genderName, - bookmarks: bookmarks, - endReview: endReview, - goToReview: goToReview, - jobViewReport: jobViewReport, - quickDataCheck: quickDataCheck, - oneClickReview: oneClickReview, - showStudentList: showStudentList, - ); - }), + }), + ), ); } } @@ -547,7 +553,7 @@ class TabletEndCompleted extends StatelessWidget { var padingEdg = EdgeInsets.only(left: 10.w, right: 10.w); return Container( width: ScreenUtil().screenWidth, - padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 16.h), + padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 16.h), child: GridView( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, //横轴三个子widget @@ -608,13 +614,13 @@ class TabletEndCompleted extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(104, 136, 253, 1), borderRadius: BorderRadius.circular(16.r), child: InkWell( onTap: () => easyThrottle( - 'OneClickReview', () => showStudentList([taskItem.id], taskItem.className)), + 'OneClickReview', () => showStudentList([taskItem.id], taskItem.className, true)), borderRadius: BorderRadius.circular(8.r), child: Container( alignment: Alignment.center, @@ -629,13 +635,13 @@ class TabletEndCompleted extends StatelessWidget { ), Expanded(flex: 1, child: SizedBox()), Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), child: InkWell( onTap: () => easyThrottle( - 'OneClickReview', () => showStudentList([taskItem.id], taskItem.className, false)), + 'OneClickReview', () => showStudentList([taskItem.id], taskItem.className)), borderRadius: BorderRadius.circular(8.r), child: Container( alignment: Alignment.center, @@ -649,7 +655,7 @@ class TabletEndCompleted extends StatelessWidget { ), Expanded(flex: 1, child: SizedBox()), Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), @@ -660,7 +666,7 @@ class TabletEndCompleted extends StatelessWidget { alignment: Alignment.center, padding: EdgeInsets.symmetric(vertical: 4.h), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), - child: quickText('收藏夹(${taskItem.collectNumber})', + child: quickText(taskItem.collectNumber <= 0 ? '收藏夹' : '收藏夹(${taskItem.collectNumber})', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)), ), ), @@ -795,13 +801,13 @@ class MobileEndCompleted extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(104, 136, 253, 1), borderRadius: BorderRadius.circular(16.r), child: InkWell( onTap: () => - easyThrottle('OneClickReview', () => showStudentList([task.id], task.className)), + easyThrottle('OneClickReview', () => showStudentList([task.id], task.className, true)), borderRadius: BorderRadius.circular(8.r), child: Container( alignment: Alignment.center, @@ -816,13 +822,13 @@ class MobileEndCompleted extends StatelessWidget { ), Expanded(flex: 1, child: SizedBox()), Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), child: InkWell( onTap: () => - easyThrottle('OneClickReview', () => showStudentList([task.id], task.className, false)), + easyThrottle('OneClickReview', () => showStudentList([task.id], task.className)), borderRadius: BorderRadius.circular(8.r), child: Container( alignment: Alignment.center, @@ -836,7 +842,7 @@ class MobileEndCompleted extends StatelessWidget { ), Expanded(flex: 1, child: SizedBox()), Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), @@ -1027,7 +1033,7 @@ Widget $itemDataViewOfPad( children: task.isFinish ? [ Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), @@ -1038,19 +1044,19 @@ Widget $itemDataViewOfPad( alignment: Alignment.center, padding: EdgeInsets.symmetric(vertical: 3.h), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), - child: quickText('收藏夹(${task.collectNumber})', + child: quickText(task.collectNumber <= 0 ? '收藏夹' : '收藏夹(${task.collectNumber})', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)), ), ), )), Expanded(flex: 1, child: SizedBox()), - Expanded(flex: 3, child: SizedBox()), + Expanded(flex: 4, child: SizedBox()), Expanded(flex: 1, child: SizedBox()), - Expanded(flex: 3, child: SizedBox()), + Expanded(flex: 4, child: SizedBox()), ] : [ Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(104, 136, 253, 1), borderRadius: BorderRadius.circular(16.r), @@ -1070,7 +1076,7 @@ Widget $itemDataViewOfPad( ), Expanded(flex: 1, child: SizedBox()), Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), @@ -1088,7 +1094,7 @@ Widget $itemDataViewOfPad( ), Expanded(flex: 1, child: SizedBox()), Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), @@ -1288,7 +1294,7 @@ Widget $itemDataView( children: task.isFinish ? [ Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), @@ -1299,19 +1305,19 @@ Widget $itemDataView( alignment: Alignment.center, padding: EdgeInsets.symmetric(vertical: 5.h), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), - child: quickText('收藏夹(${task.collectNumber})', + child: quickText(task.collectNumber <= 0 ? '收藏夹' : '收藏夹(${task.collectNumber})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)), ), ), )), Expanded(flex: 1, child: SizedBox()), - Expanded(flex: 3, child: SizedBox()), + Expanded(flex: 4, child: SizedBox()), Expanded(flex: 1, child: SizedBox()), - Expanded(flex: 3, child: SizedBox()), + Expanded(flex: 4, child: SizedBox()), ] : [ Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(104, 136, 253, 1), borderRadius: BorderRadius.circular(16.r), @@ -1331,7 +1337,7 @@ Widget $itemDataView( ), Expanded(flex: 1, child: SizedBox()), Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), @@ -1349,7 +1355,7 @@ Widget $itemDataView( ), Expanded(flex: 1, child: SizedBox()), Expanded( - flex: 3, + flex: 4, child: Material( color: Color.fromRGBO(244, 244, 244, 1), borderRadius: BorderRadius.circular(20.r), @@ -1360,7 +1366,7 @@ Widget $itemDataView( alignment: Alignment.center, padding: EdgeInsets.symmetric(vertical: 5.h), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), - child: quickText('收藏夹(${task.collectNumber})', + child: quickText(task.collectNumber <= 0 ? '收藏夹' : '收藏夹(${task.collectNumber})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)), ), ), @@ -1546,7 +1552,7 @@ Widget $completedHomeworkProgressBar( percent: percent, center: Text( percentStr, - style: TextStyle(color: Colors.white, fontSize: 8.sp), + style: TextStyle(color: Colors.white, fontSize: 6.sp), ), // linearStrokeCap: LinearStrokeCap.butt, progressColor: color, diff --git a/marking_app/lib/utils/request/rest_client.dart b/marking_app/lib/utils/request/rest_client.dart index e4c5c1e..d4420d0 100644 --- a/marking_app/lib/utils/request/rest_client.dart +++ b/marking_app/lib/utils/request/rest_client.dart @@ -274,7 +274,7 @@ abstract class RestClient { @the_retrofit.GET("/api/jobs/job-report") Future> getJobReport(@the_retrofit.Queries() Map params); - // 作业 => 获取作业报告 + // 作业 => 获取作业班级列表(参与班级) @the_retrofit.GET("/api/jobs/student-job-for-class") Future>> getJobReportJoinClasses(@the_retrofit.Query("jobId") int jobId); @@ -340,9 +340,8 @@ abstract class RestClient { @the_retrofit.POST("/api/read/jc-job-read-level") Future getSetJobReadLevel(@the_retrofit.Body() JobLevelSetParams params); - // 作业 => 取消收藏 @the_retrofit.POST("/api/jobs/de-fav-student-job") - Future getJobDeFavorites( - @the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId,@the_retrofit.Field("questionPage") int questionPage); + Future getJobDeFavorites(@the_retrofit.Field("jobId") int jobId, + @the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage); }