diff --git a/YuMi.xcodeproj/project.pbxproj b/YuMi.xcodeproj/project.pbxproj index e6b53e49..3a2bf55c 100644 --- a/YuMi.xcodeproj/project.pbxproj +++ b/YuMi.xcodeproj/project.pbxproj @@ -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 = ""; }; 54C9A1232C3E74AE00C6D970 /* MessageGameOrderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageGameOrderView.h; sourceTree = ""; }; 54C9A1242C3E74AE00C6D970 /* MessageGameOrderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageGameOrderView.m; sourceTree = ""; }; + 54CE5EF72CCA4A2600A67898 /* LocationModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocationModel.h; sourceTree = ""; }; + 54CE5EF82CCA4A2600A67898 /* LocationModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LocationModel.m; sourceTree = ""; }; 54E4D52E2C9048E1009E1FEA /* LuckyGiftWinningFlagView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LuckyGiftWinningFlagView.h; sourceTree = ""; }; 54E4D52F2C9048E1009E1FEA /* LuckyGiftWinningFlagView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LuckyGiftWinningFlagView.m; sourceTree = ""; }; 54E4D5312C90658C009E1FEA /* LuckyGiftWinningBannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LuckyGiftWinningBannerView.h; sourceTree = ""; }; @@ -10893,6 +10896,8 @@ 9B734F75288A92FB00CBDAA9 /* XPMineFunctionItemModel.m */, 54C9A11D2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.h */, 54C9A11E2C3DA08000C6D970 /* XPMineGamePartnerInfoModel.m */, + 54CE5EF72CCA4A2600A67898 /* LocationModel.h */, + 54CE5EF82CCA4A2600A67898 /* LocationModel.m */, ); path = Model; sourceTree = ""; @@ -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 */, diff --git a/YuMi/Assets.xcassets/Language/en/room_candy_tree_buy_love_but_btn_en.imageset/room_candy_tree_buy_love_but_btn@3x.png b/YuMi/Assets.xcassets/Language/en/room_candy_tree_buy_love_but_btn_en.imageset/room_candy_tree_buy_love_but_btn@3x.png index 6697053a..77a7f4cf 100644 Binary files a/YuMi/Assets.xcassets/Language/en/room_candy_tree_buy_love_but_btn_en.imageset/room_candy_tree_buy_love_but_btn@3x.png and b/YuMi/Assets.xcassets/Language/en/room_candy_tree_buy_love_but_btn_en.imageset/room_candy_tree_buy_love_but_btn@3x.png differ diff --git a/YuMi/Assets.xcassets/Language/en/room_candy_tree_buy_love_title_en.imageset/room_candy_tree_buy_love_title@3x.png b/YuMi/Assets.xcassets/Language/en/room_candy_tree_buy_love_title_en.imageset/room_candy_tree_buy_love_title@3x.png index 9f2cf490..c9970bc0 100644 Binary files a/YuMi/Assets.xcassets/Language/en/room_candy_tree_buy_love_title_en.imageset/room_candy_tree_buy_love_title@3x.png and b/YuMi/Assets.xcassets/Language/en/room_candy_tree_buy_love_title_en.imageset/room_candy_tree_buy_love_title@3x.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip1/vip_center_avatar_level_1.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip1/vip_center_avatar_level_1.imageset/Contents.json new file mode 100644 index 00000000..590383b3 --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip1/vip_center_avatar_level_1.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip1/vip_center_avatar_level_1.imageset/切图 45@3x.png b/YuMi/Assets.xcassets/Vip Center/vip1/vip_center_avatar_level_1.imageset/切图 45@3x.png new file mode 100644 index 00000000..6c37ce27 Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip1/vip_center_avatar_level_1.imageset/切图 45@3x.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip2/vip_center_avatar_level_2.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip2/vip_center_avatar_level_2.imageset/Contents.json new file mode 100644 index 00000000..bb6fdb94 --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip2/vip_center_avatar_level_2.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip2/vip_center_avatar_level_2.imageset/切图 45@3x-2.png b/YuMi/Assets.xcassets/Vip Center/vip2/vip_center_avatar_level_2.imageset/切图 45@3x-2.png new file mode 100644 index 00000000..d279b5c1 Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip2/vip_center_avatar_level_2.imageset/切图 45@3x-2.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip3/vip_center_avatar_level_3.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip3/vip_center_avatar_level_3.imageset/Contents.json new file mode 100644 index 00000000..7aea04b5 --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip3/vip_center_avatar_level_3.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip3/vip_center_avatar_level_3.imageset/切图 45@3x-3.png b/YuMi/Assets.xcassets/Vip Center/vip3/vip_center_avatar_level_3.imageset/切图 45@3x-3.png new file mode 100644 index 00000000..8e360ab3 Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip3/vip_center_avatar_level_3.imageset/切图 45@3x-3.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip4/vip_center_avatar_level_4.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip4/vip_center_avatar_level_4.imageset/Contents.json new file mode 100644 index 00000000..4bb3541a --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip4/vip_center_avatar_level_4.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip4/vip_center_avatar_level_4.imageset/切图 45@3x-4.png b/YuMi/Assets.xcassets/Vip Center/vip4/vip_center_avatar_level_4.imageset/切图 45@3x-4.png new file mode 100644 index 00000000..037d91b9 Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip4/vip_center_avatar_level_4.imageset/切图 45@3x-4.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip5/vip_center_avatar_level_5.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip5/vip_center_avatar_level_5.imageset/Contents.json new file mode 100644 index 00000000..da83e797 --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip5/vip_center_avatar_level_5.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip5/vip_center_avatar_level_5.imageset/切图 45@3x-5.png b/YuMi/Assets.xcassets/Vip Center/vip5/vip_center_avatar_level_5.imageset/切图 45@3x-5.png new file mode 100644 index 00000000..e1187fa0 Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip5/vip_center_avatar_level_5.imageset/切图 45@3x-5.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip6/vip_center_avatar_level_6.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip6/vip_center_avatar_level_6.imageset/Contents.json new file mode 100644 index 00000000..600e57b3 --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip6/vip_center_avatar_level_6.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip6/vip_center_avatar_level_6.imageset/切图 45@3x-6.png b/YuMi/Assets.xcassets/Vip Center/vip6/vip_center_avatar_level_6.imageset/切图 45@3x-6.png new file mode 100644 index 00000000..f4298f59 Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip6/vip_center_avatar_level_6.imageset/切图 45@3x-6.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip7/vip_center_avatar_level_7.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip7/vip_center_avatar_level_7.imageset/Contents.json new file mode 100644 index 00000000..0c30d3a8 --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip7/vip_center_avatar_level_7.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip7/vip_center_avatar_level_7.imageset/切图 45@3x-7.png b/YuMi/Assets.xcassets/Vip Center/vip7/vip_center_avatar_level_7.imageset/切图 45@3x-7.png new file mode 100644 index 00000000..dac32c94 Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip7/vip_center_avatar_level_7.imageset/切图 45@3x-7.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip8/vip_center_avatar_level_8.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip8/vip_center_avatar_level_8.imageset/Contents.json new file mode 100644 index 00000000..f93d4fc9 --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip8/vip_center_avatar_level_8.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip8/vip_center_avatar_level_8.imageset/切图 45@3x-8.png b/YuMi/Assets.xcassets/Vip Center/vip8/vip_center_avatar_level_8.imageset/切图 45@3x-8.png new file mode 100644 index 00000000..d9a4ed5b Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip8/vip_center_avatar_level_8.imageset/切图 45@3x-8.png differ diff --git a/YuMi/Assets.xcassets/Vip Center/vip9/vip_center_avatar_level_9.imageset/Contents.json b/YuMi/Assets.xcassets/Vip Center/vip9/vip_center_avatar_level_9.imageset/Contents.json new file mode 100644 index 00000000..12285048 --- /dev/null +++ b/YuMi/Assets.xcassets/Vip Center/vip9/vip_center_avatar_level_9.imageset/Contents.json @@ -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 + } +} diff --git a/YuMi/Assets.xcassets/Vip Center/vip9/vip_center_avatar_level_9.imageset/切图 45@3x-9.png b/YuMi/Assets.xcassets/Vip Center/vip9/vip_center_avatar_level_9.imageset/切图 45@3x-9.png new file mode 100644 index 00000000..36e51a32 Binary files /dev/null and b/YuMi/Assets.xcassets/Vip Center/vip9/vip_center_avatar_level_9.imageset/切图 45@3x-9.png differ diff --git a/YuMi/Modules/YMMine/Api/Api+Mine.h b/YuMi/Modules/YMMine/Api/Api+Mine.h index 577d504a..600af7df 100644 --- a/YuMi/Modules/YMMine/Api/Api+Mine.h +++ b/YuMi/Modules/YMMine/Api/Api+Mine.h @@ -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; ///屏蔽房间列表 diff --git a/YuMi/Modules/YMMine/Api/Api+Mine.m b/YuMi/Modules/YMMine/Api/Api+Mine.m index a106ef81..fe652df2 100644 --- a/YuMi/Modules/YMMine/Api/Api+Mine.m +++ b/YuMi/Modules/YMMine/Api/Api+Mine.m @@ -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]; } diff --git a/YuMi/Modules/YMMine/Model/LocationModel.h b/YuMi/Modules/YMMine/Model/LocationModel.h new file mode 100644 index 00000000..36cd7d50 --- /dev/null +++ b/YuMi/Modules/YMMine/Model/LocationModel.h @@ -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 diff --git a/YuMi/Modules/YMMine/Model/LocationModel.m b/YuMi/Modules/YMMine/Model/LocationModel.m new file mode 100644 index 00000000..afc06d30 --- /dev/null +++ b/YuMi/Modules/YMMine/Model/LocationModel.m @@ -0,0 +1,12 @@ +// +// LocationModel.m +// YuMi +// +// Created by P on 2024/10/24. +// + +#import "LocationModel.h" + +@implementation LocationModel + +@end diff --git a/YuMi/Modules/YMMine/Presenter/XPMineSettingPresent.h b/YuMi/Modules/YMMine/Presenter/XPMineSettingPresent.h index 39a9e566..ef17530d 100644 --- a/YuMi/Modules/YMMine/Presenter/XPMineSettingPresent.h +++ b/YuMi/Modules/YMMine/Presenter/XPMineSettingPresent.h @@ -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 diff --git a/YuMi/Modules/YMMine/Presenter/XPMineUserInfoEditPresenter.h b/YuMi/Modules/YMMine/Presenter/XPMineUserInfoEditPresenter.h index 5f182341..777b5083 100644 --- a/YuMi/Modules/YMMine/Presenter/XPMineUserInfoEditPresenter.h +++ b/YuMi/Modules/YMMine/Presenter/XPMineUserInfoEditPresenter.h @@ -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 diff --git a/YuMi/Modules/YMMine/Presenter/XPMineUserInfoEditPresenter.m b/YuMi/Modules/YMMine/Presenter/XPMineUserInfoEditPresenter.m index c4e5754b..84169be2 100644 --- a/YuMi/Modules/YMMine/Presenter/XPMineUserInfoEditPresenter.m +++ b/YuMi/Modules/YMMine/Presenter/XPMineUserInfoEditPresenter.m @@ -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 { diff --git a/YuMi/Modules/YMMine/View/Cell/Friend/XPMineAttentionTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/Friend/XPMineAttentionTableViewCell.m index d09fc921..796bb77a 100644 --- a/YuMi/Modules/YMMine/View/Cell/Friend/XPMineAttentionTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/Friend/XPMineAttentionTableViewCell.m @@ -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) { diff --git a/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.h b/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.h index dc7b55ba..4eeaca48 100644 --- a/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.h +++ b/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.h @@ -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; diff --git a/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.m index 043920c0..31947dd8 100644 --- a/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/MineInfo/XPMineUserInfoEditTableViewCell.m @@ -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]; diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.h b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.h index a5a4fce7..aa9b8352 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.h +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.h @@ -10,17 +10,18 @@ @class RelationUserVO; NS_ASSUME_NONNULL_BEGIN -@class XPMineUserInfoEditViewController; +@class XPMineUserInfoEditViewController, LocationModel; @protocol XPMineUserInfoEditViewControllerDelegate - (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 delegate; diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.m b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.m index eca60f0f..9dcbc7f3 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.m +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoEditViewController.m @@ -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 *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 *)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 { diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m index 97599c40..f2de7ccd 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m @@ -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 diff --git a/YuMi/Modules/YMMine/View/Noble/Model/NobleAuthInfo.h b/YuMi/Modules/YMMine/View/Noble/Model/NobleAuthInfo.h index 0eb843d0..0fb327f8 100644 --- a/YuMi/Modules/YMMine/View/Noble/Model/NobleAuthInfo.h +++ b/YuMi/Modules/YMMine/View/Noble/Model/NobleAuthInfo.h @@ -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; diff --git a/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.h b/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.h index f1090aa8..98f710f4 100644 --- a/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.h +++ b/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.h @@ -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 diff --git a/YuMi/Modules/YMMine/View/Noble/View/VIPCenterViewController.m b/YuMi/Modules/YMMine/View/Noble/View/VIPCenterViewController.m index f1734ab2..7b35979a 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/VIPCenterViewController.m +++ b/YuMi/Modules/YMMine/View/Noble/View/VIPCenterViewController.m @@ -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 () +@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 *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 diff --git a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoEditPickView.h b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoEditPickView.h index 87d4805f..6a2241d3 100644 --- a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoEditPickView.h +++ b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoEditPickView.h @@ -8,16 +8,20 @@ #import NS_ASSUME_NONNULL_BEGIN + +@class LocationModel; + @protocol XPMineUserInfoEditPickViewDelegate ///点了确认按钮 -- (void)didClickSureActionWithArea:(NSString *)area; +- (void)didClickSureActionWithArea:(LocationModel *)area; @end @interface XPMineUserInfoEditPickView : UIView -@property (nonatomic,strong)NSMutableArray * dataArray;//数据源 +@property (nonatomic,strong)NSMutableArray * dataArray;//数据源 /// -@property (nonatomic,copy) NSString *area; +@property (nonatomic,copy) NSString *outsideSelectedAreaName; +@property (nonatomic, strong) LocationModel *selectedArea; /// @property (nonatomic,weak) id delegate; @end diff --git a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoEditPickView.m b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoEditPickView.m index e3b9b0a1..8029e391 100644 --- a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoEditPickView.m +++ b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoEditPickView.m @@ -6,6 +6,8 @@ // #import "XPMineUserInfoEditPickView.h" +#import "LocationModel.h" + @interface XPMineUserInfoEditPickView() @property (strong, nonatomic) UIPickerView *pickerView; @@ -24,22 +26,22 @@ } return self; } --(void)setDataArray:(NSMutableArray *)dataArray{ +-(void)setDataArray:(NSMutableArray *)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 -懒加载 diff --git a/YuMi/Modules/YMMine/View/VipSettingViewController.m b/YuMi/Modules/YMMine/View/VipSettingViewController.m index 95e874ef..a6a8936e 100644 --- a/YuMi/Modules/YMMine/View/VipSettingViewController.m +++ b/YuMi/Modules/YMMine/View/VipSettingViewController.m @@ -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; diff --git a/YuMi/Modules/YMNewHome/Model/HomeMineRoomModel.h b/YuMi/Modules/YMNewHome/Model/HomeMineRoomModel.h index cfd4f145..f5b94b63 100644 --- a/YuMi/Modules/YMNewHome/Model/HomeMineRoomModel.h +++ b/YuMi/Modules/YMNewHome/Model/HomeMineRoomModel.h @@ -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 *micUsers; @end diff --git a/YuMi/Modules/YMNewHome/Presenter/XPHomeMinePresenter.m b/YuMi/Modules/YMNewHome/Presenter/XPHomeMinePresenter.m index 09922a9f..6b031b08 100644 --- a/YuMi/Modules/YMNewHome/Presenter/XPHomeMinePresenter.m +++ b/YuMi/Modules/YMNewHome/Presenter/XPHomeMinePresenter.m @@ -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]; diff --git a/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePartyCollectionViewCell.m b/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePartyCollectionViewCell.m index 8860fcd0..fcc993dc 100644 --- a/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePartyCollectionViewCell.m +++ b/YuMi/Modules/YMNewHome/View/Cell/XPNewHomePartyCollectionViewCell.m @@ -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) { diff --git a/YuMi/Modules/YMNewHome/View/XPHomeMineViewController.m b/YuMi/Modules/YMNewHome/View/XPHomeMineViewController.m index cf40c77f..e4d8515c 100644 --- a/YuMi/Modules/YMNewHome/View/XPHomeMineViewController.m +++ b/YuMi/Modules/YMNewHome/View/XPHomeMineViewController.m @@ -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 () diff --git a/YuMi/Modules/YMRoom/View/AnchorView/XPRoomAnchorInfoCardView.m b/YuMi/Modules/YMRoom/View/AnchorView/XPRoomAnchorInfoCardView.m index f6fc7ec2..7b4a2170 100644 --- a/YuMi/Modules/YMRoom/View/AnchorView/XPRoomAnchorInfoCardView.m +++ b/YuMi/Modules/YMRoom/View/AnchorView/XPRoomAnchorInfoCardView.m @@ -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"; diff --git a/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m b/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m index 7f28853d..8f655630 100644 --- a/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m +++ b/YuMi/Modules/YMRoom/View/UserCard/View/XPUserCardViewController.m @@ -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:^{ }]; diff --git a/YuMi/Structure/MVP/Model/UserVipInfoVo.h b/YuMi/Structure/MVP/Model/UserVipInfoVo.h index 542e459b..6b07d162 100644 --- a/YuMi/Structure/MVP/Model/UserVipInfoVo.h +++ b/YuMi/Structure/MVP/Model/UserVipInfoVo.h @@ -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; diff --git a/YuMi/ar.lproj/Localizable.strings b/YuMi/ar.lproj/Localizable.strings index 3dd9522e..8e8a5a5f 100644 --- a/YuMi/ar.lproj/Localizable.strings +++ b/YuMi/ar.lproj/Localizable.strings @@ -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" = "فشل المتابعة، تم تعيين المستخدم على عدم إمكانية متابعته"; diff --git a/YuMi/en.lproj/Localizable.strings b/YuMi/en.lproj/Localizable.strings index a0db36ad..983469b5 100644 --- a/YuMi/en.lproj/Localizable.strings +++ b/YuMi/en.lproj/Localizable.strings @@ -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."; diff --git a/YuMi/tr.lproj/Localizable.strings b/YuMi/tr.lproj/Localizable.strings index 9cc5b3a4..7b77c4f2 100644 --- a/YuMi/tr.lproj/Localizable.strings +++ b/YuMi/tr.lproj/Localizable.strings @@ -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ı."; diff --git a/YuMi/zh-Hant.lproj/Localizable.strings b/YuMi/zh-Hant.lproj/Localizable.strings index 77efd306..816eae64 100644 --- a/YuMi/zh-Hant.lproj/Localizable.strings +++ b/YuMi/zh-Hant.lproj/Localizable.strings @@ -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" = "關注失敗,該用戶已被設定為不可關注。";