Jolie 2 months ago
parent
commit
7282efabed
5 changed files with 29 additions and 26 deletions
  1. 4
      lib/controller/mine/deactivate_controller.dart
  2. 4
      lib/controller/setting/setting_controller.dart
  3. 6
      lib/network/network_config.dart
  4. 3
      lib/pages/mine/auth_center_page.dart
  5. 38
      lib/pages/mine/phone_page.dart

4
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<ConversationController>()) {
final conversationController = Get.find<ConversationController>();

4
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<ConversationController>()) {
final conversationController = Get.find<ConversationController>();

6
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<ConversationController>()) {
final conversationController = Get.find<ConversationController>();

3
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());

38
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),
],
),
),

Loading…
Cancel
Save