修复bug

This commit is contained in:
liyuhua
2024-01-31 10:43:03 +08:00
parent 910cb0ab0e
commit 67ae3508fa
10 changed files with 48 additions and 37 deletions

View File

@@ -11669,7 +11669,7 @@
CODE_SIGN_ENTITLEMENTS = "xplan-ios/xplan-ios.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 48UCG35Q9W;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -11685,7 +11685,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.2.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
@@ -11932,7 +11932,7 @@
CODE_SIGN_ENTITLEMENTS = "xplan-ios/xplan-iosRelease.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = 48UCG35Q9W;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -11948,7 +11948,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.2.0;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",

View File

@@ -200,7 +200,7 @@ UIKIT_EXTERN NSString * kUserCompleteInfoFinishKey;
if ([self.presenter getThirdUserInfo] && [self.presenter getThirdUserInfo].avatarUrl.length > 0) {
avatar = [self.presenter getThirdUserInfo].avatarUrl;
} else {
avatar = @"https://image.pekolive.com/default_image.png";
avatar = @"https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/default_avatar.png";
}
return avatar;
}

View File

@@ -99,6 +99,7 @@
self.giftNameLabel.text = _giftInfo.giftName;
self.giftPriceLabel.text = [NSString stringWithFormat:@"%ld", _giftInfo.giftPrice];
self.numberButton.text = [NSString stringWithFormat:@"x%ld", _giftInfo.reciveCount];
_bgImageView.image = kImage(@"mine_user_infi_gift_bg1");
if(_giftInfo.giftLevel > 0){
NSString *image = [NSString stringWithFormat:@"mine_user_infi_gift_bg%d",_giftInfo.giftLevel];
_bgImageView.image = kImage(image);

View File

@@ -116,7 +116,8 @@
}
}
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{
return section == 2 ? UIEdgeInsetsMake(0, 12, 100, 12) : UIEdgeInsetsMake(0, 12, 0, 12);;
CGFloat x = (KScreenWidth - 84 * 4 - 1)/5;
return section == 2 ? UIEdgeInsetsMake(0, x, 100, x) : UIEdgeInsetsMake(0, 12, 0, 12);;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
if(indexPath.section == 0){
@@ -209,7 +210,8 @@
- (UICollectionView *)collectionView{
if(!_collectionView){
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.minimumInteritemSpacing = 5;
layout.minimumInteritemSpacing = (KScreenWidth - 84 * 4 - 1) / 5;
layout.minimumLineSpacing = 8;
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];

View File

@@ -211,6 +211,7 @@
self.lockImageView.hidden = self.curUserNobleLevel >= giftInfo.giftVipInfo.vipLevel;
[self setVeiwLucency:!self.lockImageView.hidden ? 0.5 : 1];
}else if(giftInfo.giftType == GiftType_Unlock){
self.lockImageView.hidden = YES;
for (int i = 0 ; i < giftInfo.unlockGiftList.count; i++) {
MewUnlockGiftModel *model = giftInfo.unlockGiftList[i];
if (model.targetGift.giftId == giftInfo.giftId){
@@ -219,8 +220,6 @@
[self setVeiwLucency:0.5];
model.unlocked = NO;
}else{
self.lockImageView.hidden = YES;
[self setVeiwLucency:1];
model.unlocked = YES;
}
}

View File

@@ -44,29 +44,31 @@
self.dressUpView.image = image;
}];
}
[self.collectionView reloadData];
if(_giftModel.baseGift.isSelect == YES){
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC));
dispatch_after(delayTime, dispatch_get_main_queue(), ^{
self.collectionView.contentOffset = CGPointMake(0, 0);
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
});
}else{
CGFloat x = self.giftModel.baseGift.width + 6;
int j = 0;
for (int i = 0; i < _giftModel.unlockGiftList.count ; i++) {
MewUnlockGiftModel *model = self.giftModel.unlockGiftList[i];
if (model.isSelect){
if (i > 0){
x = x + model.width + 6;
}
if(model.isSelect){
j = i;
break;
}
}
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC));
dispatch_after(delayTime, dispatch_get_main_queue(), ^{
self.collectionView.contentOffset = CGPointMake(x, 0);
if (self.giftModel.unlockGiftList.count > j){
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:j + 1 inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
}
});
}

View File

