提交
@@ -24,6 +24,7 @@
|
||||
95C3EFF42E49F44A004B2D82 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FE2DEF0AB20031E710 /* SystemConfiguration.framework */; };
|
||||
95C3EFF52E49F44A004B2D82 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FC2DEF0AAC0031E710 /* libiconv.tbd */; };
|
||||
95C3EFF62E49F44A004B2D82 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FA2DEF0AA10031E710 /* Security.framework */; };
|
||||
95EEB7902EFBCE35000BB488 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95EEB78F2EFBCE35000BB488 /* StoreKit.framework */; };
|
||||
95F204FB2DEF0AA10031E710 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FA2DEF0AA10031E710 /* Security.framework */; };
|
||||
95F204FD2DEF0AAC0031E710 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FC2DEF0AAC0031E710 /* libiconv.tbd */; };
|
||||
95F204FF2DEF0AB20031E710 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95F204FE2DEF0AB20031E710 /* SystemConfiguration.framework */; };
|
||||
@@ -112,6 +113,7 @@
|
||||
95C3274A2E4C4068004B2D82 /* QXLiveScreenDev.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = QXLiveScreenDev.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
95C3274C2E4C4068004B2D82 /* QXLiveScreen copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "QXLiveScreen copy-Info.plist"; path = "/Users/qixing/Desktop/项目/羽声/featherVoice/QXLiveScreen copy-Info.plist"; sourceTree = "<absolute>"; };
|
||||
95C3F0022E49F44A004B2D82 /* QXLiveDev.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = QXLiveDev.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
95EEB78F2EFBCE35000BB488 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
|
||||
95F204FA2DEF0AA10031E710 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
95F204FC2DEF0AAC0031E710 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
|
||||
95F204FE2DEF0AB20031E710 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
@@ -201,6 +203,7 @@
|
||||
95F205012DEF0AB70031E710 /* CoreGraphics.framework in Frameworks */,
|
||||
95F204FF2DEF0AB20031E710 /* SystemConfiguration.framework in Frameworks */,
|
||||
95F204FD2DEF0AAC0031E710 /* libiconv.tbd in Frameworks */,
|
||||
95EEB7902EFBCE35000BB488 /* StoreKit.framework in Frameworks */,
|
||||
95F204FB2DEF0AA10031E710 /* Security.framework in Frameworks */,
|
||||
BB879DD0574F50799C6C43C6 /* Pods_QXLive.framework in Frameworks */,
|
||||
);
|
||||
@@ -271,6 +274,7 @@
|
||||
4B6F40DB8328A2B2BB1BF79D /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
95EEB78F2EFBCE35000BB488 /* StoreKit.framework */,
|
||||
9599C76A2E97631E008D19F6 /* libswiftCoreAudio.tbd */,
|
||||
953714712E56B59B00569E1E /* CoreAudioKit.framework */,
|
||||
9537146F2E56B59100569E1E /* CoreAudio.framework */,
|
||||
@@ -748,7 +752,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -787,7 +791,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.2.0;
|
||||
MARKETING_VERSION = 1.1.13;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -814,7 +818,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -853,7 +857,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.2.0;
|
||||
MARKETING_VERSION = 1.1.13;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -1207,7 +1211,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
MARKETING_VERSION = 1.0.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
@@ -1271,7 +1275,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.0;
|
||||
MARKETING_VERSION = 1.0.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive.test;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXHomeViewController : QXBaseViewController
|
||||
-(void)popFirstRechargeView;
|
||||
-(void)popFirstRechargeViewOnlyRecharge:(BOOL)onlyRecharge;
|
||||
-(void)giftScrollViewShowWithModel:(QXGiftScrollModel*)model;
|
||||
-(void)giftScrollViewShowWithModelList:(NSArray<QXGiftScrollModel*>*)list;
|
||||
@end
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
|
||||
}];
|
||||
}
|
||||
-(void)popFirstRechargeView{
|
||||
-(void)popFirstRechargeViewOnlyRecharge:(BOOL)onlyRecharge{
|
||||
if ([QXGlobal shareGlobal].isAppStore) {
|
||||
return;
|
||||
}
|
||||
@@ -336,6 +336,9 @@
|
||||
QXFirstRechargeView *view = [[QXFirstRechargeView alloc] init];
|
||||
view.closeActionBlock = ^{
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
if (onlyRecharge) {
|
||||
return;
|
||||
}
|
||||
QXLOG(@"页面关闭");
|
||||
if (weakSelf.signStatus.intValue == 1) {
|
||||
[weakSelf popRecommendRoom];
|
||||
@@ -539,7 +542,7 @@
|
||||
return;
|
||||
}
|
||||
if (md.type == 3) {
|
||||
[self popFirstRechargeView];
|
||||
[self popFirstRechargeViewOnlyRecharge:YES];
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -107,10 +107,18 @@ static NSInteger maxCount = 5;
|
||||
}
|
||||
- (void)setModel:(QXGiftScrollModel *)model{
|
||||
_model = model;
|
||||
NSString *giftInfo = [NSString stringWithFormat:@"%@%@%@ %@X%@",model.fromUserName,QXText(@"送给了"),model.toUserName,model.giftName,model.number];
|
||||
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:giftInfo];
|
||||
[attr yy_setColor:RGB16A(0x9FFFED, 0.84) range:[giftInfo rangeOfString:QXText(@"送给了")]];
|
||||
self.titleLabel.attributedText = attr;
|
||||
if ([model.toUserName isExist]) {
|
||||
NSString *giftInfo = [NSString stringWithFormat:@"%@%@%@ %@X%@",model.fromUserName,QXText(@"送给了"),model.toUserName,model.giftName,model.number];
|
||||
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:giftInfo];
|
||||
[attr yy_setColor:RGB16A(0x9FFFED, 0.84) range:[giftInfo rangeOfString:QXText(@"送给了")]];
|
||||
self.titleLabel.attributedText = attr;
|
||||
}else{
|
||||
NSString *giftInfo = model.text;
|
||||
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:giftInfo];
|
||||
[attr yy_setColor:RGB16A(0x9FFFED, 0.84) range:[giftInfo rangeOfString:QXText(@"送给了")]];
|
||||
self.titleLabel.attributedText = attr;
|
||||
}
|
||||
|
||||
}
|
||||
-(void)initSubViews{
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"home_gift_bg"]];
|
||||
|
||||
37
QXLive/Manager/QXIAPManager.h
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// QXIAPManager.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/12/24.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXIAPManager : NSObject
|
||||
|
||||
|
||||
typedef void(^SubscriptionSuccessCompletionHandler)(void);//订阅成功的回调
|
||||
typedef void(^SubscriptionFailurreCompletionHandler)(void);//订阅失败的回调
|
||||
typedef void(^RestoreSuccessCompletionHandler)(void);//恢复成功的回调
|
||||
typedef void(^RestoreFailurreCompletionHandler)(void);//恢复失败的回调
|
||||
|
||||
// 添加回调属性
|
||||
@property (nonatomic, copy) SubscriptionSuccessCompletionHandler subscriptionSuccessCompletionHandler;
|
||||
@property (nonatomic, copy) SubscriptionFailurreCompletionHandler subscriptionFailurreCompletionHandler;
|
||||
@property (nonatomic, copy) RestoreSuccessCompletionHandler restoreSuccessCompletionHandler;
|
||||
@property (nonatomic, copy) RestoreFailurreCompletionHandler restoreFailurreCompletionHandler;
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
-(void)butGoodsWithId:(NSString*)productId;
|
||||
- (void)getReceiptState:(void (^)(BOOL success))completion;
|
||||
//恢复内购
|
||||
- (void)resumeInAppPurchase;
|
||||
//
|
||||
- (Boolean)getWhetherSubscrid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
286
QXLive/Manager/QXIAPManager.m
Normal file
@@ -0,0 +1,286 @@
|
||||
//
|
||||
// QXIAPManager.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/12/24.
|
||||
//
|
||||
|
||||
|
||||
#import "QXIAPManager.h"
|
||||
#import <StoreKit/StoreKit.h>
|
||||
#import <AppTrackingTransparency/AppTrackingTransparency.h>
|
||||
#import <AdSupport/AdSupport.h>
|
||||
#import <AFNetworking/AFNetworking.h>
|
||||
|
||||
|
||||
@interface QXIAPManager()<SKPaymentTransactionObserver,SKProductsRequestDelegate,SKRequestDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@implementation QXIAPManager
|
||||
|
||||
+ (instancetype)sharedInstance{
|
||||
static dispatch_once_t pred;
|
||||
static QXIAPManager *manager = nil;
|
||||
dispatch_once(&pred, ^{
|
||||
manager = [[self alloc] init];
|
||||
});
|
||||
return manager;
|
||||
}
|
||||
|
||||
/*
|
||||
购买
|
||||
*/
|
||||
-(void)butGoodsWithId:(NSString*)productId{
|
||||
//productId要跟服务端的关键字对应
|
||||
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
|
||||
|
||||
if ([SKPaymentQueue canMakePayments]) { //用户允许app内购
|
||||
if (productId.length) {
|
||||
NSLog(@"%@商品正在请求中...",productId);
|
||||
NSArray *product = [[NSArray alloc] initWithObjects:productId, nil];
|
||||
NSSet *set = [NSSet setWithArray:product];
|
||||
SKProductsRequest *productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:set];
|
||||
productsRequest.delegate = self;
|
||||
[productsRequest start];
|
||||
}
|
||||
} else { //没有权限
|
||||
NSLog(@"没有购买权限");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
恢复购买
|
||||
*/
|
||||
- (void)resumeInAppPurchase {
|
||||
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
|
||||
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
|
||||
}
|
||||
|
||||
#pragma mark SKProductsRequestDelegate 查询成功后的回调
|
||||
- (void)productsRequest:(nonnull SKProductsRequest *)request didReceiveResponse:(nonnull SKProductsResponse *)response {
|
||||
NSArray *product = response.products;
|
||||
if (response.invalidProductIdentifiers.count) {
|
||||
NSLog(@"商品请求错误,error:%@", response.invalidProductIdentifiers);
|
||||
if (self.subscriptionFailurreCompletionHandler) {
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
SKPayment *payment = [SKPayment paymentWithProduct:product[0]];
|
||||
[[SKPaymentQueue defaultQueue] addPayment:payment];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)paymentQueue:(nonnull SKPaymentQueue *)queue updatedTransactions:(nonnull NSArray<SKPaymentTransaction *> *)transactions {
|
||||
// NSInteger i = 0;
|
||||
for (SKPaymentTransaction *tran in transactions) {
|
||||
// if(i != transactions.count - 1){
|
||||
// i++;
|
||||
// continue;
|
||||
// }
|
||||
switch (tran.transactionState) {
|
||||
case SKPaymentTransactionStatePurchasing://正在交易
|
||||
break;
|
||||
|
||||
case SKPaymentTransactionStatePurchased://交易完成
|
||||
{
|
||||
[[SKPaymentQueue defaultQueue] finishTransaction:tran];
|
||||
|
||||
if (tran.originalTransaction) {
|
||||
// 如果是自动续费的订单,originalTransaction会有内容
|
||||
if (tran.originalTransaction.transactionIdentifier) {
|
||||
[self saveOrderId:tran.originalTransaction.transactionIdentifier];
|
||||
}
|
||||
} else {
|
||||
// 第一次购买自动订阅
|
||||
if (tran.transactionIdentifier) {
|
||||
[self saveOrderId:tran.transactionIdentifier];
|
||||
}
|
||||
}
|
||||
[self vertifyReceipt:^(BOOL success) {
|
||||
if(success){
|
||||
self.subscriptionSuccessCompletionHandler();
|
||||
}else{
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
}
|
||||
}]; //获取交易成功后的购买凭证
|
||||
NSLog(@"交易完成,正在校验凭证....");
|
||||
}
|
||||
break;
|
||||
|
||||
case SKPaymentTransactionStateFailed://交易失败
|
||||
[[SKPaymentQueue defaultQueue] finishTransaction:tran];
|
||||
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
|
||||
break;
|
||||
|
||||
case SKPaymentTransactionStateRestored://已经购买过该商品
|
||||
NSLog(@"已经购买过该商品");
|
||||
[[SKPaymentQueue defaultQueue] finishTransaction:tran];
|
||||
|
||||
if (tran.originalTransaction) {
|
||||
if (tran.originalTransaction.transactionIdentifier) {
|
||||
[self saveOrderId:tran.originalTransaction.transactionIdentifier];
|
||||
}
|
||||
} else {
|
||||
if (tran.transactionIdentifier) {
|
||||
[self saveOrderId:tran.transactionIdentifier];
|
||||
}
|
||||
}
|
||||
self.subscriptionFailurreCompletionHandler();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 恢复购买成功后的回调
|
||||
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue {
|
||||
if (queue.transactions.count > 0) {
|
||||
for (SKPaymentTransaction *tran in queue.transactions) {
|
||||
NSString *originalTransactionID = tran.originalTransaction.transactionIdentifier;
|
||||
if (originalTransactionID) {
|
||||
[self saveOrderId:originalTransactionID];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
[self getReceiptState:^(BOOL success) {
|
||||
if(success){
|
||||
self.restoreSuccessCompletionHandler();
|
||||
}else{
|
||||
self.restoreFailurreCompletionHandler();
|
||||
}
|
||||
}];
|
||||
|
||||
} else {
|
||||
self.restoreFailurreCompletionHandler();
|
||||
}
|
||||
}
|
||||
|
||||
// 恢复购买失败后的回调
|
||||
- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error {
|
||||
self.restoreFailurreCompletionHandler();
|
||||
}
|
||||
|
||||
/*
|
||||
保存订单编号到本地
|
||||
*/
|
||||
- (void)saveOrderId:(NSString*)orderId{
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
[defaults setObject:orderId forKey:@"orderId"];
|
||||
[defaults synchronize];
|
||||
}
|
||||
|
||||
- (Boolean)getWhetherSubscrid{
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString *orderId = [defaults objectForKey:@"orderId"];
|
||||
return orderId != nil;
|
||||
}
|
||||
|
||||
/*
|
||||
获取订单凭证
|
||||
*/
|
||||
- (NSString *)getReceipt {
|
||||
NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
|
||||
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:[receiptURL path]]){
|
||||
NSData *receiptData = [NSData dataWithContentsOfURL:receiptURL];
|
||||
NSString *encodeReceiptStr = [receiptData base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
|
||||
return encodeReceiptStr;
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
校验订单
|
||||
*/
|
||||
- (void)vertifyReceipt:(void (^)(BOOL success))completion {
|
||||
NSLog(@"~~~正在检验。。。");
|
||||
NSString *receipt = [self getReceipt];
|
||||
NSString *password = @"秘钥";
|
||||
|
||||
NSString *urlString = [NSString stringWithFormat:@"https://校验地址"];
|
||||
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
|
||||
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
||||
|
||||
NSDictionary *parameters = @{
|
||||
@"apple_receipt": receipt,
|
||||
@"password": password
|
||||
};
|
||||
|
||||
[manager POST:urlString parameters:parameters headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
// 请求成功,处理返回的数据
|
||||
NSLog(@"弹窗提示用户请求成功");
|
||||
if (responseObject) {
|
||||
NSString *string = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
|
||||
if ([string isEqualToString:@"success"] || [string isEqualToString:@"订单已存在"]) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(YES);
|
||||
});
|
||||
}else if ([string isEqualToString:@"failure"] || [string isEqualToString:@"fail"]){
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(NO);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
// 请求失败,处理错误信息
|
||||
NSLog(@"请求失败:%@", error.localizedDescription);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(NO);
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)getReceiptState:(void (^)(BOOL success))completion {
|
||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||
NSString *order_id = [defaults objectForKey:@"orderId"];
|
||||
if(!order_id){
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(NO);
|
||||
});
|
||||
return;
|
||||
}
|
||||
NSString *urlString = [NSString stringWithFormat:@"https://订单状态地址"];
|
||||
NSString *bundleID = [[NSBundle mainBundle] bundleIdentifier];
|
||||
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
|
||||
manager.responseSerializer = [AFHTTPResponseSerializer serializer];
|
||||
|
||||
NSDictionary *parameters = @{
|
||||
@"bundle_id": bundleID,
|
||||
@"order_id": order_id
|
||||
};
|
||||
|
||||
[manager GET:urlString parameters:parameters headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
NSLog(@"订单状态获取");
|
||||
if (responseObject) {
|
||||
NSError *error = nil;
|
||||
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:responseObject options:0 error:&error];
|
||||
if([dictionary[@"status"] boolValue]){
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(YES);
|
||||
});
|
||||
}else{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(NO);
|
||||
});
|
||||
}
|
||||
}
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
// 请求失败,处理错误信息
|
||||
NSLog(@"请求失败:%@", error.localizedDescription);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(NO);
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -146,10 +146,11 @@
|
||||
/// 收到礼物
|
||||
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
|
||||
model.messageType = QXRoomChatMessageTypeGift;
|
||||
NSArray *arr = [model.GiftInfo.play_image componentsSeparatedByString:@","];
|
||||
[[QXGiftPlayerManager shareManager] displayFullEffectViewWithMorePlayImages:arr];
|
||||
if ([model.GiftInfo.play_image isExist]) {
|
||||
NSArray *arr = [model.GiftInfo.play_image componentsSeparatedByString:@","];
|
||||
[[QXGiftPlayerManager shareManager] displayFullEffectViewWithMorePlayImages:arr];
|
||||
}
|
||||
[[QXGiftDisplayManager sharedManager] receiveGift:model];
|
||||
|
||||
if (model.ToUserInfos.count>0) {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didRecieveGiftWithWithUserInfos:)]) {
|
||||
[self.delegate didRecieveGiftWithWithUserInfos:model.ToUserInfos];
|
||||
|
||||
@@ -74,10 +74,11 @@
|
||||
if (list.count == 0) {
|
||||
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
|
||||
}else{
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
[weakSelf.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
[weakSelf.tableView.mj_footer endRefreshing];
|
||||
}];
|
||||
}
|
||||
-(void)helpAction{
|
||||
@@ -105,7 +106,7 @@
|
||||
weakSelf.page = 1;
|
||||
[weakSelf getSongList];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(@"添加失败");
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
-(void)qx_mineAddSongViewDidRemove{
|
||||
@@ -119,7 +120,7 @@
|
||||
weakSelf.page = 1;
|
||||
[weakSelf getSongList];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(@"修改失败");
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
-(void)addAction{
|
||||
|
||||
@@ -295,8 +295,8 @@
|
||||
return cell;
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXDayTaskTypeModel *model = self.model.tasks[indexPath.section];
|
||||
QXDayTaskListModel *taskModel = model.task_list[indexPath.row];
|
||||
// QXDayTaskTypeModel *model = self.model.tasks[indexPath.section];
|
||||
QXDayTaskListModel *taskModel = self.typeModel.task_list[indexPath.row];
|
||||
if ([taskModel.task_id isEqualToString:@"1"]) {
|
||||
QXSignInAppView *signView = [[QXSignInAppView alloc] init];
|
||||
[signView showInView:self.view];
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
NSString *money = [NSString stringWithFormat:@"%.4f",model.today_profit.doubleValue];
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%@",money];
|
||||
[self.typeImageView sd_setImageWithURL:[NSURL URLWithString:model.label_icon] placeholderImage:nil];
|
||||
self.luckyWaterLabel.text = model.lucky_water;
|
||||
self.luckyWaterLabel.text = [NSString stringWithFormat:@"幸运值总流水:%@",model.lucky_water];
|
||||
if (model.apply_status.intValue == 1) {
|
||||
self.roomWaitImageView.hidden = NO;
|
||||
self.luckyWaterLabel.hidden = YES;
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
self.progressView = [[QXProgressView alloc] initWithFrame:CGRectMake((self.width-ScaleWidth(70))/2, self.openBtn.top-4-13, ScaleWidth(70), 13)];
|
||||
self.progressView.bgColor = RGB16(0xFFB8CD);
|
||||
self.progressView.progressColor = RGB16(0xE24272);
|
||||
self.progressView.progressTitleColor = RGB16(0xE24272);
|
||||
self.progressView.progressTitleColor = RGB16(0xFFEDF2);
|
||||
[self addSubview:self.progressView];
|
||||
|
||||
// self.titleLabel.text = @"初级礼盒";
|
||||
@@ -194,14 +194,14 @@
|
||||
self.iconImageView.image = [UIImage imageNamed:@"day_task_left"];
|
||||
self.progressView.bgColor = RGB16(0xFFB8CD);
|
||||
self.progressView.progressColor = RGB16(0xE24272);
|
||||
self.progressView.progressTitleColor = RGB16(0xE24272);
|
||||
self.progressView.progressTitleColor = RGB16(0xFFEDF2);
|
||||
}
|
||||
break;
|
||||
case QXDayTaskTopSubViewTypeRight:{
|
||||
self.iconImageView.image = [UIImage imageNamed:@"day_task_right"];
|
||||
self.progressView.bgColor = RGB16(0xFFCFB3);
|
||||
self.progressView.progressColor = RGB16(0xF35F07);
|
||||
self.progressView.progressTitleColor = RGB16(0xF35F07);
|
||||
self.progressView.progressTitleColor = RGB16(0xFFEDF2);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
[self.progressView addRoundedCornersWithRadius:self.height/2];
|
||||
|
||||
self.progressLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.width-30, 0, 30, self.height)];
|
||||
self.progressLabel.textColor = RGB16(0xE24171);
|
||||
self.progressLabel.textColor = RGB16(0xFFEDF2);
|
||||
self.progressLabel.font = [UIFont systemFontOfSize:10];
|
||||
[self addSubview:self.progressLabel];
|
||||
}
|
||||
|
||||
@@ -364,10 +364,11 @@
|
||||
//配置广告数据
|
||||
XHLaunchVideoAdConfiguration *videoAdconfiguration = [XHLaunchVideoAdConfiguration defaultConfiguration];
|
||||
// NSString *path = [[NSBundle mainBundle] pathForResource:@"app_start" ofType:@"mp4"];
|
||||
videoAdconfiguration.videoNameOrURLString = @"app_start.mp4";
|
||||
videoAdconfiguration.duration = 2;
|
||||
videoAdconfiguration.videoNameOrURLString = @"app_start2.mp4";
|
||||
videoAdconfiguration.duration = 7;
|
||||
videoAdconfiguration.skipButtonType = SkipTypeNone;
|
||||
[XHLaunchAd videoAdWithVideoAdConfiguration:videoAdconfiguration];
|
||||
videoAdconfiguration.videoCycleOnce = YES;
|
||||
[XHLaunchAd videoAdWithVideoAdConfiguration:videoAdconfiguration delegate:self];
|
||||
//广告图片URLString/或本地图片名(.jpg/.gif请带上后缀)
|
||||
// imageAdconfiguration. = model.img;
|
||||
// //广告点击打开页面参数(openModel可为NSString,模型,字典等任意类型)
|
||||
@@ -375,4 +376,8 @@
|
||||
// //显示开屏广告
|
||||
// [XHLaunchAd imageAdWithImageAdConfiguration:imageAdconfiguration delegate:self];
|
||||
}
|
||||
- (BOOL)xhLaunchAd:(XHLaunchAd *)launchAd clickAtOpenModel:(id)openModel clickPoint:(CGPoint)clickPoint{
|
||||
[XHLaunchAd removeAndAnimated:YES];
|
||||
return YES;
|
||||
}
|
||||
@end
|
||||
|
||||
BIN
QXLive/Other/Resource/app_start2.mp4
Normal file
|
Before Width: | Height: | Size: 433 KiB After Width: | Height: | Size: 433 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 2.2 MiB After Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 1.5 MiB |
@@ -1794,7 +1794,8 @@ QXRoomUserInfoViewDelegate
|
||||
MJWeakSelf
|
||||
_sendGiftView.roomSendSuccessBlock = ^(QXSendGiftViewType sendType, QXGiftModel * _Nonnull giftModel, NSString * _Nonnull giftCount, NSString * _Nonnull userId, NSString * _Nonnull optionId) {
|
||||
// if (self->_continuousView == nil) {
|
||||
[weakSelf.view addSubview:weakSelf.continuousView];
|
||||
[weakSelf.view addSubview:weakSelf.continuousView];
|
||||
[weakSelf.view bringSubviewToFront:weakSelf.continuousView];
|
||||
// }
|
||||
weakSelf.continuousView.giftModel = giftModel;
|
||||
weakSelf.continuousView.sendType = sendType;
|
||||
|
||||
@@ -217,20 +217,20 @@ NSInteger maxMessageCount = 20;
|
||||
// [self.synthesizer speakUtterance:utterance];
|
||||
// }
|
||||
#else
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
NSString *text = @"";
|
||||
if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem) {
|
||||
text = model.text;
|
||||
}else{
|
||||
text = [NSString stringWithFormat:@"%@说:%@",model.FromUserInfo.nickname,model.text];
|
||||
}
|
||||
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:text];
|
||||
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"zh-CN"];
|
||||
utterance.rate = 0.5 ;
|
||||
utterance.pitchMultiplier = 1.0 ;
|
||||
utterance.volume = 1.0 ;
|
||||
[self.synthesizer speakUtterance:utterance];
|
||||
}
|
||||
// if (QXGlobal.shareGlobal.isAppStore) {
|
||||
// NSString *text = @"";
|
||||
// if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem) {
|
||||
// text = model.text;
|
||||
// }else{
|
||||
// text = [NSString stringWithFormat:@"%@说:%@",model.FromUserInfo.nickname,model.text];
|
||||
// }
|
||||
// AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString: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];
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
}
|
||||
[weakSelf hide];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
}
|
||||
-(void)setRoomId:(NSString *)roomId{
|
||||
_roomId = roomId;
|
||||
self.alreadySongView.roomId = roomId;
|
||||
[self getSongListCount];
|
||||
}
|
||||
-(void)getSongListCount{
|
||||
@@ -99,6 +100,7 @@
|
||||
[self.titles replaceObjectAtIndex:1 withObject:self.alreadySongTitle];
|
||||
self.categoryView.titles = self.titles;
|
||||
[self.categoryView reloadDataWithoutListContainer];
|
||||
self.alreadySongView.roomId = self.roomId;
|
||||
[self.alreadySongView updateSongList];
|
||||
}
|
||||
|
||||
@@ -156,6 +158,7 @@
|
||||
-(void)showInView:(UIView *)view pitArray:(nonnull NSArray *)pitArray isCompere:(BOOL)isCompere{
|
||||
self.requestSongView.pitArray = pitArray;
|
||||
self.alreadySongView.isCompere = isCompere;
|
||||
self.alreadySongView.roomId = self.roomId;
|
||||
self.bgView.y = SCREEN_HEIGHT;
|
||||
[view addSubview:self];
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
|
||||
@@ -696,7 +696,7 @@
|
||||
_redBagSound.icon = @"room_redbag_sound_off";
|
||||
_redBagSound.selIcon = @"room_redbag_sound_on";
|
||||
_redBagSound.name = QXText(@"红包音效");
|
||||
_drifPop.selName = QXText(@"红包音效");
|
||||
_redBagSound.selName = QXText(@"红包音效");
|
||||
_redBagSound.type = QXRoomSettingTypeRedBagSound;
|
||||
}
|
||||
return _redBagSound;
|
||||
|
||||
@@ -217,6 +217,18 @@
|
||||
}
|
||||
}
|
||||
QXLOG(@"在线状态%@",QXGlobal.shareGlobal.offLineDict);
|
||||
NSInteger is_offline = [[[QXGlobal shareGlobal].offLineDict objectForKey:self.pitModel.user_id?self.pitModel.user_id:@"0"] integerValue];
|
||||
if (is_offline==1) {
|
||||
self.offlineImageView.hidden = YES;
|
||||
}else if(is_offline == 2){
|
||||
if (self.noOffLine) {
|
||||
self.offlineImageView.hidden = YES;
|
||||
}else{
|
||||
self.offlineImageView.hidden = NO;
|
||||
}
|
||||
}else{
|
||||
self.offlineImageView.hidden = YES;
|
||||
}
|
||||
}
|
||||
-(void)speakInfo:(NSNotification*)notice{
|
||||
if (self.noMicCycle) {
|
||||
|
||||
@@ -942,25 +942,28 @@
|
||||
if (self.myPitNumber == 9) {
|
||||
// 排麦模式 弹出上麦
|
||||
if (self.myPitNumber == 9 || self.roomModel.user_info.is_room_owner.intValue == 1 || self.roomModel.user_info.is_management.intValue == 1 || self.roomModel.user_info.is_host.intValue == 1) {
|
||||
MJWeakSelf
|
||||
/// 自己在9号麦 管理麦位
|
||||
QXRoomPitModel *pitModel = seatView.pitModel;
|
||||
self.settingView.roomId = self.roomModel.room_info.room_id;
|
||||
self.settingView.isNoHaveLockMic = YES;
|
||||
self.settingView.pitModel = pitModel;
|
||||
self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
seatView.pitModel = pitModel;
|
||||
// if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
// [seatView hideCharm];
|
||||
// }
|
||||
};
|
||||
self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
|
||||
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
[weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
}
|
||||
};
|
||||
[self.settingView showInView:self.viewController.view];
|
||||
// MJWeakSelf
|
||||
// /// 自己在9号麦 管理麦位
|
||||
// QXRoomPitModel *pitModel = seatView.pitModel;
|
||||
// self.settingView.roomId = self.roomModel.room_info.room_id;
|
||||
// self.settingView.isNoHaveLockMic = YES;
|
||||
// self.settingView.pitModel = pitModel;
|
||||
// self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// seatView.pitModel = pitModel;
|
||||
// // if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
// // [seatView hideCharm];
|
||||
// // }
|
||||
// };
|
||||
// self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// // [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
|
||||
// if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
// [weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
// }
|
||||
// };
|
||||
// [self.settingView showInView:self.viewController.view];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
[self.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if (self.roomModel.room_info.room_up_pit_type.intValue == 2) {
|
||||
@@ -974,25 +977,28 @@
|
||||
/// 排麦模式
|
||||
// 排麦模式 弹出上麦
|
||||
if (self.myPitNumber == 9 || self.roomModel.user_info.is_room_owner.intValue == 1 || self.roomModel.user_info.is_management.intValue == 1 || self.roomModel.user_info.is_host.intValue == 1) {
|
||||
MJWeakSelf
|
||||
/// 自己在9号麦 管理麦位
|
||||
QXRoomPitModel *pitModel = seatView.pitModel;
|
||||
self.settingView.roomId = self.roomModel.room_info.room_id;
|
||||
self.settingView.isNoHaveLockMic = YES;
|
||||
self.settingView.pitModel = pitModel;
|
||||
self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
seatView.pitModel = pitModel;
|
||||
// if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
// [seatView hideCharm];
|
||||
// }
|
||||
};
|
||||
self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
|
||||
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
[weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
}
|
||||
};
|
||||
[self.settingView showInView:self.viewController.view];
|
||||
// MJWeakSelf
|
||||
// /// 自己在9号麦 管理麦位
|
||||
// QXRoomPitModel *pitModel = seatView.pitModel;
|
||||
// self.settingView.roomId = self.roomModel.room_info.room_id;
|
||||
// self.settingView.isNoHaveLockMic = YES;
|
||||
// self.settingView.pitModel = pitModel;
|
||||
// self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// seatView.pitModel = pitModel;
|
||||
// // if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
// // [seatView hideCharm];
|
||||
// // }
|
||||
// };
|
||||
// self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// // [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
|
||||
// if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
// [weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
// }
|
||||
// };
|
||||
// [self.settingView showInView:self.viewController.view];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
[self.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,24 +130,26 @@ static NSInteger maxSeat = 8;
|
||||
return;
|
||||
}else{
|
||||
if (self.myPitNumber == 9) {
|
||||
MJWeakSelf
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
[self.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
}
|
||||
// MJWeakSelf
|
||||
/// 自己在9号麦 管理麦位
|
||||
QXRoomPitModel *pitModel = seatView.pitModel;
|
||||
self.settingView.roomId = self.roomModel.room_info.room_id;
|
||||
self.settingView.pitModel = pitModel;
|
||||
self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
seatView.pitModel = pitModel;
|
||||
// if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
// [seatView hideCharm];
|
||||
// QXRoomPitModel *pitModel = seatView.pitModel;
|
||||
// self.settingView.roomId = self.roomModel.room_info.room_id;
|
||||
// self.settingView.pitModel = pitModel;
|
||||
// self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// seatView.pitModel = pitModel;
|
||||
//// if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
//// [seatView hideCharm];
|
||||
//// }
|
||||
// };
|
||||
// self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// if (self.delegate && [self.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
// [self.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
// }
|
||||
};
|
||||
self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
|
||||
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
[weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
}
|
||||
};
|
||||
[self.settingView showInView:self.viewController.view];
|
||||
// };
|
||||
// [self.settingView showInView:self.viewController.view];
|
||||
}else{
|
||||
if (self.roomModel.room_info.room_up_pit_type.intValue == 2) {
|
||||
/// 自由麦请求
|
||||
@@ -159,24 +161,27 @@ static NSInteger maxSeat = 8;
|
||||
}else{
|
||||
// 排麦模式 弹出上麦
|
||||
if (self.myPitNumber == 9 || self.roomModel.user_info.is_room_owner.intValue == 1 || self.roomModel.user_info.is_management.intValue == 1 || self.roomModel.user_info.is_host.intValue == 1) {
|
||||
MJWeakSelf
|
||||
/// 自己在9号麦 管理麦位
|
||||
QXRoomPitModel *pitModel = seatView.pitModel;
|
||||
self.settingView.roomId = self.roomModel.room_info.room_id;
|
||||
self.settingView.pitModel = pitModel;
|
||||
self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
seatView.pitModel = pitModel;
|
||||
// if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
// [seatView hideCharm];
|
||||
// }
|
||||
};
|
||||
self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
|
||||
if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
[weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
}
|
||||
};
|
||||
[self.settingView showInView:self.viewController.view];
|
||||
// MJWeakSelf
|
||||
// /// 自己在9号麦 管理麦位
|
||||
// QXRoomPitModel *pitModel = seatView.pitModel;
|
||||
// self.settingView.roomId = self.roomModel.room_info.room_id;
|
||||
// self.settingView.pitModel = pitModel;
|
||||
// self.settingView.setSuccessBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// seatView.pitModel = pitModel;
|
||||
// // if (self.isPKMyRoom || self.isPKOtherRoom) {
|
||||
// // [seatView hideCharm];
|
||||
// // }
|
||||
// };
|
||||
// self.settingView.clickHugBlock = ^(QXRoomPitModel * _Nonnull pitModel) {
|
||||
// // [weakSelf showOnlineListWithPitNumber:pitModel.pit_number];
|
||||
// if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
// [weakSelf.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
// }
|
||||
// };
|
||||
// [self.settingView showInView:self.viewController.view];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didHugSeatWithPitNumber:)]) {
|
||||
[self.delegate didHugSeatWithPitNumber:pitModel.pit_number];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
// [weakSelf popNiceGiftView];
|
||||
[weakSelf.homeVC popFirstRechargeView];
|
||||
[weakSelf.homeVC popFirstRechargeViewOnlyRecharge:NO];
|
||||
}];
|
||||
};
|
||||
view.gotoActionBlock = ^{
|
||||
|
||||
@@ -80,7 +80,10 @@
|
||||
}
|
||||
-(void)setModel:(QXAppVersionModel *)model{
|
||||
_model = model;
|
||||
self.messageLabel.text = model.content;
|
||||
NSData *data = [model.content dataUsingEncoding:NSUnicodeStringEncoding];
|
||||
NSDictionary *options = @{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType};
|
||||
NSAttributedString *html = [[NSAttributedString alloc]initWithData:data options:options documentAttributes:nil error:nil];
|
||||
self.messageLabel.attributedText = html;
|
||||
// self.messageLabel.text = @"动环监控撒谎大健康撒谎科技打撒好看到货时间阿克汉登记卡撒大花洒科技活动极客飒户djsakljdk电视剧啊快回家读书卡多撒u一还有第四u啊个ID撒个hi打撒低功耗设计啊开工大吉萨嘎合计打撒好多个健身卡刚回到家撒合计扩大活动时间卡号大健康撒谎登记卡到货时间啊客户端健身卡核打静待花开撒会尽快的撒回到家凯撒会尽快的撒回到家凯撒会尽快的撒大花洒客户端手机卡击凯撒籍卡打撒";
|
||||
[self.messageLabel sizeToFit];
|
||||
self.scrollView.contentSize = CGSizeMake(self.bgView.width-26, self.messageLabel.height);
|
||||
|
||||
@@ -40,25 +40,29 @@
|
||||
self.bgImageView.frame = self.bounds;
|
||||
[self addSubview:self.bgImageView];
|
||||
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
self.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.titleLabel.textColor = UIColor.whiteColor;
|
||||
[self addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self).offset(-ScaleWidth(30));
|
||||
make.height.mas_equalTo(30);
|
||||
make.centerY.equalTo(self).offset(2);
|
||||
}];
|
||||
|
||||
self.giftImageView = [[UIImageView alloc] init];
|
||||
self.giftImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self addSubview:self.giftImageView];
|
||||
[self.giftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.titleLabel.mas_right).offset(5);
|
||||
make.right.equalTo(self.bgImageView).offset(-55);
|
||||
make.height.width.mas_equalTo(20);
|
||||
make.centerY.equalTo(self).offset(2);
|
||||
}];
|
||||
|
||||
self.titleLabel = [[UILabel alloc] init];
|
||||
self.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.titleLabel.textColor = UIColor.whiteColor;
|
||||
self.titleLabel.numberOfLines = 2;
|
||||
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
[self addSubview:self.titleLabel];
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.bgImageView).offset(15);
|
||||
make.right.equalTo(self.giftImageView.mas_left);
|
||||
make.centerY.equalTo(self).offset(2);
|
||||
}];
|
||||
|
||||
|
||||
|
||||
self.countLabel = [[UILabel alloc] init];
|
||||
self.countLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.countLabel.textColor = UIColor.whiteColor;
|
||||
|
||||
@@ -466,8 +466,8 @@
|
||||
}
|
||||
-(void)configData{
|
||||
[self.oneBtn.giftCoin setTitle:[NSString stringWithFormat:@"%@币一次",self.model.box_price] forState:(UIControlStateNormal)];
|
||||
[self.tenBtn.giftCoin setTitle:[NSString stringWithFormat:@"%ld币一次",self.model.box_price.integerValue*10] forState:(UIControlStateNormal)];
|
||||
[self.hundredBtn.giftCoin setTitle:[NSString stringWithFormat:@"%ld币一次",self.model.box_price.integerValue*100] forState:(UIControlStateNormal)];
|
||||
[self.tenBtn.giftCoin setTitle:[NSString stringWithFormat:@"%ld币一次",self.model.box_price.integerValue*5] forState:(UIControlStateNormal)];
|
||||
[self.hundredBtn.giftCoin setTitle:[NSString stringWithFormat:@"%ld币一次",self.model.box_price.integerValue*8] forState:(UIControlStateNormal)];
|
||||
self.oneBtn.hidden = NO;
|
||||
self.tenBtn.hidden = NO;
|
||||
self.hundredBtn.hidden = NO;
|
||||
@@ -781,14 +781,14 @@
|
||||
break;
|
||||
case QXMeetDrawBtnTypeTen:
|
||||
{
|
||||
self.titleLabel.text = @"抽十次";
|
||||
[self.giftCoin setTitle:@"100币一次" forState:(UIControlStateNormal)];
|
||||
self.titleLabel.text = @"抽五次";
|
||||
[self.giftCoin setTitle:@"50币一次" forState:(UIControlStateNormal)];
|
||||
}
|
||||
break;
|
||||
case QXMeetDrawBtnTypeHundred:
|
||||
{
|
||||
self.titleLabel.text = @"抽百次";
|
||||
[self.giftCoin setTitle:@"1000币一次" forState:(UIControlStateNormal)];
|
||||
self.titleLabel.text = @"抽八次";
|
||||
[self.giftCoin setTitle:@"80币一次" forState:(UIControlStateNormal)];
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||