Compare commits
6 Commits
enterprise
...
appstore_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1498c4b91c | ||
![]() |
c1da0893de | ||
![]() |
f9eb216bd3 | ||
![]() |
84af03be39 | ||
![]() |
8d27e307e9 | ||
![]() |
c90c726b53 |
@@ -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 = "";
|
||||
|
@@ -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
|
||||
|
@@ -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];
|
||||
|
@@ -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"
|
||||
|
@@ -46,7 +46,6 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
//是否为周榜top1
|
||||
@property(nonatomic,assign) BOOL isWeekTop1;
|
||||
@property(nonatomic,copy) NSString *inRoomUid;
|
||||
|
||||
//是否在麦位
|
||||
@property(nonatomic,assign) BOOL inMic;
|
||||
///是否在线
|
||||
|
@@ -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;
|
||||
|
@@ -243,15 +243,8 @@
|
||||
-(void)setPlaySoundTime:(NSInteger)time{
|
||||
_audioView.voiceDura = @(time).stringValue;
|
||||
}
|
||||
- (void)setRoomInfo1:(HomeRecommendRoomModel *)roomInfo1 {
|
||||
_roomInfo1 = roomInfo1;
|
||||
if (_roomInfo1) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-(void)didSelectItemAction{
|
||||
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(xPNewHomePartyTableViewCell:didSelectItem:)]){
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
|
@@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user