@@ -131,10 +131,7 @@
[_unlockGiftImageView loadImageWithUrl:_unlockModel.targetGift.giftUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.unlockGiftImageView.image = image;
}];
NSString *text = [NSString stringWithFormat:@"送出 %d个 %@可解锁",_unlockModel.condition,_baseModel.giftName];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[text rangeOfString:[NSString stringWithFormat:@"%d个",_unlockModel.condition]]];
_unlockTitleView.attributedText = textAtt;
NSMutableAttributedString *numAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%d/%d",_unlockModel.process,_unlockModel.condition] attributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xCED1DB),NSFontAttributeName:[UIFont systemFontOfSize:9 weight:UIFontWeightRegular]}];
_unlockNumView.attributedText = numAtt;
@@ -153,9 +150,17 @@
_unlockIconView.hidden = NO;
[self setVeiwLucency:0.5];
self.contentView.layer.borderColor = UIColorRGBAlpha(0xFFDA24, 0.5).CGColor ;
NSString *text = [NSString stringWithFormat:@"送出 %d个 %@可解锁",_unlockModel.condition,_baseModel.giftName];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[text rangeOfString:[NSString stringWithFormat:@"%d个",_unlockModel.condition]]];
_unlockTitleView.attributedText = textAtt;
}else{
_unlockIconView.hidden = YES;
self.contentView.layer.borderColor = UIColorRGBAlpha(0xFFDA24, 1).CGColor ;
NSString *text = [NSString stringWithFormat:@"送出 %d个 %@已解锁",_unlockModel.condition,_baseModel.giftName];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:text attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:10 weight:UIFontWeightRegular],NSForegroundColorAttributeName:[UIColor whiteColor]}];
[textAtt addAttributes:@{NSForegroundColorAttributeName:UIColorFromRGB(0xFFDA24),NSFontAttributeName:[UIFont systemFontOfSize:10 weight:UIFontWeightMedium]} range:[text rangeOfString:[NSString stringWithFormat:@"%d个",_unlockModel.condition]]];
_unlockTitleView.attributedText = textAtt;
}
if (!_baseModel.isSelect){
self.contentView.layer.borderWidth = _unlockModel.isSelect ? 1 : 0;

View File

@@ -485,6 +485,13 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
GiftInfoModel * giftInfo = [self.datasource safeObjectAtIndex1:item];
[self dealSelectGift:giftInfo];
[self.giftcollectionView reloadData];
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC));
dispatch_after(delayTime, dispatch_get_main_queue(), ^{
[self.giftcollectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:item inSection:0] atScrollPosition:UICollectionViewScrollPositionNone animated:YES];
});
if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftInfoView:didClickItem:type:)]) {
[self.delegate xPGiftInfoView:self didClickItem:giftInfo type:self.segmentType];
}
@@ -496,14 +503,13 @@ static NSString *kSendGiftViewHidePunishNewIcon = @"kSendGiftViewHidePunishNewIc
if (obj.baseGift.giftId == giftModel.giftId){
for (int i = 0 ; i < obj.unlockGiftList.count; i++) {
MewUnlockGiftModel *model = obj.unlockGiftList[i];
int num = model.condition - model.process;
if (count > num){
int num = count + model.process;
if (num > model.condition){
model.process = model.condition;
count = count - num;
}else{
model.process = model.process + count;
model.process = num;
}
}
}

View File

@@ -386,11 +386,6 @@
return;
}
GiftInfoModel * giftInfo = self.giftInfoView.lastSelectGift;
if (giftInfo.giftType == GiftType_Unlock && giftInfo.unlocked == NO){
[XCHUDTool showErrorWithMessage:@"暂未解锁该礼物,请留意上方的礼物解锁条件"];
return;
}
if (self.usingplaceType == SendGiftType_Room) {
if (uids.count > 0) {
///
@@ -571,6 +566,7 @@
}else if(info.giftType == GiftType_Unlock){
[self.luckyBroadcastView removeFromSuperview];
[self.constellationBanner removeFromSuperview];
if(info.unlockGiftList.count == 0)return;
CGFloat width = [UILabel getWidthWithText:@(info.baseGift.goldPrice).stringValue height:13 font:[UIFont systemFontOfSize:9 weight:UIFontWeightRegular]];
info.baseGift.width = (width < 33 ? 33 : width) + 51;
if(info.giftId == info.baseGift.giftId){

View File

@@ -546,7 +546,7 @@
[unlockGiftAtt appendAttributedString:[self createTextAttribute:nick color:[ThemeColor colorWithHexString:@"#FFD980"] font:fontSize]];
[self attributeAddHihtLight:unlockGiftAtt uid:unlockGift.uid.integerValue];
[unlockGiftAtt appendAttributedString:[self createTextAttribute:@" 获得 " color:[UIColor whiteColor] font:fontSize]];
[unlockGiftAtt appendAttributedString:[self createTextAttribute:unlockGift.dressName color:[UIColor whiteColor] font:fontSize]];
[unlockGiftAtt appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%@ ",unlockGift.dressName] color:[UIColor whiteColor] font:fontSize]];
[unlockGiftAtt appendAttributedString:[self createUrlImageAttribute:unlockGift.dressUrl size:CGSizeMake(28, 28)]];
messageInfo.content = unlockGiftAtt;