1.0.18 feat:重构 VIP 页面,修正发现问题,更新地区选择 API

This commit is contained in:
eggmanQQQ
2024-10-24 19:43:46 +08:00
parent fc323bd470
commit 4051a94dd4
51 changed files with 783 additions and 484 deletions

View File

@@ -551,6 +551,7 @@
54C9A11F2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A11E2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m */; };
54C9A1222C3E6C3200C6D970 /* MessageGameOrderModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A1212C3E6C3200C6D970 /* MessageGameOrderModel.m */; };
54C9A1252C3E74AE00C6D970 /* MessageGameOrderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54C9A1242C3E74AE00C6D970 /* MessageGameOrderView.m */; };
54CE5EF92CCA4A2600A67898 /* LocationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 54CE5EF82CCA4A2600A67898 /* LocationModel.m */; };
54E4D5302C9048E1009E1FEA /* LuckyGiftWinningFlagView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E4D52F2C9048E1009E1FEA /* LuckyGiftWinningFlagView.m */; };
54E4D5332C90658C009E1FEA /* LuckyGiftWinningBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E4D5322C90658C009E1FEA /* LuckyGiftWinningBannerView.m */; };
54E82E9F2CA6876300C931D9 /* RoomBoomManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 54E82E9E2CA6876300C931D9 /* RoomBoomManager.m */; };
@@ -2663,6 +2664,8 @@
54C9A1212C3E6C3200C6D970 /* MessageGameOrderModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageGameOrderModel.m; sourceTree = "<group>"; };
54C9A1232C3E74AE00C6D970 /* MessageGameOrderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageGameOrderView.h; sourceTree = "<group>"; };
54C9A1242C3E74AE00C6D970 /* MessageGameOrderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageGameOrderView.m; sourceTree = "<group>"; };
54CE5EF72CCA4A2600A67898 /* LocationModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocationModel.h; sourceTree = "<group>"; };
54CE5EF82CCA4A2600A67898 /* LocationModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LocationModel.m; sourceTree = "<group>"; };
54E4D52E2C9048E1009E1FEA /* LuckyGiftWinningFlagView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LuckyGiftWinningFlagView.h; sourceTree = "<group>"; };
54E4D52F2C9048E1009E1FEA /* LuckyGiftWinningFlagView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LuckyGiftWinningFlagView.m; sourceTree = "<group>"; };
54E4D5312C90658C009E1FEA /* LuckyGiftWinningBannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LuckyGiftWinningBannerView.h; sourceTree = "<group>"; };
@@ -10893,6 +10896,8 @@
9B734F75288A92FB00CBDAA9 /* XPMineFunctionItemModel.m */,
54C9A11D2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.h */,
54C9A11E2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m */,
54CE5EF72CCA4A2600A67898 /* LocationModel.h */,
54CE5EF82CCA4A2600A67898 /* LocationModel.m */,
);
path = Model;
sourceTree = "<group>";
@@ -12029,6 +12034,7 @@
E81C27AE26EF39AB0031E639 /* AppDelegate+ThirdConfig.m in Sources */,
E8AB631028ADD92D0023B0D2 /* XPMonentsTopicRecommondViewController.m in Sources */,
E8E70D8326F2F51A00F03460 /* XPMineHeadView.m in Sources */,
54CE5EF92CCA4A2600A67898 /* LocationModel.m in Sources */,
E80EC81128ACD84000D133C5 /* QEmotionHelper.m in Sources */,
E8EEB90C26FC5EBC007C6EBA /* XPMineUserInfoEditModel.m in Sources */,
23630BA62BAC3888003AD25D /* PIGiftSuperGiftBroadcastView.m in Sources */,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x-2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x-3.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x-4.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x-5.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x-6.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x-7.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x-8.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "切图 45@3x-9.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

View File

@@ -330,7 +330,7 @@ NS_ASSUME_NONNULL_BEGIN
//////获取地区列表
+(void)getAreaList:(HttpRequestHelperCompletion)completion;
///保存地区列表
+(void)saveAreaConfigWithArea:(HttpRequestHelperCompletion)completion region:(NSString *)region;
+(void)saveAreaConfigWithArea:(HttpRequestHelperCompletion)completion id:(NSString *)id;
///
+(void)requestQueryWithRoomType:(HttpRequestHelperCompletion)completion;
///屏蔽房间列表

View File

@@ -431,12 +431,13 @@
}
//////
+(void)getAreaList:(HttpRequestHelperCompletion)completion{
[self makeRequest:@"region/config" method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, nil];
[self makeRequest:@"regionInfo/list" method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, nil];
}
///
+(void)saveAreaConfigWithArea:(HttpRequestHelperCompletion)completion region:(NSString *)region{
[self makeRequest:@"region/save" method:HttpRequestHelperMethodPOST completion:completion,__FUNCTION__,region, nil];
+(void)saveAreaConfigWithArea:(HttpRequestHelperCompletion)completion id:(NSString *)id{
[self makeRequest:@"regionInfo/save" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, id, nil];
}
+(void)getBlackRoomList:(HttpRequestHelperCompletion)completion pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize{
[self makeRequest:@"user/black/pageRoom" method:HttpRequestHelperMethodGET completion:completion,__FUNCTION__, pageNum,pageSize,nil];
}

View File

@@ -0,0 +1,23 @@
//
// LocationModel.h
// YuMi
//
// Created by P on 2024/10/24.
//
#import "PIBaseModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface LocationModel : PIBaseModel
@property (nonatomic, copy) NSString *code;
@property (nonatomic, assign) NSInteger id;
@property (nonatomic, copy) NSString *icon;
@property (nonatomic, assign) NSInteger partitionId;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, assign) NSInteger seq;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// LocationModel.m
// YuMi
//
// Created by P on 2024/10/24.
//
#import "LocationModel.h"
@implementation LocationModel
@end

View File

@@ -27,6 +27,8 @@ NS_ASSUME_NONNULL_BEGIN
-(void)getBlackRoomListWithPageNum:(NSString *)pageNum pageSize:(NSString *)pageSize;
///解除屏蔽
-(void)requestUnmaskingFromBlackRoomListWithRoomUid:(NSString *)roomUid type:(NSString *)type;
@end
NS_ASSUME_NONNULL_END

View File

@@ -7,7 +7,7 @@
#import "BaseMvpPresenter.h"
NS_ASSUME_NONNULL_BEGIN
@class UserInfoModel;
@class UserInfoModel, LocationModel;
@interface XPMineUserInfoEditPresenter : BaseMvpPresenter
// 获取用户信息
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
///获取地区列表
-(void)getAreaList;
///保存地区列表
-(void)saveAreaConfigWithArea:(NSString *)area;
-(void)saveAreaConfigWithArea:(LocationModel *)area;
@end
NS_ASSUME_NONNULL_END

View File

