Commit 5c45013c by pierce

fixed bugs

parent c7d02c45
Showing with 204 additions and 134 deletions
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "bind_agent_info_alert_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "bind_agent_info_alert_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "翻轉鏡頭@2x.png",
"idiom" : "universal", "idiom" : "universal",
"filename" : "单播-反转镜头@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }
\ No newline at end of file
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "美顏設置@2x.png",
"idiom" : "universal", "idiom" : "universal",
"filename" : "单播-美颜图标@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }
\ No newline at end of file
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "閃光開啓@2x.png",
"idiom" : "universal", "idiom" : "universal",
"filename" : "单播-闪光灯开始图标@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }
\ No newline at end of file
...@@ -439,6 +439,9 @@ ...@@ -439,6 +439,9 @@
#define URL_RANK_ROOM_DEVOTE_GET DNS_FUS_API(@"/rank/room/devote/get") #define URL_RANK_ROOM_DEVOTE_GET DNS_FUS_API(@"/rank/room/devote/get")
// Fusi-获取房间真实用户列表
#define URL_Live_Real_Users_GetList DNS_FUS_API(@"/live/real/users/getList")
#define URL_ROOM_Interact_Game_List DNS_FUS_API(@"/room/queryInteractGameList") #define URL_ROOM_Interact_Game_List DNS_FUS_API(@"/room/queryInteractGameList")
#define URL_ROOM_Set_Live_Game_Switch DNS_FUS_API(@"/personal/liveGame/switch/set") #define URL_ROOM_Set_Live_Game_Switch DNS_FUS_API(@"/personal/liveGame/switch/set")
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#define ADDFRIENDVIEW_H 50 #define ADDFRIENDVIEW_H 50
@interface FUSChatDetailViewController ()<UITableViewDelegate,UITableViewDataSource,UIScrollViewDelegate,UINavigationBarDelegate,FUSIMChatServiceDelegate,FUSIMMoreButtonViewDelegate,FUSImagePickerViewControllerDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate,FUSIMGiftViewDelegate,FUSIMChatDetailCellDelegate,FUSIMChatAudioManagerDelegate> @interface FUSChatDetailViewController ()<UITableViewDelegate,UITableViewDataSource,UIScrollViewDelegate,UINavigationBarDelegate,FUSIMChatServiceDelegate,FUSIMMoreButtonViewDelegate,FUSImagePickerViewControllerDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate,FUSIMGiftViewDelegate,FUSIMChatDetailCellDelegate,FUSIMChatAudioManagerDelegate,UIGestureRecognizerDelegate>
/** /**
会话的名称 会话的名称
...@@ -255,6 +255,9 @@ ...@@ -255,6 +255,9 @@
_tableView.estimatedRowHeight = 0; _tableView.estimatedRowHeight = 0;
// 关闭点击状态栏滚动到顶部 // 关闭点击状态栏滚动到顶部
_tableView.scrollsToTop = NO; _tableView.scrollsToTop = NO;
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(fus_endEditState)];
tapGesture.delegate = self;
[_tableView addGestureRecognizer:tapGesture];
} }
return _tableView; return _tableView;
} }
...@@ -1880,6 +1883,14 @@ ...@@ -1880,6 +1883,14 @@
}]; }];
} }
#pragma mark - UIGestureRecognizerDelegate
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
if ([touch.view isKindOfClass:[YYLabel class]]) {
return NO;
}
return YES;
}
#pragma mark - UIResponderStandardEditActions #pragma mark - UIResponderStandardEditActions
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{ {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/> <device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
...@@ -12,17 +13,17 @@ ...@@ -12,17 +13,17 @@
<rect key="frame" x="0.0" y="0.0" width="120" height="100"/> <rect key="frame" x="0.0" y="0.0" width="120" height="100"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="KQz-1K-J4b"> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="video_chat_camera" translatesAutoresizingMaskIntoConstraints="NO" id="KQz-1K-J4b">
<rect key="frame" x="47" y="27" width="26" height="26"/> <rect key="frame" x="42.5" y="22.5" width="35" height="35"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="26" id="nOf-rB-Usy"/> <constraint firstAttribute="height" constant="35" id="nOf-rB-Usy"/>
<constraint firstAttribute="width" secondItem="KQz-1K-J4b" secondAttribute="height" multiplier="1:1" id="qga-1c-9LG"/> <constraint firstAttribute="width" secondItem="KQz-1K-J4b" secondAttribute="height" multiplier="1:1" id="qga-1c-9LG"/>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t2W-c0-yCI"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t2W-c0-yCI">
<rect key="frame" x="43.5" y="53" width="33" height="16"/> <rect key="frame" x="43.5" y="63.5" width="33" height="16"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/> <fontDescription key="fontDescription" type="system" pointSize="13"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wnh-4U-cjf"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wnh-4U-cjf">
...@@ -37,7 +38,7 @@ ...@@ -37,7 +38,7 @@
<constraint firstAttribute="trailing" secondItem="Wnh-4U-cjf" secondAttribute="trailing" id="4gl-Rb-4Gp"/> <constraint firstAttribute="trailing" secondItem="Wnh-4U-cjf" secondAttribute="trailing" id="4gl-Rb-4Gp"/>
<constraint firstItem="Wnh-4U-cjf" firstAttribute="leading" secondItem="5pF-fe-eJh" secondAttribute="leading" id="7xQ-fo-FtP"/> <constraint firstItem="Wnh-4U-cjf" firstAttribute="leading" secondItem="5pF-fe-eJh" secondAttribute="leading" id="7xQ-fo-FtP"/>
<constraint firstItem="Wnh-4U-cjf" firstAttribute="top" secondItem="5pF-fe-eJh" secondAttribute="top" id="DgV-Ms-3Zm"/> <constraint firstItem="Wnh-4U-cjf" firstAttribute="top" secondItem="5pF-fe-eJh" secondAttribute="top" id="DgV-Ms-3Zm"/>
<constraint firstItem="t2W-c0-yCI" firstAttribute="top" secondItem="KQz-1K-J4b" secondAttribute="bottom" id="K5C-xc-eLo"/> <constraint firstItem="t2W-c0-yCI" firstAttribute="top" secondItem="KQz-1K-J4b" secondAttribute="bottom" constant="6" id="K5C-xc-eLo"/>
<constraint firstItem="KQz-1K-J4b" firstAttribute="centerY" secondItem="5pF-fe-eJh" secondAttribute="centerY" constant="-10" id="YSR-Bv-x42"/> <constraint firstItem="KQz-1K-J4b" firstAttribute="centerY" secondItem="5pF-fe-eJh" secondAttribute="centerY" constant="-10" id="YSR-Bv-x42"/>
<constraint firstAttribute="bottom" secondItem="Wnh-4U-cjf" secondAttribute="bottom" id="ova-Cu-LSx"/> <constraint firstAttribute="bottom" secondItem="Wnh-4U-cjf" secondAttribute="bottom" id="ova-Cu-LSx"/>
<constraint firstItem="t2W-c0-yCI" firstAttribute="centerX" secondItem="5pF-fe-eJh" secondAttribute="centerX" id="q0A-bY-uSl"/> <constraint firstItem="t2W-c0-yCI" firstAttribute="centerX" secondItem="5pF-fe-eJh" secondAttribute="centerX" id="q0A-bY-uSl"/>
...@@ -51,4 +52,7 @@ ...@@ -51,4 +52,7 @@
<point key="canvasLocation" x="-1539.2" y="73.763118440779621"/> <point key="canvasLocation" x="-1539.2" y="73.763118440779621"/>
</view> </view>
</objects> </objects>
<resources>
<image name="video_chat_camera" width="40" height="40"/>
</resources>
</document> </document>
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
} }
- (void)fus_setupUI { - (void)fus_setupUI {
self.backgroundColor = [[UIColor colorWithHex:@"#1A1A24"] colorWithAlphaComponent:0.9]; self.backgroundColor = [UIColor fus_appBGColor];
[self addRoundedCorners:UIRectCornerTopLeft|UIRectCornerTopRight withRadii:CGSizeMake(12, 12)];
NSArray *typeArr = @[@(FUSVideoChatSettingTypeSkinBeauty),@(FUSVideoChatSettingTypeThunderLight),@(FUSVideoChatSettingTypeCamera)]; NSArray *typeArr = @[@(FUSVideoChatSettingTypeSkinBeauty),@(FUSVideoChatSettingTypeThunderLight),@(FUSVideoChatSettingTypeCamera)];
_itemArray = [NSMutableArray arrayWithCapacity:typeArr.count]; _itemArray = [NSMutableArray arrayWithCapacity:typeArr.count];
CGFloat itemWidth = UIView.fus_screenW / 3.0; CGFloat itemWidth = UIView.fus_screenW / 3.0;
......
...@@ -24,15 +24,9 @@ ...@@ -24,15 +24,9 @@
///经纪人名字 ///经纪人名字
@property (weak, nonatomic) IBOutlet UILabel *agentNameLabel; @property (weak, nonatomic) IBOutlet UILabel *agentNameLabel;
//经纪人名字是否获取成功
//@property (nonatomic, assign) BOOL agentResultSuccess;
//弹框的标题 //弹框的标题
@property (weak, nonatomic) IBOutlet UILabel *tipsTitleLbael; @property (weak, nonatomic) IBOutlet UILabel *tipsTitleLbael;
//弹框的说明
@property (weak, nonatomic) IBOutlet UILabel *tipsDetailLabel;
//取消 //取消
@property (weak, nonatomic) IBOutlet UIButton *cancelBtn; @property (weak, nonatomic) IBOutlet UIButton *cancelBtn;
...@@ -65,18 +59,16 @@ ...@@ -65,18 +59,16 @@
} }
- (void)initUI{ - (void)initUI{
_confirmBtn.style = FUSButtonStyleBlue;
// _agentResultSuccess = YES;
_confirmBtn.style = FUSButtonStyleBlue;
_agentNameLabel.text = @" "; _agentNameLabel.text = @" ";
_tipsTitleLbael.text = FUSLocalizationHelper.localString(@"输入朋友的邀请码"); _tipsTitleLbael.text = FUSLocalizationHelper.localString(@"输入朋友的邀请码");
_tipsDetailLabel.text = FUSLocalizationHelper.localString(@"输入邀请码和好友联系更紧密");
[_confirmBtn setTitle:FUSLocalizationHelper.localString(@"确定") forState:UIControlStateNormal]; [_confirmBtn setTitle:FUSLocalizationHelper.localString(@"确定") forState:UIControlStateNormal];
[_cancelBtn setTitle:FUSLocalizationHelper.localString(@"不用了") forState:UIControlStateNormal]; [_cancelBtn setTitle:FUSLocalizationHelper.localString(@"不用了") forState:UIControlStateNormal];
NSAttributedString *holderAttr = [[NSAttributedString alloc] initWithString:FUSLocalizationHelper.localString(@"输入邀请码(选填)") attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"#8C8C8C"]}]; NSAttributedString *holderAttr = [[NSAttributedString alloc] initWithString:FUSLocalizationHelper.localString(@"输入邀请码(选填)") attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"#BEBEBE"]}];
_agentIdTextfield.attributedPlaceholder = holderAttr; _agentIdTextfield.attributedPlaceholder = holderAttr;
_agentIdTextfield.returnKeyType = UIReturnKeyDone; _agentIdTextfield.returnKeyType = UIReturnKeyDone;
_agentIdTextfield.delegate = self; _agentIdTextfield.delegate = self;
...@@ -85,7 +77,6 @@ ...@@ -85,7 +77,6 @@
_agentIdTextfield.layer.borderWidth = 1.0; _agentIdTextfield.layer.borderWidth = 1.0;
_agentIdTextfield.layer.cornerRadius = 5.0; _agentIdTextfield.layer.cornerRadius = 5.0;
_agentIdTextfield.contentEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 0); _agentIdTextfield.contentEdgeInsets = UIEdgeInsetsMake(0, 5, 0, 0);
_agentIdTextfield.layer.borderColor = [UIColor colorWithHex:@"#8C8C8C"].CGColor;
// 注册 TextField DidChange 通知 // 注册 TextField DidChange 通知
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(recieveTextFieldDidChangeNotification:) name:UITextFieldTextDidChangeNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(recieveTextFieldDidChangeNotification:) name:UITextFieldTextDidChangeNotification object:nil];
...@@ -126,16 +117,16 @@ ...@@ -126,16 +117,16 @@
// __weak typeof(self) weakSelf = self; // __weak typeof(self) weakSelf = self;
[FUSLoginHttpHelper fus_bindAgentWithID:_agentIdTextfield.text success:^{ [FUSLoginHttpHelper fus_bindAgentWithID:_agentIdTextfield.text success:^{
if ([NSString isNull:_agentName]) { if ([NSString isNull:self.agentName]) {
[self fus_requestAgentInfoSuccess:^(NSString *name) { [self fus_requestAgentInfoSuccess:^(NSString *name) {
// 显示绑定弹窗 // 显示绑定弹窗
[[[FUSBindSuccessPopView alloc] initWithFrame:UIView.fus_screenFrame brokerName:name brokerID:_agentIdTextfield.text] fus_show]; [[[FUSBindSuccessPopView alloc] initWithFrame:UIView.fus_screenFrame brokerName:name brokerID:self.agentIdTextfield.text] fus_show];
} failure:^(NSString *msg, int code) { } failure:^(NSString *msg, int code) {
[FUSDialogView fus_showDialog:msg]; [FUSDialogView fus_showDialog:msg];
}]; }];
}else { }else {
// 显示绑定弹窗 // 显示绑定弹窗
[[[FUSBindSuccessPopView alloc] initWithFrame:UIView.fus_screenFrame brokerName:_agentName brokerID:_agentIdTextfield.text] fus_show]; [[[FUSBindSuccessPopView alloc] initWithFrame:UIView.fus_screenFrame brokerName:self.agentName brokerID:self.agentIdTextfield.text] fus_show];
} }
...@@ -202,16 +193,16 @@ ...@@ -202,16 +193,16 @@
- (void)fus_getAgentName { - (void)fus_getAgentName {
[FUSLoginHttpHelper fus_getAgentNameWithID:_agentIdTextfield.text success:^(NSString *name) { [FUSLoginHttpHelper fus_getAgentNameWithID:_agentIdTextfield.text success:^(NSString *name) {
_agentName = name; self.agentName = name;
_agentNameLabel.textColor = [UIColor whiteColor]; self.agentNameLabel.textColor = [UIColor whiteColor];
_agentNameLabel.text = [NSString stringWithFormat:@"%@:%@",FUSLocalizationHelper.localString(@"邀请人昵称"),name]; self.agentNameLabel.text = [NSString stringWithFormat:@"%@:%@",FUSLocalizationHelper.localString(@"邀请人昵称"),name];
// _agentResultSuccess = YES; // _agentResultSuccess = YES;
} failure:^(NSString *msg, int code) { } failure:^(NSString *msg, int code) {
_agentName = nil; self.agentName = nil;
//没有找到用户 //没有找到用户
if (code == -11) { if (code == -11) {
_agentNameLabel.textColor = [UIColor redColor]; self.agentNameLabel.textColor = [UIColor redColor];
_agentNameLabel.text = FUSLocalizationHelper.localString(@"未查询到邀请人"); self.agentNameLabel.text = FUSLocalizationHelper.localString(@"未查询到邀请人");
} }
// _agentResultSuccess = NO; // _agentResultSuccess = NO;
}]; }];
...@@ -222,17 +213,16 @@ ...@@ -222,17 +213,16 @@
*/ */
- (void)fus_requestAgentInfoSuccess:(void (^)(NSString *name))success failure:(void (^)(NSString *msg, int code))failure{ - (void)fus_requestAgentInfoSuccess:(void (^)(NSString *name))success failure:(void (^)(NSString *msg, int code))failure{
[FUSLoginHttpHelper fus_getAgentNameWithID:_agentIdTextfield.text success:^(NSString *name) { [FUSLoginHttpHelper fus_getAgentNameWithID:_agentIdTextfield.text success:^(NSString *name) {
_agentName = name; self.agentName = name;
_agentNameLabel.textColor = [UIColor whiteColor]; self.agentNameLabel.textColor = [UIColor whiteColor];
_agentNameLabel.text = [NSString stringWithFormat:@"%@:%@",FUSLocalizationHelper.localString(@"邀请人昵称"),name]; self.agentNameLabel.text = [NSString stringWithFormat:@"%@:%@",FUSLocalizationHelper.localString(@"邀请人昵称"),name];
// _agentResultSuccess = YES;
if (success) success(name); if (success) success(name);
} failure:^(NSString *msg, int code) { } failure:^(NSString *msg, int code) {
_agentName = nil; self.agentName = nil;
//没有找到用户 //没有找到用户
if (code == -11) { if (code == -11) {
_agentNameLabel.textColor = [UIColor redColor]; self.agentNameLabel.textColor = [UIColor redColor];
_agentNameLabel.text = FUSLocalizationHelper.localString(@"未查询到邀请人"); self.agentNameLabel.text = FUSLocalizationHelper.localString(@"未查询到邀请人");
} }
if (failure) failure(msg,code); if (failure) failure(msg,code);
// _agentResultSuccess = NO; // _agentResultSuccess = NO;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
/// 拥有宝石(0:无、1:有) /// 拥有宝石(0:无、1:有)
@property (nonatomic, assign) BOOL haveGem; @property (nonatomic, assign) BOOL haveGem;
/// 添加的时间 /// 加入时间戳
@property (nonatomic, assign) NSInteger addedTime; @property (nonatomic, assign) NSInteger addTimestamp;
@end @end
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
- (instancetype)init { - (instancetype)init {
self = [super init]; self = [super init];
if (self) { if (self) {
_addedTime = [NSDate date].timeIntervalSince1970 * 1000; _addTimestamp = [NSDate date].timeIntervalSince1970 * 1000;
} }
return self; return self;
} }
......
...@@ -206,6 +206,7 @@ ...@@ -206,6 +206,7 @@
[self.faceImageView setWebImageWithSubURLString:contributeModel.face]; [self.faceImageView setWebImageWithSubURLString:contributeModel.face];
self.nicknameLabel.text = contributeModel.nickname; self.nicknameLabel.text = contributeModel.nickname;
self.firstLoveImageView.hidden = YES;
BOOL ishide = contributeModel.isHide; BOOL ishide = contributeModel.isHide;
if (ishide) { if (ishide) {
...@@ -241,8 +242,6 @@ ...@@ -241,8 +242,6 @@
if ([contributeModel.privilege[@"firstChargePower"] integerValue] == 1) { if ([contributeModel.privilege[@"firstChargePower"] integerValue] == 1) {
self.firstLoveImageView.hidden = NO; self.firstLoveImageView.hidden = NO;
self.firstLoveImageView.image = [UIImage imageNamed:@"live_first_love_img"]; self.firstLoveImageView.image = [UIImage imageNamed:@"live_first_love_img"];
} else {
self.firstLoveImageView.hidden = YES;
} }
CGFloat firstLoveWidth = 32; CGFloat firstLoveWidth = 32;
......
...@@ -16,9 +16,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -16,9 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, strong) void(^clickSendGiftHandler)(NSString *gid, NSInteger num); @property (nonatomic, strong) void(^clickSendGiftHandler)(NSString *gid, NSInteger num);
+ (FUSAudiencePopView *)fus_showAudiencePopViewWithUserList:(NSArray<FUSOnlineUserModel *> *)userList startWithContribute:(BOOL)startWithContribute rootView:(UIView *)rootView; + (FUSAudiencePopView *)fus_showAudiencePopViewStartWithContribute:(BOOL)startWithContribute rootView:(UIView *)rootView;
- (void)fus_showWithUserList:(NSArray<FUSOnlineUserModel *> *)userList;
- (void)fus_dismissView; - (void)fus_dismissView;
......
...@@ -36,11 +36,11 @@ ...@@ -36,11 +36,11 @@
@implementation FUSAudiencePopView @implementation FUSAudiencePopView
+ (FUSAudiencePopView *)fus_showAudiencePopViewWithUserList:(NSArray<FUSOnlineUserModel *> *)userList startWithContribute:(BOOL)startWithContribute rootView:(UIView *)rootView { + (FUSAudiencePopView *)fus_showAudiencePopViewStartWithContribute:(BOOL)startWithContribute rootView:(UIView *)rootView {
FUSAudiencePopView *popView = [[FUSAudiencePopView alloc] initWithFrame:UIView.fus_screenFrame]; FUSAudiencePopView *popView = [[FUSAudiencePopView alloc] initWithFrame:UIView.fus_screenFrame];
[rootView addSubview:popView]; [rootView addSubview:popView];
[popView.segmentView fus_setSelectedItem:(startWithContribute ? 2 : 0) autoCallBack:YES]; [popView.segmentView fus_setSelectedItem:(startWithContribute ? 2 : 0) autoCallBack:YES];
[popView fus_showWithUserList:userList]; [popView fus_showUserList];
return popView; return popView;
} }
...@@ -91,6 +91,7 @@ ...@@ -91,6 +91,7 @@
if (weakSelf.clickUserHandler) { if (weakSelf.clickUserHandler) {
weakSelf.clickUserHandler(user); weakSelf.clickUserHandler(user);
} }
[weakSelf fus_dismissView];
}; };
[self.scrollView addSubview:self.onlineUserView]; [self.scrollView addSubview:self.onlineUserView];
...@@ -100,6 +101,7 @@ ...@@ -100,6 +101,7 @@
if (weakSelf.clickUserHandler) { if (weakSelf.clickUserHandler) {
weakSelf.clickUserHandler(user); weakSelf.clickUserHandler(user);
} }
[weakSelf fus_dismissView];
}; };
[self.scrollView addSubview:self.vipUserView]; [self.scrollView addSubview:self.vipUserView];
...@@ -110,6 +112,7 @@ ...@@ -110,6 +112,7 @@
if (weakSelf.clickUserHandler) { if (weakSelf.clickUserHandler) {
weakSelf.clickUserHandler(userModel); weakSelf.clickUserHandler(userModel);
} }
[weakSelf fus_dismissView];
}; };
self.contributeView.clickSendGiftHandler = ^(NSString * _Nonnull gid, NSInteger num) { self.contributeView.clickSendGiftHandler = ^(NSString * _Nonnull gid, NSInteger num) {
[weakSelf fus_dismissView]; [weakSelf fus_dismissView];
...@@ -123,10 +126,13 @@ ...@@ -123,10 +126,13 @@
return self; return self;
} }
- (void)fus_showWithUserList:(NSArray<FUSOnlineUserModel *> *)userList { - (void)fus_showUserList {
[self.onlineUserView setUserList:userList isVipOnly:NO]; [self.onlineUserView showUserListWithIsVipOnly:NO];
[self.vipUserView setUserList:userList isVipOnly:YES]; __weak typeof(self) weakSelf = self;
self.onlineUserView.totalUserChangedHandler = ^(NSInteger total) {
[weakSelf.segmentView fus_setImageForIndex:0 title:[NSString stringWithFormat:@"%@ %zd",FUSLocalizationHelper.versionLocalString(@"观看人数"),total]];
};
[self.vipUserView showUserListWithIsVipOnly:YES];
[UIView animateWithDuration:0.3 animations:^{ [UIView animateWithDuration:0.3 animations:^{
self.contentView.bottom = UIView.fus_screenH; self.contentView.bottom = UIView.fus_screenH;
}]; }];
......
...@@ -16,11 +16,14 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -16,11 +16,14 @@ NS_ASSUME_NONNULL_BEGIN
/// 点击用户回调 /// 点击用户回调
@property (nonatomic, copy) void(^clickUserHandler)(FUSOnlineUserModel *user); @property (nonatomic, copy) void(^clickUserHandler)(FUSOnlineUserModel *user);
@property (nonatomic, copy) void(^totalUserChangedHandler)(NSInteger total);
/// 传入用户列表 /// 传入用户列表
/// - Parameters: /// - Parameters:
/// - userList: 用户列表 /// - userList: 用户列表
/// - isVipOnly: 是否只显示VIP /// - isVipOnly: 是否只显示VIP
- (void)setUserList:(NSArray<FUSOnlineUserModel *> * _Nonnull)userList isVipOnly:(BOOL)isVipOnly; - (void)showUserListWithIsVipOnly:(BOOL)isVipOnly;
@end @end
......
...@@ -9,11 +9,16 @@ ...@@ -9,11 +9,16 @@
#import "FUSAudienceTableViewCell.h" #import "FUSAudienceTableViewCell.h"
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
#import "FUSLiveHelper.h"
@interface FUSAudienceListView () <UITableViewDelegate, UITableViewDataSource> @interface FUSAudienceListView () <UITableViewDelegate, UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView; @property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, copy) NSArray<FUSOnlineUserModel *> *userList; @property (nonatomic, strong) NSMutableArray<FUSOnlineUserModel *> *userList;
/// 用户uid列表
@property (nonatomic, strong) NSMutableSet *userIdSet;
/// vip的View /// vip的View
@property (nonatomic, strong) UIView *openVIPView; @property (nonatomic, strong) UIView *openVIPView;
...@@ -24,6 +29,12 @@ ...@@ -24,6 +29,12 @@
/// 开通VIP btn /// 开通VIP btn
@property (nonatomic, strong) FUSStyleButton *openVIPBtn; @property (nonatomic, strong) FUSStyleButton *openVIPBtn;
/// 页码
@property (nonatomic, assign) NSInteger page;
/// 是否vip列表
@property (nonatomic, assign) BOOL isVipOnly;
@end @end
@implementation FUSAudienceListView @implementation FUSAudienceListView
...@@ -39,51 +50,31 @@ ...@@ -39,51 +50,31 @@
self.tableView.rowHeight = 60; self.tableView.rowHeight = 60;
self.tableView.tableFooterView = [[UIView alloc] init]; self.tableView.tableFooterView = [[UIView alloc] init];
[self addSubview:self.tableView]; [self addSubview:self.tableView];
__weak typeof(self) weakSelf = self;
self.tableView.mj_header = [FUSRefreshHeader headerWithRefreshingBlock:^{
[weakSelf fus_reloadData];
}];
self.tableView.mj_footer = [FUSRefreshAutoFooter footerWithRefreshingBlock:^{
[weakSelf fus_loadMoreData];
}];
} }
return self; return self;
} }
- (void)setUserList:(NSArray<FUSOnlineUserModel *> *)userList isVipOnly:(BOOL)isVipOnly { /// 传入用户列表
NSMutableArray *dataSource = [NSMutableArray arrayWithArray:userList]; /// - Parameters:
/// - userList: 用户列表
/// - isVipOnly: 是否只显示VIP
- (void)showUserListWithIsVipOnly:(BOOL)isVipOnly {
_isVipOnly = isVipOnly;
if (isVipOnly) { if (isVipOnly) {
[self fus_setupVIPViews]; [self fus_setupVIPViews];
}
for (FUSOnlineUserModel *user in userList) {
if ([user.privilege[@"richPower"] integerValue] != 1) {
[dataSource removeObject:user];
}
}
self.userList = [dataSource sortedArrayUsingComparator:^NSComparisonResult(FUSOnlineUserModel * _Nonnull obj1, FUSOnlineUserModel * _Nonnull obj2) {
if (obj1.realLevel.integerValue > obj2.realLevel.integerValue) {
return NSOrderedAscending;
} else if (obj1.realLevel.integerValue < obj2.realLevel.integerValue) {
return NSOrderedDescending;
} else if (obj1.lev.integerValue > obj2.lev.integerValue) {
return NSOrderedAscending;
} else if (obj1.lev.integerValue < obj2.lev.integerValue) {
return NSOrderedDescending;
} else {
return NSOrderedSame;
}
}];
} else {
self.userList = [dataSource sortedArrayUsingComparator:^NSComparisonResult(FUSOnlineUserModel * _Nonnull obj1, FUSOnlineUserModel * _Nonnull obj2) {
if (obj1.addedTime > obj2.addedTime) {
return NSOrderedAscending;
} else if (obj1.addedTime < obj2.addedTime) {
return NSOrderedDescending;
} else {
return NSOrderedSame;
}
}];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self);
}];
}
[self.tableView reloadData]; [self fus_reloadData];
} }
- (void)fus_setupVIPViews { - (void)fus_setupVIPViews {
...@@ -164,4 +155,56 @@ ...@@ -164,4 +155,56 @@
} }
} }
#pragma mark - Datas
- (void)fus_reloadData {
self.page = 1;
[self fus_loadData];
}
- (void)fus_loadMoreData {
self.page++;
[self fus_loadData];
}
- (void)fus_loadData {
NSDictionary *params = @{
@"roomId":FUSLiveHelper.shareInstance.roomInfoModel.roomId,
@"type":@(self.isVipOnly ? 1 : 0),
@"page":@(self.page)
};
[FUSHttpHelper postRequestBinaryWithUrl:URL_Live_Real_Users_GetList params:params success:^(NSDictionary * _Nullable dataDict, int code) {
self.page = [dataDict[@"page"] integerValue];
if (self.page == 1) {
[self.userList removeAllObjects];
self.userList = [NSMutableArray array];
[self.userIdSet removeAllObjects];
self.userIdSet = [NSMutableSet set];
}
NSMutableArray *users = [NSMutableArray array];
for (NSDictionary *user in dataDict[@"users"]) {
FUSOnlineUserModel *model = [FUSOnlineUserModel fus_modelWithDict:user];
/// 去重
if (![self.userIdSet containsObject:model.uid]) {
[self.userIdSet addObject:model.uid];
[users addObject:model];
}
}
[self.userList addObjectsFromArray:users];
[self.tableView reloadData];
if (self.totalUserChangedHandler && dataDict[@"total"]) {
NSInteger total = [dataDict[@"total"] integerValue];
self.totalUserChangedHandler(total);
}
} failure:^(NSDictionary * _Nullable dataDict, int code) {
[FUSDialogView fus_showDialog:dataDict[@"msg"]];
}];
}
@end @end
...@@ -141,8 +141,9 @@ ...@@ -141,8 +141,9 @@
[self.faceImageView setWebImageWithSubURLString:userModel.face]; [self.faceImageView setWebImageWithSubURLString:userModel.face];
self.nicknameLabel.text = userModel.nickname; self.nicknameLabel.text = userModel.nickname;
self.firstLoveImageView.hidden = YES;
BOOL ishide = userModel.isHide.boolValue; BOOL ishide = userModel.isHide.boolValue;
if (ishide) { if (ishide) {
self.firstLoveImageView.hidden = YES; self.firstLoveImageView.hidden = YES;
self.onlineLabel.hidden = YES; self.onlineLabel.hidden = YES;
...@@ -176,8 +177,6 @@ ...@@ -176,8 +177,6 @@
if ([userModel.privilege[@"firstChargePower"] integerValue] == 1) { if ([userModel.privilege[@"firstChargePower"] integerValue] == 1) {
self.firstLoveImageView.hidden = NO; self.firstLoveImageView.hidden = NO;
self.firstLoveImageView.image = [UIImage imageNamed:@"live_first_love_img"]; self.firstLoveImageView.image = [UIImage imageNamed:@"live_first_love_img"];
} else {
self.firstLoveImageView.hidden = YES;
} }
CGFloat firstLoveWidth = 32; CGFloat firstLoveWidth = 32;
......
...@@ -5766,7 +5766,7 @@ FUSLinkMicUserListDelegate ...@@ -5766,7 +5766,7 @@ FUSLinkMicUserListDelegate
{ {
// 审核状态下不显示守护榜 // 审核状态下不显示守护榜
// if (FUSConfig.sharedInstanced.devConfigs.appStatus) return; // if (FUSConfig.sharedInstanced.devConfigs.appStatus) return;
[self fus_showAudiencePopView:self.userListViewModel startWithContribute:YES]; [self fus_showAudiencePopViewStartWithContribute:YES];
// __weak typeof(self) weakSelf = self; // __weak typeof(self) weakSelf = self;
// // 正在显示,不重复显示 // // 正在显示,不重复显示
// if (_liveFireCountView.isOnShow == YES) return; // if (_liveFireCountView.isOnShow == YES) return;
...@@ -5801,16 +5801,12 @@ FUSLinkMicUserListDelegate ...@@ -5801,16 +5801,12 @@ FUSLinkMicUserListDelegate
} }
- (void)fus_headViewClickUserCountBtnAction:(FUSLiveHeaderUserListViewModel *)userListModel { - (void)fus_headViewClickUserCountBtnAction:(FUSLiveHeaderUserListViewModel *)userListModel {
[self fus_showAudiencePopView:userListModel startWithContribute:NO]; [self fus_showAudiencePopViewStartWithContribute:NO];
} }
- (void)fus_showAudiencePopView:(FUSLiveHeaderUserListViewModel *)userListModel startWithContribute:(BOOL)startWithContribute { - (void)fus_showAudiencePopViewStartWithContribute:(BOOL)startWithContribute {
NSMutableArray *userList = [NSMutableArray array];
for (NSArray *list in userListModel.realUserList) {
[userList appendObjects:list];
}
FUSAudiencePopView *popView = [FUSAudiencePopView fus_showAudiencePopViewWithUserList:userList startWithContribute:startWithContribute rootView:[self fus_viewWithLayer:FUSLiveFunctionLayerManualPopView]]; FUSAudiencePopView *popView = [FUSAudiencePopView fus_showAudiencePopViewStartWithContribute:startWithContribute rootView:[self fus_viewWithLayer:FUSLiveFunctionLayerManualPopView]];
__weak typeof(self) weakSelf = self; __weak typeof(self) weakSelf = self;
popView.clickUserHandler = ^(FUSOnlineUserModel * _Nonnull user) { popView.clickUserHandler = ^(FUSOnlineUserModel * _Nonnull user) {
FUSRoomUserInfoModel *roomUserInfo = [FUSRoomUserInfoModel fus_modelWithDict:user.fus_getDictionary]; FUSRoomUserInfoModel *roomUserInfo = [FUSRoomUserInfoModel fus_modelWithDict:user.fus_getDictionary];
......
...@@ -1115,7 +1115,7 @@ ...@@ -1115,7 +1115,7 @@
} else if (model.realLevel.integerValue < user.realLevel.integerValue) { } else if (model.realLevel.integerValue < user.realLevel.integerValue) {
break; break;
} else { } else {
if (model.addedTime < user.addedTime) { if (model.addTimestamp < user.addTimestamp) {
continue; continue;
} else { } else {
break; break;
...@@ -1191,7 +1191,7 @@ ...@@ -1191,7 +1191,7 @@
midIndex = endIndex; midIndex = endIndex;
while ([self fus_isNormalUser1:user while ([self fus_isNormalUser1:user
biggerThanNormalUser2:midModel] == NSOrderedSame biggerThanNormalUser2:midModel] == NSOrderedSame
&& user.addedTime < midModel.addedTime && user.addTimestamp < midModel.addTimestamp
&& midIndex > 0) { && midIndex > 0) {
midIndex--; midIndex--;
if (midIndex > 0) { if (midIndex > 0) {
......
...@@ -228,7 +228,7 @@ ...@@ -228,7 +228,7 @@
self.faceAnimationImageView.animationImages = animImages; self.faceAnimationImageView.animationImages = animImages;
self.faceAnimationImageView.animationDuration = 2.03; self.faceAnimationImageView.animationDuration = 2.03;
self.topUpBtn.style = FUSButtonStyleBlueBorder; self.topUpBtn.style = FUSButtonStyleBlue;
self.topUpBtn.layer.cornerRadius = self.topUpBtn.height / 2.0f; self.topUpBtn.layer.cornerRadius = self.topUpBtn.height / 2.0f;
self.topUpBtn.layer.masksToBounds = YES; self.topUpBtn.layer.masksToBounds = YES;
} }
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/> <capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies> </dependencies>
...@@ -28,22 +28,19 @@ ...@@ -28,22 +28,19 @@
<action selector="clickCloseBtnAction:" destination="-1" eventType="touchUpInside" id="bFh-Kr-tly"/> <action selector="clickCloseBtnAction:" destination="-1" eventType="touchUpInside" id="bFh-Kr-tly"/>
</connections> </connections>
</button> </button>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_alert_bg_img" translatesAutoresizingMaskIntoConstraints="NO" id="dQV-DW-kxC">
<rect key="frame" x="62" y="251" width="290" height="394"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x8N-H9-KWj"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x8N-H9-KWj">
<rect key="frame" x="72" y="261" width="270" height="374"/> <rect key="frame" x="72" y="261" width="270" height="374"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现在就撩" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hVf-9l-wto"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="现在就撩" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hVf-9l-wto">
<rect key="frame" x="20" y="25" width="230" height="24"/> <rect key="frame" x="20" y="25" width="230" height="24"/>
<fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="17"/> <fontDescription key="fontDescription" name="PingFangSC-Semibold" family="PingFang SC" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="儲值1寶石即可於主播互動,儲值成功後,“撩一下”禮物會自動發送至您的背包,獲得主播青睞成功率100%" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KXg-lT-Yyw"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="儲值1寶石即可於主播互動,儲值成功後,“撩一下”禮物會自動發送至您的背包,獲得主播青睞成功率100%" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KXg-lT-Yyw">
<rect key="frame" x="20" y="61" width="230" height="50.5"/> <rect key="frame" x="20" y="61" width="230" height="50.5"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="12"/>
<color key="textColor" red="0.90196078431372551" green="0.90196078431372551" blue="0.90196078431372551" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="live_first_charge_alert_face_bg" translatesAutoresizingMaskIntoConstraints="NO" id="5vj-wa-4PE"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="live_first_charge_alert_face_bg" translatesAutoresizingMaskIntoConstraints="NO" id="5vj-wa-4PE">
...@@ -76,7 +73,7 @@ ...@@ -76,7 +73,7 @@
</connections> </connections>
</button> </button>
</subviews> </subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="Ddw-Q2-Om6" firstAttribute="centerX" secondItem="5vj-wa-4PE" secondAttribute="centerX" id="0AV-28-Acd"/> <constraint firstItem="Ddw-Q2-Om6" firstAttribute="centerX" secondItem="5vj-wa-4PE" secondAttribute="centerX" id="0AV-28-Acd"/>
<constraint firstItem="hVf-9l-wto" firstAttribute="top" secondItem="x8N-H9-KWj" secondAttribute="top" constant="25" id="1ai-mn-ZvX"/> <constraint firstItem="hVf-9l-wto" firstAttribute="top" secondItem="x8N-H9-KWj" secondAttribute="top" constant="25" id="1ai-mn-ZvX"/>
...@@ -95,19 +92,21 @@ ...@@ -95,19 +92,21 @@
<constraint firstItem="KXg-lT-Yyw" firstAttribute="leading" secondItem="hVf-9l-wto" secondAttribute="leading" id="moo-PD-OO0"/> <constraint firstItem="KXg-lT-Yyw" firstAttribute="leading" secondItem="hVf-9l-wto" secondAttribute="leading" id="moo-PD-OO0"/>
<constraint firstAttribute="width" constant="270" id="z4F-FUS-jEE"/> <constraint firstAttribute="width" constant="270" id="z4F-FUS-jEE"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="16"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</view> </view>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/> <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstItem="x8N-H9-KWj" firstAttribute="top" secondItem="dQV-DW-kxC" secondAttribute="top" constant="10" id="1Sl-gM-Z7H"/>
<constraint firstItem="x8N-H9-KWj" firstAttribute="leading" secondItem="dQV-DW-kxC" secondAttribute="leading" constant="10" id="3AN-WW-Wp5"/>
<constraint firstItem="tdB-gh-oJK" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="5s5-zk-pYQ"/> <constraint firstItem="tdB-gh-oJK" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="5s5-zk-pYQ"/>
<constraint firstItem="tdB-gh-oJK" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="8wp-4r-NCk"/> <constraint firstItem="tdB-gh-oJK" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="8wp-4r-NCk"/>
<constraint firstItem="x8N-H9-KWj" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="B4d-lq-dMX"/> <constraint firstItem="x8N-H9-KWj" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="B4d-lq-dMX"/>
<constraint firstItem="dQV-DW-kxC" firstAttribute="bottom" secondItem="x8N-H9-KWj" secondAttribute="bottom" constant="10" id="VO4-6F-RZ1"/>
<constraint firstAttribute="trailing" secondItem="tdB-gh-oJK" secondAttribute="trailing" id="VxO-CX-VDj"/> <constraint firstAttribute="trailing" secondItem="tdB-gh-oJK" secondAttribute="trailing" id="VxO-CX-VDj"/>
<constraint firstItem="dQV-DW-kxC" firstAttribute="trailing" secondItem="x8N-H9-KWj" secondAttribute="trailing" constant="10" id="chW-q6-ZZz"/>
<constraint firstItem="x8N-H9-KWj" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="mVN-UV-2vo"/> <constraint firstItem="x8N-H9-KWj" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="mVN-UV-2vo"/>
<constraint firstAttribute="bottom" secondItem="tdB-gh-oJK" secondAttribute="bottom" id="piM-FB-4bK"/> <constraint firstAttribute="bottom" secondItem="tdB-gh-oJK" secondAttribute="bottom" id="piM-FB-4bK"/>
</constraints> </constraints>
...@@ -115,7 +114,6 @@ ...@@ -115,7 +114,6 @@
</view> </view>
</objects> </objects>
<resources> <resources>
<image name="common_alert_bg_img" width="120.5" height="118.5"/>
<image name="live_first_charge_alert_face_bg" width="162.5" height="162.5"/> <image name="live_first_charge_alert_face_bg" width="162.5" height="162.5"/>
</resources> </resources>
</document> </document>
...@@ -775,7 +775,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey"; ...@@ -775,7 +775,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
//1图片 2文本。 //1图片 2文本。
NSInteger type = [dataDict[@"type"] integerValue]; NSInteger type = [dataDict[@"type"] integerValue];
NSDictionary *style = dataDict[@"style"]; NSDictionary *style = dataDict[@"style"];
if (type == 1) { if (type == 1 && dataDict[@"imgUrl"]) {
NSString *imgUrl = [dataDict[@"imgUrl"] description]; NSString *imgUrl = [dataDict[@"imgUrl"] description];
CGFloat width = [style[@"width"] doubleValue]; CGFloat width = [style[@"width"] doubleValue];
...@@ -791,7 +791,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey"; ...@@ -791,7 +791,7 @@ static NSString *FUSWebRightBtnExtraInfoKey = @"FUSWebRightBtnExtraInfoKey";
// 这里不用一个customView包住imageView的话,image的图片宽度会被titleView根据图片真实宽度改变 // 这里不用一个customView包住imageView的话,image的图片宽度会被titleView根据图片真实宽度改变
self.wkVC.navigationItem.titleView = customView; self.wkVC.navigationItem.titleView = customView;
} else if (type == 2) { } else if (type == 2 || dataDict[@"imgTxt"]) {
NSString *imgTxt = [dataDict[@"imgTxt"] description]; NSString *imgTxt = [dataDict[@"imgTxt"] description];
NSString *color = [dataDict[@"color"] description]; NSString *color = [dataDict[@"color"] description];
CGFloat fontSize = [dataDict[@"font-size"] doubleValue]; CGFloat fontSize = [dataDict[@"font-size"] doubleValue];
......
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