1.0.18 feat:调整 web 小游戏逻辑
This commit is contained in:
@@ -70,6 +70,11 @@
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self addSubview:self.gameIcon];
|
||||
[self.gameIcon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(44);
|
||||
@@ -173,7 +178,6 @@
|
||||
|
||||
self.titleLabel.attributedText = attribute;
|
||||
|
||||
|
||||
BOOL isSvga = [model.resourceType.uppercaseString isEqualToString:@"SVGA"];
|
||||
@kWeakify(self);
|
||||
if (isSvga == YES) {
|
||||
@@ -192,7 +196,15 @@
|
||||
}else{
|
||||
self.bgSVGA.hidden = YES;
|
||||
self.bgImageView.hidden = NO;
|
||||
self.bgImageView.imageUrl = model.resourceContent;
|
||||
@kWeakify(self);
|
||||
[self.bgImageView loadImageWithUrl:model.resourceContent completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
|
||||
@kStrongify(self);
|
||||
if (image) {
|
||||
[self loadLocalSVGA];
|
||||
} else {
|
||||
self.bgImageView.image = image;
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +234,7 @@
|
||||
|
||||
#pragma mark -
|
||||
- (NetImageView *)bgImageView {
|
||||
if (_bgImageView) {
|
||||
if (!_bgImageView) {
|
||||
_bgImageView = [[NetImageView alloc] init];
|
||||
_bgImageView.layer.cornerRadius = 2;
|
||||
_bgImageView.layer.masksToBounds = YES;
|
||||
|
@@ -294,17 +294,7 @@ NSString * const kMSGameLoaded = @"gameLoaded";
|
||||
#pragma mark - LeaderCC Delegate
|
||||
// 关闭游戏
|
||||
- (void)closeGame:(NSDictionary*)args {
|
||||
// NSLog(@"1234");
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc]init];
|
||||
config.message = YMLocalizedString(@"MSRoomGameWebVC0");
|
||||
config.actionStyle = TTAlertActionBothStyle;
|
||||
[TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{
|
||||
[self willMoveToParentViewController:nil]; //1
|
||||
[self.view removeFromSuperview]; //2
|
||||
[self removeFromParentViewController]; //3
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
[self backBtnAction];
|
||||
}
|
||||
|
||||
// 显示充值界面
|
||||
@@ -394,14 +384,12 @@ NSString * const kMSGameLoaded = @"gameLoaded";
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc]init];
|
||||
config.message = YMLocalizedString(@"MSRoomGameWebVC0");
|
||||
config.actionStyle = TTAlertActionBothStyle;
|
||||
@kWeakify(self);
|
||||
[TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{
|
||||
[self willMoveToParentViewController:nil]; //1
|
||||
[self.view removeFromSuperview]; //2
|
||||
[self removeFromParentViewController]; //3
|
||||
@kStrongify(self);
|
||||
[self destroy:nil];
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
// 提⽰余额不⾜
|
||||
- (void) gameRecharge:(NSDictionary*)args
|
||||
|
Reference in New Issue
Block a user