Merge remote-tracking branch 'origin/master'
commit
6fa38a51be
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue