diff --git a/xplan-ios/Base/MVP/Model/BaseModel.h b/xplan-ios/Base/MVP/Model/BaseModel.h index a2c8e003..56af284b 100644 --- a/xplan-ios/Base/MVP/Model/BaseModel.h +++ b/xplan-ios/Base/MVP/Model/BaseModel.h @@ -16,6 +16,11 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic , copy) NSString *message; ///注销的时间戳 因为后端返回的内容和code在同一层级 安卓已经发出去了 兼容就写在这里吧 请不要模仿 @property (nonatomic,assign) long long cancelDate; +///账号封禁返回的code +///时间 +@property (nonatomic,copy) NSString * date; +///封禁的理由 +@property (nonatomic,copy) NSString *reason; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Base/MVP/Presenter/BaseMvpPresenter.m b/xplan-ios/Base/MVP/Presenter/BaseMvpPresenter.m index 57034f8c..a34f8202 100644 --- a/xplan-ios/Base/MVP/Presenter/BaseMvpPresenter.m +++ b/xplan-ios/Base/MVP/Presenter/BaseMvpPresenter.m @@ -81,6 +81,10 @@ case 401: // 登录过期 [self logout]; return; + case 407: + case 408: + [[self getView] accountBanned:data]; + return; case 1415: // 未完善用户信息 [[self getView] completeUserInfo]; return; diff --git a/xplan-ios/Base/MVP/Protocol/BaseMvpProtocol.h b/xplan-ios/Base/MVP/Protocol/BaseMvpProtocol.h index c525b702..e5853db7 100644 --- a/xplan-ios/Base/MVP/Protocol/BaseMvpProtocol.h +++ b/xplan-ios/Base/MVP/Protocol/BaseMvpProtocol.h @@ -9,7 +9,7 @@ #import "BaseViewController.h" NS_ASSUME_NONNULL_BEGIN - +@class BaseModel; @protocol BaseMvpProtocol - (void)tokenInvalid; @@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN ///实名认证弹窗 - (void)showRealNameAuthenticationTipsAlertView; +///封禁账号 +- (void)accountBanned:(BaseModel *)data; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Base/MVP/View/MvpViewController.m b/xplan-ios/Base/MVP/View/MvpViewController.m index f7236a5c..9d1e5c83 100644 --- a/xplan-ios/Base/MVP/View/MvpViewController.m +++ b/xplan-ios/Base/MVP/View/MvpViewController.m @@ -99,4 +99,23 @@ }]; } +///封禁账号 +- (void)accountBanned:(BaseModel *)data { + TTAlertConfig * config = [[TTAlertConfig alloc] init]; + config.title = @"您被封号了"; + NSString *dateDes = [PLTimeUtil getDateWithYYMMDD:data.date]; + NSString * title = [NSString stringWithFormat:@"您的账号因%@被封禁\n解封时间:%@", data.reason,dateDes]; + TTAlertMessageAttributedConfig * inviteAlertConfig = [[TTAlertMessageAttributedConfig alloc] init]; + inviteAlertConfig.text = dateDes; + inviteAlertConfig.color = [ThemeColor appMainColor]; + inviteAlertConfig.font = [UIFont systemFontOfSize:15]; + config.message = title; + config.messageAttributedConfig = @[inviteAlertConfig]; + [TTPopup alertWithConfig:config confirmHandler:^{ + + } cancelHandler:^{ + + }]; +} + @end