Commit 0601f26a by ludi

1.更新了全局loading图,

2.解决了寨信没有消息的bug。
3.修复了首页图片显示不出来的bug。
4.规范我的页面。
parent 2b5ec2c1
Showing with 1144 additions and 96 deletions
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_10@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_11@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_12@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_13@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_14@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_15@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_16@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_17@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_18@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_19@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_2@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_20@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_21@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_22@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_23@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_24@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_25@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_26@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_27@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_28@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_29@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_3@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_30@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_31@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_32@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_33@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_34@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_35@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_36@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_37@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_38@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_39@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_4@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_5@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_6@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_7@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_8@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fusi_loading_animate_9@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -213,7 +213,7 @@ NSString * const kBGShineMoveAnimation = @"kBGShineMoveAnimation"; ...@@ -213,7 +213,7 @@ NSString * const kBGShineMoveAnimation = @"kBGShineMoveAnimation";
{ {
if (!_enteringAnimateImage) { if (!_enteringAnimateImage) {
_enteringAnimateImage = [UIImage animatedImageWithImages:[UIImage fus_animationImages:@"release_refresh_" mainBundle:NO needCache:YES] duration:1.5]; _enteringAnimateImage = [UIImage animatedImageWithImages:[UIImage fus_animationImages:@"fusi_loading_animate_" mainBundle:NO needCache:YES] duration:1.5];
} }
return _enteringAnimateImage; return _enteringAnimateImage;
...@@ -232,7 +232,7 @@ NSString * const kBGShineMoveAnimation = @"kBGShineMoveAnimation"; ...@@ -232,7 +232,7 @@ NSString * const kBGShineMoveAnimation = @"kBGShineMoveAnimation";
- (UIImage *)loadingAnimateImage - (UIImage *)loadingAnimateImage
{ {
if (!_loadingAnimateImage) { if (!_loadingAnimateImage) {
_loadingAnimateImage = [UIImage animatedImageWithImages:[UIImage fus_animationImages:@"release_refresh_" mainBundle:NO needCache:YES] duration:1.5]; _loadingAnimateImage = [UIImage animatedImageWithImages:[UIImage fus_animationImages:@"fusi_loading_animate_" mainBundle:NO needCache:YES] duration:1.5];
} }
return _loadingAnimateImage; return _loadingAnimateImage;
} }
......
...@@ -38,6 +38,15 @@ ...@@ -38,6 +38,15 @@
if (canTouchBottomView) { if (canTouchBottomView) {
hudView.userInteractionEnabled = NO; hudView.userInteractionEnabled = NO;
} }
//fusipart
hudView.bezelView.backgroundColor = [UIColor clearColor];
hudView.mode = MBProgressHUDModeCustomView;
UIImageView *animateImageView = [[UIImageView alloc] initWithFrame:hudView.bezelView.bounds];
animateImageView.image = [UIImage animatedImageWithImages:[UIImage fus_animationImages:@"fusi_loading_animate_" mainBundle:NO needCache:YES] duration:1.5];;
animateImageView.contentMode = UIViewContentModeScaleAspectFit;
hudView.customView = animateImageView;
[animateImageView startAnimating];
} }
...@@ -58,6 +67,15 @@ ...@@ -58,6 +67,15 @@
if (![NSString isNull:message]) { if (![NSString isNull:message]) {
hudView.label.text = message; hudView.label.text = message;
} }
//fusipart
hudView.bezelView.backgroundColor = [UIColor clearColor];
hudView.mode = MBProgressHUDModeCustomView;
UIImageView *animateImageView = [[UIImageView alloc] initWithFrame:hudView.bezelView.bounds];
animateImageView.image = [UIImage animatedImageWithImages:[UIImage fus_animationImages:@"fusi_loading_animate_" mainBundle:NO needCache:YES] duration:1.5];;
animateImageView.contentMode = UIViewContentModeScaleAspectFit;
hudView.customView = animateImageView;
[animateImageView startAnimating];
} }
// 销毁progressView // 销毁progressView
......
...@@ -45,12 +45,20 @@ ...@@ -45,12 +45,20 @@
_isBackgroundHidden = NO; _isBackgroundHidden = NO;
for (NSInteger i = 0; i < 7; i++) { // for (NSInteger i = 0; i < 7; i++) {
[pullDownArray addObject:[UIImage fus_ImageNamed:[NSString stringWithFormat:@"pull_down%02ld",i]]]; // [pullDownArray addObject:[UIImage fus_ImageNamed:[NSString stringWithFormat:@"pull_down%02ld",i]]];
// }
//
// for (NSInteger i = 1; i < 25; i++) {
// [releaseArray addObject:[UIImage fus_ImageNamed:[NSString stringWithFormat:@"release_refresh_%ld",i]]];
// }
for (NSInteger i = 0; i < 9; i++) {
[pullDownArray addObject:[UIImage fus_ImageNamed:[NSString stringWithFormat:@"fusi_loading_animate_%ld",i + 7]]];
} }
for (NSInteger i = 1; i < 25; i++) { for (NSInteger i = 0; i <= 39; i++) {
[releaseArray addObject:[UIImage fus_ImageNamed:[NSString stringWithFormat:@"release_refresh_%ld",i]]]; [releaseArray addObject:[UIImage fus_ImageNamed:[NSString stringWithFormat:@"fusi_loading_animate_%ld",i]]];
} }
for (NSInteger i = 0; i < 14; i++) { for (NSInteger i = 0; i < 14; i++) {
...@@ -59,7 +67,8 @@ ...@@ -59,7 +67,8 @@
self.mj_h = 80; self.mj_h = 80;
_loadingImageView = [[UIImageView alloc] initWithImage:[UIImage fus_ImageNamed:@"pull_down00"]]; // _loadingImageView = [[UIImageView alloc] initWithImage:[UIImage fus_ImageNamed:@"pull_down00"]];
_loadingImageView = [[UIImageView alloc] initWithImage:[UIImage fus_ImageNamed:@"fusi_loading_animate_7"]];
_loadingImageView.contentMode = UIViewContentModeScaleAspectFill; _loadingImageView.contentMode = UIViewContentModeScaleAspectFill;
_freshBackView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width,300)]; _freshBackView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width,300)];
...@@ -152,11 +161,21 @@ ...@@ -152,11 +161,21 @@
lastPullingPercent = 0; lastPullingPercent = 0;
} }
// if (pullingPercent - lastPullingPercent > 0) {
// _loadingImageView.image = [UIImage fus_ImageNamed:[NSString stringWithFormat:@"pull_down%02ld",(NSInteger)floor(7*pullingPercent)]];
//
// if (pullingPercent >= 1) {
// _loadingImageView.image = [UIImage fus_ImageNamed:@"pull_down06"];
// }
// }
// fusi_loading_animate_
if (pullingPercent - lastPullingPercent > 0) { if (pullingPercent - lastPullingPercent > 0) {
_loadingImageView.image = [UIImage fus_ImageNamed:[NSString stringWithFormat:@"pull_down%02ld",(NSInteger)floor(7*pullingPercent)]]; _loadingImageView.image = [UIImage fus_ImageNamed:[NSString stringWithFormat:@"fusi_loading_animate_%ld",(NSInteger)floor(7 + 9*pullingPercent)]];
if (pullingPercent >= 1) { if (pullingPercent >= 1) {
_loadingImageView.image = [UIImage fus_ImageNamed:@"pull_down06"]; _loadingImageView.image = [UIImage fus_ImageNamed:@"fusi_loading_animate_7"];
} }
} }
} }
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
} }
array = [NSMutableArray array]; array = [NSMutableArray array];
for (int i = 0; i < 30; i++) { for (int i = 0; i < 99; i++) {
UIImage *image; UIImage *image;
if (mainBundle) { if (mainBundle) {
......
...@@ -61,13 +61,16 @@ ...@@ -61,13 +61,16 @@
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) { if (self) {
[self.detailTextLabel addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil]; // [self.detailTextLabel addObserver:self forKeyPath:@"frame" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil];
// 副标题显示多行 // 副标题显示多行
self.detailTextLabel.numberOfLines = 0; self.detailTextLabel.numberOfLines = 0;
// 图标居中 // 图标居中
self.imageView.contentMode = UIViewContentModeCenter; self.imageView.contentMode = UIViewContentModeCenter;
// 内容居右 // 内容居右
self.detailTextLabel.textAlignment = NSTextAlignmentRight; self.detailTextLabel.textAlignment = NSTextAlignmentRight;
[self.contentView addSubview:self.theImageView];
[self.contentView addSubview:self.leftCircleRedView];
} }
return self; return self;
} }
...@@ -329,14 +332,16 @@ ...@@ -329,14 +332,16 @@
self.detailTextLabel.attributedText = nil; self.detailTextLabel.attributedText = nil;
[_theCenterLabel removeFromSuperview]; [_theCenterLabel removeFromSuperview];
_theCenterLabel = nil; _theCenterLabel = nil;
[_theImageView removeFromSuperview];
_theImageView = nil;
[_theRightLabel removeFromSuperview]; [_theRightLabel removeFromSuperview];
_theRightLabel = nil; _theRightLabel = nil;
[_thirdPartyCell removeFromSuperview]; [_thirdPartyCell removeFromSuperview];
_thirdPartyCell = nil; _thirdPartyCell = nil;
[_leftCircleRedView removeFromSuperview]; // [_theImageView removeFromSuperview];
_leftCircleRedView = nil; // _theImageView = nil;
// [_leftCircleRedView removeFromSuperview];
// _leftCircleRedView = nil;
self.theImageView.hidden = YES;
self.leftCircleRedView.hidden = YES;
// 接收模型 // 接收模型
_item = item; _item = item;
...@@ -411,7 +416,8 @@ ...@@ -411,7 +416,8 @@
self.accessoryView = self.theArrowImageView; self.accessoryView = self.theArrowImageView;
} }
[self.contentView addSubview:self.theImageView]; // [self.contentView addSubview:self.theImageView];
self.theImageView.hidden = NO;
} }
break; break;
case CustomSettingItemTypeSwitch: case CustomSettingItemTypeSwitch:
...@@ -421,13 +427,15 @@ ...@@ -421,13 +427,15 @@
break; break;
case CustomSettingItemTypeShowImage: case CustomSettingItemTypeShowImage:
{ {
[self.contentView addSubview:self.theImageView]; // [self.contentView addSubview:self.theImageView];
self.theImageView.hidden = NO;
} }
break; break;
case CustomSettingItemTypeShowImageAndArrow: case CustomSettingItemTypeShowImageAndArrow:
{ {
self.accessoryView = self.theArrowImageView; self.accessoryView = self.theArrowImageView;
[self.contentView addSubview:self.theImageView]; // [self.contentView addSubview:self.theImageView];
self.theImageView.hidden = NO;
} }
break; break;
case CustomSettingItemTypeShowLabelAndArrow: case CustomSettingItemTypeShowLabelAndArrow:
...@@ -455,10 +463,44 @@ ...@@ -455,10 +463,44 @@
break; break;
} }
if (self.theImageView.isHidden == NO && (_item.rightShowImage != nil || ![NSString isNull:_item.rightShowImageUrl])) {
[self.theImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.detailTextLabel.mas_left).offset(-3);
// make.centerY.equalTo(self.detailTextLabel.mas_centerY);
make.centerY.offset(0);
if (!CGRectEqualToRect(_item.rightShowImageFrame, CGRectZero)) {
make.size.mas_equalTo(_item.rightShowImageFrame.size);
}else{
make.size.mas_equalTo(CGSizeMake(22, 22));
}
}];
}else {
self.theImageView.hidden = YES;
}
if (item.isShowRedCirclePoint) { if (item.isShowRedCirclePoint) {
//放在这里add是解决不圆的bug self.leftCircleRedView.hidden = NO;
[self.contentView addSubview:self.leftCircleRedView]; if (item.redCircleColor) {
self.leftCircleRedView.backgroundColor = item.redCircleColor;
}else{
self.leftCircleRedView.backgroundColor = [UIColor redColor];
}
[self.leftCircleRedView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerY.equalTo(self.detailTextLabel.mas_centerY);
make.centerY.offset(0);
make.size.mas_equalTo(CGSizeMake(kRightRedViewWidth, kRightRedViewWidth));
if (self.theImageView.isHidden) {
make.right.equalTo(self.detailTextLabel.mas_left).offset(-2);
}else{
make.right.equalTo(self.theImageView.mas_left).offset(-2);
}
}];
} }
// if (item.isShowRedCirclePoint) {
// //放在这里add是解决不圆的bug
// [self.contentView addSubview:self.leftCircleRedView];
// }
} }
- (void)setItemsGroup:(FUSCustomSettingGroup *)itemsGroup { - (void)setItemsGroup:(FUSCustomSettingGroup *)itemsGroup {
...@@ -468,34 +510,37 @@ ...@@ -468,34 +510,37 @@
self.maskLayer = nil; self.maskLayer = nil;
} }
-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context { //-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSKeyValueChangeKey,id> *)change context:(void *)context {
// FUSLogInfo(@""); //// FUSLogInfo(@"");
NSValue *value = [change objectForKey:@"new"]; // NSValue *value = [change objectForKey:@"new"];
CGRect frame = [value CGRectValue]; // CGRect frame = [value CGRectValue];
if (_item.isShowRedCirclePoint) { //
// [self.contentView addSubview:self.leftCircleRedView]; // if (!CGRectEqualToRect(_item.rightShowImageFrame, CGRectZero)) {
if (FUSRTL.isRTL) { //// _theImageView.centerY = frame.origin.y + frame.size.height / 2.0f;
self.leftCircleRedView.x = CGRectGetMaxX(frame) + 2; // _theImageView.y = (frame.origin.y + frame.size.height / 2.0f) - _item.rightShowImageFrame.size.height / 2.0f;
} else { // if (FUSRTL.isRTL) {
self.leftCircleRedView.x = CGRectGetMinX(frame) - kRightRedViewWidth - 2; // _theImageView.x = self.detailTextLabel.right + 3;
} // } else {
// self.leftCircleRedView.y = 28; // _theImageView.x = self.detailTextLabel.x - _item.rightShowImageFrame.size.width - 3;
self.leftCircleRedView.centerY = frame.origin.y + frame.size.height / 2; // }
self.leftCircleRedView.backgroundColor = self.item.redCircleColor; // frame = _theImageView.frame;
} // }
//
if (!CGRectEqualToRect(_item.rightShowImageFrame, CGRectZero)) { // if (_item.isShowRedCirclePoint) {
_theImageView.centerY = self.detailTextLabel.centerY; //// [self.contentView addSubview:self.leftCircleRedView];
if (FUSRTL.isRTL) { // if (FUSRTL.isRTL) {
_theImageView.x = self.detailTextLabel.right + 3; // self.leftCircleRedView.x = CGRectGetMaxX(frame) + 2;
} else { // } else {
_theImageView.x = self.detailTextLabel.x - _item.rightShowImageFrame.size.width - 3; // self.leftCircleRedView.x = CGRectGetMinX(frame) - kRightRedViewWidth - 2;
} // }
} //// self.leftCircleRedView.y = 28;
} // self.leftCircleRedView.centerY = frame.origin.y + frame.size.height / 2.0f;
// self.leftCircleRedView.backgroundColor = self.item.redCircleColor;
- (void)dealloc { // }
[self.detailTextLabel removeObserver:self forKeyPath:@"frame"]; //}
} //
//- (void)dealloc {
// [self.detailTextLabel removeObserver:self forKeyPath:@"frame"];
//}
@end @end
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@protocol FUSHomeViewDelegate <NSObject> @protocol FUSHomeViewBaseDelegate <NSObject>
/// 提醒显示navi,tabbar /// 提醒显示navi,tabbar
-(void)fus_scrollview:(UIScrollView *)view shouldHideNavigationBar:(BOOL)hidden; -(void)fus_scrollview:(UIScrollView *)view shouldHideNavigationBar:(BOOL)hidden;
...@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface FUSHomePageBaseView : UIView @interface FUSHomePageBaseView : UIView
@property (nonatomic, weak) id<FUSHomeViewDelegate> delegate; @property (nonatomic, weak) id<FUSHomeViewBaseDelegate> fus_baseDelegate;
/// 传递父控制器,弱持有 /// 传递父控制器,弱持有
@property (nonatomic, weak) UIViewController *parentController; @property (nonatomic, weak) UIViewController *parentController;
......
...@@ -11,8 +11,17 @@ ...@@ -11,8 +11,17 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@protocol FUSHomeViewDelegate <NSObject>
@optional
/// 返回collectionview的内容最大高度
-(void)fus_homeViewCollectionViewContentMaxHeight:(CGFloat)maxHeight;
@end
@interface FUSHomeView : FUSHomePageBaseView @interface FUSHomeView : FUSHomePageBaseView
@property (nonatomic, weak) id<FUSHomeViewDelegate> fus_homeDelegate;
@end @end
......
...@@ -99,7 +99,8 @@ ...@@ -99,7 +99,8 @@
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH) self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH)
collectionViewLayout:[[UICollectionViewFlowLayout alloc]init]]; collectionViewLayout:[[UICollectionViewFlowLayout alloc]init]];
self.collectionView.scrollsToTop = YES; self.collectionView.scrollsToTop = YES;
self.collectionView.contentInset = UIEdgeInsetsMake(self.titleContainerView.height + 0, 0, UIView.fus_tabbarHeight, 0); // self.collectionView.contentInset = UIEdgeInsetsMake(self.titleContainerView.height + 0, 0, UIView.fus_tabbarHeight, 0);
self.collectionView.contentInset = UIEdgeInsetsMake(self.titleContainerView.height + 0, 0, 0, 0);
if (@available(iOS 11.0, *)) { if (@available(iOS 11.0, *)) {
self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; self.collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} }
...@@ -135,6 +136,13 @@ ...@@ -135,6 +136,13 @@
#pragma mark --- scrollview delegate #pragma mark --- scrollview delegate
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
if (self.fus_homeDelegate && [self.fus_homeDelegate respondsToSelector:@selector(fus_homeViewCollectionViewContentMaxHeight:)]) {
CGFloat contentH = 0;
NSInteger line = self.viewModel.dataList.count / self.columnsCount;
NSInteger last = self.viewModel.dataList.count % self.columnsCount;
contentH = [self fus_itemWidth] * line + (last > 1 ? 1 : 0) * [self fus_itemWidth];
[self.fus_homeDelegate fus_homeViewCollectionViewContentMaxHeight:self.titleContainerView.height + contentH];
}
return self.viewModel.dataList.count; return self.viewModel.dataList.count;
} }
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
...@@ -310,13 +318,13 @@ ...@@ -310,13 +318,13 @@
withStartContentOffSetY:_newContentOffsetY withStartContentOffSetY:_newContentOffsetY
pullUp: pullUp:
^{//上拉 ^{//上拉
if (self.delegate && [self.delegate respondsToSelector:@selector(fus_scrollview:shouldHideNavigationBar:)]) { if (self.fus_baseDelegate && [self.fus_baseDelegate respondsToSelector:@selector(fus_scrollview:shouldHideNavigationBar:)]) {
[self.delegate fus_scrollview:scrollView shouldHideNavigationBar:YES]; [self.fus_baseDelegate fus_scrollview:scrollView shouldHideNavigationBar:YES];
} }
[self fus_shouldHideNavigationbBar:YES]; [self fus_shouldHideNavigationbBar:YES];
} pullDown:^{//下拉 } pullDown:^{//下拉
if (self.delegate && [self.delegate respondsToSelector:@selector(fus_scrollview:shouldShowNavigationBar:)]) { if (self.fus_baseDelegate && [self.fus_baseDelegate respondsToSelector:@selector(fus_scrollview:shouldShowNavigationBar:)]) {
[self.delegate fus_scrollview:scrollView shouldShowNavigationBar:YES]; [self.fus_baseDelegate fus_scrollview:scrollView shouldShowNavigationBar:YES];
} }
[self fus_shouldHideNavigationbBar:NO]; [self fus_shouldHideNavigationbBar:NO];
} endDrag:^{//拉到尾(提前大概一页半的距离) } endDrag:^{//拉到尾(提前大概一页半的距离)
......
...@@ -178,6 +178,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -178,6 +178,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
NSMutableArray *groupItemList = [[NSMutableArray alloc] init]; NSMutableArray *groupItemList = [[NSMutableArray alloc] init];
if (evSection == itemTypeSectionList.lastObject) { if (evSection == itemTypeSectionList.lastObject) {
tempGroup.groupFooterHeight = UIView.fus_tabbarHeight; tempGroup.groupFooterHeight = UIView.fus_tabbarHeight;
tempGroup.groupFooterBgColor = [UIColor clearColor];
} }
// for (NSNumber *itemTypVaule in evSection) { // for (NSNumber *itemTypVaule in evSection) {
for (int j = 0; j < evSection.count; j++) { for (int j = 0; j < evSection.count; j++) {
...@@ -240,8 +241,10 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -240,8 +241,10 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
FUSCustomSettingGroup *group1 = [FUSCustomSettingGroup fus_settingGroup]; FUSCustomSettingGroup *group1 = [FUSCustomSettingGroup fus_settingGroup];
group1.groupFooterBgColor = [UIColor colorWithHex:@"#F6F7FB"]; group1.groupFooterBgColor = [UIColor colorWithHex:@"#F6F7FB"];
group1.groupHeaderBgColor = [UIColor colorWithHex:@"#F6F7FB"]; group1.groupHeaderBgColor = [UIColor colorWithHex:@"#F6F7FB"];
group1.groupFooterTextBgColor = [UIColor colorWithHex:@"#F6F7FB"]; // group1.groupFooterTextBgColor = [UIColor colorWithHex:@"#F6F7FB"];
group1.groupHeaderTextBgColor = [UIColor colorWithHex:@"#F6F7FB"]; // group1.groupHeaderTextBgColor = [UIColor colorWithHex:@"#F6F7FB"];
group1.groupFooterTextBgColor = [UIColor clearColor];
group1.groupHeaderTextBgColor = [UIColor clearColor];
group1.groupFooterOriginY = 6; group1.groupFooterOriginY = 6;
group1.groupFooterHeight = 11; group1.groupFooterHeight = 11;
group1.groupFooterOriginX = 0; group1.groupFooterOriginX = 0;
......
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
[self.tagView fus_refreshTagImagesWithModel:model]; [self.tagView fus_refreshTagImagesWithModel:model];
FUSWeakSelf(weakSelf); FUSWeakSelf(weakSelf);
[self.bgImageView setBaoFangCoverWebImageWithSubURLString:[FUSConfig.sharedInstanced.pathConfigs thumbImageUrl:model.face] placeholder:nil completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) { [self.bgImageView setBaoFangCoverWebImageWithSubURLString:model.face placeholder:nil completion:^(UIImage * _Nullable image, NSURL * _Nonnull url, YYWebImageFromType from, YYWebImageStage stage, NSError * _Nullable error) {
// 防止下载到图片的时候,cell已经被重用了 // 防止下载到图片的时候,cell已经被重用了
if (![url.absoluteString containsString:model.face]) { if (![url.absoluteString containsString:model.face]) {
return; return;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#import "FUSCacheDataShare.h" #import "FUSCacheDataShare.h"
#import "FUSMyZoneViewController.h" #import "FUSMyZoneViewController.h"
#import "FUSNewsFeedHelper.h" #import "FUSNewsFeedHelper.h"
#import "FUSLoginCacheOperate.h"
typedef NS_ENUM(NSInteger, FUSImAnchorItemType){ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
FUSImAnchorItemTypeLiveTask = 1, FUSImAnchorItemTypeLiveTask = 1,
...@@ -35,6 +36,8 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){ ...@@ -35,6 +36,8 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
@property (nonatomic, strong) UIButton *publishBtn; @property (nonatomic, strong) UIButton *publishBtn;
@property (nonatomic, strong) FUSImAnchorHeaderView *headerView; @property (nonatomic, strong) FUSImAnchorHeaderView *headerView;
@property (nonatomic, strong) FUSUserInfosModel *userInfosModel;
@end @end
@implementation FUSImAnchorViewController @implementation FUSImAnchorViewController
...@@ -47,6 +50,7 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){ ...@@ -47,6 +50,7 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
[self fus_cerateUI]; [self fus_cerateUI];
[self fus_createItems]; [self fus_createItems];
[self fus_reloadItemUI]; [self fus_reloadItemUI];
[self fus_loadUserInfo];
} }
-(void)fus_cerateUI{ -(void)fus_cerateUI{
...@@ -101,8 +105,12 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){ ...@@ -101,8 +105,12 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
} }
break; break;
case FUSImAnchorHeaderButtonTypeWithDraw:{ case FUSImAnchorHeaderButtonTypeWithDraw:{
if (FUSConfig.sharedInstanced.devConfigs.appStatus){
// sh不跳
return;
}
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init]; FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.withdrawAddress; vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.withdrawAddress;
[weakself.navigationController pushViewController:vc animated:YES]; [weakself.navigationController pushViewController:vc animated:YES];
} }
break; break;
...@@ -115,9 +123,13 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){ ...@@ -115,9 +123,13 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
-(void)fus_createItems{ -(void)fus_createItems{
NSArray *section1 = @[@(FUSImAnchorItemTypeLiveTask), @(FUSImAnchorItemTypePopular)]; NSArray *section1 = @[@(FUSImAnchorItemTypeLiveTask), @(FUSImAnchorItemTypePopular)];
NSArray *section2 = @[@(FUSImAnchorItemTypeLiveTime), @(FUSImAnchorItemTypeTotalFire)]; NSArray *section2 = @[@(FUSImAnchorItemTypeLiveTime), @(FUSImAnchorItemTypeTotalFire)];
NSArray *section3 = @[@(FUSImAnchorItemTypePrivacyRoomSetting)]; if (FUSConfig.sharedInstanced.devConfigs.appStatus) {
section2 = @[@(FUSImAnchorItemTypeLiveTime)];
}
// 暂时不要私房设置
// NSArray *section3 = @[@(FUSImAnchorItemTypePrivacyRoomSetting)];
NSArray *section4 = @[@(FUSImAnchorItemTypeBroadcastBuild), @(FUSImAnchorItemTypeActivity)]; NSArray *section4 = @[@(FUSImAnchorItemTypeBroadcastBuild), @(FUSImAnchorItemTypeActivity)];
NSArray *itemTypeSectionList = @[section1, section2, section3, section4]; NSArray *itemTypeSectionList = @[section1, section2, section4];
[self.allGroups removeAllObjects]; [self.allGroups removeAllObjects];
for (NSArray *evSection in itemTypeSectionList) { for (NSArray *evSection in itemTypeSectionList) {
...@@ -139,6 +151,7 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){ ...@@ -139,6 +151,7 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
case FUSImAnchorItemTypeTotalFire: case FUSImAnchorItemTypeTotalFire:
itemModel.rightShowTextColor = [UIColor fus_fireGreen]; itemModel.rightShowTextColor = [UIColor fus_fireGreen];
itemModel.rightShowImage = [UIImage fus_fireIcon]; itemModel.rightShowImage = [UIImage fus_fireIcon];
itemModel.rightShowImageFrame = CGRectMake(0, 0, 22, 22);
break; break;
case FUSImAnchorItemTypePrivacyRoomSetting: case FUSImAnchorItemTypePrivacyRoomSetting:
itemModel.rightShowTextColor = [UIColor fus_textColorLight]; itemModel.rightShowTextColor = [UIColor fus_textColorLight];
...@@ -205,19 +218,31 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){ ...@@ -205,19 +218,31 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
} }
#pragma mark --- method #pragma mark --- method
-(void)fus_loadUserInfo{
FUSWeakSelf(weakself);
[FUSLoginCacheOperate fus_getUserInfosWithType:ReadServerBegin success:^(FUSUserInfosModel *userInfoModel) {
weakself.userInfosModel = userInfoModel;
[weakself fus_reloadItemUI];
} failure:^(NSString *msg, int code) {
[FUSDialogView fus_showDialog:msg];
}];
}
-(void)fus_reloadItemUI{ -(void)fus_reloadItemUI{
for (FUSCustomSettingGroup *sectionModel in self.allGroups) { for (FUSCustomSettingGroup *sectionModel in self.allGroups) {
for (FUSCustomSettingItem *itemModel in sectionModel.items) { for (FUSCustomSettingItem *itemModel in sectionModel.items) {
switch (itemModel.itemTag) { switch (itemModel.itemTag) {
case FUSImAnchorItemTypeTotalFire: case FUSImAnchorItemTypeTotalFire:
if ([FUSConfig sharedInstanced].devConfigs.appStatus) { itemModel.rightShowText = _zoneModel.bonds;
itemModel.rightShowText = _zoneModel.charm;
}else{
itemModel.rightShowText = _zoneModel.bonds;
}
break; break;
case FUSImAnchorItemTypeLiveTime: case FUSImAnchorItemTypeLiveTime:{
itemModel.rightShowText = _zoneModel.showTime; if (self.userInfosModel != nil && ![NSString isNull:self.userInfosModel.showTime]) {
NSInteger showTime = [self.userInfosModel.showTime integerValue];
itemModel.rightShowText = [NSString stringWithFormat:@"%ldH",showTime / 3600];
}
}
break; break;
case FUSImAnchorItemTypePrivacyRoomSetting: case FUSImAnchorItemTypePrivacyRoomSetting:
// itemModel.rightShowText = // itemModel.rightShowText =
...@@ -237,29 +262,38 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){ ...@@ -237,29 +262,38 @@ typedef NS_ENUM(NSInteger, FUSImAnchorItemType){
switch (type) { switch (type) {
case FUSImAnchorItemTypeLiveTask:{ case FUSImAnchorItemTypeLiveTask:{
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init]; FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.liveTaskAddress; vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.liveTaskAddress;
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
break; break;
case FUSImAnchorItemTypePopular:{ case FUSImAnchorItemTypePopular:{
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init]; FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.popularAddress; vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.popularAddress;
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
break; break;
case FUSImAnchorItemTypeBroadcastBuild:{ case FUSImAnchorItemTypeBroadcastBuild:{
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init]; FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.anchorNovaAddress; vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.anchorNovaAddress;
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
break; break;
case FUSImAnchorItemTypeActivity:{ case FUSImAnchorItemTypeActivity:{
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init]; FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.activitiesAddress; vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.activitiesAddress;
[self.navigationController pushViewController:vc animated:YES];
}
break;
case FUSImAnchorItemTypeTotalFire:{
if (FUSConfig.sharedInstanced.devConfigs.appStatus){
// sh不跳
return;
}
FUSWKWebViewController *vc = [[FUSWKWebViewController alloc] init];
vc.webUrlString = [FUSCacheDataShare shareStore].settingInitDataModel.fusiConfig.withdrawAddress;
[self.navigationController pushViewController:vc animated:YES]; [self.navigationController pushViewController:vc animated:YES];
} }
break; break;
default: default:
break; break;
} }
......
...@@ -213,7 +213,10 @@ ...@@ -213,7 +213,10 @@
UILabel *withdrawTitleLabel = [[UILabel alloc] init]; UILabel *withdrawTitleLabel = [[UILabel alloc] init];
withdrawTitleLabel.font = [UIFont fus_themeMediumFont:13]; withdrawTitleLabel.font = [UIFont fus_themeMediumFont:13];
withdrawTitleLabel.textColor = [UIColor fus_textColorLight]; withdrawTitleLabel.textColor = [UIColor fus_textColorLight];
withdrawTitleLabel.text = FUSLocalizationHelper.versionLocalString(@"可提现"); if (!FUSConfig.sharedInstanced.devConfigs.appStatus) {
// 非sh显示
withdrawTitleLabel.text = FUSLocalizationHelper.versionLocalString(@"可提现");
}
[bottomBgImageView addSubview:withdrawTitleLabel]; [bottomBgImageView addSubview:withdrawTitleLabel];
[withdrawTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { [withdrawTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.offset(-25); make.right.offset(-25);
......
...@@ -622,10 +622,45 @@ ...@@ -622,10 +622,45 @@
_allListInfo[newTalkModel.uid] = newTalkModel; _allListInfo[newTalkModel.uid] = newTalkModel;
} }
// 更新寨信列表
[self fus_orderZhaiXinTableList];
//更新未读 //更新未读
[self fus_dealUnreadCountWithArr:_allNewTalkList]; [self fus_dealUnreadCountWithArr:_allNewTalkList];
} }
/**
更新寨信列表
*/
- (void)fus_orderZhaiXinTableList{
// 添加旧会话数组
NSArray *oldTalkList = [FUSZhaiXinDBOperate fus_selectZhaiXinInfosTable];
for (FUSZhaiXinModel *oldTalkModel in oldTalkList) {
// 只添加非单聊窗口
if (![oldTalkModel.typeId hasPrefix:SINGLE_CHAT]) {
[_allNewTalkList addObject:oldTalkModel];
} else if ([oldTalkModel.uid isEqualToString:IM_SERVEICE_UID] ||
[oldTalkModel.uid isEqualToString:IM_SERVEICE_UID1] ||
[oldTalkModel.uid isEqualToString:IM_SERVEICE_UID2]) {
[_allNewTalkList addObject:oldTalkModel];
}
}
// 寨信 重新根据时间戳排序
[_allNewTalkList sortUsingComparator:^NSComparisonResult(FUSZhaiXinModel *obj1,FUSZhaiXinModel *obj2) {
if (obj1.time.longLongValue > obj2.time.longLongValue) {
return NSOrderedAscending;
}else{
return NSOrderedDescending;
}
}];
// 写入数据库
[FUSZhaiXinDBOperate fus_writeMultiDataToZhaiXinInfosTableWithModelArray:_allNewTalkList keyArray:@[@"typeId"]];
}
/** /**
转化为一个寨信 model 转化为一个寨信 model
......
...@@ -5,10 +5,39 @@ ...@@ -5,10 +5,39 @@
// Created by aaa on 2024/6/18. // Created by aaa on 2024/6/18.
// //
#import <FUSFoundation/FUSFoundation.h> //#import <FUSFoundation/FUSFoundation.h>
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
/// Fusi配置
@interface FUSSettingFusiConfigModel : FUSBaseModel
/// 平台榜单H5地址
@property (nonatomic, copy) NSString *rankAddress;
/// 直播任务地址
@property (nonatomic, copy) NSString *liveTaskAddress;
/// 人气加成地址
@property (nonatomic, copy) NSString *popularAddress;
/// 主播养成地址
@property (nonatomic, copy) NSString *anchorNovaAddress;
/// 平台活动地址
@property (nonatomic, copy) NSString *activitiesAddress;
/// 提现H5地址
@property (nonatomic, copy) NSString *withdrawAddress;
/// 宝石记录H5地址
@property (nonatomic, copy) NSString *gemTradeAddress;
/// 露水记录H5地址
@property (nonatomic, copy) NSString *chipTradeAddress;
/// 萤火记录H5地址
@property (nonatomic, copy) NSString *bondsTradeAddress;
/// 邀请记录H5地址
@property (nonatomic, copy) NSString *inviteTradeAddress;
/// Vip开通H5地址
@property (nonatomic, copy) NSString *vipOpenAddress;
@end
@interface FUSRoomWebFrameworkModel : FUSBaseModel @interface FUSRoomWebFrameworkModel : FUSBaseModel
/// 横向h5地址 /// 横向h5地址
...@@ -73,33 +102,17 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -73,33 +102,17 @@ NS_ASSUME_NONNULL_BEGIN
/// H5客服访问地址 /// H5客服访问地址
@property (nonatomic, copy) NSString *url; @property (nonatomic, copy) NSString *url;
/// 直播预告配置 /// 直播预告配置:时间范围(单位:天)key:modelTimeScope
@property (nonatomic, strong) NSDictionary *previewLiveConfig; @property (nonatomic, strong) NSDictionary *previewLiveConfig;
/// 时间范围(单位:天)
@property (nonatomic, copy) NSString *modelTimeScope;
/// 直播任务访问地址
@property (nonatomic, copy) NSString *liveTaskAddress;
/// 人气加成访问地址
@property (nonatomic, copy) NSString *popularAddress;
/// 主播养成访问地址
@property (nonatomic, copy) NSString *anchorNovaAddress;
/// 平台活动访问地址
@property (nonatomic, copy) NSString *activitiesAddress;
/// 提现H5访问地址
@property (nonatomic, copy) NSString *withdrawAddress;
/// 房间活动运营框架配置 /// 房间活动运营框架配置
@property (nonatomic, strong) FUSRoomWebFrameworkModel *roomWebFramework; @property (nonatomic, strong) FUSRoomWebFrameworkModel *roomWebFramework;
/// 客服配置 /// 客服配置
@property (nonatomic, strong) FUSAPPSeviceConfig *kfConfig; @property (nonatomic, strong) FUSAPPSeviceConfig *kfConfig;
@property (nonatomic, strong) FUSSettingFusiConfigModel *fusiConfig;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
return @{ return @{
@"roomWebFramework":[FUSRoomWebFrameworkModel class], @"roomWebFramework":[FUSRoomWebFrameworkModel class],
@"kfConfig":[FUSAPPSeviceConfig class] @"kfConfig":[FUSAPPSeviceConfig class],
@"fusiConfig":[FUSSettingFusiConfigModel class]
}; };
} }
...@@ -31,3 +32,9 @@ ...@@ -31,3 +32,9 @@
@implementation FUSAPPSeviceConfig @implementation FUSAPPSeviceConfig
@end @end
@implementation FUSSettingFusiConfigModel
@end
...@@ -33,6 +33,8 @@ class FUSSearchTableViewCell: UITableViewCell { ...@@ -33,6 +33,8 @@ class FUSSearchTableViewCell: UITableViewCell {
super.awakeFromNib() super.awakeFromNib()
// Initialization code // Initialization code
self.selectionStyle = .none
commonInit() commonInit()
} }
......
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