From c92b8eb91066c5b50488b4c42cbe2005aa7d1301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=AF=E6=98=9F?= Date: Thu, 30 Oct 2025 18:30:45 +0800 Subject: [PATCH] 1.1.2 --- QXLive.xcodeproj/project.pbxproj | 12 +- QXLive/Base/QXAppStartViewController.m | 1 + QXLive/Base/QXGlobal.h | 2 + .../View/QXExpansionAppStoreView.m | 330 ++++++++++++++---- .../Controlller/QXHomeViewController.m | 3 + .../道具商城/QXPropShopViewController.m | 4 +- .../Controller/邀请/QXInviteViewController.m | 2 +- QXLive/Mine(音域)/Model/QXUserModel.h | 2 + QXLive/Mine(音域)/Model/QXUserModel.m | 12 + QXLive/Mine(音域)/Services/QXMineNetwork.m | 2 + QXLive/Room(房间)/View/QXRoomChatListView.m | 14 + 11 files changed, 297 insertions(+), 87 deletions(-) diff --git a/QXLive.xcodeproj/project.pbxproj b/QXLive.xcodeproj/project.pbxproj index 8cc4927..924851e 100644 --- a/QXLive.xcodeproj/project.pbxproj +++ b/QXLive.xcodeproj/project.pbxproj @@ -748,7 +748,7 @@ CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 8798G5VMH9; ENABLE_USER_SCRIPT_SANDBOXING = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -787,7 +787,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.1.2; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -814,7 +814,7 @@ CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 8798G5VMH9; ENABLE_USER_SCRIPT_SANDBOXING = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -853,7 +853,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.1.2; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1207,7 +1207,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -1271,7 +1271,7 @@ "$(inherited)", "$(SDKROOT)/usr/lib/swift", ); - MARKETING_VERSION = 1.1.0; + MARKETING_VERSION = 1.0.0; PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/QXLive/Base/QXAppStartViewController.m b/QXLive/Base/QXAppStartViewController.m index 67a93f6..096ef7f 100644 --- a/QXLive/Base/QXAppStartViewController.m +++ b/QXLive/Base/QXAppStartViewController.m @@ -80,6 +80,7 @@ [delegate changeRootViewControllerIsTabbar]; BOOL api_version = [responseObject[@"api_version"] boolValue]; TUIChatConfig.defaultConfig.isAppStore = api_version; + [QXGlobal shareGlobal].isAppStore = api_version; NSLog(@"请求成功"); } fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) { NSLog(@"请求失败"); diff --git a/QXLive/Base/QXGlobal.h b/QXLive/Base/QXGlobal.h index f3546c8..81ae55d 100644 --- a/QXLive/Base/QXGlobal.h +++ b/QXLive/Base/QXGlobal.h @@ -26,6 +26,8 @@ typedef void (^showFinishBlock)(void); @property (nonatomic,strong)NSString *roomId; // 是否实名 @property (nonatomic,assign)BOOL isRealName; +/// 是否为appstore +@property (nonatomic,assign)BOOL isAppStore; /// 钻石兑币比例 @property (nonatomic,strong)NSString *coin_exchange_rate; diff --git a/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.m b/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.m index d9a115a..28237e3 100644 --- a/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.m +++ b/QXLive/Dynamic(语圈)/View/QXExpansionAppStoreView.m @@ -28,7 +28,23 @@ @property (nonatomic,strong)QXExpansionAppStoreSubView *userView6; @property (nonatomic,strong)QXExpansionAppStoreSubView *userView7; @property (nonatomic,strong)QXExpansionAppStoreSubView *userView8; + + +@property (nonatomic,strong)QXExpansionAppStoreSubView *userViewCopy1; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userViewCopy2; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userViewCopy3; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userViewCopy4; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userViewCopy5; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userViewCopy6; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userViewCopy7; +@property (nonatomic,strong)QXExpansionAppStoreSubView *userViewCopy8; @property (nonatomic,strong)NSMutableArray *userViews; +@property (nonatomic,strong)NSMutableArray *userViewCopys; + + +@property (nonatomic, strong) CADisplayLink *displayLink; +@property (nonatomic, assign) CGFloat currentRotation; +@property (nonatomic, assign) CGFloat rotationSpeed; @end @implementation QXExpansionAppStoreView @@ -117,34 +133,40 @@ // }]; self.userView1 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake((self.centerBgView.width-ScaleWidth(56))/2, 0, ScaleWidth(56), ScaleWidth(71))]; + self.userView1.hidden = YES; [self.centerBgView addSubview:self.userView1]; self.userView2 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView1.right+ScaleWidth(54), self.userView1.top+ScaleWidth(45), ScaleWidth(56), ScaleWidth(71))]; + self.userView2.hidden = YES; [self.centerBgView addSubview:self.userView2]; self.userView3 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH-ScaleWidth(66), (self.centerBgView.height-ScaleWidth(71))/2, ScaleWidth(56), ScaleWidth(71))]; + self.userView3.hidden = YES; [self.centerBgView addSubview:self.userView3]; self.userView4 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView2.left, self.userView3.bottom+ScaleWidth(32), ScaleWidth(56), ScaleWidth(71))]; + self.userView4.hidden = YES; [self.centerBgView addSubview:self.userView4]; self.userView5 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView1.left, self.centerBgView.height-ScaleWidth(71), ScaleWidth(56), ScaleWidth(71))]; + self.userView5.hidden = YES; [self.centerBgView addSubview:self.userView5]; self.userView7 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(ScaleWidth(10), self.userView3.top, ScaleWidth(56), ScaleWidth(71))]; + self.userView7.hidden = YES; [self.centerBgView addSubview:self.userView7]; self.userView8 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(ScaleWidth(48), self.userView2.top, ScaleWidth(56), ScaleWidth(71))]; + self.userView8.hidden = YES; [self.centerBgView addSubview:self.userView8]; self.userView6 = [[QXExpansionAppStoreSubView alloc] initWithFrame:CGRectMake(self.userView8.left, self.userView4.top, ScaleWidth(56), ScaleWidth(71))]; + self.userView6.hidden = YES; [self.centerBgView addSubview:self.userView6]; - - [self.userViews addObject:self.userView1]; [self.userViews addObject:self.userView2]; [self.userViews addObject:self.userView3]; @@ -153,15 +175,63 @@ [self.userViews addObject:self.userView6]; [self.userViews addObject:self.userView7]; [self.userViews addObject:self.userView8]; - self.userView1.alpha = 0; - self.userView2.alpha = 0; - self.userView3.alpha = 0; - self.userView4.alpha = 0; + + + self.userViewCopy1 = [[QXExpansionAppStoreSubView alloc] initWithFrame:self.userView1.frame]; + self.userViewCopy1.hidden = YES; + [self.centerBgView addSubview:self.userViewCopy1]; - self.userView5.alpha = 0; - self.userView6.alpha = 0; - self.userView7.alpha = 0; - self.userView8.alpha = 0; + + self.userViewCopy2 = [[QXExpansionAppStoreSubView alloc] initWithFrame:self.userView2.frame]; + self.userViewCopy2.hidden = YES; + [self.centerBgView addSubview:self.userViewCopy2]; + + + self.userViewCopy3 = [[QXExpansionAppStoreSubView alloc] initWithFrame:self.userView3.frame]; + self.userViewCopy3.hidden = YES; + [self.centerBgView addSubview:self.userViewCopy3]; + + self.userViewCopy4 = [[QXExpansionAppStoreSubView alloc] initWithFrame:self.userView4.frame]; + self.userViewCopy4.hidden = YES; + [self.centerBgView addSubview:self.userViewCopy4]; + + self.userViewCopy5 = [[QXExpansionAppStoreSubView alloc] initWithFrame:self.userView5.frame]; + self.userViewCopy5.hidden = YES; + [self.centerBgView addSubview:self.userViewCopy5]; + + + + self.userViewCopy7 = [[QXExpansionAppStoreSubView alloc] initWithFrame:self.userView7.frame]; + self.userViewCopy7.hidden = YES; + [self.centerBgView addSubview:self.userViewCopy7]; + + self.userViewCopy8 = [[QXExpansionAppStoreSubView alloc] initWithFrame:self.userView8.frame]; + self.userViewCopy8.hidden = YES; + [self.centerBgView addSubview:self.userViewCopy8]; + + self.userViewCopy6 = [[QXExpansionAppStoreSubView alloc] initWithFrame:self.userView6.frame]; + self.userViewCopy6.hidden = YES; + [self.centerBgView addSubview:self.userViewCopy6]; + [self.userViewCopys addObject:self.userViewCopy1]; + [self.userViewCopys addObject:self.userViewCopy2]; + [self.userViewCopys addObject:self.userViewCopy3]; + [self.userViewCopys addObject:self.userViewCopy4]; + [self.userViewCopys addObject:self.userViewCopy5]; + [self.userViewCopys addObject:self.userViewCopy6]; + [self.userViewCopys addObject:self.userViewCopy7]; + [self.userViewCopys addObject:self.userViewCopy8]; + + + + self.userViewCopy1.alpha = 0; + self.userViewCopy2.alpha = 0; + self.userViewCopy3.alpha = 0; + self.userViewCopy4.alpha = 0; + + self.userViewCopy5.alpha = 0; + self.userViewCopy6.alpha = 0; + self.userViewCopy7.alpha = 0; + self.userViewCopy8.alpha = 0; MJWeakSelf [self.userView1 addTapBlock:^(id _Nonnull obj) { if (weakSelf.userBlock) { @@ -209,28 +279,75 @@ weakSelf.userBlock(weakSelf.userView8.model); } }]; - [self startAnimate]; - [self.userView1 startSmoothFloatAnimation]; - [self.userView2 startSmoothFloatAnimation]; - [self.userView3 startSmoothFloatAnimation]; - [self.userView4 startSmoothFloatAnimation]; - [self.userView5 startSmoothFloatAnimation]; - [self.userView6 startSmoothFloatAnimation]; - [self.userView7 startSmoothFloatAnimation]; - [self.userView8 startSmoothFloatAnimation]; +// [self startAnimate]; +// [self.userView1 startSmoothFloatAnimation]; +// [self.userView2 startSmoothFloatAnimation]; +// [self.userView3 startSmoothFloatAnimation]; +// [self.userView4 startSmoothFloatAnimation]; +// [self.userView5 startSmoothFloatAnimation]; +// [self.userView6 startSmoothFloatAnimation]; +// [self.userView7 startSmoothFloatAnimation]; +// [self.userView8 startSmoothFloatAnimation]; + self.rotationSpeed = (M_PI * 2) / (30.0 * 60.0); // 30秒一圈 + [self startWheelRotation]; } +- (void)startWheelRotation { + self.currentRotation = 0; + self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateWheelRotation)]; + [self.displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; +} + +- (void)updateWheelRotation { + // 更新旋转角度 + self.currentRotation += self.rotationSpeed; + if (self.currentRotation >= M_PI * 2) { + self.currentRotation -= M_PI * 2; + } + + // 方案1:使用CGAffineTransform(推荐) + [self updateRotationWithCGAffineTransform]; + + // 或者方案2:使用CATransform3D + // [self updateRotationWithCATransform3D]; + + // 更新调试信息 +// [self updateDebugInfo]; +} + +// 方案1:使用CGAffineTransform(推荐) +- (void)updateRotationWithCGAffineTransform { + // 应用摩天轮旋转 + self.centerBgView.transform = CGAffineTransformMakeRotation(self.currentRotation); + + // 关键修复:头像反向旋转保持垂直 + // 注意:这里使用identity来重置transform,然后应用反向旋转 + for (QXExpansionAppStoreSubView *avatarView in self.userViews) { + // 重置transform到初始状态,然后应用反向旋转 + avatarView.transform = CGAffineTransformIdentity; + avatarView.transform = CGAffineTransformMakeRotation(-self.currentRotation); + } + + for (QXExpansionAppStoreSubView *avatarView in self.userViewCopys) { + // 重置transform到初始状态,然后应用反向旋转 + avatarView.transform = CGAffineTransformIdentity; + avatarView.transform = CGAffineTransformMakeRotation(-self.currentRotation); + } +} + + -(void)startAnimate{ - CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; - //旋转角度 - rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI]; - //每次旋转的时间(单位秒) - rotationAnimation.duration = 15; - rotationAnimation.cumulative = YES; - rotationAnimation.removedOnCompletion = NO; - //重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT - rotationAnimation.repeatCount = MAXFLOAT; - [self.centerBgView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"]; +// CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; +// //旋转角度 +// rotationAnimation.toValue = [NSNumber numberWithFloat: M_PI]; +// //每次旋转的时间(单位秒) +// rotationAnimation.duration = 15; +// rotationAnimation.cumulative = YES; +// rotationAnimation.removedOnCompletion = NO; +// //重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT +// rotationAnimation.repeatCount = MAXFLOAT; +// [self.centerBgView.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"]; + } @@ -246,37 +363,57 @@ self.fengcheImageView.alpha = 0; self.fengcheImageView.hidden = NO; + self.userViewCopy1.hidden = NO; + self.userViewCopy2.hidden = NO; + self.userViewCopy3.hidden = NO; + self.userViewCopy4.hidden = NO; + self.userViewCopy5.hidden = NO; + self.userViewCopy6.hidden = NO; + self.userViewCopy7.hidden = NO; + self.userViewCopy8.hidden = NO; + self.userView1.hidden = YES; + self.userView2.hidden = YES; + self.userView3.hidden = YES; + self.userView4.hidden = YES; + self.userView5.hidden = YES; + self.userView6.hidden = YES; + self.userView7.hidden = YES; + self.userView8.hidden = YES; [UIView animateWithDuration:0.3 animations:^{ self.changeBtn.alpha = 0; self.fengcheImageView.alpha = 1; - - self.userView1.centerX = self.bgImageView.centerX; - self.userView1.centerY = self.bgImageView.centerY; - self.userView2.centerX = self.bgImageView.centerX; - self.userView2.centerY = self.bgImageView.centerY; - self.userView3.centerX = self.bgImageView.centerX; - self.userView3.centerY = self.bgImageView.centerY; - self.userView4.centerX = self.bgImageView.centerX; - self.userView4.centerY = self.bgImageView.centerY; - - self.userView5.centerX = self.bgImageView.centerX; - self.userView5.centerY = self.bgImageView.centerY; - self.userView6.centerX = self.bgImageView.centerX; - self.userView6.centerY = self.bgImageView.centerY; - self.userView7.centerX = self.bgImageView.centerX; - self.userView7.centerY = self.bgImageView.centerY; - self.userView8.centerX = self.bgImageView.centerX; - self.userView8.centerY = self.bgImageView.centerY; - - self.userView1.alpha = 0; - self.userView2.alpha = 0; - self.userView3.alpha = 0; - self.userView4.alpha = 0; - self.userView5.alpha = 0; - self.userView6.alpha = 0; - self.userView7.alpha = 0; - self.userView8.alpha = 0; + self.userViewCopy1.centerX = self.bgImageView.centerX; + self.userViewCopy1.centerY = self.bgImageView.centerY; + self.userViewCopy2.centerX = self.bgImageView.centerX; + self.userViewCopy2.centerY = self.bgImageView.centerY; + self.userViewCopy3.centerX = self.bgImageView.centerX; + self.userViewCopy3.centerY = self.bgImageView.centerY; + self.userViewCopy4.centerX = self.bgImageView.centerX; + self.userViewCopy4.centerY = self.bgImageView.centerY; + + self.userViewCopy5.centerX = self.bgImageView.centerX; + self.userViewCopy5.centerY = self.bgImageView.centerY; + self.userViewCopy6.centerX = self.bgImageView.centerX; + self.userViewCopy6.centerY = self.bgImageView.centerY; + self.userViewCopy7.centerX = self.bgImageView.centerX; + self.userViewCopy7.centerY = self.bgImageView.centerY; + self.userViewCopy8.centerX = self.bgImageView.centerX; + self.userViewCopy8.centerY = self.bgImageView.centerY; + + + + self.userViewCopy1.alpha = 0; + self.userViewCopy2.alpha = 0; + self.userViewCopy3.alpha = 0; + self.userViewCopy4.alpha = 0; + + self.userViewCopy5.alpha = 0; + self.userViewCopy6.alpha = 0; + self.userViewCopy7.alpha = 0; + self.userViewCopy8.alpha = 0; + + } completion:^(BOOL finished) { self.changeBtn.hidden = YES; @@ -303,32 +440,48 @@ self.changeBtn.alpha = 0; self.changeBtn.hidden = NO; self.fengcheImageView.hidden = YES; - dispatch_async(dispatch_get_main_queue(), ^{ - [self configData]; - }); - + [self configData]; [UIView animateWithDuration:0.3 animations:^{ self.changeBtn.alpha = 1; + self.userViewCopy1.frame = self.userView1.frame; + self.userViewCopy2.frame = self.userView2.frame; + self.userViewCopy3.frame = self.userView3.frame; + self.userViewCopy4.frame = self.userView4.frame; + self.userViewCopy5.frame = self.userView5.frame; + self.userViewCopy6.frame = self.userView6.frame; + self.userViewCopy7.frame = self.userView7.frame; + self.userViewCopy8.frame = self.userView8.frame; + + self.userViewCopy1.alpha = 1; + self.userViewCopy2.alpha = 1; + self.userViewCopy3.alpha = 1; + self.userViewCopy4.alpha = 1; + + self.userViewCopy5.alpha = 1; + self.userViewCopy6.alpha = 1; + self.userViewCopy7.alpha = 1; + self.userViewCopy8.alpha = 1; + - self.userView1.frame = CGRectMake((self.centerBgView.width-ScaleWidth(56))/2, 0, ScaleWidth(56), ScaleWidth(71)); - self.userView2.frame = CGRectMake(self.userView1.right+ScaleWidth(54), self.userView1.top+ScaleWidth(45), ScaleWidth(56), ScaleWidth(71)); - self.userView3.frame = CGRectMake(SCREEN_WIDTH-ScaleWidth(66), (self.centerBgView.height-ScaleWidth(71))/2, ScaleWidth(56), ScaleWidth(71)); - self.userView4.frame = CGRectMake(self.userView2.left, self.userView3.bottom+ScaleWidth(32), ScaleWidth(56), ScaleWidth(71)); - self.userView5.frame = CGRectMake(self.userView1.left, self.centerBgView.height-ScaleWidth(71), ScaleWidth(56), ScaleWidth(71)); - self.userView7.frame = CGRectMake(ScaleWidth(10), self.userView3.top, ScaleWidth(56), ScaleWidth(71)); - self.userView8.frame = CGRectMake(ScaleWidth(48), self.userView2.top, ScaleWidth(56), ScaleWidth(71)); - self.userView6.frame = CGRectMake(self.userView8.left, self.userView4.top, ScaleWidth(56), ScaleWidth(71)); - self.userView1.alpha = 1; - self.userView2.alpha = 1; - self.userView3.alpha = 1; - self.userView4.alpha = 1; - self.userView5.alpha = 1; - self.userView6.alpha = 1; - self.userView7.alpha = 1; - self.userView8.alpha = 1; } completion:^(BOOL finished) { - + self.userViewCopy1.hidden = YES; + self.userViewCopy2.hidden = YES; + self.userViewCopy3.hidden = YES; + self.userViewCopy4.hidden = YES; + self.userViewCopy5.hidden = YES; + self.userViewCopy6.hidden = YES; + self.userViewCopy7.hidden = YES; + self.userViewCopy8.hidden = YES; + + self.userView1.hidden = NO; + self.userView2.hidden = NO; + self.userView3.hidden = NO; + self.userView4.hidden = NO; + self.userView5.hidden = NO; + self.userView6.hidden = NO; + self.userView7.hidden = NO; + self.userView8.hidden = NO; }]; } -(void)setUsers:(NSArray *)users{ @@ -349,7 +502,9 @@ for (int i = 0 ; i < self.randomArray.count;i++) { QXUserHomeModel *md = self.randomArray[i]; QXExpansionAppStoreSubView *v = self.userViews[i]; + QXExpansionAppStoreSubView *cv = self.userViewCopys[i]; v.model = md; + cv.model = [md copyModel]; } } @@ -383,6 +538,12 @@ } return _userViews; } +-(NSMutableArray *)userViewCopys{ + if (!_userViewCopys) { + _userViewCopys = [NSMutableArray array]; + } + return _userViewCopys; +} @end @@ -405,6 +566,7 @@ self.nameBgView.hidden = NO; } -(void)initSubviews{ + self.transform = CGAffineTransformRotate(self.transform, M_PI); self.headerImageView = [[UIImageView alloc] init]; self.headerImageView.contentMode = UIViewContentModeScaleAspectFill; [self.headerImageView addRoundedCornersWithRadius:self.width/2]; @@ -444,7 +606,9 @@ make.height.width.mas_offset(16); }]; } + - (void)startSmoothFloatAnimation { + // [self animateFloatUp]; CABasicAnimation *rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; //旋转角度 @@ -456,6 +620,18 @@ //重复旋转的次数,如果你想要无数次,那么设置成MAXFLOAT rotationAnimation.repeatCount = MAXFLOAT; [self.layer addAnimation:rotationAnimation forKey:@"rotationAnimation"]; +// [UIView animateWithDuration:15.0 +// delay:0.0 +// options:UIViewAnimationOptionCurveLinear|UIViewKeyframeAnimationOptionAllowUserInteraction +// animations:^{ +// self.transform = CGAffineTransformRotate(self.transform, 2*M_PI); +// } +// completion:^(BOOL finished) { +// if (finished) { +// // 递归调用实现无限旋转 +// [self startSmoothFloatAnimation]; +// } +// }]; } diff --git a/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m b/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m index 2314e30..f226b1b 100644 --- a/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m +++ b/QXLive/HomePage(声播)/Controlller/QXHomeViewController.m @@ -302,6 +302,9 @@ }]; } -(void)popFirstRechargeView{ + if ([QXGlobal shareGlobal].isAppStore) { + return; + } if (self.permissionModel.first_charge_permission.intValue != 1) { return; } diff --git a/QXLive/Mine(音域)/Controller/道具商城/QXPropShopViewController.m b/QXLive/Mine(音域)/Controller/道具商城/QXPropShopViewController.m index f6730d0..90a25b5 100644 --- a/QXLive/Mine(音域)/Controller/道具商城/QXPropShopViewController.m +++ b/QXLive/Mine(音域)/Controller/道具商城/QXPropShopViewController.m @@ -60,7 +60,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; , 2)]; } - (void)loadData { - NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/prop/propMall?id=%@",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token]]; + NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/prop/propMall?id=%@&is_show=%@",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,QXGlobal.shareGlobal.isAppStore?@"0":@"1"]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } @@ -173,8 +173,6 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; configuration.processPool = [[WKProcessPool alloc] init]; //自定义配置,一般用于 js调用oc方法(OC拦截URL中的数据做自定义操作) WKUserContentController * UserContentController = [[WKUserContentController alloc]init]; - // 是否支持记忆读取 - configuration.suppressesIncrementalRendering = NO; // 允许用户更改网页的设置 [UserContentController addScriptMessageHandler:self name:@"login"]; [UserContentController addScriptMessageHandler:self name:@"nativeHandler"]; diff --git a/QXLive/Mine(音域)/Controller/邀请/QXInviteViewController.m b/QXLive/Mine(音域)/Controller/邀请/QXInviteViewController.m index 593f238..4d79d14 100644 --- a/QXLive/Mine(音域)/Controller/邀请/QXInviteViewController.m +++ b/QXLive/Mine(音域)/Controller/邀请/QXInviteViewController.m @@ -63,7 +63,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext; } - (void)loadData { NSInteger safeTop = kSafeAreaTop; - NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/other/income??id=%@&h=%ld",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,safeTop]]; + NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/other/income??id=%@&h=%ld&is_show=%@",H5ServerUrl,[QXGlobal shareGlobal].loginModel.token,safeTop,QXGlobal.shareGlobal.isAppStore?@"0":@"1"]]; NSURLRequest *request =[NSURLRequest requestWithURL:url]; [self.contentWebView loadRequest:request]; } diff --git a/QXLive/Mine(音域)/Model/QXUserModel.h b/QXLive/Mine(音域)/Model/QXUserModel.h index 332e16b..d17b44c 100644 --- a/QXLive/Mine(音域)/Model/QXUserModel.h +++ b/QXLive/Mine(音域)/Model/QXUserModel.h @@ -105,6 +105,8 @@ NS_ASSUME_NONNULL_BEGIN /// 是否使用靓号 0未使用 1 已使用 @property (nonatomic,strong)NSString *is_use_code; + +-(instancetype)copyModel; @end @interface QXUserTag : NSObject diff --git a/QXLive/Mine(音域)/Model/QXUserModel.m b/QXLive/Mine(音域)/Model/QXUserModel.m index 9ed7f6c..8552c91 100644 --- a/QXLive/Mine(音域)/Model/QXUserModel.m +++ b/QXLive/Mine(音域)/Model/QXUserModel.m @@ -18,6 +18,18 @@ +(NSDictionary *)modelContainerPropertyGenericClass{ return @{@"tag_list" : @"QXUserTag"}; } + + +-(instancetype)copyModel{ + QXUserHomeModel *copy = [[QXUserHomeModel alloc] init]; + copy.user_id = self.user_id; + copy.user_code = self.user_code; + copy.avatar = self.avatar; + copy.sex = self.sex; + copy.dress = self.dress; + copy.nickname = self.nickname; + return copy; +} @end diff --git a/QXLive/Mine(音域)/Services/QXMineNetwork.m b/QXLive/Mine(音域)/Services/QXMineNetwork.m index 3207cc2..a76febc 100644 --- a/QXLive/Mine(音域)/Services/QXMineNetwork.m +++ b/QXLive/Mine(音域)/Services/QXMineNetwork.m @@ -19,6 +19,8 @@ [QXGlobal shareGlobal].loginModel.auth = userModel.auth.intValue; [QXGlobal shareGlobal].loginModel.chat_bubble = userModel.chat_bubble; [[QXGlobal shareGlobal] updateUserInfoWithMolde:[QXGlobal shareGlobal].loginModel]; + BOOL api_version = [responseObject[@"api_version"] boolValue]; + [QXGlobal shareGlobal].isAppStore = api_version; [[NSUserDefaults standardUserDefaults] setInteger:userModel.is_can_chat forKey:kIsCanChat]; [[NSUserDefaults standardUserDefaults] setObject:userModel.can_chat_money forKey:kIsCanChatMoney]; [[NSUserDefaults standardUserDefaults] synchronize]; diff --git a/QXLive/Room(房间)/View/QXRoomChatListView.m b/QXLive/Room(房间)/View/QXRoomChatListView.m index 738ddfe..7cdfd68 100644 --- a/QXLive/Room(房间)/View/QXRoomChatListView.m +++ b/QXLive/Room(房间)/View/QXRoomChatListView.m @@ -7,6 +7,8 @@ #import "QXRoomChatListView.h" #import "UIImage+WebP.h" +#import + #define messageNoticeColor RGB16(0xCCA882) #define messageNameColor RGB16(0x00C8FF) #define messageGiftColor RGB16(0xFFE309) @@ -51,6 +53,7 @@ NSInteger maxMessageCount = 20; @property (nonatomic,assign)BOOL isDragging; @property (nonatomic,strong)UILabel *messageLabel; @property (nonatomic,strong)UIButton *messageCountBtn; +@property (nonatomic,strong)AVSpeechSynthesizer *synthesizer; @end @implementation QXRoomChatListView @@ -64,6 +67,7 @@ NSInteger maxMessageCount = 20; } -(void)initSubviews{ + self.synthesizer = [[AVSpeechSynthesizer alloc] init]; [self addSubview:self.tableView]; [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.equalTo(self); @@ -197,6 +201,16 @@ NSInteger maxMessageCount = 20; // if (self.giftArray.count>maxMessageCount) { // [self.giftArray removeFirstObject]; // } +#if DEBUG + if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem) { + AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:model.text]; + utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"zh-CN"]; + utterance.rate = 0.5 ; + utterance.pitchMultiplier = 1.0 ; + utterance.volume = 1.0 ; + [self.synthesizer speakUtterance:utterance]; + } +#endif NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:self.dataArray.count - 1 inSection:0]; [self.tableView beginUpdates]; [self.tableView insertRowsAtIndexPaths:@[newIndexPath] withRowAnimation:UITableViewRowAnimationNone];