Commit 29b2334a by pierce

通知页面

parent 07fc83dd
...@@ -28,6 +28,11 @@ typedef NS_ENUM(NSInteger, CustomSettingItemType) { ...@@ -28,6 +28,11 @@ typedef NS_ENUM(NSInteger, CustomSettingItemType) {
*/ */
@property (nonatomic, copy) NSString *icon; @property (nonatomic, copy) NSString *icon;
/**
* 图标
*/
@property (nonatomic, copy) NSString *webIcon;
// 图标的偏移量 // 图标的偏移量
@property (nonatomic, assign) CGPoint iconOffset; @property (nonatomic, assign) CGPoint iconOffset;
...@@ -179,4 +184,10 @@ typedef NS_ENUM(NSInteger, CustomSettingItemType) { ...@@ -179,4 +184,10 @@ typedef NS_ENUM(NSInteger, CustomSettingItemType) {
*/ */
+ (instancetype)fus_itemWithIcon:(NSString *)icon title:(NSString *)title type:(CustomSettingItemType)type; + (instancetype)fus_itemWithIcon:(NSString *)icon title:(NSString *)title type:(CustomSettingItemType)type;
@property (nonatomic, copy) UITableViewCell *(^getCustomCellBlock)(UITableView *tableView, NSIndexPath *indexPath, FUSCustomSettingItem *item);
@end @end
...@@ -85,6 +85,11 @@ ...@@ -85,6 +85,11 @@
FUSCustomSettingGroup *itemsGroup = self.allGroups[indexPath.section]; FUSCustomSettingGroup *itemsGroup = self.allGroups[indexPath.section];
FUSCustomSettingItem *item = itemsGroup.items[indexPath.row]; FUSCustomSettingItem *item = itemsGroup.items[indexPath.row];
if (item.getCustomCellBlock) {
UITableViewCell *cell = item.getCustomCellBlock(tableView, indexPath, item);
return cell;
}
FUSCustomSettingCell *settingCell = [FUSCustomSettingCell settingCellWithTableView:tableView style:item.cellStyle bgColor:itemsGroup.itemsBgColor]; FUSCustomSettingCell *settingCell = [FUSCustomSettingCell settingCellWithTableView:tableView style:item.cellStyle bgColor:itemsGroup.itemsBgColor];
settingCell.selectedBackgroundView = [[UIView alloc] initWithFrame:settingCell.frame]; settingCell.selectedBackgroundView = [[UIView alloc] initWithFrame:settingCell.frame];
settingCell.selectedBackgroundView.backgroundColor = itemsGroup.itemsPressBgColor; settingCell.selectedBackgroundView.backgroundColor = itemsGroup.itemsPressBgColor;
......
...@@ -158,6 +158,8 @@ ...@@ -158,6 +158,8 @@
BE2A4B982CF86CF6008B4796 /* FUSLiveAudienceSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE2A4B962CF86CF6008B4796 /* FUSLiveAudienceSettingViewController.m */; }; BE2A4B982CF86CF6008B4796 /* FUSLiveAudienceSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BE2A4B962CF86CF6008B4796 /* FUSLiveAudienceSettingViewController.m */; };
BE2A4B9E2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BE2A4B9C2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h */; }; BE2A4B9E2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BE2A4B9C2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h */; };
BE2A4B9F2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h.m in Sources */ = {isa = PBXBuildFile; fileRef = BE2A4B9D2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h.m */; }; BE2A4B9F2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h.m in Sources */ = {isa = PBXBuildFile; fileRef = BE2A4B9D2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h.m */; };
BE2A4BA22CF9B893008B4796 /* FUSNoticeLiveUserCell.h in Headers */ = {isa = PBXBuildFile; fileRef = BE2A4BA02CF9B893008B4796 /* FUSNoticeLiveUserCell.h */; };
BE2A4BA32CF9B893008B4796 /* FUSNoticeLiveUserCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BE2A4BA12CF9B893008B4796 /* FUSNoticeLiveUserCell.m */; };
BE3625822C6B32130004606D /* 1_zone_details_animation_1@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE3625062C6B32130004606D /* 1_zone_details_animation_1@3x.png */; }; BE3625822C6B32130004606D /* 1_zone_details_animation_1@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE3625062C6B32130004606D /* 1_zone_details_animation_1@3x.png */; };
BE3625832C6B32130004606D /* 1_zone_details_animation_2@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE3625072C6B32130004606D /* 1_zone_details_animation_2@3x.png */; }; BE3625832C6B32130004606D /* 1_zone_details_animation_2@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE3625072C6B32130004606D /* 1_zone_details_animation_2@3x.png */; };
BE3625842C6B32130004606D /* 1_zone_details_animation_3@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE3625082C6B32130004606D /* 1_zone_details_animation_3@3x.png */; }; BE3625842C6B32130004606D /* 1_zone_details_animation_3@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = BE3625082C6B32130004606D /* 1_zone_details_animation_3@3x.png */; };
...@@ -1010,6 +1012,8 @@ ...@@ -1010,6 +1012,8 @@
BE2A4B962CF86CF6008B4796 /* FUSLiveAudienceSettingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveAudienceSettingViewController.m; sourceTree = "<group>"; }; BE2A4B962CF86CF6008B4796 /* FUSLiveAudienceSettingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSLiveAudienceSettingViewController.m; sourceTree = "<group>"; };
BE2A4B9C2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSZhaixinChatSettingViewController.h; sourceTree = "<group>"; }; BE2A4B9C2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSZhaixinChatSettingViewController.h; sourceTree = "<group>"; };
BE2A4B9D2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSZhaixinChatSettingViewController.h.m; sourceTree = "<group>"; }; BE2A4B9D2CF87E5C008B4796 /* FUSZhaixinChatSettingViewController.h.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSZhaixinChatSettingViewController.h.m; sourceTree = "<group>"; };
BE2A4BA02CF9B893008B4796 /* FUSNoticeLiveUserCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSNoticeLiveUserCell.h; sourceTree = "<group>"; };
BE2A4BA12CF9B893008B4796 /* FUSNoticeLiveUserCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSNoticeLiveUserCell.m; sourceTree = "<group>"; };
BE3625062C6B32130004606D /* 1_zone_details_animation_1@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_zone_details_animation_1@3x.png"; sourceTree = "<group>"; }; BE3625062C6B32130004606D /* 1_zone_details_animation_1@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_zone_details_animation_1@3x.png"; sourceTree = "<group>"; };
BE3625072C6B32130004606D /* 1_zone_details_animation_2@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_zone_details_animation_2@3x.png"; sourceTree = "<group>"; }; BE3625072C6B32130004606D /* 1_zone_details_animation_2@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_zone_details_animation_2@3x.png"; sourceTree = "<group>"; };
BE3625082C6B32130004606D /* 1_zone_details_animation_3@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_zone_details_animation_3@3x.png"; sourceTree = "<group>"; }; BE3625082C6B32130004606D /* 1_zone_details_animation_3@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "1_zone_details_animation_3@3x.png"; sourceTree = "<group>"; };
...@@ -2727,6 +2731,8 @@ ...@@ -2727,6 +2731,8 @@
BE78CA0F2C538D7D00F38855 /* FUSSettingNetworkCherkAlert.h */, BE78CA0F2C538D7D00F38855 /* FUSSettingNetworkCherkAlert.h */,
BE78CA102C538D7D00F38855 /* FUSSettingNetworkCherkAlert.m */, BE78CA102C538D7D00F38855 /* FUSSettingNetworkCherkAlert.m */,
BE78CA112C538D7D00F38855 /* FUSSettingNetworkCherkAlert.xib */, BE78CA112C538D7D00F38855 /* FUSSettingNetworkCherkAlert.xib */,
BE2A4BA02CF9B893008B4796 /* FUSNoticeLiveUserCell.h */,
BE2A4BA12CF9B893008B4796 /* FUSNoticeLiveUserCell.m */,
); );
path = View; path = View;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3508,6 +3514,7 @@ ...@@ -3508,6 +3514,7 @@
BE189A952C7323FE0008418B /* FSRMinedictMotorMissionView.h in Headers */, BE189A952C7323FE0008418B /* FSRMinedictMotorMissionView.h in Headers */,
BE78CC302C538D7F00F38855 /* FUSSettingChatInviteCell.h in Headers */, BE78CC302C538D7F00F38855 /* FUSSettingChatInviteCell.h in Headers */,
BE78CBFA2C538D7F00F38855 /* FUSChatSettingViewController.h in Headers */, BE78CBFA2C538D7F00F38855 /* FUSChatSettingViewController.h in Headers */,
BE2A4BA22CF9B893008B4796 /* FUSNoticeLiveUserCell.h in Headers */,
BE78CC9D2C538D8000F38855 /* FUSNewsFeedReplyInputView.h in Headers */, BE78CC9D2C538D8000F38855 /* FUSNewsFeedReplyInputView.h in Headers */,
BE189AA92C7323FE0008418B /* FSRVoicedictMinePrivacySearchView.h in Headers */, BE189AA92C7323FE0008418B /* FSRVoicedictMinePrivacySearchView.h in Headers */,
BE78CCEF2C538D8000F38855 /* NEW_FUSFullImageViewController.h in Headers */, BE78CCEF2C538D8000F38855 /* NEW_FUSFullImageViewController.h in Headers */,
...@@ -4152,6 +4159,7 @@ ...@@ -4152,6 +4159,7 @@
BEDEDC292C66029D00B4B0B0 /* FUSBaoFangHomeFocusCollectionViewSmallCell.m in Sources */, BEDEDC292C66029D00B4B0B0 /* FUSBaoFangHomeFocusCollectionViewSmallCell.m in Sources */,
BE189A742C7323FE0008418B /* FSRPrivacyCollectionViewCell.m in Sources */, BE189A742C7323FE0008418B /* FSRPrivacyCollectionViewCell.m in Sources */,
BE189A782C7323FE0008418B /* FSRPrivacyVoiceCollectionViewCell.m in Sources */, BE189A782C7323FE0008418B /* FSRPrivacyVoiceCollectionViewCell.m in Sources */,
BE2A4BA32CF9B893008B4796 /* FUSNoticeLiveUserCell.m in Sources */,
BE78CC4F2C538D7F00F38855 /* FUSNewsFeedHttpHelper.m in Sources */, BE78CC4F2C538D7F00F38855 /* FUSNewsFeedHttpHelper.m in Sources */,
BE78CB6E2C538D7E00F38855 /* FUSZoneCacheOperate.m in Sources */, BE78CB6E2C538D7E00F38855 /* FUSZoneCacheOperate.m in Sources */,
BE78CBF62C538D7F00F38855 /* FUSBlackListViewController.m in Sources */, BE78CBF62C538D7F00F38855 /* FUSBlackListViewController.m in Sources */,
......
...@@ -267,4 +267,26 @@ ...@@ -267,4 +267,26 @@
success:(void (^)(NSDictionary *dataDict))success success:(void (^)(NSDictionary *dataDict))success
failure:(void (^)(NSString * msg, int code))failure; failure:(void (^)(NSString * msg, int code))failure;
/**
获取用户关注主播-设置通知开关
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_getUserLikePushListWithPage:(NSInteger)page
success:(void(^)(NSDictionary *dataDict))success
failure:(void(^)(NSString *msg, int code))failure;
/**
用户设置接收/不接收某个主播开播通知
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_setUserLikePushListWithRoomId:(NSString *)roomId
selected:(BOOL)selected
success:(void(^)(NSDictionary *dataDict))success
failure:(void(^)(NSString *msg, int code))failure;
@end @end
...@@ -517,7 +517,7 @@ ...@@ -517,7 +517,7 @@
/** /**
设置推送配置 设置推送配置
@param type 消息类型(1:开播消息、2:私信消息、3:声视讯消息、4:动态分享消息、5:活动消息 @param type 消息类型(0:系统通知、 1:开播消息、2:亲密私信消息、3:其他私信消息、4:动态分享消息、5:活动消息、6:好友私信通知、7:签到通知
@param switchState 状态(0:开启,1:关闭) @param switchState 状态(0:开启,1:关闭)
@param success 成功回调 @param success 成功回调
@param failure 失败回调 @param failure 失败回调
...@@ -539,6 +539,54 @@ ...@@ -539,6 +539,54 @@
}]; }];
} }
/**
获取用户关注主播-设置通知开关
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_getUserLikePushListWithPage:(NSInteger)page
success:(void(^)(NSDictionary *dataDict))success
failure:(void(^)(NSString *msg, int code))failure
{
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_GetUserLikePushList
params:@{@"page":@(page), @"pageSize":@(20)} success:^(NSDictionary *dataDict, int code) {
if (success) {
success(dataDict);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(dataDict[@"msg"],code);
}];
}
/**
用户设置接收/不接收某个主播开播通知
@param success 成功回调
@param failure 失败回调
*/
+ (void)fus_setUserLikePushListWithRoomId:(NSString *)roomId
selected:(BOOL)selected
success:(void(^)(NSDictionary *dataDict))success
failure:(void(^)(NSString *msg, int code))failure
{
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_setUserLikePushList
params:@{@"roomId":roomId, @"value":@(selected), @"type":@(1)}
success:^(NSDictionary *dataDict, int code) {
if (success) {
success(dataDict);
}
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(dataDict[@"msg"],code);
}];
}
/// 校验是否已更新账号资料 /// 校验是否已更新账号资料
+ (void)fus_oneToOneCheckQualificationSuccess:(void (^)(FUSOnetoOneCheckQualificationModel *))success failure:(void (^)(NSString *, int))failure{ + (void)fus_oneToOneCheckQualificationSuccess:(void (^)(FUSOnetoOneCheckQualificationModel *))success failure:(void (^)(NSString *, int))failure{
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_OneToOneCheckQualification params:nil success:^(NSDictionary * _Nullable dataDict, int code) { [FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_OneToOneCheckQualification params:nil success:^(NSDictionary * _Nullable dataDict, int code) {
......
//
// FUSNoticeLiveUserCell.h
// FUSUserCenterModule
//
// Created by pierce on 2024/11/29.
//
#import <UIKit/UIKit.h>
#import "FUSCustomSettingItem.h"
NS_ASSUME_NONNULL_BEGIN
@interface FUSNoticeLiveUserCell : UITableViewCell
/**
* 通过CustomSettingItem确定自己显示什么样式
*/
@property (nonatomic,strong) FUSCustomSettingItem *item;
/**
cell 的reuse id
*/
+ (NSString *)cellIdentifer;
@end
NS_ASSUME_NONNULL_END
//
// FUSNoticeLiveUserCell.m
// FUSUserCenterModule
//
// Created by pierce on 2024/11/29.
//
#import "FUSNoticeLiveUserCell.h"
#import <Masonry/Masonry.h>
@interface FUSNoticeLiveUserCell ()
@property (nonatomic, strong) UIImageView *faceImageView;
@property (nonatomic, strong) UILabel *nicknameLabel;
@property (nonatomic, strong) UISwitch *theSwitch;
@property (nonatomic, strong) UIView *separatorLineView;
@end
@implementation FUSNoticeLiveUserCell
/**
cell 的reuse id
*/
+ (NSString *)cellIdentifer {
return NSStringFromClass([self class]);
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
self.backgroundColor = [UIColor whiteColor];
self.selectedBackgroundView = [[UIView alloc] initWithFrame:self.frame];
self.faceImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
self.faceImageView.contentMode = UIViewContentModeScaleAspectFill;
self.faceImageView.layer.cornerRadius = 20;
self.faceImageView.layer.masksToBounds = YES;
[self.contentView addSubview:self.faceImageView];
self.nicknameLabel = [[UILabel alloc] init];
[self.contentView addSubview:self.nicknameLabel];
self.accessoryView = self.theSwitch;
self.separatorLineView = [[UIView alloc] init];
self.separatorLineView.backgroundColor = [UIColor fus_lineColor];
[self.contentView addSubview:self.separatorLineView];
[self.separatorLineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.inset(16);
make.bottom.offset(0);
make.height.offset(0.5);
}];
[self.faceImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(40);
make.left.mas_equalTo(16);
make.centerY.equalTo(self.contentView);
}];
[self.nicknameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.faceImageView.mas_right).offset(8);
make.centerY.equalTo(self.contentView);
}];
}
return self;
}
- (void)setItem:(FUSCustomSettingItem *)item {
_item = item;
//设置图标
if (_item.icon) {
self.faceImageView.image = [UIImage com_ImageNamed:_item.icon];
} else if (_item.webIcon) {
[self.faceImageView setWebImageWithSubURLString:_item.webIcon];
}
//设置标题字体
if (_item.font) {
self.nicknameLabel.font = _item.font;
}
//设置标题颜色
if (_item.titleColor) {
self.nicknameLabel.textColor = _item.titleColor;
}
if (_item.title){ //设置标题
self.nicknameLabel.text = _item.title;
} else if (_item.titleAttributedText) { //设置标题富文本
self.nicknameLabel.attributedText = _item.titleAttributedText;
}
self.separatorLineView.hidden = !item.showSeparatorLine;
self.accessoryView = self.theSwitch;
}
#pragma mark - 右侧开关
- (UISwitch *)theSwitch
{
if (_theSwitch == nil) {
_theSwitch = [[UISwitch alloc]init];
[_theSwitch setOnTintColor:[UIColor colorWithHex:@"02F2F2"]];
[_theSwitch addTarget:self action:@selector(switchClick:) forControlEvents:UIControlEventValueChanged];
}
_theSwitch.on = _item.currentSwitchState;
return _theSwitch;
}
#pragma mark 开关点击事件
- (void)switchClick:(UISwitch *)theSwith
{
_item.switchState = theSwith.isOn;
if (_item.switchClick) {
_item.switchClick(_item);
}
}
@end
...@@ -38,6 +38,12 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -38,6 +38,12 @@ NS_ASSUME_NONNULL_BEGIN
// 绑定手机 // 绑定手机
+ (NSString *)fus_URL_PHONE_AUTH; + (NSString *)fus_URL_PHONE_AUTH;
/// 获取用户关注主播-设置通知开关
+ (NSString *)fus_URL_GetUserLikePushList;
/// 用户设置接收/不接收某个主播开播通知
+ (NSString *)fus_URL_setUserLikePushList;
#pragma mark -- 登录注册相关 #pragma mark -- 登录注册相关
// 登录 // 登录
......
...@@ -265,6 +265,16 @@ ...@@ -265,6 +265,16 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/userManager/changePush"]; return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/userManager/changePush"];
} }
/// 获取用户关注主播-设置通知开关
+ (NSString *)fus_URL_GetUserLikePushList {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/userManager/getUserLikePushList"];
}
/// 用户设置接收/不接收某个主播开播通知
+ (NSString *)fus_URL_setUserLikePushList {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/userManager/setUserLikePush"];
}
// 举报 // 举报
+ (NSString *)fus_URL_ZONE_REPORT_USER { + (NSString *)fus_URL_ZONE_REPORT_USER {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/user/userexpose.html"]; return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/user/userexpose.html"];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment