//更新token(同步更新)
CommonViewModel *vm=[CommonViewModel new];
[vm refreshLoginSuccess:^(BaseResponseData *result) {
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_LOGINCHANGE object:@YES];
//这里改变RunLoop模式
CFRunLoopStop(CFRunLoopGetMain());
} failure:^(BaseResponseData *result) {
NSDictionary *userInfo=@{@"isPresentLoginVC":@(0)};
[[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_LOGINCHANGE object:@NO userInfo:userInfo];
//这里改变RunLoop模式
CFRunLoopStop(CFRunLoopGetMain());
}];
//这里恢复RunLoop
CFRunLoopRun();
网友评论