爵位完成
This commit is contained in:
@@ -36,15 +36,27 @@ static NSInteger maxClickCount = 6;
|
||||
self.navigationItem.title = QXText(@"设置");
|
||||
}
|
||||
-(void)initSubViews{
|
||||
NSArray *section1 = @[
|
||||
// QXText(@"消息通知"),
|
||||
// QXText(@"未成年人模式"),
|
||||
QXText(@"黑名单"),
|
||||
QXText(@"设置密码"),
|
||||
QXText(@"手机绑定"),
|
||||
QXText(@"关于我们"),
|
||||
QXText(@"版本号")
|
||||
];
|
||||
NSArray *section1;
|
||||
if (self.haveNobility) {
|
||||
section1 = @[
|
||||
QXText(@"隐身进入房间"),
|
||||
QXText(@"黑名单"),
|
||||
QXText(@"设置密码"),
|
||||
QXText(@"手机绑定"),
|
||||
QXText(@"关于我们"),
|
||||
QXText(@"版本号")
|
||||
];
|
||||
}else{
|
||||
section1 = @[
|
||||
// QXText(@"消息通知"),
|
||||
QXText(@"黑名单"),
|
||||
QXText(@"设置密码"),
|
||||
QXText(@"手机绑定"),
|
||||
QXText(@"关于我们"),
|
||||
QXText(@"版本号")
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
NSArray *section2 = @[
|
||||
QXText(@"切换账号"),
|
||||
@@ -62,7 +74,8 @@ static NSInteger maxClickCount = 6;
|
||||
QXText(@"切换账号"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"实名认证"):[NSNumber numberWithInteger:QXSettingCellTypeNormal],
|
||||
QXText(@"账号注销"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"退出登录"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow]
|
||||
QXText(@"退出登录"):[NSNumber numberWithInteger:QXSettingCellTypeOnlyArrow],
|
||||
QXText(@"隐身进入房间"):[NSNumber numberWithInteger:QXSettingCellTypeSwitch]
|
||||
};
|
||||
|
||||
self.controllerDict = @{
|
||||
@@ -89,7 +102,8 @@ static NSInteger maxClickCount = 6;
|
||||
QXText(@"切换账号"):@"",
|
||||
QXText(@"实名认证"):@"",
|
||||
QXText(@"账号注销"):@"",
|
||||
QXText(@"退出登录"):@""
|
||||
QXText(@"退出登录"):@"",
|
||||
QXText(@"隐身进入房间"):QXGlobal.shareGlobal.loginModel.hide_status
|
||||
};
|
||||
[self.dataArray addObject:section1];
|
||||
[self.dataArray addObject:section2];
|
||||
@@ -111,10 +125,27 @@ static NSInteger maxClickCount = 6;
|
||||
NSString *value = self.valueDict[text];
|
||||
cell.titleLabel.text = text;
|
||||
cell.detailLabel.text = value;
|
||||
cell.btnSwitch.selected = value.intValue==1;
|
||||
[cell.btnSwitch addTarget:self action:@selector(setHideJoinRoom:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
cell.cellType = [self.cellTypeDict[text] integerValue];
|
||||
cell.needLine = (indexPath.row>=0) && (indexPath.row < arr.count-1);
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)setHideJoinRoom:(UIButton *)sender{
|
||||
sender.selected = !sender.selected;
|
||||
__block NSString *status = QXGlobal.shareGlobal.loginModel.hide_status;
|
||||
if ([status isEqualToString:@"0"]) {
|
||||
status = @"1";
|
||||
}else{
|
||||
status = @"0";
|
||||
}
|
||||
[QXMineNetwork getNobilityPriceWithHideStatus:status successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
QXGlobal.shareGlobal.loginModel.hide_status = status;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
return [UIView new];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user