opt: logout

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-14 12:26:26 +08:00
parent c1104c931b
commit cb3f72959f
3 changed files with 16 additions and 4 deletions

View File

@@ -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']);