开通贵族时青少年toast,实名认证弹窗

This commit is contained in:
chenguilong
2022-01-18 15:22:05 +08:00
committed by fengshuo
parent df44c20dad
commit a1e35aede2
5 changed files with 45 additions and 43 deletions

View File

@@ -87,6 +87,18 @@
case 3009: //
[[self getView] accountCanceled:data.model2dictionary];
return;
case 31005: {//
}
case 30000: {// , toast
}
case 10111: //
[[self getView] showRealNameAuthenticationTipsAlertView];
return;
case 10108: //
[[self getView] showRealNameAuthenticationTipsAlertView];
return;
case 25000: {//
}
}
if (toast) {

View File

@@ -16,6 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
- (void)completeUserInfo;
- (void)accountCanceled:(NSDictionary *)data;
///实名认证弹窗
- (void)showRealNameAuthenticationTipsAlertView;
@end
NS_ASSUME_NONNULL_END

View File

@@ -11,9 +11,13 @@
#import "LoginViewController.h"
#import "BaseNavigationController.h"
#import "LoginFullInfoViewController.h"
#import "XPWebViewController.h"
//Tool
#import "TTPopup.h"
#import "PLTimeUtil.h"
#import "ThemeColor.h"
#import "XPMacro.h"
#import "XPHtmlUrl.h"
@interface MvpViewController ()
@@ -71,4 +75,28 @@
[self.navigationController presentViewController:nav animated:YES completion:nil];
}
///
- (void)showRealNameAuthenticationTipsAlertView {
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.message = @"为了营造更安全的网络环境\n保护您和他人的财产安全\n请先进行实名认证";
config.messageLineSpacing = 4;
config.confirmButtonConfig.title = @"前往认证";
config.confirmButtonConfig.titleColor = UIColor.whiteColor;
config.confirmButtonConfig.backgroundColor = [ThemeColor appMainColor];
TTAlertMessageAttributedConfig *nameAttrConf = [[TTAlertMessageAttributedConfig alloc] init];
nameAttrConf.text = @"实名认证";
nameAttrConf.color = [ThemeColor appMainColor];
config.messageAttributedConfig = @[nameAttrConf];
@kWeakify(self);
[TTPopup alertWithConfig:config confirmHandler:^{
@kStrongify(self);
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = URLWithType(kIdentityURL);
[self.navigationController pushViewController:webVC animated:YES];
} cancelHandler:^{
}];
}
@end

View File

@@ -61,7 +61,7 @@
[[self getView] requestIAPRechargeOrderSuccess:orderId chargeProdId:chargeProdId];
} fail:^(NSInteger code, NSString * _Nullable msg) {
[[self getView] requestIAPRechargeOrderFail:msg code:code];
}] chargeProdId:chargeProdId uid:uid roomUid:roomUid ticket:ticket deviceInfo:deviceInfo clientIp:clientIp];
} showLoading:YES] chargeProdId:chargeProdId uid:uid roomUid:roomUid ticket:ticket deviceInfo:deviceInfo clientIp:clientIp];
}
///

View File

@@ -211,47 +211,7 @@
}
///
- (void)requestIAPRechargeOrderFail:(NSString *)message code:(NSInteger)code {
[self hideHUD];
if (code == 25000) { // code = 25000
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.cancelButtonConfig.title = @"去关闭";
config.confirmButtonConfig.title = @"知道了";
config.message = message;
@kWeakify(self);
[TTPopup alertWithConfig:config confirmHandler:^{ //
} cancelHandler:^{ //
@kStrongify(self);
XPMineTeenagerViewController *vc = [[XPMineTeenagerViewController alloc] init];
[self.navigationController pushViewController:vc animated:YES];
}];
}else if (code == 10108){ //
[self showTipsAlertView];
} else {
[self showErrorToast:message];
}
}
- (void)showTipsAlertView{
TTAlertConfig *config = [[TTAlertConfig alloc] init];
config.message = @"为了营造更安全的网络环境\n保护您和他人的财产安全\n请先进行实名认证";
config.messageLineSpacing = 4;
config.confirmButtonConfig.title = @"前往认证";
config.confirmButtonConfig.titleColor = UIColor.whiteColor;
config.confirmButtonConfig.backgroundColor = [ThemeColor appMainColor];
TTAlertMessageAttributedConfig *nameAttrConf = [[TTAlertMessageAttributedConfig alloc] init];
nameAttrConf.text = @"实名认证";
nameAttrConf.color = [ThemeColor appMainColor];
config.messageAttributedConfig = @[nameAttrConf];
@kWeakify(self);
[TTPopup alertWithConfig:config confirmHandler:^{
@kStrongify(self);
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = URLWithType(kIdentityURL);
[self.navigationController pushViewController:webVC animated:YES];
} cancelHandler:^{
}];
// [self hideHUD];
}
///
@@ -378,7 +338,6 @@
#pragma mark - events
- (void)onOpenNobleButtonClick:(UIButton *)button {
[self showLoading];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventVipOpenClick];
RechargeListModel *rechargeModel = [self.rechargeModel.list lookin_safeObjectAtIndex:0];
[self.presenter requestNobleIAPRechargeOrderWithChargeProdId:rechargeModel.chargeProdId roomUid:self.roomUid ? [NSString stringWithFormat:@"%zd", self.roomUid] : nil];