开通贵族时青少年toast,实名认证弹窗
This commit is contained in:
@@ -87,6 +87,18 @@
|
|||||||
case 3009: // 账号已注销
|
case 3009: // 账号已注销
|
||||||
[[self getView] accountCanceled:data.model2dictionary];
|
[[self getView] accountCanceled:data.model2dictionary];
|
||||||
return;
|
return;
|
||||||
|
case 31005: {//余额不足
|
||||||
|
}
|
||||||
|
case 30000: {// 青少年模式进房错误,进行弹窗处理,同时不显示 toast。
|
||||||
|
}
|
||||||
|
case 10111: // 提现时,金额过大,需要先实名认证
|
||||||
|
[[self getView] showRealNameAuthenticationTipsAlertView];
|
||||||
|
return;
|
||||||
|
case 10108: // 未实名认证
|
||||||
|
[[self getView] showRealNameAuthenticationTipsAlertView];
|
||||||
|
return;
|
||||||
|
case 25000: {// 在青少年模式下,充值已达上限
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toast) {
|
if (toast) {
|
||||||
|
@@ -16,6 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (void)completeUserInfo;
|
- (void)completeUserInfo;
|
||||||
- (void)accountCanceled:(NSDictionary *)data;
|
- (void)accountCanceled:(NSDictionary *)data;
|
||||||
|
|
||||||
|
///实名认证弹窗
|
||||||
|
- (void)showRealNameAuthenticationTipsAlertView;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -11,9 +11,13 @@
|
|||||||
#import "LoginViewController.h"
|
#import "LoginViewController.h"
|
||||||
#import "BaseNavigationController.h"
|
#import "BaseNavigationController.h"
|
||||||
#import "LoginFullInfoViewController.h"
|
#import "LoginFullInfoViewController.h"
|
||||||
|
#import "XPWebViewController.h"
|
||||||
|
//Tool
|
||||||
#import "TTPopup.h"
|
#import "TTPopup.h"
|
||||||
#import "PLTimeUtil.h"
|
#import "PLTimeUtil.h"
|
||||||
#import "ThemeColor.h"
|
#import "ThemeColor.h"
|
||||||
|
#import "XPMacro.h"
|
||||||
|
#import "XPHtmlUrl.h"
|
||||||
|
|
||||||
@interface MvpViewController ()
|
@interface MvpViewController ()
|
||||||
|
|
||||||
@@ -71,4 +75,28 @@
|
|||||||
[self.navigationController presentViewController:nav animated:YES completion:nil];
|
[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
|
@end
|
||||||
|
@@ -61,7 +61,7 @@
|
|||||||
[[self getView] requestIAPRechargeOrderSuccess:orderId chargeProdId:chargeProdId];
|
[[self getView] requestIAPRechargeOrderSuccess:orderId chargeProdId:chargeProdId];
|
||||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||||
[[self getView] requestIAPRechargeOrderFail:msg code:code];
|
[[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];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 充值成功二次验证
|
/// 充值成功二次验证
|
||||||
|
@@ -211,47 +211,7 @@
|
|||||||
}
|
}
|
||||||
///请求充值账单失败
|
///请求充值账单失败
|
||||||
- (void)requestIAPRechargeOrderFail:(NSString *)message code:(NSInteger)code {
|
- (void)requestIAPRechargeOrderFail:(NSString *)message code:(NSInteger)code {
|
||||||
[self hideHUD];
|
// [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:^{
|
|
||||||
}];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///二次校验成功
|
///二次校验成功
|
||||||
@@ -378,7 +338,6 @@
|
|||||||
|
|
||||||
#pragma mark - events
|
#pragma mark - events
|
||||||
- (void)onOpenNobleButtonClick:(UIButton *)button {
|
- (void)onOpenNobleButtonClick:(UIButton *)button {
|
||||||
[self showLoading];
|
|
||||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventVipOpenClick];
|
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventVipOpenClick];
|
||||||
RechargeListModel *rechargeModel = [self.rechargeModel.list lookin_safeObjectAtIndex:0];
|
RechargeListModel *rechargeModel = [self.rechargeModel.list lookin_safeObjectAtIndex:0];
|
||||||
[self.presenter requestNobleIAPRechargeOrderWithChargeProdId:rechargeModel.chargeProdId roomUid:self.roomUid ? [NSString stringWithFormat:@"%zd", self.roomUid] : nil];
|
[self.presenter requestNobleIAPRechargeOrderWithChargeProdId:rechargeModel.chargeProdId roomUid:self.roomUid ? [NSString stringWithFormat:@"%zd", self.roomUid] : nil];
|
||||||
|
Reference in New Issue
Block a user