From 882957e2f842a0d54b1b134e21b9cb08869a80ff Mon Sep 17 00:00:00 2001 From: guohaonan <972101775@qq.com> Date: Tue, 12 Mar 2024 14:34:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feature:=E5=8A=A8=E6=80=81=E9=A1=B5?= =?UTF-8?q?=E7=9A=84=E9=94=99=E8=AF=AF=E6=8C=89=E9=92=AE=E5=9C=A8=E6=9C=AA?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81=E4=B8=8B=E7=9A=84=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E4=B8=BA=E7=9B=B4=E6=8E=A5=E8=B7=B3=E8=BD=AC=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/dynamics/view.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/pages/dynamics/view.dart b/lib/pages/dynamics/view.dart index 4a92cdfb8..5fa06c91e 100644 --- a/lib/pages/dynamics/view.dart +++ b/lib/pages/dynamics/view.dart @@ -14,6 +14,7 @@ import 'package:pilipala/pages/main/index.dart'; import 'package:pilipala/utils/feed_back.dart'; import 'package:pilipala/utils/storage.dart'; +import '../mine/controller.dart'; import 'controller.dart'; import 'widgets/dynamic_panel.dart'; import 'widgets/up_panel.dart'; @@ -28,6 +29,7 @@ class DynamicsPage extends StatefulWidget { class _DynamicsPageState extends State with AutomaticKeepAliveClientMixin { final DynamicsController _dynamicsController = Get.put(DynamicsController()); + final MineController mineController = Get.put(MineController()); late Future _futureBuilderFuture; late Future _futureBuilderFutureUp; Box userInfoCache = GStrorage.userInfo; @@ -256,6 +258,16 @@ class _DynamicsPageState extends State } }, ); + } else if (data['msg'] == "账号未登录") { + return HttpError( + errMsg: data['msg'], + btnText: "去登录", + fn: () { + setState(() { + mineController.onLogin(); + }); + }, + ); } else { return HttpError( errMsg: data['msg'], From 357133fa975d0c059e897117db849536d5444be4 Mon Sep 17 00:00:00 2001 From: guohaonan <972101775@qq.com> Date: Thu, 14 Mar 2024 10:00:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=E5=8E=BB=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84setState?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/dynamics/view.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/pages/dynamics/view.dart b/lib/pages/dynamics/view.dart index 5fa06c91e..fe594a43f 100644 --- a/lib/pages/dynamics/view.dart +++ b/lib/pages/dynamics/view.dart @@ -263,9 +263,7 @@ class _DynamicsPageState extends State errMsg: data['msg'], btnText: "去登录", fn: () { - setState(() { - mineController.onLogin(); - }); + mineController.onLogin(); }, ); } else {