修复无限登陆的问题

hmxc
小赖 4 years ago
parent 869718a329
commit 6a6cecac38

@ -178,7 +178,7 @@ class NetUtil {
_parseRequestError(BaseModel model, {bool showMessage = false}) { _parseRequestError(BaseModel model, {bool showMessage = false}) {
final userProvider = Provider.of<UserProvider>(Get.context, listen: false); final userProvider = Provider.of<UserProvider>(Get.context, listen: false);
if (!model.status && model.message == '登录失效,请登录') { if (!model.status && model.message == '登录失效,请登录' && userProvider.isLogin) {
userProvider.logout(); userProvider.logout();
Get.offAll(SignInPage()); Get.offAll(SignInPage());
} }

Loading…
Cancel
Save