自习室优化ok

This commit is contained in:
zhutao
2025-11-28 18:01:09 +08:00
parent 57305c5804
commit 54bf2dcee7
38 changed files with 527 additions and 117 deletions

View File

@@ -7,9 +7,9 @@ class UserStore extends ChangeNotifier {
UserInfoDto? userInfo;
String token = "";
Future<void> init() async{
Future<void> init() async {
token = await getToken();
await setUserInfo();
await setUserInfo();
notifyListeners();
}
@@ -41,4 +41,10 @@ class UserStore extends ChangeNotifier {
token = '';
notifyListeners();
}
///强制退出(不调用接口、不通知 UI
static Future<void> forceLogout() async {
await Storage.remove('token');
await Storage.remove('user_info');
}
}