Compare commits

...

6 Commits

Author SHA1 Message Date
liyuhua
ae84ee3ec2 更换图片logo 2024-03-25 23:56:01 +08:00
liyuhua
22d8ff96e5 小游戏优化 2024-03-25 23:56:01 +08:00
liyuhua
2e54f7f3c3 修复bug 2024-03-25 23:56:01 +08:00
liyuhua
5f75858bd6 更改logo 2024-03-25 23:56:01 +08:00
liyuhua
8d27e307e9 商店包版本修改 此commit置顶 2.6.5 2024-03-25 23:51:02 +08:00
liyuhua
c90c726b53 商店包版本修改 此commit置顶 2.6.5 2024-03-25 23:18:36 +08:00
15 changed files with 84 additions and 56 deletions

View File

@@ -12207,7 +12207,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 20.20.14;
MARKETING_VERSION = 20.20.15;
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -12243,7 +12243,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 20.20.14;
MARKETING_VERSION = 20.20.15;
PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -12,6 +12,7 @@
NS_ASSUME_NONNULL_BEGIN
typedef void(^LoadCompletion)(UIImage *_Nullable image, NSURL * url);
typedef void(^LoadFail)(NSError *error);
typedef NS_ENUM(NSInteger, NetImageState){
NetImageStateUnload = 1,
@@ -30,7 +31,7 @@ typedef NS_ENUM(NSInteger, NetImageState){
- (void)loadImage:(LoadCompletion _Nullable)completion;
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion _Nullable)completion;
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion fail:(LoadFail)fail;
@end
NS_ASSUME_NONNULL_END

View File

@@ -64,9 +64,6 @@
[self sd_setImageWithURL:[NSURL URLWithString:_innerConfigedUrl] placeholderImage:self.config.placeHolder options:SDWebImageRetryFailed completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
if (error) {
self.state = NetImageStateUnload;
if (completion) {
completion(nil, imageURL);
};
} else {
self.state = NetImageStateLoaded;
if (completion) {
@@ -75,12 +72,30 @@
}
}];
}
- (void)loadImage:(LoadCompletion)completion fail:(LoadFail)fail{
self.state = NetImageStateLoading;
[self sd_setImageWithURL:[NSURL URLWithString:_innerConfigedUrl] placeholderImage:self.config.placeHolder options:SDWebImageRetryFailed completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
if (error) {
self.state = NetImageStateUnload;
if (fail){
fail(error);
}
} else {
self.state = NetImageStateLoaded;
if (completion) {
completion(image, imageURL);
};
}
}];
}
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion {
[self initImageUrl:imageUrl];
[self loadImage:completion];
}
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion fail:(LoadFail)fail{
[self initImageUrl:imageUrl];
[self loadImage:completion fail:fail];
}
- (NetImageConfig *)config {
if (!_config) {
_config = [[NetImageConfig alloc] init];

View File

@@ -49,7 +49,7 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
///内置版本号
#define PI_App_Version @"2.6.4"
#define PI_App_Version @"2.6.5"
///渠道
#define PI_App_Source @"appstore"
//#define PI_App_Source @"pi_tf"

View File

@@ -46,7 +46,6 @@ NS_ASSUME_NONNULL_BEGIN
//是否为周榜top1
@property(nonatomic,assign) BOOL isWeekTop1;
@property(nonatomic,copy) NSString *inRoomUid;
//是否在麦位
@property(nonatomic,assign) BOOL inMic;
///是否在线

View File

@@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface XPNewHomePartyTableViewCell : UITableViewCell
@property (nonatomic,strong) HomePlayRoomModel *roomInfo;
@property (nonatomic,strong) HomeRecommendRoomModel *roomInfo1;
@property(nonatomic,weak) id<XPNewHomePartyTableViewCellDelegate>delegate;
///声音卡时svga是否播放动画
-(void)setPlaySoundStatus:(BOOL)isPlay;

View File

@@ -243,14 +243,7 @@
-(void)setPlaySoundTime:(NSInteger)time{
_audioView.voiceDura = @(time).stringValue;
}
- (void)setRoomInfo1:(HomeRecommendRoomModel *)roomInfo1 {
_roomInfo1 = roomInfo1;
if (_roomInfo1) {
}
}
-(void)didSelectItemAction{

View File

@@ -431,6 +431,7 @@ UIKIT_EXTERN NSString * const kShieldingNotification;
-(void)xPNewHomePartyTableViewCell:(XPNewHomePartyTableViewCell *_Nullable)cell didSelectChat:(HomePlayRoomModel *_Nonnull)roomModel{
if(roomModel.inMic == YES){
[XPRoomViewController openRoom:roomModel.inRoomUid fromNick:roomModel.nick fromType:UserEnterRoomFromType_Follow_User fromUid:roomModel.uid viewController:self];
return;
}

View File

@@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic,assign) CGFloat resourceHeight;
@property(nonatomic,strong) SVGAVideoEntity *videoItem;
@property(nonatomic,strong) UIImage *image;
@property(nonatomic,assign) CGFloat resourceTop;
@end

View File

@@ -18,6 +18,7 @@
@property (nonatomic,strong) UILabel *titleView;
@property (nonatomic,strong) UIButton *clickBtn;
@property(nonatomic,strong) SVGAVideoEntity *videoItem;
@end
@implementation PIUniversalBannerView
@@ -62,15 +63,21 @@
if(textDic.allKeys.count == 0)return ;
NSString *title = textDic[@"zh-CHT"] == nil ? textDic[textDic.allKeys.firstObject] : textDic[@"zh-CHT"];
if(title.length == 0)return;
[title stringByReplacingOccurrencesOfString:@"\n" withString:@""];
CGFloat font = _isSvga == YES ? _model.fontSize / 2 : _model.fontSize;
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:font],NSForegroundColorAttributeName:[DJDKMIMOMColor colorWithHexString:_model.textColor]}];
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:_model.fontSize],NSForegroundColorAttributeName:[DJDKMIMOMColor colorWithHexString:_model.textColor]}];
for (PIUniversalBannerItemModel *model in _model.contents) {
if([model.type isEqualToString:@"TEXT"]){
NSDictionary *subTextDic = model.text;
if(subTextDic.allKeys.count > 0){
NSString *subText = subTextDic[@"zh-CHT"] == nil ? subTextDic[subTextDic.allKeys.firstObject] : subTextDic[@"zh-CHT"];
NSAttributedString *attText = [[NSAttributedString alloc]initWithString:subText attributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor colorWithHexString:model.textColor]}];
[attribute replaceCharactersInRange:[attribute.string rangeOfString:[NSString stringWithFormat:@"{%@}",model.key]] withAttributedString:attText];
NSAttributedString *attText = [[NSAttributedString alloc]initWithString:subText attributes:@{NSForegroundColorAttributeName:[DJDKMIMOMColor colorWithHexString:model.textColor],NSFontAttributeName:[UIFont systemFontOfSize:font]}];
if ([attribute.string containsString:[NSString stringWithFormat:@"{%@}",model.key]]){
[attribute replaceCharactersInRange:[attribute.string rangeOfString:[NSString stringWithFormat:@"{%@}",model.key]] withAttributedString:attText];
}
}
}
@@ -79,12 +86,17 @@
if(_isSvga == YES){
self.bgImageView.hidden = YES;
self.svgaView.hidden = NO;
self.titleView.hidden = YES;
self.titleView.hidden = NO;
self.svgaView.loops = 1;
self.titleView.attributedText = attribute;
self.svgaView.clearsAfterStop = NO;
self.svgaView.videoItem = _model.videoItem;
[self.svgaView setAttributedText:attribute forKey:_model.svgaTextKey];
// [self.svgaView setAttributedText:attribute forKey:_model.svgaTextKey];
[self.svgaView startAnimation];
[self.titleView mas_updateConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kGetScaleWidth(self.model.resourceTop));
make.leading.trailing.equalTo(self).inset(kGetScaleWidth(70));
}];
}else{
self.bgImageView.hidden = NO;
self.bgImageView.image = _model.image;

View File

@@ -409,13 +409,13 @@
PIUniversalBannerModel *model = [PIUniversalBannerModel modelWithDictionary:attacment.data];
BOOL isSvga = [model.resourceType isEqualToString:@"SVGA"];
__block PIUniversalBannerView *bannerView;
__block PIUniversalBannerView *bannerView;
if (isSvga == YES) {
SVGAParser *parser = [SVGAParser new];
[parser parseWithURL:[NSURL URLWithString:model.resourceContent] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
model.videoItem = videoItem;
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(0, top, model.resourceWidth, model.resourceHeight) ];
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(KScreenWidth, top, kGetScaleWidth(model.resourceWidth), kGetScaleWidth(model.resourceHeight)) ];
[self showGeneralFloatingScreenView:bannerView model:model];
} failureBlock:^(NSError * _Nonnull error) {
[bannerView removeFromSuperview];
@@ -428,16 +428,7 @@
}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 ;
@@ -445,7 +436,15 @@
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(0, top, KScreenWidth, getHeigth) ];
[self showGeneralFloatingScreenView:bannerView model:model];
}fail:^(NSError * _Nonnull error) {
[bannerView removeFromSuperview];
self.isPlayOfB = NO;
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
[self playAnimationWithModel];
}];
}
}

