2026.3.13 修改通知

master
xufei 2026-03-13 11:25:15 +08:00
parent f4f2b3c566
commit 18ec2a746b
1 changed files with 20 additions and 18 deletions

View File

@ -14,6 +14,8 @@ import 'package:qhd_prevention/pages/notif/notif_detail_page.dart';
import 'package:qhd_prevention/tools/tools.dart'; import 'package:qhd_prevention/tools/tools.dart';
import '../../http/ApiService.dart'; import '../../http/ApiService.dart';
class NotifPage extends StatefulWidget { class NotifPage extends StatefulWidget {
const NotifPage({Key? key}) : super(key: key); const NotifPage({Key? key}) : super(key: key);
@ -110,10 +112,10 @@ class NotifPageState extends RouteAwareState<NotifPage>
final routeTitle = route.title; final routeTitle = route.title;
switch (routeTitle) { switch (routeTitle) {
case '公告': case '公告通知':
newPlatformAnnouncement = route.hasMenu; newPlatformAnnouncement = route.hasMenu;
break; break;
case '通知': case '平台提醒':
newEnterpriseAnnouncement = route.hasMenu; newEnterpriseAnnouncement = route.hasMenu;
break; break;
} }
@ -240,16 +242,16 @@ class NotifPageState extends RouteAwareState<NotifPage>
// Tab // Tab
final List<Widget> visibleTabs = []; final List<Widget> visibleTabs = [];
if (_showPlatformAnnouncement) { if (_showPlatformAnnouncement) {
visibleTabs.add(const Tab(text: '公告')); visibleTabs.add(const Tab(text: '公告通知'));
} }
if (_showEnterpriseAnnouncement) { if (_showEnterpriseAnnouncement) {
visibleTabs.add(const Tab(text: '通知')); visibleTabs.add(const Tab(text: '平台提醒'));
} }
// Tab // Tab
if (visibleTabs.isEmpty) { if (visibleTabs.isEmpty) {
return Scaffold( return Scaffold(
appBar: MyAppbar(title: '通知', isBack: false), appBar: MyAppbar(title: '通知公告', isBack: false),
body: Center( body: Center(
child: Text( child: Text(
'暂无通知权限', '暂无通知权限',
@ -260,7 +262,7 @@ class NotifPageState extends RouteAwareState<NotifPage>
} }
return Scaffold( return Scaffold(
appBar: MyAppbar(title: '通知', isBack: false), appBar: MyAppbar(title: '通知公告', isBack: false),
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
FocusScope.of(context).unfocus(); FocusScope.of(context).unfocus();
@ -281,7 +283,7 @@ class NotifPageState extends RouteAwareState<NotifPage>
width: 4.0, width: 4.0,
color: const Color(0xFF1C61FF), color: const Color(0xFF1C61FF),
), ),
insets: EdgeInsets.symmetric(horizontal: 35.0), insets: EdgeInsets.symmetric(horizontal: 6.0),
), ),
labelColor: const Color(0xFF1C61FF), labelColor: const Color(0xFF1C61FF),
unselectedLabelColor: Colors.grey, unselectedLabelColor: Colors.grey,