token 过期 diss 和 pressent 间隔一下
| | |
| | | PBNetworkModel *networkModel = [PBNetworkModel yy_modelWithJSON:str]; |
| | | if ([networkModel.Msg isEqualToString:@"Token已过期"]) { |
| | | [PBNoteCenter postNotificationName: PBNoteCenterDismissTabBarController 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 { |