View File

@@ -104,9 +104,6 @@
#else
isTestEnv = NO;
#endif
if(isEnterprise == NO){
[[SudMGP getCfg]setBackgroundMode:NO];
}
[SudMGP initSDK:KeyWithType(KeyType_SudGameAppID) appKey:KeyWithType(KeyType_SudGameAppKey) isTestEnv:isTestEnv listener:^(int retCode, const NSString *retMsg) {
if (retCode == 0) {
if (!self.currentmgId) {

View File

@@ -39,12 +39,18 @@
}
- (NSMutableAttributedString*)updateNetImageAttribute:(NetImageView*)imageView attributes:(NSMutableAttributedString*)attributes range:(NSRange)range{
UIImage* image = imageView.image;
CGFloat scale = image.size.width / image.size.height;
// imageView.bounds.size.height
CGSize size = CGSizeMake(imageView.bounds.size.height * scale, imageView.bounds.size.height);
imageView.bounds = CGRectMake(0, 0, size.width, size.height);
UIImage* image = imageView.image;
CGSize size;
if (image != nil){
CGFloat scale = image.size.width / image.size.height;
// imageView.bounds.size.height
size = CGSizeMake(imageView.bounds.size.height * scale, imageView.bounds.size.height);
imageView.bounds = CGRectMake(0, 0, size.width, size.height);
}else{
size = CGSizeMake(16, 16);
imageView.bounds = CGRectMake(0, 0, 16, 16);
}
NSMutableAttributedString * replaceAttr = [NSMutableAttributedString yy_attachmentStringWithContent:imageView contentMode:UIViewContentModeScaleAspectFit attachmentSize:size alignToFont:[UIFont systemFontOfSize:15.0] alignment:YYTextVerticalAlignmentCenter];
[attributes replaceCharactersInRange:range withAttributedString:replaceAttr];
return attributes;

View File

@@ -219,9 +219,15 @@
}
}
if (self.roomPKInfo.voteMode == RoomPKVoteModeType_NumberPerson) { //
[self canculeRoomPKSendGiftNumPerson:targetUids sendUid:giftReceiveInfo.uid];
if (giftInfo.giftType != GiftType_super){
[self canculeRoomPKSendGiftNumPerson:targetUids sendUid:giftReceiveInfo.uid];
}
} else {
[self canculeRoomGiftValueReceiveInfo:targetUids giftPrice:giftInfo.goldPrice * giftReceiveInfo.giftNum];
if (giftInfo.giftType != GiftType_super){
[self canculeRoomGiftValueReceiveInfo:targetUids giftPrice:giftInfo.goldPrice * giftReceiveInfo.giftNum];
}
}
}
}

View File

@@ -252,7 +252,7 @@
SVGAParser *parser = [SVGAParser new];
[parser parseWithURL:[NSURL URLWithString:model.resourceContent] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
model.videoItem = videoItem;
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(0, top, model.resourceWidth, model.resourceHeight) ];
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(KScreenWidth, top, kGetScaleWidth(model.resourceWidth), kGetScaleWidth(model.resourceHeight)) ];
[self showGeneralFloatingScreenView:bannerView model:model];
} failureBlock:^(NSError * _Nonnull error) {
[bannerView removeFromSuperview];
@@ -266,22 +266,20 @@
}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 ;
CGFloat getHeigth = KScreenWidth * height / width;
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth, getHeigth) ];
[self showGeneralFloatingScreenView:bannerView model:model];
} fail:^(NSError * _Nonnull error) {
self.isPlayOfB = NO;
if(self.animationListB.count > 0){
[self.animationListB removeObjectAtIndex:0];
}
[self playAnimationWithModel];
}];
}
}