mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: logout
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:PiliPlus/utils/login.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -56,6 +57,8 @@ class MineController extends GetxController {
|
||||
userInfo.value = res['data'];
|
||||
GStorage.userInfo.put('userInfoCache', res['data']);
|
||||
isLogin.value = true;
|
||||
} else {
|
||||
LoginUtils.onLogout();
|
||||
}
|
||||
} else {
|
||||
SmartDialog.showToast(res['msg']);
|
||||
|
||||
@@ -52,11 +52,11 @@ class LoginUtils {
|
||||
..loadingState.value = LoadingState.loading();
|
||||
} catch (_) {}
|
||||
|
||||
try {
|
||||
for (int i = 0; i < tabsConfig.length; i++) {
|
||||
for (int i = 0; i < tabsConfig.length; i++) {
|
||||
try {
|
||||
Get.find<DynamicsTabController>(tag: tabsConfig[i]['tag']).onRefresh();
|
||||
}
|
||||
} catch (_) {}
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
|
||||
static String buvid() {
|
||||
|
||||
@@ -13,8 +13,10 @@ import 'package:PiliPlus/http/search.dart';
|
||||
import 'package:PiliPlus/http/user.dart';
|
||||
import 'package:PiliPlus/http/video.dart';
|
||||
import 'package:PiliPlus/models/bangumi/info.dart';
|
||||
import 'package:PiliPlus/models/common/dynamics_type.dart';
|
||||
import 'package:PiliPlus/models/common/search_type.dart';
|
||||
import 'package:PiliPlus/pages/dynamics/controller.dart';
|
||||
import 'package:PiliPlus/pages/dynamics/tab/controller.dart';
|
||||
import 'package:PiliPlus/pages/home/controller.dart';
|
||||
import 'package:PiliPlus/pages/live/controller.dart';
|
||||
import 'package:PiliPlus/pages/media/controller.dart';
|
||||
@@ -189,6 +191,13 @@ class Utils {
|
||||
..onRefresh();
|
||||
} catch (_) {}
|
||||
|
||||
for (int i = 0; i < tabsConfig.length; i++) {
|
||||
try {
|
||||
Get.find<DynamicsTabController>(tag: tabsConfig[i]['tag'])
|
||||
.onRefresh();
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
try {
|
||||
Get.find<MediaController>()
|
||||
..mid = result['data'].mid
|
||||
|
||||
Reference in New Issue
Block a user