@@ -14,7 +14,7 @@
///Model
#import "XPMineUserInfoEditModel.h"
#import "UserInfoModel.h"
#import "LocationModel.h"
///P
#import "XPMineUserInfoEditProtocol.h"
@interface XPMineUserInfoEditPresenter ()
@@ -149,15 +149,19 @@
///
-(void)getAreaList{
@kWeakify(self);
[Api getAreaList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView]getAreaListSuccess:data.data];
@kStrongify(self);
[[self getView] getAreaListSuccess:[LocationModel modelsWithArray:data.data]];
}showLoading:NO]];
}
///
-(void)saveAreaConfigWithArea:(NSString *)area{
-(void)saveAreaConfigWithArea:(LocationModel *)area{
@kWeakify(self);
[Api saveAreaConfigWithArea:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView]saveAreaSuccess];
}showLoading:YES errorToast:YES] region:area];
@kStrongify(self);
[[self getView] saveAreaSuccess];
}showLoading:YES errorToast:YES] id:@(area.id).stringValue];
}
#pragma mark - Getters And Setters
- (XPMineUserInfoEditModel *)nickItem {

View File

@@ -162,7 +162,9 @@
self.sexImageView.selected = _fansInfo.gender != GenderType_Male;
self.findButton.hidden = _fansInfo.userInRoomUid.length <= 0;
if (self.fansInfo.userVipInfoVO.preventTrace) {
self.findButton.hidden = YES;
}
UIImage *nobleImage = self.nobleImageView.image;
if (nobleImage) {

View File

@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
@class XPMineUserInfoEditModel;
@interface XPMineUserInfoEditTableViewCell : UITableViewCell
///数据
@property (nonatomic,strong) XPMineUserInfoEditModel *itmeModel;
@property (nonatomic,strong) XPMineUserInfoEditModel *itemModel;
@property (nonatomic,strong) XPSoundCardModel *soundModel;
@property (nonatomic,strong) NSMutableArray *itemList;
@property (nonatomic,assign) CGFloat maxWidth;

View File

@@ -283,7 +283,7 @@
- (void)switchValueChanged:(UISwitch *)sender {
if (_changeCPSwitch) {
self.changeCPSwitch(sender.isOn, self.itmeModel.type == XPMineUserInfoEditType_CP_Animation ? 2 : 1);
self.changeCPSwitch(sender.isOn, self.itemModel.type == XPMineUserInfoEditType_CP_Animation ? 2 : 1);
}
}
@@ -302,19 +302,19 @@
-(void)setSoundModel:(XPSoundCardModel *)soundModel{
_soundModel = soundModel;
if(_itmeModel.type == XPMineUserInfoEditType_Sound){
if(_itemModel.type == XPMineUserInfoEditType_Sound){
_soundView.hidden = !(_soundModel.status == 1 || _soundModel.status == 2);
_subTitleLabel.hidden = _soundModel.status == 1 || _soundModel.status == 2;
_soundTimeView.text = [NSString stringWithFormat:@"%ld\"",_soundModel.second];
}
}
- (void)setItmeModel:(XPMineUserInfoEditModel *)itmeModel {
_itmeModel = itmeModel;
if (_itmeModel) {
self.titleLabel.text = _itmeModel.title;
self.titleLabelLong.text = _itmeModel.title;
self.subTitleLabel.text = _itmeModel.subTitle;
- (void)setItemModel:(XPMineUserInfoEditModel *)itmeModel {
_itemModel = itmeModel;
if (_itemModel) {
self.titleLabel.text = _itemModel.title;
self.titleLabelLong.text = _itemModel.title;
self.subTitleLabel.text = _itemModel.subTitle;
self.isCPAvatarDisplay = itmeModel.isCPAvatar;
self.isCPAnimationDisplay = itmeModel.isCPAnimation;
[self configCellWithModel:itmeModel];

View File

@@ -10,17 +10,18 @@
@class RelationUserVO;
NS_ASSUME_NONNULL_BEGIN
@class XPMineUserInfoEditViewController;
@class XPMineUserInfoEditViewController, LocationModel;
@protocol XPMineUserInfoEditViewControllerDelegate <NSObject>
- (void)xPMineUserInfoEditViewControllerC:(XPMineUserInfoEditViewController *)vc didClickComplete:(NSString *)meLabels;
- (void)xPMineUserInfoEditViewControllerC:(XPMineUserInfoEditViewController *)vc didClickCompleteArea:(NSString *)area;
- (void)xPMineUserInfoEditViewControllerC:(XPMineUserInfoEditViewController *)vc didClickCompleteArea:(LocationModel *)area;
@end
@interface XPMineUserInfoEditViewController : MvpViewController
@property (nonatomic,copy) NSString *uid;
@property (nonatomic,copy) NSString *outsideSelectedRegionName;
///
@property (nonatomic,copy) NSString *area;
@property (nonatomic,strong) LocationModel *selectedArea;
///
@property (nonatomic,weak) id<XPMineUserInfoEditViewControllerDelegate> delegate;

View File

@@ -20,6 +20,7 @@
///Model
#import "XPMineUserInfoEditModel.h"
#import "UserInfoModel.h"
#import "LocationModel.h"
///View
#import "XPMineUserInfoEditTableViewCell.h"
#import "XPMineUserInfoDateView.h"
@@ -51,11 +52,11 @@ TZImagePickerControllerDelegate>
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NSArray *datasouce;
@property (nonatomic,strong) NSArray *dataSource;
///
@property (nonatomic,strong) UserInfoModel *userInfo;
///
@property (nonatomic,strong) NSMutableArray *areaList;
@property (nonatomic,strong) NSMutableArray <LocationModel *>*areaList;
@property (nonatomic,assign) CGFloat maxWidth;
@@ -119,20 +120,9 @@ TZImagePickerControllerDelegate>
}];
}];
TTActionSheetConfig *photoLibraryConfig = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMineUserInfoEditViewController6") clickAction:^{
TTActionSheetConfig *photoLibraryConfig = [TTActionSheetConfig normalTitle:YMLocalizedString(@"UserInfoEdit_1.0.17_1") clickAction:^{
[YYUtility checkAssetsLibrayAvailable:^{
@strongify(self);
// UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
// imagePicker.modalPresentationCapturesStatusBarAppearance = YES;
// imagePicker.delegate = self;
// imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
// imagePicker.allowsEditing = YES;
// AlbumResourcePickerViewController *imagePicker = [[AlbumResourcePickerViewController alloc] init];
// [self presentViewController:imagePicker animated:YES completion:NULL];
// [imagePicker setDidSelectedAsset:^(PHAsset * _Nonnull asset) {
//
// }];
[self presentViewController:[self photoPickerWillDisplayGIF: NO]
animated:YES
completion:nil];
@@ -244,7 +234,7 @@ TZImagePickerControllerDelegate>
if (section == 1) {
return 2;
}
return self.datasouce.count;
return self.dataSource.count;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -252,7 +242,7 @@ TZImagePickerControllerDelegate>
return kGetScaleWidth(60);
}
XPMineUserInfoEditModel * model = [self.datasouce xpSafeObjectAtIndex:indexPath.row];
XPMineUserInfoEditModel * model = [self.dataSource xpSafeObjectAtIndex:indexPath.row];
if (model.type == XPMineUserInfoEditType_Avatar) {
return kGetScaleWidth(80);
} else {
@@ -309,7 +299,7 @@ TZImagePickerControllerDelegate>
model.title =YMLocalizedString(@"UserDetail_Setting_1");
model.type = XPMineUserInfoEditType_CP_Avatar;
}
cell.itmeModel = model;
cell.itemModel = model;
@kWeakify(self);
[cell setChangeCPSwitch:^(BOOL isOn, NSInteger type) {
@@ -320,14 +310,18 @@ TZImagePickerControllerDelegate>
return cell;
}
XPMineUserInfoEditModel * model = [self.datasouce xpSafeObjectAtIndex:indexPath.row];
XPMineUserInfoEditModel * model = [self.dataSource xpSafeObjectAtIndex:indexPath.row];
if(model.type == XPMineUserInfoEditType_Tag){
}else if(model.type == XPMineUserInfoEditType_Area){
model.subTitle = self.area;
if (self.selectedArea) {
model.subTitle = self.selectedArea.name;
} else {
model.subTitle = self.outsideSelectedRegionName;
}
}
cell.itmeModel = model;
cell.itemModel = model;
return cell;
}
@@ -336,7 +330,7 @@ TZImagePickerControllerDelegate>
if (indexPath.section == 1) {
return;
}
XPMineUserInfoEditModel * model = [self.datasouce xpSafeObjectAtIndex:indexPath.row];
XPMineUserInfoEditModel * model = [self.dataSource xpSafeObjectAtIndex:indexPath.row];
switch (model.type) {
case XPMineUserInfoEditType_Nick:
{
@@ -378,12 +372,12 @@ TZImagePickerControllerDelegate>
case XPMineUserInfoEditType_Area:
{
XPMineUserInfoEditPickView *pckView = [[XPMineUserInfoEditPickView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
pckView.area = self.area;
pckView.dataArray = self.areaList;
pckView.delegate = self;
[kWindow addSubview:pckView];
XPMineUserInfoEditPickView *pickerView = [[XPMineUserInfoEditPickView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
pickerView.outsideSelectedAreaName = self.outsideSelectedRegionName;
pickerView.selectedArea = self.selectedArea;
pickerView.dataArray = self.areaList;
pickerView.delegate = self;
[kWindow addSubview:pickerView];
break;
}
default:
@@ -461,14 +455,11 @@ TZImagePickerControllerDelegate>
#pragma mark - XPMineUserInfoDateViewDelegate
- (void)xPMineUserInfoDateView:(XPMineUserInfoDateView *)view didClickSureButton:(NSString *)dateStr{
if (dateStr.length > 0) {
[self.presenter complectionInfoWithAvatar:nil nick:nil birth:dateStr userDesc:nil];
}
}
#pragma mark - XPMineUserInfoNickViewControllerDelegate
- (void)xPMineUserInfoNickViewController:(XPMineUserInfoNickViewController *)viewController updateNick:(NSString *)nick {
if (nick.length > 0) {
@@ -484,15 +475,15 @@ TZImagePickerControllerDelegate>
#pragma mark - XPMineUserInfoEditProtocol
- (void)getUserInfoEditDataSourceSuccess:(NSArray *)array {
self.datasouce = array;
self.dataSource = array;
[self.tableView reloadData];
}
-(void)getAreaListSuccess:(NSArray *)list{
-(void)getAreaListSuccess:(NSArray <LocationModel *>*)list{
self.areaList = [list mutableCopy];
}
- (void)saveAreaSuccess{
if(self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoEditViewControllerC:didClickCompleteArea:)]){
[self.delegate xPMineUserInfoEditViewControllerC:self didClickCompleteArea:self.area];
[self.delegate xPMineUserInfoEditViewControllerC:self didClickCompleteArea:self.selectedArea];
}
[self.tableView reloadData];
}
@@ -523,9 +514,9 @@ TZImagePickerControllerDelegate>
});
}
#pragma mark - XPMineUserInfoEditPickView
- (void)didClickSureActionWithArea:(NSString *)area{
self.area = area;
[self.presenter saveAreaConfigWithArea:area];
- (void)didClickSureActionWithArea:(LocationModel *)area{
self.selectedArea = area;
[self.presenter saveAreaConfigWithArea:self.selectedArea];
}
#pragma mark - Getters And Setters
- (UITableView *)tableView {

View File

@@ -48,6 +48,8 @@
#import "XPMomentUserDataViewController.h"
#import "LocationModel.h"
UIKIT_EXTERN NSString * kUpdateSoundInfo;
@interface XPMineUserInfoViewController ()<
@@ -112,8 +114,6 @@ HWDMP4PlayDelegate>
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
// [self initHttpRequest];
}
-(void)viewDidDisappear:(BOOL)animated{
@@ -305,7 +305,7 @@ HWDMP4PlayDelegate>
#pragma mark - XPMineCustomNavViewDelegate
- (void)xPMineCustomNavView:(XPMineUserInfoCustomNavView *)view didClickEditButton:(UIButton *)sender {
if (sender.isSelected) {///
self.editVC.area = self.userInfo.region;
self.editVC.outsideSelectedRegionName = self.userInfo.region;
self.editVC.relationUser = self.userInfo.relationUserVO;
[self.navigationController pushViewController:self.editVC animated:YES];
} else {
@@ -446,8 +446,8 @@ HWDMP4PlayDelegate>
- (void)xPMineUserInfoEditViewControllerC:(XPMineUserInfoEditViewController *)vc didClickComplete:(NSString *)meLabels{
// self.headView.tagModel = self.tagModel;
}
- (void)xPMineUserInfoEditViewControllerC:(XPMineUserInfoEditViewController *)vc didClickCompleteArea:(NSString *)area{
self.userInfo.region = area;
- (void)xPMineUserInfoEditViewControllerC:(XPMineUserInfoEditViewController *)vc didClickCompleteArea:(LocationModel *)area{
self.userInfo.region = area.name;
self.userDataVC.userInfo = self.userInfo;
}
#pragma mark - Event Response

View File

@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
///特权名称
@property (nonatomic, copy) NSString *authName;
///特权类型1. 铭牌 2. 头饰 3. 座驾 4. 礼物 5.资料卡 6. 财富值经验加成 7.表情 8.麦序光圈 9.麦位昵称颜色 10. 好友红名 11.房间小喇叭 12.进场特效 13 隐身进房
///特权类型1. 铭牌 2. 头饰 3. 座驾 4. 礼物 5.资料卡 6. 财富值经验加成 7.表情 8.麦序光圈 9.麦位昵称颜色 10. 好友红名 11.聊天气泡 12.进场特效 13 隐身进房
@property (nonatomic, assign) NSInteger authType;
///描述图片
@property (nonatomic, copy) NSString *descPic;

View File

@@ -47,8 +47,8 @@ NS_ASSUME_NONNULL_BEGIN
/// 切换隐身进房
/// @param enterHide 隐身进房
- (void)changeEnterHide:(BOOL)enterHide;
- (void)changePreventFollow:(BOOL)preventFollow;
- (void)changePreventTrace:(BOOL)preventTrace;
- (void)changePreventFollow:(BOOL)preventFollow; // 关注
- (void)changePreventTrace:(BOOL)preventTrace; // 跟随
- (void)changePreventKick:(BOOL)preventKick;
@end

View File

@@ -39,7 +39,121 @@
#import "RechargeListModel.h"
@interface VIPExclusivePrivilegesCard: UIView
@interface VIPExclusivePrivilegesTitleCell: UICollectionViewCell
@property (nonatomic, strong) UIStackView *titlesStack;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *exclusivePrivilegesCountLabel;
@property (nonatomic, strong) UIImageView *leftDecorateImageView;
@property (nonatomic, strong) UIImageView *rightDecorateImageView;
@end
@implementation VIPExclusivePrivilegesTitleCell
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
UIStackView *titlesStack = [[UIStackView alloc] init];
titlesStack.axis = UILayoutConstraintAxisVertical;
UILabel *titleLabel = [UILabel labelInitWithText:YMLocalizedString(@"VipCenter_3")
font:kFontBold(16)
textColor:[DJDKMIMOMColor colorWithHexString:@"#FFE3AF"]];
[titlesStack addArrangedSubview:titleLabel];
[titlesStack addArrangedSubview:self.exclusivePrivilegesCountLabel];
[self.contentView addSubview:titlesStack];
[titlesStack mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.contentView);
make.centerX.mas_equalTo(self.contentView);
make.height.mas_equalTo(22 * 2);
}];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(22);
}];
[self.exclusivePrivilegesCountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(titleLabel);
}];
UIImageView *leftDecorateImageView = [[UIImageView alloc] initWithImage:kImage(@"vip_center_label_decorate")];
[self.contentView addSubview:leftDecorateImageView];
[leftDecorateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(titlesStack);
make.trailing.mas_equalTo(titlesStack.mas_leading).offset(-12);
make.size.mas_equalTo(CGSizeMake(43, 16));
}];
UIImageView *rightDecorateImageView = [[UIImageView alloc] initWithImage:kImage(@"vip_center_label_decorate")];
rightDecorateImageView.transform = CGAffineTransformMakeScale(-1.0, 1.0);
[self.contentView addSubview:rightDecorateImageView];
[rightDecorateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(titlesStack);
make.leading.mas_equalTo(titlesStack.mas_trailing).offset(12);
make.size.mas_equalTo(CGSizeMake(43, 16));
}];
}
return self;
}
- (UILabel *)exclusivePrivilegesCountLabel {
if (!_exclusivePrivilegesCountLabel) {
_exclusivePrivilegesCountLabel = [UILabel labelInitWithText:@""
font:kFontMedium(13)
textColor:[DJDKMIMOMColor colorWithHexString:@"#FFE3AF"]];
_exclusivePrivilegesCountLabel.textAlignment = NSTextAlignmentCenter;
}
return _exclusivePrivilegesCountLabel;
}
@end
@interface VIPIdentificationTitleCell: UICollectionViewCell
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIImageView *leftDecorateImageView;
@property (nonatomic, strong) UIImageView *rightDecorateImageView;
@end
@implementation VIPIdentificationTitleCell
- (instancetype)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
UILabel *titleLabel = [UILabel labelInitWithText:YMLocalizedString(@"VipCenter_4")
font:kFontBold(16)
textColor:[DJDKMIMOMColor colorWithHexString:@"#FFE3AF"]];
[self.contentView addSubview:titleLabel];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerX.mas_equalTo(self.contentView);
make.height.mas_equalTo(22);
}];
UIImageView *leftDecorateImageView = [[UIImageView alloc] initWithImage:kImage(@"vip_center_label_decorate")];
[self.contentView addSubview:leftDecorateImageView];
[leftDecorateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(titleLabel);
make.trailing.mas_equalTo(titleLabel.mas_leading).offset(-12);
make.size.mas_equalTo(CGSizeMake(43, 16));
}];
UIImageView *rightDecorateImageView = [[UIImageView alloc] initWithImage:kImage(@"vip_center_label_decorate")];
rightDecorateImageView.transform = CGAffineTransformMakeScale(-1.0, 1.0);
[self.contentView addSubview:rightDecorateImageView];
[rightDecorateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(titleLabel);
make.leading.mas_equalTo(titleLabel.mas_trailing).offset(12);
make.size.mas_equalTo(CGSizeMake(43, 16));
}];
}
return self;
}
@end
@interface VIPExclusivePrivilegesCard: UICollectionViewCell
@property (nonatomic, assign) bool enable;
@property (nonatomic, assign) NSInteger index;
@@ -53,17 +167,17 @@
@implementation VIPExclusivePrivilegesCard
- (instancetype)init {
if (self = [super init]) {
[self addSubview:self.imageView];
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
[self.contentView addSubview:self.imageView];
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerX.mas_equalTo(self);
make.width.height.mas_equalTo(kGetScaleWidth(48));
make.top.centerX.mas_equalTo(self.contentView);
make.width.height.mas_equalTo(kGetScaleWidth(42));
}];
[self addSubview:self.titleLabel];
[self.contentView addSubview:self.titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.bottom.trailing.mas_equalTo(self);
make.bottom.centerX.mas_equalTo(self.contentView);
make.height.mas_equalTo(18);
}];
@@ -121,7 +235,7 @@
@end
@interface VIPIdentificationCard : UIView
@interface VIPIdentificationCard : UICollectionViewCell
@property (nonatomic, strong) UIImageView *bg;
@property (nonatomic, strong) NetImageView *imageView;
@property (nonatomic, strong) UILabel *titleLabel;
@@ -143,15 +257,15 @@
}];
_bg = bg;
[self addSubview:self.imageView];
[self.contentView addSubview:self.imageView];
[self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.leading.trailing.mas_equalTo(self);
make.top.leading.trailing.mas_equalTo(self.contentView);
make.height.mas_equalTo(kGetScaleWidth(90));
}];
[self addSubview:self.titleLabel];
[self.contentView addSubview:self.titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self);
make.centerX.mas_equalTo(self.contentView);
make.bottom.mas_equalTo(-13);
}];
}
@@ -170,7 +284,6 @@
}
- (void)updateImage:(NSString *)imagePath {
// self.imageView.imageUrl = imagePath;
self.imageView.image = kImage(imagePath);
}
@@ -201,7 +314,6 @@
@property (nonatomic, strong) UIImageView *levelBgImageView;
@property (nonatomic, strong) UILabel *statusLabel;
@property (nonatomic, strong) NetImageView *placeHolderImageView;
//@property (nonatomic, strong) SVGAImageView *svgaImageView;
@property (nonatomic, strong) VAPView *vapView;
@property (nonatomic, strong) XPRoomGiftAnimationParser *vapParser;
@@ -322,19 +434,20 @@
@end
@interface VIPCenterViewController () <TYCyclePagerViewDataSource, TYCyclePagerViewDelegate, XPNobleCenterPayViewDelegate, XPNobleCenterProtocol, NIMSystemNotificationManagerDelegate>
@interface VIPCenterViewController () <
TYCyclePagerViewDataSource,
TYCyclePagerViewDelegate,
XPNobleCenterPayViewDelegate,
XPNobleCenterProtocol,
NIMSystemNotificationManagerDelegate,
UICollectionViewDelegateFlowLayout,
UICollectionViewDataSource>
@property (nonatomic, strong) UIButton *backButton;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIButton *helpButton;
@property (nonatomic, strong) UIButton *settingButton;
@property (nonatomic, strong) TYCyclePagerView *vipCardCyclePager;
@property (nonatomic, strong) UIView *headerContentView;
@property (nonatomic, strong) UIScrollView *mainScrollView;
@property (nonatomic, strong) UIView *scrollContentView;
@property (nonatomic, strong) UserInfoModel *userInfo;
@property (nonatomic, strong) UserVipInfoVo *userVIPInfo;
@property (nonatomic, strong) NobleInfo *currentVIPInfo;
@@ -343,16 +456,8 @@
@property (nonatomic, copy) NSArray <VIPExclusivePrivilegesCard *> *exclusivePrivilegesCards;
@property (nonatomic, strong) UIStackView *identificationStack;
@property (nonatomic, strong) VIPIdentificationCard *identificationCard_vipIdentity;
@property (nonatomic, strong) VIPIdentificationCard *identificationCard_roomCard;
@property (nonatomic, strong) VIPIdentificationCard *identificationCard_entryAnimation;
@property (nonatomic, strong) VIPIdentificationCard *identificationCard_placeHolder;
@property (nonatomic, strong) VIPIdentificationCard *identificationCard_micSoundWave;
@property (nonatomic, strong) VIPIdentificationCard *identificationCard_exclusiveBubbles;
@property (nonatomic, strong) UIStackView *exclusivePrivilegesStack;
@property (nonatomic, strong) UILabel *exclusivePrivilegesCountLabel;
@property (nonatomic, strong) UICollectionView *identificationCollectionView;
@property (nonatomic, strong) UICollectionView *exclusivePrivilegesCollectionView;
@property (nonatomic, strong) UIView *purchaseContainer;
@property (nonatomic, strong) UILabel *purchaseExpiresLabel;
@@ -360,16 +465,17 @@
@property (nonatomic, strong) UILabel *purchaseNoticeLabel;
@property (nonatomic, copy) NSArray *vipIdentificationInfoArray;
@property (nonatomic, copy) NSArray *displayVipIdentificationInfoArray;
@property (nonatomic, copy) NSArray *vipExclusivePrivilegesInfoArray;
@property (nonatomic, assign) NSInteger roomUid;
@property (nonatomic, copy) NSString *exclusivePrivilegesSubTitle;
@end
@implementation VIPCenterViewController
- (instancetype)initWithRoomUid:(NSInteger)roomUid {
if (self = [super init]) {
self.roomUid = roomUid;
@@ -402,10 +508,7 @@
[self setupBG];
[self setupNavigationBar];
[self setupVIPCardCyclePager];
[self setupScrollContent];
[self setupVipIdentificationArea];
[self setupExclusivePrivilegesArea];
[self setupPurchaseArea];
}
@@ -432,7 +535,6 @@
- (void)setupNavigationBar {
[self.view addSubview:self.titleLabel];
[self.view addSubview:self.backButton];
[self.view addSubview:self.settingButton];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view);
@@ -445,161 +547,14 @@
make.centerY.mas_equalTo(self.titleLabel);
make.size.mas_equalTo(CGSizeMake(22, 22));
}];
[self.settingButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(self.view).offset(-16);
make.centerY.mas_equalTo(self.titleLabel);
make.size.mas_equalTo(CGSizeMake(22, 22));
}];
}
- (void)setupScrollContent {
[self.view addSubview:self.mainScrollView];
[self.mainScrollView addSubview:self.scrollContentView];
[self.mainScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
[self.view addSubview:self.identificationCollectionView];
[self.identificationCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.leading.trailing.mas_equalTo(self.view);
make.top.mas_equalTo(self.vipCardCyclePager.mas_bottom);
}];
[self.scrollContentView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.mainScrollView);
make.width.mas_equalTo(self.mainScrollView);
}];
}
- (void)setupVipIdentificationArea {
UILabel *titleLabel = [UILabel labelInitWithText:YMLocalizedString(@"VipCenter_4")
font:kFontBold(16)
textColor:[DJDKMIMOMColor colorWithHexString:@"#FFE3AF"]];
[self.scrollContentView addSubview:titleLabel];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.centerX.mas_equalTo(self.scrollContentView);
make.height.mas_equalTo(22);
}];
UIImageView *leftDecorateImageView = [[UIImageView alloc] initWithImage:kImage(@"vip_center_label_decorate")];
[self.scrollContentView addSubview:leftDecorateImageView];
[leftDecorateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(titleLabel);
make.trailing.mas_equalTo(titleLabel.mas_leading).offset(-12);
make.size.mas_equalTo(CGSizeMake(43, 16));
}];
UIImageView *rightDecorateImageView = [[UIImageView alloc] initWithImage:kImage(@"vip_center_label_decorate")];
rightDecorateImageView.transform = CGAffineTransformMakeScale(-1.0, 1.0);
[self.scrollContentView addSubview:rightDecorateImageView];
[rightDecorateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(titleLabel);
make.leading.mas_equalTo(titleLabel.mas_trailing).offset(12);
make.size.mas_equalTo(CGSizeMake(43, 16));
}];
UIStackView *identificationStack = [[UIStackView alloc] init];
identificationStack.spacing = 12;
identificationStack.axis = UILayoutConstraintAxisVertical;
identificationStack.distribution = UIStackViewDistributionEqualSpacing;
identificationStack.alignment = UIStackViewAlignmentFill;
[self.scrollContentView addSubview:identificationStack];
[identificationStack mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(titleLabel.mas_bottom).offset(16);
make.leading.mas_equalTo(self.scrollContentView).offset(16);
make.trailing.mas_equalTo(self.scrollContentView).offset(-16);
}];
_identificationStack = identificationStack;
UIStackView *identificationStack_1 = [[UIStackView alloc] init];
identificationStack_1.alignment = UIStackViewAlignmentCenter;
identificationStack_1.axis = UILayoutConstraintAxisHorizontal;
identificationStack_1.distribution = UIStackViewDistributionFillEqually;
identificationStack_1.spacing = 12;
UIStackView *identificationStack_2 = [[UIStackView alloc] init];
identificationStack_2.alignment = UIStackViewAlignmentCenter;
identificationStack_2.axis = UILayoutConstraintAxisHorizontal;
identificationStack_2.distribution = UIStackViewDistributionFillEqually;
identificationStack_2.spacing = 12;
UIStackView *identificationStack_3 = [[UIStackView alloc] init];
identificationStack_3.alignment = UIStackViewAlignmentLeading;
identificationStack_3.axis = UILayoutConstraintAxisHorizontal;
identificationStack_3.distribution = UIStackViewDistributionEqualSpacing;
identificationStack_3.spacing = 12;
[identificationStack addArrangedSubview:identificationStack_1];
[identificationStack addArrangedSubview:identificationStack_2];
[identificationStack addArrangedSubview:identificationStack_3];
[identificationStack_1 addArrangedSubview:self.identificationCard_vipIdentity];
[identificationStack_1 addArrangedSubview:self.identificationCard_roomCard];
[identificationStack_2 addArrangedSubview:self.identificationCard_micSoundWave];
[identificationStack_2 addArrangedSubview:self.identificationCard_exclusiveBubbles];
[identificationStack_3 addArrangedSubview:self.identificationCard_entryAnimation];
[identificationStack_3 addArrangedSubview:self.identificationCard_placeHolder];
[self.identificationCard_vipIdentity mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(120)));
}];
[self.identificationCard_entryAnimation mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(120)));
}];
[self.identificationCard_micSoundWave mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(120)));
}];
[self.identificationCard_roomCard mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(120)));
}];
[self.identificationCard_exclusiveBubbles mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(120)));
}];
[self.identificationCard_placeHolder mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(120)));
}];
}
- (void)setupExclusivePrivilegesArea {
UIStackView *titlesStack = [[UIStackView alloc] init];
titlesStack.axis = UILayoutConstraintAxisVertical;
UILabel *titleLabel = [UILabel labelInitWithText:YMLocalizedString(@"VipCenter_3")
font:kFontBold(16)
textColor:[DJDKMIMOMColor colorWithHexString:@"#FFE3AF"]];
[titlesStack addArrangedSubview:titleLabel];
[titlesStack addArrangedSubview:self.exclusivePrivilegesCountLabel];
[self.scrollContentView addSubview:titlesStack];
[titlesStack mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.identificationStack.mas_bottom).offset(24);
make.centerX.mas_equalTo(self.identificationStack);
make.height.mas_equalTo(22 * 2);
}];
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(22);
}];
[self.exclusivePrivilegesCountLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(titleLabel);
}];
UIImageView *leftDecorateImageView = [[UIImageView alloc] initWithImage:kImage(@"vip_center_label_decorate")];
[self.scrollContentView addSubview:leftDecorateImageView];
[leftDecorateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(titlesStack);
make.trailing.mas_equalTo(titlesStack.mas_leading).offset(-12);
make.size.mas_equalTo(CGSizeMake(43, 16));
}];
UIImageView *rightDecorateImageView = [[UIImageView alloc] initWithImage:kImage(@"vip_center_label_decorate")];
rightDecorateImageView.transform = CGAffineTransformMakeScale(-1.0, 1.0);
[self.scrollContentView addSubview:rightDecorateImageView];
[rightDecorateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(titlesStack);
make.leading.mas_equalTo(titlesStack.mas_trailing).offset(12);
make.size.mas_equalTo(CGSizeMake(43, 16));
}];
[self.scrollContentView addSubview:self.exclusivePrivilegesStack];
[self.exclusivePrivilegesStack mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(titlesStack.mas_bottom).offset(22);
make.leading.trailing.mas_equalTo(self.scrollContentView);
make.bottom.mas_equalTo(self.scrollContentView).offset(-80);
}];
}
- (void)setupPurchaseArea {
@@ -676,71 +631,55 @@
- (void)configIdentificationCards {
NSInteger currentVIPLevel = self.currentVIPInfo.vipLevel;
for (NobleAuthInfo *info in self.vipIdentificationInfoArray) {
switch (info.authType) {
__block NSMutableArray *tempArray = @[].mutableCopy;
[self.vipIdentificationInfoArray enumerateObjectsUsingBlock:^(NobleAuthInfo * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
switch (currentVIPLevel) {
case 1:
[self.identificationCard_vipIdentity updateImage:[NSString stringWithFormat:@"vip_center_id_level_%ld", currentVIPLevel]];
[self.identificationCard_vipIdentity updateTitle:info.authName];
case 2:{
if (obj.authType == 1 || obj.authType == 2 || obj.authType == 5) {
[tempArray addObject:obj];
}
}
break;
case 3:{
if (obj.authType == 1 || obj.authType == 2 || obj.authType == 5 || obj.authType == 8) {
[tempArray addObject:obj];
}
}
break;
case 4:
case 5:
[self.identificationCard_roomCard updateImage:[NSString stringWithFormat:@"vip_center_room_card_level_%ld", currentVIPLevel]];
[self.identificationCard_roomCard updateTitle:info.authName];
break;
case 6:
case 7:
case 8:
[self.identificationCard_micSoundWave updateImage:[NSString stringWithFormat:@"vip_center_wave_level_%ld", currentVIPLevel]];
[self.identificationCard_micSoundWave updateTitle:info.authName];
break;
case 11:
[self.identificationCard_exclusiveBubbles updateImage:[NSString stringWithFormat:@"vip_center_bubbles_level_%ld", currentVIPLevel]];
[self.identificationCard_exclusiveBubbles updateTitle:info.authName];
break;
case 12:
[self.identificationCard_entryAnimation updateImage:[NSString stringWithFormat:@"vip_center_entry_level_%ld", currentVIPLevel]];
[self.identificationCard_entryAnimation updateTitle:info.authName];
break;
default:
case 9:
default:{
if (obj.authType == 1 ||
obj.authType == 2 ||
obj.authType == 5 ||
obj.authType == 8 ||
obj.authType == 11 ||
obj.authType == 12 ) {
[tempArray addObject:obj];
}
}
break;
}
}
self.identificationCard_micSoundWave.hidden = currentVIPLevel < 3;
self.identificationCard_entryAnimation.hidden = currentVIPLevel < 4;
self.identificationCard_placeHolder.hidden = currentVIPLevel < 4;
self.identificationCard_exclusiveBubbles.isPlaceHolder = currentVIPLevel < 4;
self.identificationCard_exclusiveBubbles.hidden = currentVIPLevel < 3;
}];
self.displayVipIdentificationInfoArray = tempArray.copy;
}
- (void)configExclusivePrivilegesArea {
int itemsPerRow = 3;
NSMutableArray *tempArray = @[].mutableCopy;
for (int row = 0; row < (self.vipExclusivePrivilegesInfoArray.count + itemsPerRow - 1)/itemsPerRow; row++) {
UIStackView *horizontalStackView = [[UIStackView alloc] init];
horizontalStackView.axis = UILayoutConstraintAxisHorizontal; //
horizontalStackView.distribution = UIStackViewDistributionFillEqually;
horizontalStackView.spacing = 14;
for (int col = 0; col < itemsPerRow; col++) {
int index = row * itemsPerRow + col;
if (index < self.vipExclusivePrivilegesInfoArray.count) {
NobleAuthInfo *info = [self.vipExclusivePrivilegesInfoArray xpSafeObjectAtIndex:index];
VIPExclusivePrivilegesCard *v = [[VIPExclusivePrivilegesCard alloc] init];
v.info = info;
[horizontalStackView addArrangedSubview:v];
[v mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(48 + 18 + 6);
}];
[tempArray addObject:v];
} else {
//
UIView *placeholderView = [[UIView alloc] init];
placeholderView.backgroundColor = [UIColor clearColor];
[horizontalStackView addArrangedSubview:placeholderView];
[tempArray addObject:info];
}
}
[self.exclusivePrivilegesStack addArrangedSubview:horizontalStackView];
}
self.exclusivePrivilegesCards = tempArray.copy;
@@ -751,14 +690,13 @@
- (void)updateExclusivePrivilegesArea {
NSInteger enableCount = 0;
if (self.currentVIPInfo) {
for (VIPExclusivePrivilegesCard *v in self.exclusivePrivilegesCards) {
v.enable = [self.currentVIPInfo.ownAuthTypes containsObject:@(v.info.authType)];
if (v.enable) {
for (NobleAuthInfo *info in self.exclusivePrivilegesCards) {
if ([self.currentVIPInfo.ownAuthTypes containsObject:@(info.authType)]) {
enableCount++;
}
}
}
self.exclusivePrivilegesCountLabel.text = [NSString stringWithFormat:@"(%ld/%ld)", enableCount, self.vipExclusivePrivilegesInfoArray.count];
self.exclusivePrivilegesSubTitle = [NSString stringWithFormat:@"(%ld/%ld)", enableCount, self.vipExclusivePrivilegesInfoArray.count];
}
- (void)updatePurchaseArea {
@@ -766,6 +704,8 @@
return;
}
[self.identificationCollectionView reloadData];
if (self.currentVIPInfo.buyAmount == 0) {
self.purchaseNoticeLabel.text = [NSString stringWithFormat:YMLocalizedString(@"VipCenter_7"), self.currentVIPInfo.vipLevel];
self.purchaseNoticeLabel.hidden = NO;
@@ -810,8 +750,6 @@
self.userInfo = infoModel;
self.userVIPInfo = infoModel.userVipInfoVO;
self.settingButton.hidden = self.userVIPInfo.vipLevel < 8;
[self loadVIPCenterInfo];
[self updatePurchaseArea];
} else {
@@ -848,7 +786,7 @@
__block NSMutableArray *tempArray_1 = @[].mutableCopy;
__block NSMutableArray *tempArray_2 = @[].mutableCopy;
[model.vipAuthInfos enumerateObjectsUsingBlock:^(NobleAuthInfo * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.authType == 1 || obj.authType == 5 || obj.authType == 8 || obj.authType == 11 || obj.authType == 12) {
if (obj.authType == 1 || obj.authType == 2 || obj.authType == 5 || obj.authType == 8 || obj.authType == 11 || obj.authType == 12) {
[tempArray_1 addObject:obj];
} else if (obj.authType != 16) {
[tempArray_2 addObject:obj];
@@ -884,23 +822,6 @@
[self.navigationController popViewControllerAnimated:YES];
}
- (void)didTapHelpButton {
XPWebViewController * webVC =[[XPWebViewController alloc] initWithRoomUID:nil];
webVC.url = URLWithType(kNobleRuleURL);
[self.navigationController pushViewController:webVC animated:YES];
}
- (void)didTapSetting {
XPNobleSettingViewController * settingVC =[[XPNobleSettingViewController alloc] init];
settingVC.enterHide = self.userInfo.userVipInfoVO.enterHide;
@kWeakify(self);
settingVC.didUpdateEnterHideBlock = ^{
@kStrongify(self);
self.userInfo.userVipInfoVO.enterHide = !self.userInfo.userVipInfoVO.enterHide;
};
[self.navigationController pushViewController:settingVC animated:YES];
}
- (void)didTapPurchaseButton {
if (self.userInfo.userVipInfoVO.vipLevel > 0) {
XPNobleCenterWindow *window = [[XPNobleCenterWindow alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
@@ -954,17 +875,6 @@
[cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_6"), [self calNextVIPExpiredSeconds:info.remainSeconds]]];
} else {
[cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_5"), index + 1]];
// if (self.userVIPInfo) {
// if (self.userVIPInfo.vipLevel - 1 > index) {
// [cell setDueDate:@""];
// } else if (self.userVIPInfo.vipLevel - 1 == index) {
// [cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_6"), [self calNextVIPExpiredSeconds:self.vipModel.remainSeconds]]];
// } else {
// [cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_5"), index + 1]];
// }
// } else {
// [cell setDueDate:[NSString stringWithFormat:YMLocalizedString(@"VipCenter_5"), index + 1]];
// }
}
}
}
@@ -976,6 +886,7 @@
self.currentVIPInfo = [self.vipModel.vipInfos xpSafeObjectAtIndex:toIndex];
[self configIdentificationCards];
[self configExclusivePrivilegesArea];
[self updateExclusivePrivilegesArea];
[self updatePurchaseArea];
}
@@ -988,6 +899,182 @@
}
}
#pragma mark - UICollectionView Delegate & DataSource
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
return 4;
}
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section {
switch (section) {
case 0:
return 0;
break;
case 1:
return 12;
break;
case 2:
return 0;
break;
case 3:
return 28;
break;
default:
return 8;
break;
}
}
- (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
switch (section) {
case 0:
return 0;
break;
case 1:
return 12;
break;
case 2:
return 0;
break;
case 3:
return kGetScaleWidth(84);
break;
default:
return 8;
break;
}
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
switch (section) {
case 0:
return 1;
break;
case 1:
return self.displayVipIdentificationInfoArray.count;
break;
case 2:
return 1;
break;
case 3:
return self.vipExclusivePrivilegesInfoArray.count;
break;
default:
return 0;
break;
}
}
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
switch (indexPath.section) {
case 0:
return CGSizeMake(KScreenWidth, 30);
break;
case 1:
return CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(120));
break;
case 2:
return CGSizeMake(KScreenWidth, 60);
break;
case 3:
return CGSizeMake(42, 42 + 4 + 18);
break;
default:
return CGSizeZero;
break;
}
}
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
switch (section) {
case 0:
return UIEdgeInsetsMake(10, 0, 10, 0);
break;
case 1:
return UIEdgeInsetsMake(0, 16, 0, 16);
break;
case 2:
return UIEdgeInsetsMake(10, 0, 10, 0);
break;
case 3:
return UIEdgeInsetsMake(0, 40, 100, 40);
break;
default:
return UIEdgeInsetsZero;
break;
}
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath {
NSInteger currentVIPLevel = self.currentVIPInfo.vipLevel;
switch (indexPath.section) {
case 0: {
VIPIdentificationTitleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([VIPIdentificationTitleCell class])
forIndexPath:indexPath];
return cell;
}
return [UICollectionViewCell new];
break;
case 1: {
VIPIdentificationCard *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([VIPIdentificationCard class])
forIndexPath:indexPath];
NobleAuthInfo *info = [self.displayVipIdentificationInfoArray xpSafeObjectAtIndex:indexPath.row];
[cell updateTitle:info.authName];
switch (info.authType) {
case 1:
[cell updateImage:[NSString stringWithFormat:@"vip_center_id_level_%ld", currentVIPLevel]];
break;
case 2:
[cell updateImage:[NSString stringWithFormat:@"vip_center_avatar_level_%ld", currentVIPLevel]];
break;
case 5:
[cell updateImage:[NSString stringWithFormat:@"vip_center_room_card_level_%ld", currentVIPLevel]];
break;
case 8:
[cell updateImage:[NSString stringWithFormat:@"vip_center_wave_level_%ld", currentVIPLevel]];
break;
case 11:
[cell updateImage:[NSString stringWithFormat:@"vip_center_bubbles_level_%ld", currentVIPLevel]];
break;
case 12:
[cell updateImage:[NSString stringWithFormat:@"vip_center_entry_level_%ld", currentVIPLevel]];
break;
default:
break;
}
return cell;
}
break;
case 2: {
VIPExclusivePrivilegesTitleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([VIPExclusivePrivilegesTitleCell class])
forIndexPath:indexPath];
cell.exclusivePrivilegesCountLabel.text = self.exclusivePrivilegesSubTitle;
return cell;
}
break;
case 3: {
VIPExclusivePrivilegesCard *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([VIPExclusivePrivilegesCard class])
forIndexPath:indexPath];
NobleAuthInfo *info = [self.vipExclusivePrivilegesInfoArray xpSafeObjectAtIndex:indexPath.row];
cell.info = info;
cell.enable = [self.currentVIPInfo.ownAuthTypes containsObject:@(info.authType)];
return cell;
}
break;
default:
return [UICollectionViewCell new];
break;
}
}
#pragma mark - Purchase & Recharge
- (void)openVipWithDiamondSuccess {
[self setupData];
@@ -1021,19 +1108,6 @@
return _backButton;
}
- (UIButton *)settingButton {
if (!_settingButton) {
_settingButton = [UIButton buttonWithType:UIButtonTypeCustom];
_settingButton.hidden = YES;
[_settingButton setImage:kImage(@"vip_center_setting")
forState:UIControlStateNormal];
[_settingButton addTarget:self
action:@selector(didTapSetting)
forControlEvents:UIControlEventTouchUpInside];
}
return _settingButton;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
@@ -1062,79 +1136,27 @@
return _vipCardCyclePager;
}
- (UIScrollView *)mainScrollView {
if (!_mainScrollView) {
_mainScrollView = [[UIScrollView alloc] init];
_mainScrollView.showsVerticalScrollIndicator = false;
- (UICollectionView *)identificationCollectionView {
if (!_identificationCollectionView) {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(kGetScaleWidth(166), kGetScaleWidth(120));
layout.minimumInteritemSpacing = 12;
layout.minimumLineSpacing = 12;
_identificationCollectionView = [[UICollectionView alloc] initWithFrame:CGRectZero
collectionViewLayout:layout];
_identificationCollectionView.backgroundColor = [UIColor clearColor];
_identificationCollectionView.delegate = self;
_identificationCollectionView.dataSource = self;
[_identificationCollectionView registerClass:[VIPIdentificationTitleCell class]
forCellWithReuseIdentifier:NSStringFromClass([VIPIdentificationTitleCell class])];
[_identificationCollectionView registerClass:[VIPExclusivePrivilegesTitleCell class]
forCellWithReuseIdentifier:NSStringFromClass([VIPExclusivePrivilegesTitleCell class])];
[_identificationCollectionView registerClass:[VIPIdentificationCard class]
forCellWithReuseIdentifier:NSStringFromClass([VIPIdentificationCard class])];
[_identificationCollectionView registerClass:[VIPExclusivePrivilegesCard class]
forCellWithReuseIdentifier:NSStringFromClass([VIPExclusivePrivilegesCard class])];
}
return _mainScrollView;
}
- (UIView *)scrollContentView {
if (!_scrollContentView) {
_scrollContentView = [[UIView alloc] init];
}
return _scrollContentView;
}
- (VIPIdentificationCard *)identificationCard_vipIdentity {
if (!_identificationCard_vipIdentity) {
_identificationCard_vipIdentity = [[VIPIdentificationCard alloc] initWithFrame:CGRectMake(0, 0, kGetScaleWidth(166), kGetScaleWidth(120))];
}
return _identificationCard_vipIdentity;
}
- (VIPIdentificationCard *)identificationCard_roomCard {
if (!_identificationCard_roomCard) {
_identificationCard_roomCard = [[VIPIdentificationCard alloc] initWithFrame:CGRectMake(0, 0, kGetScaleWidth(166), kGetScaleWidth(120))];
}
return _identificationCard_roomCard;
}
- (VIPIdentificationCard *)identificationCard_entryAnimation {
if (!_identificationCard_entryAnimation) {
_identificationCard_entryAnimation = [[VIPIdentificationCard alloc] initWithFrame:CGRectMake(0, 0, kGetScaleWidth(166), kGetScaleWidth(120))];
}
return _identificationCard_entryAnimation;
}
- (VIPIdentificationCard *)identificationCard_micSoundWave {
if (!_identificationCard_micSoundWave) {
_identificationCard_micSoundWave = [[VIPIdentificationCard alloc] initWithFrame:CGRectMake(0, 0, kGetScaleWidth(166), kGetScaleWidth(120))];
}
return _identificationCard_micSoundWave;
}
- (VIPIdentificationCard *)identificationCard_exclusiveBubbles {
if (!_identificationCard_exclusiveBubbles) {
_identificationCard_exclusiveBubbles = [[VIPIdentificationCard alloc] initWithFrame:CGRectMake(0, 0, kGetScaleWidth(166), kGetScaleWidth(120))];
}
return _identificationCard_exclusiveBubbles;
}
- (VIPIdentificationCard *)identificationCard_placeHolder {
if (!_identificationCard_placeHolder) {
_identificationCard_placeHolder = [[VIPIdentificationCard alloc] initWithFrame:CGRectMake(0, 0, kGetScaleWidth(166), kGetScaleWidth(120))];
_identificationCard_placeHolder.isPlaceHolder = YES;
}
return _identificationCard_placeHolder;
}
- (UIStackView *)exclusivePrivilegesStack {
if (!_exclusivePrivilegesStack) {
_exclusivePrivilegesStack = [[UIStackView alloc] init];
_exclusivePrivilegesStack.axis = UILayoutConstraintAxisVertical; //
_exclusivePrivilegesStack.distribution = UIStackViewDistributionEqualSpacing;
_exclusivePrivilegesStack.spacing = 22; //
}
return _exclusivePrivilegesStack;
}
- (UILabel *)exclusivePrivilegesCountLabel {
if (!_exclusivePrivilegesCountLabel) {
_exclusivePrivilegesCountLabel = [UILabel labelInitWithText:@""
font:kFontMedium(13)
textColor:[DJDKMIMOMColor colorWithHexString:@"#FFE3AF"]];
_exclusivePrivilegesCountLabel.textAlignment = NSTextAlignmentCenter;
}
return _exclusivePrivilegesCountLabel;
return _identificationCollectionView;
}
- (UILabel *)purchasePriceLabel {
@@ -1167,6 +1189,4 @@
return _purchaseNoticeLabel;
}
@end

View File

@@ -8,16 +8,20 @@
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class LocationModel;
@protocol XPMineUserInfoEditPickViewDelegate <NSObject>
///点了确认按钮
- (void)didClickSureActionWithArea:(NSString *)area;
- (void)didClickSureActionWithArea:(LocationModel *)area;
@end
@interface XPMineUserInfoEditPickView : UIView
@property (nonatomic,strong)NSMutableArray * dataArray;//数据源
@property (nonatomic,strong)NSMutableArray <LocationModel *>* dataArray;//数据源
///
@property (nonatomic,copy) NSString *area;
@property (nonatomic,copy) NSString *outsideSelectedAreaName;
@property (nonatomic, strong) LocationModel *selectedArea;
///
@property (nonatomic,weak) id<XPMineUserInfoEditPickViewDelegate> delegate;
@end

View File

@@ -6,6 +6,8 @@
//
#import "XPMineUserInfoEditPickView.h"
#import "LocationModel.h"
@interface XPMineUserInfoEditPickView()<UIPickerViewDelegate,UIPickerViewDataSource>
@property (strong, nonatomic) UIPickerView *pickerView;
@@ -24,22 +26,22 @@
}
return self;
}
-(void)setDataArray:(NSMutableArray *)dataArray{
-(void)setDataArray:(NSMutableArray <LocationModel *> *)dataArray{
_dataArray = dataArray;
if(_dataArray.count == 0)return;
if(![_dataArray containsObject:_area]){
_area = _dataArray.firstObject;
NSInteger index = 0;
for (LocationModel *model in dataArray) {
if ([model.name isEqualToString:self.outsideSelectedAreaName]) {
index = [dataArray indexOfObject:model];
break;
}
}
[_pickerView reloadAllComponents];
if([_dataArray containsObject:_area]){
[_pickerView selectRow:[_dataArray indexOfObject:_area] inComponent:0 animated:YES];
}else{
[_pickerView selectRow:0 inComponent:0 animated:YES];
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[_pickerView selectRow:index inComponent:0 animated:YES];
});
}
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
return 1;
}
@@ -60,11 +62,11 @@
[self changeSpearatorLineColor];
AreaPickerView *lab = (AreaPickerView *)view;
if (!lab) {
lab = [[AreaPickerView alloc]initWithFrame:CGRectMake(kGetScaleWidth(15),0, KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(38))];
lab = [[AreaPickerView alloc] initWithFrame:CGRectMake(kGetScaleWidth(15),0, KScreenWidth - kGetScaleWidth(30), kGetScaleWidth(38))];
}
NSString *area = self.dataArray[row];
lab.titleLab.text = area;
if([area isEqualToString:self.area]){
LocationModel *area = self.dataArray[row];
lab.titleLab.text = area.name;
if([area isEqual:self.self.selectedArea]){
lab.backgroundColor = UIColorFromRGB(0xF3F5FA);
lab.titleLab.textColor = [DJDKMIMOMColor inputTextColor];
}else{
@@ -89,7 +91,7 @@
}
-(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
if(row < self.dataArray.count){
self.area = self.dataArray[row];
self.selectedArea = self.dataArray[row];
[pickerView reloadAllComponents];
}
@@ -129,7 +131,7 @@
-(void)confirmAction{
[self removeFromSuperview];
if(self.delegate && [self.delegate respondsToSelector:@selector(didClickSureActionWithArea:)]){
[self.delegate didClickSureActionWithArea:self.area];
[self.delegate didClickSureActionWithArea:self.selectedArea];
}
}
#pragma mark -

View File

@@ -317,13 +317,13 @@
VipSettingCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([VipSettingCell class])];
switch (indexPath.row) {
case 0:
//
//
cell.title = YMLocalizedString(@"VipSettin_1.0.17_2");
cell.switchStatus = self.userInfo.userVipInfoVO.preventFollow;
cell.minLevel = 5;
break;
case 1:
//
//
cell.title = YMLocalizedString(@"VipSettin_1.0.17_3");
cell.switchStatus = self.userInfo.userVipInfoVO.preventTrace;
cell.minLevel = 6;

View File

@@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) NSInteger micUserCount;
@property (nonatomic, assign) NSInteger partitionId;
@property (nonatomic, assign) NSString *roomDesc;
@property (nonatomic, copy) NSString *regionFlag;
@property (nonatomic, strong) NSArray<HomePlayMicUserModel *> *micUsers;
@end

View File

@@ -17,7 +17,9 @@
@implementation XPHomeMinePresenter
- (void)getMyRoom {
@kWeakify(self);
[Api getMyRoomCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
if (code == 200) {
HomeMineRoomModel *model = [HomeMineRoomModel modelWithDictionary:data.data];
[[self getView] getMyRoomSuccess:model];

View File

@@ -131,7 +131,7 @@
make.leading.equalTo(self.nameLabel);
make.height.mas_equalTo(kGetScaleWidth(14));
make.width.mas_equalTo(kGetScaleWidth(18));
make.top.equalTo(self.nameLabel.mas_bottom).mas_offset(kGetScaleWidth(5));
make.top.equalTo(self.nameLabel.mas_bottom).mas_offset(kGetScaleWidth(6));
}];
[self.subLabel mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@@ -31,6 +31,7 @@
@property (nonatomic, strong) UILabel *descLabel;
@property (nonatomic, strong) UILabel *heatLabel;
@property (nonatomic, strong) UIView *miniAvatarsContainer;
@property (nonatomic, strong) NetImageView *flagImage;
@property (nonatomic, copy) void(^didTapMyRoom)(void);
@end
@@ -55,6 +56,14 @@
self.descLabel.text = model.roomDesc.length > 0 ? model.roomDesc : YMLocalizedString(@"XPHomeMineViewController3");
self.heatLabel.text = [NSString stringWithFormat:@"%ld", model.onlineNum];
[self.flagImage mas_updateConstraints:^(MASConstraintMaker *make) {
make.width.mas_equalTo(model.regionFlag.length > 0 ? kGetScaleWidth(18) : 0);
}];
[self.descLabel mas_updateConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(self.roomNameLabel).offset(model.regionFlag.length > 0 ? kGetScaleWidth(18)+4 : 0);
}];
self.flagImage.imageUrl = model.regionFlag;
for (UIView *subView in self.miniAvatarsContainer.subviews) {
[subView removeFromSuperview];
}
@@ -118,10 +127,19 @@
make.trailing.mas_equalTo(backgroundImageView).offset(-8);
}];
[self addSubview:self.flagImage];
[self.flagImage mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.equalTo(self.roomNameLabel);
make.height.mas_equalTo(kGetScaleWidth(14));
make.width.mas_equalTo(kGetScaleWidth(18));
make.top.equalTo(self.roomNameLabel.mas_bottom).mas_offset(kGetScaleWidth(6));
}];
[self addSubview:self.descLabel];
[self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(backgroundImageView).offset(40);
make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(8);
// make.leading.mas_equalTo(self.avatarImageView.mas_trailing).offset(8);
make.leading.equalTo(self.roomNameLabel).offset(0);
make.trailing.mas_equalTo(backgroundImageView).offset(-8);
}];
@@ -207,6 +225,14 @@
return _heatLabel;
}
- (NetImageView *)flagImage{
if(!_flagImage){
_flagImage = [NetImageView new];
_flagImage.contentMode = UIViewContentModeScaleAspectFit;
}
return _flagImage;
}
@end
@interface XPHomeMineViewController () <JXCategoryViewDelegate, JXPagerViewDelegate, JXPagerMainTableViewGestureDelegate, XPHomeMineProtocol>

