From 881f0da670f20c401c1e1d08b36253abb28f72d2 Mon Sep 17 00:00:00 2001 From: zjf <zhangjf@probim.com.cn> Date: Mon, 13 Mar 2023 13:35:39 +0800 Subject: [PATCH] token 过期 diss 和 pressent 间隔一下 --- IphoneBIMe/IphoneBIMe/Classes/Tools/PBNetworkTools.m | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/IphoneBIMe/IphoneBIMe/Classes/Tools/PBNetworkTools.m b/IphoneBIMe/IphoneBIMe/Classes/Tools/PBNetworkTools.m index 80532f1..b396ab0 100644 --- a/IphoneBIMe/IphoneBIMe/Classes/Tools/PBNetworkTools.m +++ b/IphoneBIMe/IphoneBIMe/Classes/Tools/PBNetworkTools.m @@ -151,9 +151,14 @@ PBNetworkModel *networkModel = [PBNetworkModel yy_modelWithJSON:str]; if ([networkModel.Msg isEqualToString:@"Token已过期"]) { [PBNoteCenter postNotificationName: PBNoteCenterDismissTabBarController object:nil]; - [PBNoteCenter postNotificationName:@"PBNoteCenterTokenExpired" object:nil]; + [self performSelector:@selector(toLogin) withObject:nil afterDelay:0.3f]; + } } +- (void)toLogin { + [PBNoteCenter postNotificationName:@"PBNoteCenterTokenExpired" object:nil]; +} + #pragma mark =================================新接口======================================= #pragma mark - 登录 - (void)loginWithUserName:(NSString *)userName andPassword:(NSString *)password andCallBack:(void (^) (NSURLSessionDataTask *task,id response, NSError *error))callBack { -- Gitblit v1.9.3