mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
增加错误提示
This commit is contained in:
@@ -127,6 +127,7 @@ class Http {
|
||||
}
|
||||
|
||||
static HttpResponse<T> exceptionHandler<T>(DioError e, String path) {
|
||||
logger.e(e);
|
||||
if (e.response?.statusCode == 401 && !Url.inWhiteList(path)) {
|
||||
if (!getIt<UserInfoViewModel>().useSecretLogined) {
|
||||
exitLogin();
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:qinglong_app/utils/extension.dart';
|
||||
import 'package:qinglong_app/utils/sp_utils.dart';
|
||||
|
||||
import '../main.dart';
|
||||
import 'sp_const.dart';
|
||||
import 'theme.dart';
|
||||
|
||||
@@ -89,7 +91,7 @@ class UserInfoViewModel {
|
||||
|
||||
//如果已经存在host,那就更新
|
||||
|
||||
print("login success $_host $userName $passWord");
|
||||
"login success $_host $userName $passWord".log();
|
||||
|
||||
historyAccounts.removeWhere((element) => element.host == _host);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user