账号封禁弹框

This commit is contained in:
fengshuo
2022-06-17 16:26:45 +08:00
parent 33305f8939
commit 040ad7c71a
4 changed files with 32 additions and 1 deletions

View File

@@ -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

View File

@@ -81,6 +81,10 @@
case 401: //
[self logout];
return;
case 407:
case 408:
[[self getView] accountBanned:data];
return;
case 1415: //
[[self getView] completeUserInfo];
return;

View File

@@ -9,7 +9,7 @@
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class BaseModel;
@protocol BaseMvpProtocol <NSObject, BaseViewControllerProtocol>
- (void)tokenInvalid;
@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
///实名认证弹窗
- (void)showRealNameAuthenticationTipsAlertView;
///封禁账号
- (void)accountBanned:(BaseModel *)data;
@end
NS_ASSUME_NONNULL_END

View File

@@ -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