Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
29b2334a
authored
Nov 29, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知页面
parent
07fc83dd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
269 additions
and
1 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/View/FUSQuicklySettingGroup/FUSCustomSettingItem.h
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/View/FUSQuicklySettingGroup/FUSSettingTableView.m
Modules/FUSUserCenterModule/FUSUserCenterModule.xcodeproj/project.pbxproj
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/Controller/FUSNoticeSettingViewController.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/Other/FUSSettingHttpRequest.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/Other/FUSSettingHttpRequest.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/View/FUSNoticeLiveUserCell.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/View/FUSNoticeLiveUserCell.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Others/FUSUserCenterURLs.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Others/FUSUserCenterURLs.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/View/FUSQuicklySettingGroup/FUSCustomSettingItem.h
View file @
29b2334a
...
...
@@ -28,6 +28,11 @@ typedef NS_ENUM(NSInteger, CustomSettingItemType) {
*/
@property
(
nonatomic
,
copy
)
NSString
*
icon
;
/**
* 图标
*/
@property
(
nonatomic
,
copy
)
NSString
*
webIcon
;
// 图标的偏移量
@property
(
nonatomic
,
assign
)
CGPoint
iconOffset
;
...
...
@@ -179,4 +184,10 @@ typedef NS_ENUM(NSInteger, CustomSettingItemType) {
*/
+
(
instancetype
)
fus_itemWithIcon
:(
NSString
*
)
icon
title
:(
NSString
*
)
title
type
:(
CustomSettingItemType
)
type
;
@property
(
nonatomic
,
copy
)
UITableViewCell
*
(
^
getCustomCellBlock
)(
UITableView
*
tableView
,
NSIndexPath
*
indexPath
,
FUSCustomSettingItem
*
item
);
@end
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/View/FUSQuicklySettingGroup/FUSSettingTableView.m
View file @
29b2334a
...
...
@@ -85,6 +85,11 @@
FUSCustomSettingGroup
*
itemsGroup
=
self
.
allGroups
[
indexPath
.
section
];
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
];
settingCell
.
selectedBackgroundView
=
[[
UIView
alloc
]
initWithFrame
:
settingCell
.
frame
];
settingCell
.
selectedBackgroundView
.
backgroundColor
=
itemsGroup
.
itemsPressBgColor
;
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule.xcodeproj/project.pbxproj
View file @
29b2334a
...
...
@@ -158,6 +158,8 @@
BE2A4B982CF86CF6008B4796
/* FUSLiveAudienceSettingViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE2A4B962CF86CF6008B4796
/* FUSLiveAudienceSettingViewController.m */
;
};
BE2A4B9E2CF87E5C008B4796
/* FUSZhaixinChatSettingViewController.h in Headers */
=
{
isa
=
PBXBuildFile
;
fileRef
=
BE2A4B9C2CF87E5C008B4796
/* FUSZhaixinChatSettingViewController.h */
;
};
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 */
;
};
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 */
;
};
...
...
@@ -1010,6 +1012,8 @@
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>"
;
};
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>"
;
};
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>"
;
};
...
...
@@ -2727,6 +2731,8 @@
BE78CA0F2C538D7D00F38855
/* FUSSettingNetworkCherkAlert.h */
,
BE78CA102C538D7D00F38855
/* FUSSettingNetworkCherkAlert.m */
,
BE78CA112C538D7D00F38855
/* FUSSettingNetworkCherkAlert.xib */
,
BE2A4BA02CF9B893008B4796
/* FUSNoticeLiveUserCell.h */
,
BE2A4BA12CF9B893008B4796
/* FUSNoticeLiveUserCell.m */
,
);
path
=
View
;
sourceTree
=
"<group>"
;
...
...
@@ -3508,6 +3514,7 @@
BE189A952C7323FE0008418B
/* FSRMinedictMotorMissionView.h in Headers */
,
BE78CC302C538D7F00F38855
/* FUSSettingChatInviteCell.h in Headers */
,
BE78CBFA2C538D7F00F38855
/* FUSChatSettingViewController.h in Headers */
,
BE2A4BA22CF9B893008B4796
/* FUSNoticeLiveUserCell.h in Headers */
,
BE78CC9D2C538D8000F38855
/* FUSNewsFeedReplyInputView.h in Headers */
,
BE189AA92C7323FE0008418B
/* FSRVoicedictMinePrivacySearchView.h in Headers */
,
BE78CCEF2C538D8000F38855
/* NEW_FUSFullImageViewController.h in Headers */
,
...
...
@@ -4152,6 +4159,7 @@
BEDEDC292C66029D00B4B0B0
/* FUSBaoFangHomeFocusCollectionViewSmallCell.m in Sources */
,
BE189A742C7323FE0008418B
/* FSRPrivacyCollectionViewCell.m in Sources */
,
BE189A782C7323FE0008418B
/* FSRPrivacyVoiceCollectionViewCell.m in Sources */
,
BE2A4BA32CF9B893008B4796
/* FUSNoticeLiveUserCell.m in Sources */
,
BE78CC4F2C538D7F00F38855
/* FUSNewsFeedHttpHelper.m in Sources */
,
BE78CB6E2C538D7E00F38855
/* FUSZoneCacheOperate.m in Sources */
,
BE78CBF62C538D7F00F38855
/* FUSBlackListViewController.m in Sources */
,
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/Controller/FUSNoticeSettingViewController.m
View file @
29b2334a
This diff is collapsed.
Click to expand it.
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/Other/FUSSettingHttpRequest.h
View file @
29b2334a
...
...
@@ -267,4 +267,26 @@
success
:(
void
(
^
)(
NSDictionary
*
dataDict
))
success
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
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/Other/FUSSettingHttpRequest.m
View file @
29b2334a
...
...
@@ -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 success 成功回调
@param failure 失败回调
...
...
@@ -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
{
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSUserCenterURLs
.
fus_URL_OneToOneCheckQualification
params
:
nil
success
:^
(
NSDictionary
*
_Nullable
dataDict
,
int
code
)
{
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/View/FUSNoticeLiveUserCell.h
0 → 100644
View file @
29b2334a
//
// 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
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Setting/View/FUSNoticeLiveUserCell.m
0 → 100644
View file @
29b2334a
//
// 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
Modules/FUSUserCenterModule/FUSUserCenterModule/Others/FUSUserCenterURLs.h
View file @
29b2334a
...
...
@@ -38,6 +38,12 @@ NS_ASSUME_NONNULL_BEGIN
// 绑定手机
+
(
NSString
*
)
fus_URL_PHONE_AUTH
;
/// 获取用户关注主播-设置通知开关
+
(
NSString
*
)
fus_URL_GetUserLikePushList
;
/// 用户设置接收/不接收某个主播开播通知
+
(
NSString
*
)
fus_URL_setUserLikePushList
;
#pragma mark -- 登录注册相关
// 登录
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Others/FUSUserCenterURLs.m
View file @
29b2334a
...
...
@@ -265,6 +265,16 @@
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
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/user/userexpose.html"
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment