fix
This commit is contained in:
@ -36,10 +36,10 @@ class _HomePageState extends State<HomePage>
|
|||||||
showUserBottomSheet() {
|
showUserBottomSheet() {
|
||||||
feedBack();
|
feedBack();
|
||||||
final MainController mainController = Get.put(MainController());
|
final MainController mainController = Get.put(MainController());
|
||||||
if (mainController.navigationBars
|
int mineItemIndex = mainController.navigationBars
|
||||||
.where((item) => item['label'] == "我的")
|
.indexWhere((item) => item['label'] == "我的");
|
||||||
.isNotEmpty) {
|
if (mineItemIndex != -1) {
|
||||||
mainController.pageController.jumpToPage(2);
|
mainController.pageController.jumpToPage(mineItemIndex);
|
||||||
} else {
|
} else {
|
||||||
Get.toNamed('/mine');
|
Get.toNamed('/mine');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,9 +98,14 @@ class _MinePageState extends State<MinePage>
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
_buildMenuSection(context),
|
_buildMenuSection(context),
|
||||||
Divider(
|
Obx(
|
||||||
height: 25,
|
() => Visibility(
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
visible: ctr.userLogin.value,
|
||||||
|
child: Divider(
|
||||||
|
height: 25,
|
||||||
|
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Obx(
|
Obx(
|
||||||
() => ctr.userLogin.value
|
() => ctr.userLogin.value
|
||||||
@ -320,8 +325,8 @@ class _MinePageState extends State<MinePage>
|
|||||||
future: ctr.queryFavFolder(),
|
future: ctr.queryFavFolder(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState == ConnectionState.done) {
|
if (snapshot.connectionState == ConnectionState.done) {
|
||||||
Map data = snapshot.data as Map;
|
Map? data = snapshot.data;
|
||||||
if (data['status']) {
|
if (data != null && data['status']) {
|
||||||
List favFolderList = ctr.favFolderData.value.list!;
|
List favFolderList = ctr.favFolderData.value.list!;
|
||||||
int favFolderCount = ctr.favFolderData.value.count!;
|
int favFolderCount = ctr.favFolderData.value.count!;
|
||||||
bool flag = favFolderCount > favFolderList.length;
|
bool flag = favFolderCount > favFolderList.length;
|
||||||
@ -369,7 +374,7 @@ class _MinePageState extends State<MinePage>
|
|||||||
} else {
|
} else {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 110,
|
height: 110,
|
||||||
child: Center(child: Text(data['msg'])),
|
child: Center(child: Text(data?['msg'] ?? '')),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user