|
@@ -170,9 +170,12 @@ class NetUtil { |
|
|
///非法用户 |
|
|
///非法用户 |
|
|
if (result[GlobalConfig.HTTP_RESPONSE_KEY_CODE]?.toString() == '401000') { |
|
|
if (result[GlobalConfig.HTTP_RESPONSE_KEY_CODE]?.toString() == '401000') { |
|
|
try { |
|
|
try { |
|
|
Future.delayed(Duration(seconds: 0)).then((onValue) { |
|
|
|
|
|
BuildContext context = navigatorKey.currentState.overlay.context; |
|
|
|
|
|
Provider.of<UserInfoNotifier>(context, listen: false).unLogin(); |
|
|
|
|
|
|
|
|
Future.delayed(Duration(seconds: 0)).then((onValue) async { |
|
|
|
|
|
String token= await SharedPreferencesUtil.getStringValue(GlobalConfig.SHARED_KEY_TOKEN); |
|
|
|
|
|
if(token!=null&&token.length>2){ |
|
|
|
|
|
BuildContext context = navigatorKey.currentState.overlay.context; |
|
|
|
|
|
Provider.of<UserInfoNotifier>(context, listen: false).unLogin(); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} catch (e, s) { |
|
|
} catch (e, s) { |
|
|
Logger.error(e, s); |
|
|
Logger.error(e, s); |
|
|