From 6d450443d0dc64401ee6e1528e5e1ef6309eecba Mon Sep 17 00:00:00 2001 From: liyuhua <15626451870@163.com> Date: Mon, 25 Mar 2024 14:54:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=94=A8=E9=A3=98=E5=B1=8F=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/YMMessage/Model/AttachmentModel.h | 20 ++++++++++--------- .../View/AnimationView/XPRoomAnimationView.m | 17 +++++++++++++++- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/YuMi/Modules/YMMessage/Model/AttachmentModel.h b/YuMi/Modules/YMMessage/Model/AttachmentModel.h index e3a02582..12a269ec 100644 --- a/YuMi/Modules/YMMessage/Model/AttachmentModel.h +++ b/YuMi/Modules/YMMessage/Model/AttachmentModel.h @@ -115,10 +115,11 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) { CustomMessageType_General_Public_Screen = 103, ///疯狂动物园飘屏 CustomMessageType_Graffiti_Star_Kitchen = 104, - ///通用飘屏 - CustomMessageType_General_Floating_Screen = 105, + ///超级礼物 CustomMessageType_Super_Gift = 106, + ///通用飘屏 + CustomMessageType_General_Floating_Screen = 107, }; @@ -637,13 +638,7 @@ typedef NS_ENUM(NSUInteger, CustomMessageTypeGeneralPublicScreen) { Custom_Message_Sub_General_Public_Screen_One_Room = 1031,//单房间 Custom_Message_Sub_General_Public_Screen_All_Room = 1032,///全部房间 }; -///通用飘屏 -//CustomMessageType_General_Floating_Screen = 105, -typedef NS_ENUM(NSUInteger, CustomMessageTypeGeneralFloatingScreen) { - ///所有房间 - Custom_Message_Sub_General_Floating_Screen_One_Room = 1051,//单房间 - Custom_Message_Sub_General_Floating_Screen_All_Room = 1052,///全部房间 -}; + ///超级礼物 //CustomMessageType_Super_Gift = 106, typedef NS_ENUM(NSUInteger, CustomMessageTypeSuperGift) { @@ -651,6 +646,13 @@ typedef NS_ENUM(NSUInteger, CustomMessageTypeSuperGift) { Custom_Message_Sub_Super_Gift = 1061, }; +///通用飘屏 +//CustomMessageType_General_Floating_Screen = 105, +typedef NS_ENUM(NSUInteger, CustomMessageTypeGeneralFloatingScreen) { + ///所有房间 + Custom_Message_Sub_General_Floating_Screen_One_Room = 1071,//单房间 + Custom_Message_Sub_General_Floating_Screen_All_Room = 1072,///全部房间 +}; @interface AttachmentModel : PIBaseModel @property (nonatomic,assign) int first; @property (nonatomic,assign) int second; diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m index 206e6c07..1b93acfa 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m @@ -418,11 +418,26 @@ bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(0, top, model.resourceWidth, model.resourceHeight) ]; [self showGeneralFloatingScreenView:bannerView model:model]; } failureBlock:^(NSError * _Nonnull error) { - + [bannerView removeFromSuperview]; + self.isPlayOfB = NO; + if(self.animationListB.count > 0){ + [self.animationListB removeObjectAtIndex:0]; + } + [self playAnimationWithModel]; }]; }else{ NetImageView *imageView = [NetImageView new]; [imageView loadImageWithUrl:model.resourceContent completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) { + if (image == nil){ + + [bannerView removeFromSuperview]; + self.isPlayOfB = NO; + if(self.animationListB.count > 0){ + [self.animationListB removeObjectAtIndex:0]; + } + [self playAnimationWithModel]; + return; + } model.image = image; CGFloat width = image.size.width <= 0 ? kGetScaleWidth(60) : image.size.width; CGFloat height = image.size.height ;