View File

@@ -108,6 +108,13 @@
}
- (void)followBtnClick:(UIButton *)btn {
if (self.targetUserInfo.userVipInfoVO.preventFollow) {
// NSString *message = [NSString stringWithFormat:YMLocalizedString(@"UserCard_1.0.17_0"), @(self.targetUserInfo.userVipInfoVO.vipLevel)];
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"UserCard_1.0.17_1")];
return;
}
NSString * uid = [[AccountInfoStorage instance] getUid];
NSString * ticket = [[AccountInfoStorage instance] getTicket];
NSString * type = @"1";

View File

@@ -828,8 +828,6 @@
}
}
// TODO VIP
if (self.datasource.count > 0) {
XPUserCardItemModel * model = [self.datasource xpSafeObjectAtIndex:indexPath.item];
NSString * roomId = [NSString stringWithFormat:@"%ld", self.cardInfo.roomInfo.roomId];;
@@ -838,8 +836,8 @@
case UserCardMicroType_UpDown: {
// VIP T
if (self.targetUserInfo.userVipInfoVO.preventKick) {
NSString *message = YMLocalizedString(@"UserCard_1.0.17_0");
[TTPopup alertWithMessage:message confirmHandler:^{
NSString *message = [NSString stringWithFormat:YMLocalizedString(@"UserCard_1.0.17_0"), @(self.targetUserInfo.userVipInfoVO.vipLevel)];
[TTPopup alertWithMessage:YMLocalizedString(@"UserCard_1.0.17_1") confirmHandler:^{
} cancelHandler:^{
}];
@@ -930,8 +928,8 @@
// if (self.cardInfo.roomInfo.uid != [AccountInfoStorage instance].getUid.integerValue) {
// [self showErrorToast:[NSString stringWithFormat:YMLocalizedString(@"XPUserCardViewController5"), self.targetUserInfo.userVipInfoVO.vipName]];
// } else {//
NSString *message = YMLocalizedString(@"UserCard_1.0.17_0");//[NSString stringWithFormat:YMLocalizedString(@"UserCard_1.0.17_0"), self.targetUserInfo.userVipInfoVO.vipName];
[TTPopup alertWithMessage:message confirmHandler:^{
NSString *message = [NSString stringWithFormat:YMLocalizedString(@"UserCard_1.0.17_0"), @(self.targetUserInfo.userVipInfoVO.vipLevel)];
[TTPopup alertWithMessage:YMLocalizedString(@"UserCard_1.0.17_1") confirmHandler:^{
} cancelHandler:^{
}];
@@ -989,8 +987,8 @@
{
// 1
if (self.targetUserInfo.userVipInfoVO.preventKick) {
NSString *message = YMLocalizedString(@"UserCard_1.0.17_0");
[TTPopup alertWithMessage:message confirmHandler:^{
NSString *message = [NSString stringWithFormat:YMLocalizedString(@"UserCard_1.0.17_0"), @(self.targetUserInfo.userVipInfoVO.vipLevel)];
[TTPopup alertWithMessage:YMLocalizedString(@"UserCard_1.0.17_1") confirmHandler:^{
} cancelHandler:^{
}];

View File

@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL uploadGifAvatar;
/// 过期时间
@property (nonatomic, assign) NSTimeInterval expireTime;
/// 是否防跟
/// 是否防跟随进房
@property (nonatomic, assign) BOOL preventTrace;
/// 是否防关注
@property (nonatomic, assign) BOOL preventFollow;

View File

@@ -3953,12 +3953,14 @@ ineHeadView12" = "الحمل";
"RoomMicState_1" = "لقد قمت بتشغيل الموسيقى ولكنك أوقفت الميكروفون.";
"RoomMicState_2" = "لقد أوقفت الموسيقى والميكروفون.";
"UserInfoEdit_1.0.17_0" = "Gif 头像";
"UserInfoEdit_1.0.17_0" = "الصورة الرمزية المتحركة";
"UserInfoEdit_1.0.17_1" = "الصورة الرمزية الثابتة";
"RoomSetting_1.0.17_0" = "الصورة الرمزية للغرفة";
"VipSettin_1.0.17_0" = "إعداد في اي بي";
"VipSettin_1.0.17_1" = "VIP امتياز";
"VipSettin_1.0.17_2" = "منع المتابعة";
"VipSettin_1.0.17_3" = "عدم الإزعاج";
"VipSettin_1.0.17_4" = "تشغيل وضع التصفح المتخفي";
"VipSettin_1.0.17_5" = "تجنب الطرد";
"UserCard_1.0.17_0" = "设置失败用户为尊贵的VIP8/ VIP9";
"VipSettin_1.0.17_1" = "امتيازات VIP";
"VipSettin_1.0.17_2" = "لا يتم متابعته";
"VipSettin_1.0.17_3" = "منع المتابعة";
"VipSettin_1.0.17_4" = "الخفاء";
"VipSettin_1.0.17_5" = "منع الطرد";
"UserCard_1.0.17_0" = "%@فشل الإعداد، هذا المستخدم هو في اي بي";
"UserCard_1.0.17_1" = "فشل المتابعة، تم تعيين المستخدم على عدم إمكانية متابعته";

View File

@@ -3749,12 +3749,14 @@
"RoomMicState_1" = "You turned on the music but turned off the mic.";
"RoomMicState_2" = "You turned off the music and the mic.";
"UserInfoEdit_1.0.17_0" = "Gif 头像";
"UserInfoEdit_1.0.17_0" = "Dynamic Avatar";
"UserInfoEdit_1.0.17_1" = "Static Avatar";
"RoomSetting_1.0.17_0" = "Room avatar";
"VipSettin_1.0.17_0" = "VIP Setting";
"VipSettin_1.0.17_1" = "VIP privilege";
"VipSettin_1.0.17_2" = "Forbid to follow";
"VipSettin_1.0.17_3" = "Do not disturb";
"VipSettin_1.0.17_4" = "Turn on incognito mode";
"VipSettin_1.0.17_5" = "Avoid being kicked out";
"UserCard_1.0.17_0" = "设置失败用户为尊贵的VIP8/ VIP9";
"VipSettin_1.0.17_2" = "Not being Followed";
"VipSettin_1.0.17_3" = "Anti-Entering Room";
"VipSettin_1.0.17_4" = "Invisibility";
"VipSettin_1.0.17_5" = "Anti-Kick";
"UserCard_1.0.17_0" = "Setting failed, this user is VIP%@";
"UserCard_1.0.17_1" = "Follow failed, the user has been set to be unfollowable.";

View File

@@ -3213,12 +3213,14 @@
"RoomMicState_1" = "Müziği açık, mikrofonu kapalı.";
"RoomMicState_2" = "Müziği ve mikrofonu kapattınız.";
"UserInfoEdit_1.0.17_0" = "Gif Profil Resmi";
"UserInfoEdit_1.0.17_0" = "Dinamik Avatar";
"UserInfoEdit_1.0.17_1" = "Statik Avatar";
"RoomSetting_1.0.17_0" = "Oda avatarı";
"VipSettin_1.0.17_0" = "VIP Ayarı";
"VipSettin_1.0.17_0" = "VIP Ayrıcalıkları";
"VipSettin_1.0.17_1" = "VIP ayrıcalık";
"VipSettin_1.0.17_2" = "Takip etmeyi yasakla";
"VipSettin_1.0.17_3" = "Rahatsız etmeyin";
"VipSettin_1.0.17_4" = "Gizli modu aç";
"VipSettin_1.0.17_5" = "Atılmaktan kaçın";
"UserCard_1.0.17_0" = "设置失败用户为尊贵的VIP8/ VIP9";
"VipSettin_1.0.17_2" = "Takip Edilmemek";
"VipSettin_1.0.17_3" = "Odaya Giriş Karşıtı";
"VipSettin_1.0.17_4" = "Görünmezlik";
"VipSettin_1.0.17_5" = "Tekme Karşıtı";
"UserCard_1.0.17_0" = "Ayar başarısız oldu, bu kullanıcı VIP%@";
"UserCard_1.0.17_1" = "Takip başarısız oldu, kullanıcı takip edilemez olarak ayarlandı.";

View File

@@ -3405,12 +3405,14 @@
"RoomMicState_1" = "您打開了音樂但關閉了麥克風。";
"RoomMicState_2" = "你關掉了音樂和麥克風。";
"UserInfoEdit_1.0.17_0" = "Gif 头像";
"UserInfoEdit_1.0.17_0" = "動態头像";
"UserInfoEdit_1.0.17_1" = "靜態头像";
"RoomSetting_1.0.17_0" = "房間頭像";
"VipSettin_1.0.17_0" = "VIP設定";
"VipSettin_1.0.17_1" = "VIP privilege";
"VipSettin_1.0.17_2" = "禁止跟隨";
"VipSettin_1.0.17_3" = "請勿打擾";
"VipSettin_1.0.17_4" = "開啟隱身模式";
"VipSettin_1.0.17_5" = "避免被趕出";
"UserCard_1.0.17_0" = "设置失败用户为尊贵的VIP8/ VIP9";
"VipSettin_1.0.17_1" = "VIP 特權";
"VipSettin_1.0.17_2" = "不被关注";
"VipSettin_1.0.17_3" = "防跟随";
"VipSettin_1.0.17_4" = "隐身";
"VipSettin_1.0.17_5" = "防踢";
"UserCard_1.0.17_0" = "設定失敗,該使用者是 VIP%@";
"UserCard_1.0.17_1" = "關注失敗,該用戶已被設定為不可關注。";