From 13c22b09c1a354580824efab6b49b3f94b6bc0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Fri, 9 Jan 2026 10:45:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/auth_center_page.dart | 3 --- lib/pages/mine/phone_page.dart | 38 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/lib/pages/mine/auth_center_page.dart b/lib/pages/mine/auth_center_page.dart index 151731c..d07935c 100644 --- a/lib/pages/mine/auth_center_page.dart +++ b/lib/pages/mine/auth_center_page.dart @@ -104,9 +104,6 @@ class AuthCenterPage extends StatelessWidget { ), ).onTap(() async{ if(item.index == 1) { - if(item.authed){ - return; - } await Get.to(() => PhonePage()); } else if(item.index == 2){ await Get.to(() => EditInfoPage()); diff --git a/lib/pages/mine/phone_page.dart b/lib/pages/mine/phone_page.dart index 117c3fa..cce7aec 100644 --- a/lib/pages/mine/phone_page.dart +++ b/lib/pages/mine/phone_page.dart @@ -29,25 +29,25 @@ class PhonePage extends StatelessWidget { const SizedBox(height: 12), Text(_encryptPhone(controller.phone.value), style: TextStyle(fontSize: 40, fontWeight: FontWeight.bold)), SizedBox(height: 64), - TDButton( - text: '更换手机号码', - width: MediaQuery.of(context).size.width - 50, - size: TDButtonSize.large, - type: TDButtonType.fill, - shape: TDButtonShape.round, - style: TDButtonStyle( - textColor: Colors.white, - backgroundColor: Color(0xFF7562F9), - ), - activeStyle: TDButtonStyle( - textColor: Colors.white, - backgroundColor: Color(0xC37562F9), - ), - onTap: (){ - controller.tabIndex.value = 1; - }, - ), - SizedBox(height: 200), + // TDButton( + // text: '更换手机号码', + // width: MediaQuery.of(context).size.width - 50, + // size: TDButtonSize.large, + // type: TDButtonType.fill, + // shape: TDButtonShape.round, + // style: TDButtonStyle( + // textColor: Colors.white, + // backgroundColor: Color(0xFF7562F9), + // ), + // activeStyle: TDButtonStyle( + // textColor: Colors.white, + // backgroundColor: Color(0xC37562F9), + // ), + // onTap: (){ + // controller.tabIndex.value = 1; + // }, + // ), + // SizedBox(height: 200), ], ), ), From 9588cf659a864f9025b2cfd7cad031ed7a030fea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Fri, 9 Jan 2026 11:19:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dtoken=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84app=E5=B4=A9=E6=BA=83=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/controller/mine/deactivate_controller.dart | 4 +++- lib/controller/setting/setting_controller.dart | 4 +++- lib/network/network_config.dart | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/controller/mine/deactivate_controller.dart b/lib/controller/mine/deactivate_controller.dart index 9c0a7de..6dc6361 100644 --- a/lib/controller/mine/deactivate_controller.dart +++ b/lib/controller/mine/deactivate_controller.dart @@ -36,7 +36,9 @@ class DeactivateController extends GetxController { } // 先退出 IM 登录 - await IMManager.instance.logout(); + if(IMManager.instance.isInitialized){ + await IMManager.instance.logout(); + } // 清除会话列表和用户信息缓存 if (Get.isRegistered()) { final conversationController = Get.find(); diff --git a/lib/controller/setting/setting_controller.dart b/lib/controller/setting/setting_controller.dart index 32b71af..5a175cb 100644 --- a/lib/controller/setting/setting_controller.dart +++ b/lib/controller/setting/setting_controller.dart @@ -83,7 +83,9 @@ class SettingController extends GetxController { } // 先退出 IM 登录 - await IMManager.instance.logout(); + if(IMManager.instance.isInitialized){ + await IMManager.instance.logout(); + } // 清除会话列表和用户信息缓存 if (Get.isRegistered()) { final conversationController = Get.find(); diff --git a/lib/network/network_config.dart b/lib/network/network_config.dart index b2a14cf..079b1a7 100644 --- a/lib/network/network_config.dart +++ b/lib/network/network_config.dart @@ -182,8 +182,10 @@ class ResponseInterceptor extends Interceptor { print('取消小窗口失败: $e'); } } - - await IMManager.instance.logout(); + + if(IMManager.instance.isInitialized){ + await IMManager.instance.logout(); + } // 清除会话列表和用户信息缓存 if (Get.isRegistered()) { final conversationController = Get.find();