Compare commits
8 Commits
1a0dac1d91
...
ba4fd658a9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba4fd658a9 | ||
|
|
999bf3d804 | ||
|
|
ad6cd82a05 | ||
|
|
ff11e9715e | ||
|
|
aedc48c098 | ||
|
|
011536e8f4 | ||
|
|
22025ad033 | ||
|
|
6b01c3bb49 |
2
Podfile
@@ -79,6 +79,8 @@ def taget_pods
|
||||
pod 'TUIConversation', :path => "./TUIKit/TUIConversation"
|
||||
# pod 'RTCRoomEngine'
|
||||
pod 'TIMPush'
|
||||
#占位
|
||||
pod 'DZNEmptyDataSet'
|
||||
end
|
||||
|
||||
target 'QXLive' do
|
||||
|
||||
@@ -748,7 +748,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -787,7 +787,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.6;
|
||||
MARKETING_VERSION = 1.2.0;
|
||||
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 = 1;
|
||||
CURRENT_PROJECT_VERSION = 3;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -853,7 +853,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.6;
|
||||
MARKETING_VERSION = 1.2.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
||||
@@ -336,7 +336,17 @@
|
||||
|
||||
-(void)checkAndUpdateRedPackets{
|
||||
if ([self.roomId isExist]) {
|
||||
[QXMineNetwork appKeepAliveWithRoomId:self.roomId];
|
||||
[QXMineNetwork appKeepAliveWithRoomId:self.roomId successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
NSString *string = [NSString stringWithFormat:@"%@",dict[@"not_received_tasks_num"]];
|
||||
if ([string containsString:@"null"]) {
|
||||
string = @"";
|
||||
}
|
||||
if (self.roomVC) {
|
||||
self.roomVC.taskWaitDrawNum = string;
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#import "QXSystemNoticeViewController.h"
|
||||
#import "QXHotRoomViewController.h"
|
||||
#import "QXInvitePopView.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXSignInAppView.h"
|
||||
|
||||
@interface QXHomeViewController ()<JXPagerViewDelegate,JXCategoryViewDelegate,GKCycleScrollViewDataSource,GKCycleScrollViewDelegate,QXGiftScrollViewDelegate,SDCycleScrollViewDelegate,QXHomeTopViewDelegate>
|
||||
@property (nonatomic, strong) JXPagerView *pagingView;
|
||||
@@ -60,6 +62,8 @@
|
||||
|
||||
@property (nonatomic,strong)QXRechargePermissionModel *permissionModel;
|
||||
@property (nonatomic,strong)QXRoomListModel *recommendRoom;
|
||||
/// 今日签到状态
|
||||
@property (nonatomic,strong)NSString* signStatus;
|
||||
@end
|
||||
|
||||
@implementation QXHomeViewController
|
||||
@@ -150,6 +154,7 @@
|
||||
self.rechargePermissionView.hidden = YES;
|
||||
[self.view addSubview:self.rechargePermissionView];
|
||||
[self getRecommendRoom];
|
||||
[self getSignStatus];
|
||||
}
|
||||
- (void)viewDidLayoutSubviews {
|
||||
[super viewDidLayoutSubviews];
|
||||
@@ -247,6 +252,14 @@
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)getSignStatus{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork appSignTaskStatusSuccessBlock:^(NSString * _Nonnull status) {
|
||||
weakSelf.signStatus = status;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
//-(void)firstAction{
|
||||
// [self popnPeopleRechargeView];
|
||||
@@ -318,41 +331,58 @@
|
||||
if ([QXGlobal shareGlobal].isAppStore) {
|
||||
return;
|
||||
}
|
||||
if (self.permissionModel.first_charge_permission.intValue != 1) {
|
||||
[self popRecommendRoom];
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
QXFirstRechargeView *view = [[QXFirstRechargeView alloc] init];
|
||||
view.closeActionBlock = ^{
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
if (self.permissionModel.first_charge_permission.intValue == 1) {
|
||||
QXFirstRechargeView *view = [[QXFirstRechargeView alloc] init];
|
||||
view.closeActionBlock = ^{
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
if (weakSelf.signStatus.intValue == 1) {
|
||||
[weakSelf popRecommendRoom];
|
||||
}else{
|
||||
[weakSelf popSignTask];
|
||||
}
|
||||
}];
|
||||
};
|
||||
view.rechargeActionBlock = ^(NSString * _Nonnull money, NSString * _Nonnull gift_bag_id) {
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
QXRechargeView *recharge = [[QXRechargeView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
|
||||
QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
|
||||
model.money = money;
|
||||
recharge.selectedModel = model;
|
||||
recharge.isPop = YES;
|
||||
recharge.gift_bag_id = gift_bag_id;
|
||||
recharge.isOnlyDisplayPayType = YES;
|
||||
[recharge showInView:KEYWINDOW];
|
||||
}];
|
||||
};
|
||||
|
||||
view.refreshBlcock = ^{
|
||||
[weakSelf getRechargePermission];
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
}];
|
||||
};
|
||||
[[QXGlobal shareGlobal] showView:view popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
}];
|
||||
}else{
|
||||
if (weakSelf.signStatus.intValue == 1) {
|
||||
[weakSelf popRecommendRoom];
|
||||
}];
|
||||
}else{
|
||||
[weakSelf popSignTask];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void)popSignTask{
|
||||
MJWeakSelf
|
||||
QXSignInAppView *view = [[QXSignInAppView alloc] init];
|
||||
view.cancelBlock = ^{
|
||||
[weakSelf popRecommendRoom];
|
||||
};
|
||||
view.rechargeActionBlock = ^(NSString * _Nonnull money, NSString * _Nonnull gift_bag_id) {
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
QXRechargeView *recharge = [[QXRechargeView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
|
||||
QXRechargeListModel *model = [[QXRechargeListModel alloc] init];
|
||||
model.money = money;
|
||||
recharge.selectedModel = model;
|
||||
recharge.isPop = YES;
|
||||
recharge.gift_bag_id = gift_bag_id;
|
||||
recharge.isOnlyDisplayPayType = YES;
|
||||
[recharge showInView:KEYWINDOW];
|
||||
}];
|
||||
};
|
||||
|
||||
view.refreshBlcock = ^{
|
||||
[weakSelf getRechargePermission];
|
||||
[[QXGlobal shareGlobal].alertViewController hideViewFinishBlock:^{
|
||||
QXLOG(@"页面关闭");
|
||||
}];
|
||||
};
|
||||
[[QXGlobal shareGlobal] showView:view popType:(PopViewTypeTopToCenter) tapDismiss:NO finishBlock:^{
|
||||
|
||||
}];
|
||||
[view showInView:KEYWINDOW];
|
||||
}
|
||||
|
||||
-(void)popRecommendRoom{
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
}
|
||||
-(UITableView *)tableView{
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.rankTypeView.bottom+10, SCREEN_WIDTH, self.myRankView.top - self.rankTypeView.bottom-10) style:(UITableViewStyleGrouped)];
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.rankTypeView.bottom+10, SCREEN_WIDTH, self.myRankView.top - self.rankTypeView.bottom-10) style:(UITableViewStylePlain)];
|
||||
_tableView.dataSource = self;
|
||||
_tableView.delegate = self;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
if (self) {
|
||||
self = [[[NSBundle mainBundle]loadNibNamed:@"QXRankCPTopThreeView" owner:nil options:nil] lastObject];
|
||||
self.frame = frame;
|
||||
self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="WH3-Kj-tPl" userLabel="RankCP Top Three View" customClass="QXRankCPTopThreeView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="438" height="230"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="230"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_rank_top_bg" translatesAutoresizingMaskIntoConstraints="NO" id="ouU-i5-mkT">
|
||||
<rect key="frame" x="10" y="0.0" width="418" height="230"/>
|
||||
<rect key="frame" x="10" y="0.0" width="355" height="230"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fkt-5i-wGo">
|
||||
<rect key="frame" x="12" y="71" width="106" height="147"/>
|
||||
@@ -131,13 +131,13 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9kQ-2p-WMi">
|
||||
<rect key="frame" x="140" y="32" width="158" height="197"/>
|
||||
<rect key="frame" x="108.66666666666669" y="32" width="158" height="197"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rank_first_bg" translatesAutoresizingMaskIntoConstraints="NO" id="ELT-qa-QKO">
|
||||
<rect key="frame" x="0.0" y="0.0" width="158" height="197"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_header_placehoulder" translatesAutoresizingMaskIntoConstraints="NO" id="aGF-cs-ovJ">
|
||||
<rect key="frame" x="34" y="61.666666666666671" width="43" height="43"/>
|
||||
<rect key="frame" x="33.999999999999986" y="61.666666666666671" width="43" height="43"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="43" id="hxW-n4-Uyk"/>
|
||||
<constraint firstAttribute="height" constant="43" id="rge-H5-p6O"/>
|
||||
@@ -150,7 +150,7 @@
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="user_header_placehoulder" translatesAutoresizingMaskIntoConstraints="NO" id="hOp-Tb-y2w">
|
||||
<rect key="frame" x="81" y="61.666666666666671" width="43" height="43"/>
|
||||
<rect key="frame" x="80.999999999999986" y="61.666666666666671" width="43" height="43"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="43" id="Lc4-yM-QcA"/>
|
||||
<constraint firstAttribute="width" constant="43" id="r5d-qQ-0ry"/>
|
||||
@@ -163,21 +163,21 @@
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="my_real_love_bg" translatesAutoresizingMaskIntoConstraints="NO" id="TNm-GF-bzb">
|
||||
<rect key="frame" x="34" y="60" width="90" height="46"/>
|
||||
<rect key="frame" x="33.999999999999986" y="60" width="90" height="46"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="46" id="NPw-VB-8m8"/>
|
||||
<constraint firstAttribute="width" constant="90" id="fP0-0i-9jG"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_rank_top_name_bg" translatesAutoresizingMaskIntoConstraints="NO" id="LZO-Bi-Scl">
|
||||
<rect key="frame" x="43" y="120" width="72" height="22"/>
|
||||
<rect key="frame" x="42.999999999999986" y="120" width="72" height="22"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="9Ll-3D-kiE"/>
|
||||
<constraint firstAttribute="width" constant="72" id="itM-jv-mGn"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_rank_top_cp_name_bg" translatesAutoresizingMaskIntoConstraints="NO" id="aOR-DW-3Z8">
|
||||
<rect key="frame" x="43" y="143" width="72" height="22"/>
|
||||
<rect key="frame" x="42.999999999999986" y="143" width="72" height="22"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="72" id="aBr-8e-rKs"/>
|
||||
<constraint firstAttribute="height" constant="22" id="fOH-xn-3FU"/>
|
||||
@@ -202,14 +202,14 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rank_real_love_value_bg" translatesAutoresizingMaskIntoConstraints="NO" id="PqR-bx-jVl">
|
||||
<rect key="frame" x="39" y="102" width="80" height="18"/>
|
||||
<rect key="frame" x="38.999999999999986" y="102" width="80" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="80" id="ZYt-mm-gLE"/>
|
||||
<constraint firstAttribute="height" constant="18" id="eFY-Wa-ws3"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Z7f-CG-uOk">
|
||||
<rect key="frame" x="58" y="102" width="61" height="18"/>
|
||||
<rect key="frame" x="57.999999999999986" y="102" width="61" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="VNk-5G-EDl"/>
|
||||
</constraints>
|
||||
@@ -249,7 +249,7 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="W20-Fx-QTq">
|
||||
<rect key="frame" x="316" y="71" width="106" height="147"/>
|
||||
<rect key="frame" x="253" y="71" width="106" height="147"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rank_third_bg" translatesAutoresizingMaskIntoConstraints="NO" id="Nxb-5v-S7f">
|
||||
<rect key="frame" x="0.0" y="0.0" width="106" height="147"/>
|
||||
@@ -379,6 +379,8 @@
|
||||
<constraint firstItem="ouU-i5-mkT" firstAttribute="top" secondItem="WH3-Kj-tPl" secondAttribute="top" id="uqO-NW-LZp"/>
|
||||
<constraint firstItem="ouU-i5-mkT" firstAttribute="leading" secondItem="WH3-Kj-tPl" secondAttribute="leading" constant="10" id="xnA-kc-eRW"/>
|
||||
</constraints>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="firstHeaderImage" destination="aGF-cs-ovJ" id="rwA-vJ-tQq"/>
|
||||
|
||||
@@ -536,6 +536,7 @@
|
||||
[weakSelf.codeTextField startTimeDown];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
sender.userInteractionEnabled = YES;
|
||||
showToast(msg);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
16
QXLive/Manager/QXAudioEngineManager.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QXAudioEngineManager.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/11/6.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXAudioEngineManager : NSObject
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
19
QXLive/Manager/QXAudioEngineManager.m
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// QXAudioEngineManager.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/11/6.
|
||||
//
|
||||
|
||||
#import "QXAudioEngineManager.h"
|
||||
#import<Speech/Speech.h>
|
||||
@interface QXAudioEngineManager()
|
||||
@property (nonatomic, strong) AVAudioEngine *audioEngine;
|
||||
@property (nonatomic, strong) SFSpeechRecognizer *speechRecognizer;
|
||||
@property (nonatomic, strong) SFSpeechAudioBufferRecognitionRequest *recognitionRequest;
|
||||
@property (nonatomic, strong) SFSpeechRecognitionTask *recognitionTask;
|
||||
@property (nonatomic, strong) NSLocale *locale;
|
||||
@end
|
||||
@implementation QXAudioEngineManager
|
||||
|
||||
@end
|
||||
@@ -25,6 +25,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
QXRoomMessageTypeSendAndRecieveCpHeartSignal = 130,
|
||||
/// cp双向奔赴
|
||||
QXRoomMessageTypeCpHeartFinished = 131,
|
||||
/// 师徒任务
|
||||
QXRoomMessageTypeMasterTask = 132,
|
||||
|
||||
/// 基础文本消息类型
|
||||
QXRoomMessageTypeText = 1,
|
||||
|
||||
@@ -791,6 +791,21 @@
|
||||
};
|
||||
}
|
||||
|
||||
-(void)showMasterTaskInviteAlertViewWithRoomId:(NSString*)roomId userId:(NSString*)userId{
|
||||
QXCustomAlertView *alertView = [[QXCustomAlertView alloc] init];
|
||||
alertView.autoDismissTime = 10;
|
||||
[alertView showInView:KEYWINDOW title:@"温馨提示" message:@"您的师傅邀请您进入房间,您是否同意?" cancleTitle:@"拒绝" commitTitle:@"同意"];
|
||||
alertView.cancelBlock = ^{
|
||||
NSDictionary *dict = @{@"status":@"2",@"room_id":roomId?:@""};
|
||||
NSString *jsonStr = [dict jsonStringEncoded];
|
||||
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:(QXRoomMessageTypeMasterTask) userId:userId];
|
||||
};
|
||||
alertView.commitBlock = ^{
|
||||
QXLOG(@"进入房间");
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:roomId isRejoin:NO navagationController:(QXRoomNavigationController*)KEYWINDOW.rootViewController];
|
||||
};
|
||||
}
|
||||
|
||||
-(void)onRecvC2CTextMessage:(NSString *)msgID sender:(V2TIMUserInfo *)info text:(NSString *)text{
|
||||
|
||||
}
|
||||
@@ -823,6 +838,17 @@
|
||||
NSDictionary *dict = [json jsonValueDecoded];
|
||||
NSString *message = [NSString stringWithFormat:@"%@",dict[@"text1"]];
|
||||
[self showCpFinishedAlertViewWithText:message];
|
||||
}else if (meesageType == QXRoomMessageTypeMasterTask){
|
||||
NSString *json = [NSString stringWithFormat:@"%@",msg.Text[@"text"]];
|
||||
NSDictionary *dict = [json jsonValueDecoded];
|
||||
NSString *status = [NSString stringWithFormat:@"%@",dict[@"status"]];
|
||||
if ([status isEqualToString:@"2"]) {
|
||||
showToast(@"您的徒弟拒绝了您的邀请");
|
||||
}else if ([status isEqualToString:@"1"]){
|
||||
NSString *roomId = [NSString stringWithFormat:@"%@",dict[@"room_id"]];
|
||||
QXRoomChatListModel *model = [QXRoomChatListModel yy_modelWithJSON:msg.Text];
|
||||
[self showMasterTaskInviteAlertViewWithRoomId:roomId userId:model.FromUserInfo.user_id];
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)onRecvGroupCustomMessage:(NSString *)msgID groupID:(NSString *)groupID sender:(V2TIMGroupMemberInfo *)info customData:(NSData *)data{
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
// [self addChildViewController:self.vc];
|
||||
// [self.view addSubview:self.vc.view];
|
||||
[self.vc reloadConversationList];
|
||||
self.vc.tableViewForAll.tableHeaderView = self.topView;
|
||||
}
|
||||
|
||||
- (void)conversationListController:(UIViewController *)conversationController
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
@property (nonatomic,strong)QXUserModel *userModel;
|
||||
@property (nonatomic,strong)NSMutableArray *bannerArry;
|
||||
@property (nonatomic,strong)NSString *cancelCode;
|
||||
@property (nonatomic,strong)NSString *taskNum;
|
||||
@end
|
||||
|
||||
@implementation QXMineViewController
|
||||
@@ -106,6 +107,16 @@
|
||||
weakSelf.tableHeaderView.earnings = earnings;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
[self getTaskCount];
|
||||
}
|
||||
|
||||
-(void)getTaskCount{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork appTaskWaitDrawSuccessBlock:^(NSString * _Nonnull num) {
|
||||
weakSelf.taskNum = num;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
#pragma mark - QXMineServiceCellDelegate
|
||||
@@ -171,8 +182,7 @@
|
||||
};
|
||||
v.authActionBlock = ^{
|
||||
[[QXGlobal shareGlobal] hideViewBlock:^{
|
||||
QXRoomSingerAuthViewController *vc = [[QXRoomSingerAuthViewController alloc] init];
|
||||
vc.singer_status = weakSelf.userModel.singer_status;
|
||||
QXRealNameViewController *vc = [[QXRealNameViewController alloc] init];
|
||||
[weakSelf.navigationController pushViewController:vc animated:YES];
|
||||
}];
|
||||
};
|
||||
@@ -324,6 +334,7 @@
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXMineServiceCell *cell = [QXMineServiceCell cellWithTableView:tableView];
|
||||
cell.taskNumber = self.taskNum;
|
||||
cell.delegate = self;
|
||||
cell.singerIsAuth = self.userModel.singer_status.intValue==1;
|
||||
if (indexPath.row == 0) {
|
||||
@@ -361,6 +372,7 @@
|
||||
vc.logOutBlock = ^(BOOL isCancel, NSString * _Nonnull code) {
|
||||
weakSelf.cancelCode = code;
|
||||
if (isCancel) {
|
||||
showToast(@"注销成功");
|
||||
[weakSelf performSelector:@selector(cancelAccount) afterDelay:0.5];
|
||||
}else{
|
||||
[weakSelf performSelector:@selector(logout) afterDelay:0.5];
|
||||
|
||||
@@ -12,6 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface QXUserHomePageViewController : QXBaseViewController
|
||||
@property (nonatomic,strong)NSString *user_id;
|
||||
@property (nonatomic,assign)BOOL isGiftWall;
|
||||
/// 是否是相册
|
||||
@property (nonatomic,assign)BOOL isAlbum;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -79,6 +79,9 @@
|
||||
if (self.isGiftWall) {
|
||||
self.categoryView.defaultSelectedIndex = 1;
|
||||
}
|
||||
if (self.isAlbum) {
|
||||
self.categoryView.defaultSelectedIndex = 2;
|
||||
}
|
||||
self.categoryView.backgroundColor = [UIColor clearColor];
|
||||
JXCategoryIndicatorImageView *indicatorView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
indicatorView.indicatorImageView.image = [UIImage imageNamed:@"home_slider"];
|
||||
|
||||
@@ -13,4 +13,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@end
|
||||
|
||||
@interface QXTaskTypeCell : UICollectionViewCell
|
||||
@property (nonatomic,strong)QXDayTaskTypeModel *model;
|
||||
@property (nonatomic,strong)UIButton *titleBtn;
|
||||
@property (nonatomic,strong)UIButton *lockImageBtn;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -11,11 +11,23 @@
|
||||
#import "QXDayTaskRuleView.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXTaskGiftRecordVC.h"
|
||||
#import "QXRealNameViewController.h"
|
||||
#import "QXUserHomePageViewController.h"
|
||||
#import "QXGuildViewController.h"
|
||||
#import "QXWithDrawBindViewController.h"
|
||||
#import "QXRechargeViewcController.h"
|
||||
#import "QXSignInAppView.h"
|
||||
#import "QXCreatPhotosViewController.h"
|
||||
#import "QXCreateRoomViewController.h"
|
||||
|
||||
@interface QXTaskViewController ()<UITableViewDataSource,UITableViewDelegate>
|
||||
@interface QXTaskViewController ()<UITableViewDataSource,UITableViewDelegate,QXDayTaskCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout>
|
||||
@property (nonatomic,strong)QXDayTaskTopView *topView;
|
||||
@property (nonatomic,strong)UIView *bottomView;
|
||||
@property (nonatomic,strong)UITableView *tableView;
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
@property (nonatomic,strong)QXDayTaskModel *model;
|
||||
@property (nonatomic,strong)QXDayTaskTypeModel *typeModel;
|
||||
@property (nonatomic,strong)UIImageView *nodataView;
|
||||
@end
|
||||
|
||||
@implementation QXTaskViewController
|
||||
@@ -42,17 +54,55 @@
|
||||
}
|
||||
- (void)initSubViews{
|
||||
self.bgImageHidden = YES;
|
||||
self.view.backgroundColor = RGB16(0xD7CDFF);
|
||||
self.tableView.tableHeaderView = self.topView;
|
||||
[self.view addSubview:self.tableView];
|
||||
self.view.backgroundColor = RGB16(0xE3FAE4);
|
||||
[self.view addSubview:self.topView];
|
||||
self.bottomView = [[UIView alloc] initWithFrame:CGRectMake(16, self.topView.bottom, SCREEN_WIDTH-32, SCREEN_HEIGHT-self.topView.bottom-kSafeAreaBottom)];
|
||||
self.bottomView.backgroundColor = RGB16(0xffffff);
|
||||
[self.bottomView addRoundedCornersWithRadius:16];
|
||||
self.tableView.frame = CGRectMake(0, 48, self.bottomView.width, self.bottomView.height-48);
|
||||
[self.bottomView addSubview:self.tableView];
|
||||
[self.view addSubview:self.bottomView];
|
||||
self.nodataView = [[UIImageView alloc] initWithFrame:self.tableView.frame];
|
||||
self.nodataView.hidden = YES;
|
||||
[self.bottomView addSubview:self.nodataView];
|
||||
[self createTaskTypeView];
|
||||
}
|
||||
-(void)createTaskTypeView{
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.minimumLineSpacing = 20;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 14, 0, 16);
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
[self.collectionView registerClass:[QXTaskTypeCell class] forCellWithReuseIdentifier:@"QXTaskTypeCell"];
|
||||
self.collectionView.delegate = self;
|
||||
self.collectionView.dataSource = self;
|
||||
self.collectionView.showsHorizontalScrollIndicator = NO;
|
||||
self.collectionView.bounces = NO;
|
||||
self.collectionView.pagingEnabled = NO;
|
||||
self.collectionView.backgroundColor = [UIColor clearColor];
|
||||
[self.bottomView addSubview:self.collectionView];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(0);
|
||||
make.top.mas_equalTo(0);
|
||||
make.right.mas_equalTo(0);
|
||||
make.height.mas_equalTo(48);
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(void)getDayTask{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getDayTaskListSuccessBlock:^(QXDayTaskModel * _Nonnull model) {
|
||||
weakSelf.model = model;
|
||||
weakSelf.topView.model = model;
|
||||
[weakSelf.tableView reloadData];
|
||||
weakSelf.typeModel = model.tasks.firstObject;
|
||||
if (weakSelf.typeModel) {
|
||||
weakSelf.typeModel.isSelected = YES;
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
[weakSelf.dataArray addObjectsFromArray:weakSelf.typeModel.task_list];
|
||||
[weakSelf.tableView reloadData];
|
||||
}
|
||||
[weakSelf.collectionView reloadData];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
@@ -64,92 +114,160 @@
|
||||
}
|
||||
-(QXDayTaskTopView *)topView{
|
||||
if (!_topView) {
|
||||
_topView = [[QXDayTaskTopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-32, ScaleWidth(285)+12)];
|
||||
_topView = [[QXDayTaskTopView alloc] initWithFrame:CGRectMake(16, NavContentHeight, SCREEN_WIDTH-32, ScaleWidth(285))];
|
||||
}
|
||||
return _topView;
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource,UITableViewDelegate
|
||||
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
if (self.model == nil) {
|
||||
return 0;
|
||||
-(void)didClickFinishTaskWithModel:(QXDayTaskListModel *)taskModel{
|
||||
if ([taskModel.task_id isEqualToString:@"1"]) {
|
||||
QXSignInAppView *signView = [[QXSignInAppView alloc] init];
|
||||
[signView showInView:self.view];
|
||||
return;
|
||||
}
|
||||
if (self.model.tasks.teacher_tasks.count > 0) {
|
||||
return 4;
|
||||
}else{
|
||||
return 3;
|
||||
if (taskModel.task_status.intValue == 1) {
|
||||
// if (taskModel.task_id.intValue == 9 || taskModel.task_id.intValue == 10) {
|
||||
//// QXGlobal.shareGlobal.taskModel = self.model;
|
||||
// if ([[QXGlobal shareGlobal].roomId isEqualToString:taskModel.from_id]) {
|
||||
// [[QXGlobal shareGlobal] popToRoomViewController];
|
||||
// }
|
||||
// [[QXGlobal shareGlobal] joinRoomWithRoomId:self.model.from_id isRejoin:NO navagationController:self.viewController.navigationController];
|
||||
// }
|
||||
if (taskModel.jump_type.intValue == 0) {
|
||||
return;
|
||||
}else if (taskModel.jump_type.intValue == 1) {
|
||||
QXRealNameViewController *vc = [[QXRealNameViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
return;
|
||||
}else if (taskModel.jump_type.intValue == 2) {
|
||||
QXCreatPhotosViewController *vc = [[QXCreatPhotosViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
return;
|
||||
}else if (taskModel.jump_type.intValue == 3) {
|
||||
QXWithDrawBindViewController *vc = [[QXWithDrawBindViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
return;
|
||||
}else if (taskModel.jump_type.intValue == 4) {
|
||||
// if (taskModel.from_id.longLongValue > 0) {
|
||||
showLoadingInView(self.view);
|
||||
[QXMineNetwork getRoomTaskJumpRoomWithTaskId:taskModel.task_id successBlock:^(NSString * _Nonnull roomId) {
|
||||
hideLoadingInView(self.view);
|
||||
if (roomId.longLongValue > 0) {
|
||||
NSDictionary *dict = @{@"status":@"1",@"room_id":taskModel.from_id?:@""};
|
||||
NSString *jsonStr = [dict jsonStringEncoded];
|
||||
[[QXRoomMessageManager shared] sendC2CMessage:jsonStr messageType:(QXRoomMessageTypeMasterTask) userId:taskModel.student_id];
|
||||
[QXGlobal.shareGlobal joinRoomWithRoomId:roomId isRejoin:NO navagationController:self.navigationController];
|
||||
}else{
|
||||
showToast(@"暂无此类型房间");
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
hideLoadingInView(self.view);
|
||||
showToast(msg);
|
||||
}];
|
||||
// }else{
|
||||
// showToast(@"暂无此类型房间");
|
||||
// }
|
||||
return;
|
||||
}else if (taskModel.jump_type.intValue == 5) {
|
||||
QXGuildViewController *vc = [[QXGuildViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
return;
|
||||
}else if (taskModel.jump_type.intValue == 6) {
|
||||
QXRechargeViewcController *vc = [[QXRechargeViewcController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
return;
|
||||
}else if (taskModel.jump_type.intValue == 7) {
|
||||
QXCreateRoomViewController *vc = [[QXCreateRoomViewController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
return;
|
||||
}
|
||||
|
||||
}else if (taskModel.task_status.intValue == 2) {
|
||||
MJWeakSelf
|
||||
[QXMineNetwork dayTaskDrawWithTaskId:taskModel.task_id student_id:taskModel.student_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"领取成功");
|
||||
[weakSelf getDayTask];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
if (section == 0) {
|
||||
return self.model.tasks.daily_tasks.count;
|
||||
}else if(section == 1){
|
||||
return self.model.tasks.daily_tasks_special.count;
|
||||
}else if(section == 2){
|
||||
return self.model.tasks.usual_tasks.count;
|
||||
}else{
|
||||
return self.model.tasks.teacher_tasks.count;
|
||||
#pragma mark - UICollectionViewDelegate,UICollectionViewDataSource
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.model.tasks.count;
|
||||
}
|
||||
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXTaskTypeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXTaskTypeCell" forIndexPath:indexPath];
|
||||
cell.model = self.model.tasks[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXDayTaskTypeModel *model = self.model.tasks[indexPath.row];
|
||||
CGFloat itemWidth = [model.task_type_name widthForFont:[UIFont boldSystemFontOfSize:16]];
|
||||
if (model.is_lock.intValue == 1) {
|
||||
itemWidth += 21;
|
||||
}
|
||||
|
||||
itemWidth += 5;
|
||||
return CGSizeMake(itemWidth, 48);
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXDayTaskTypeModel *model = self.model.tasks[indexPath.row];
|
||||
if (model == self.typeModel) {
|
||||
return;
|
||||
}
|
||||
if (self.typeModel) {
|
||||
self.typeModel.isSelected = NO;
|
||||
}
|
||||
model.isSelected = YES;
|
||||
self.typeModel = model;
|
||||
[collectionView reloadData];
|
||||
[self.dataArray removeAllObjects];
|
||||
[self.dataArray addObjectsFromArray:model.task_list];
|
||||
[self.tableView reloadData];
|
||||
if (model.is_lock.intValue == 1) {
|
||||
if ([model.task_type_name containsString:@"情侣"]) {
|
||||
self.nodataView.hidden = NO;
|
||||
self.nodataView.image = [UIImage imageNamed:@"task_cp_no_data"];
|
||||
}else if ([model.task_type_name containsString:@"师徒"]) {
|
||||
self.nodataView.hidden = NO;
|
||||
self.nodataView.image = [UIImage imageNamed:@"task_master_no_data"];
|
||||
}else{
|
||||
self.nodataView.hidden = YES;
|
||||
}
|
||||
}else{
|
||||
self.nodataView.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDataSource,UITableViewDelegate
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXDayTaskCell *cell = [QXDayTaskCell cellWithTableView:tableView];
|
||||
QXDayTaskListModel *model;
|
||||
if (indexPath.section == 0) {
|
||||
model = self.model.tasks.daily_tasks[indexPath.row];
|
||||
}else if(indexPath.section == 1){
|
||||
model = self.model.tasks.daily_tasks_special[indexPath.row];
|
||||
}else if(indexPath.section == 2){
|
||||
model = self.model.tasks.usual_tasks[indexPath.row];
|
||||
}else{
|
||||
model = self.model.tasks.teacher_tasks[indexPath.row];
|
||||
}
|
||||
cell.model = model;
|
||||
QXDayTaskListModel *taskModel = self.dataArray[indexPath.row];
|
||||
cell.model = taskModel;
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
}
|
||||
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-32, 35)];
|
||||
header.backgroundColor = [UIColor whiteColor];
|
||||
[header addRoundedCornersWithRadius:17.5 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
|
||||
UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, 12, SCREEN_WIDTH-32*2, 23)];
|
||||
titleLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
titleLabel.textColor = QXConfig.textColor;
|
||||
if (section == 0) {
|
||||
titleLabel.text = QXText(@"每日任务");
|
||||
}else if(section == 1){
|
||||
titleLabel.text = QXText(@"特殊任务");
|
||||
}else if(section == 2){
|
||||
titleLabel.text = QXText(@"平台任务");
|
||||
}else{
|
||||
titleLabel.text = QXText(@"师徒任务");
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXDayTaskTypeModel *model = self.model.tasks[indexPath.section];
|
||||
QXDayTaskListModel *taskModel = model.task_list[indexPath.row];
|
||||
if ([taskModel.task_id isEqualToString:@"1"]) {
|
||||
QXSignInAppView *signView = [[QXSignInAppView alloc] init];
|
||||
[signView showInView:self.view];
|
||||
return;
|
||||
}
|
||||
[header addSubview:titleLabel];
|
||||
return header;
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
return 35;
|
||||
}
|
||||
-(UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
|
||||
UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-32, 35)];
|
||||
footer.backgroundColor = [UIColor clearColor];
|
||||
UIView *roundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-32, 25)];
|
||||
roundView.backgroundColor = [UIColor whiteColor];
|
||||
[roundView addRoundedCornersWithRadius:17.5 byRoundingCorners:(UIRectCornerBottomLeft|UIRectCornerBottomRight)];
|
||||
[footer addSubview:roundView];
|
||||
return footer;
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 35;
|
||||
}
|
||||
|
||||
-(UITableView *)tableView{
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(16, NavContentHeight, SCREEN_WIDTH-32, SCREEN_HEIGHT-NavContentHeight) style:(UITableViewStyleGrouped)];
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(16, self.topView.bottom+12, SCREEN_WIDTH-32, SCREEN_HEIGHT-self.topView.bottom-12) style:(UITableViewStylePlain)];
|
||||
_tableView.dataSource = self;
|
||||
_tableView.delegate = self;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
_tableView.rowHeight = 60;
|
||||
// _tableView.estimatedRowHeight = 60;
|
||||
_tableView.rowHeight = UITableViewAutomaticDimension;
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
if (@available(iOS 15.0, *)) {
|
||||
_tableView.sectionHeaderTopPadding = 0;
|
||||
@@ -160,3 +278,64 @@
|
||||
return _tableView;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation QXTaskTypeCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)setModel:(QXDayTaskTypeModel *)model{
|
||||
_model = model;
|
||||
[self.titleBtn setTitle:model.task_type_name forState:(UIControlStateNormal)];
|
||||
if (model.is_lock.intValue == 1) {
|
||||
[self.titleBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.bottom.equalTo(self);
|
||||
make.right.equalTo(self.lockImageBtn.mas_left);
|
||||
}];
|
||||
self.lockImageBtn.hidden = NO;
|
||||
}else{
|
||||
self.lockImageBtn.hidden = YES;
|
||||
[self.titleBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.bottom.equalTo(self);
|
||||
make.right.equalTo(self.lockImageBtn.mas_right);
|
||||
}];
|
||||
}
|
||||
if (model.isSelected) {
|
||||
self.titleBtn.selected = YES;
|
||||
self.lockImageBtn.selected = YES;
|
||||
}else{
|
||||
self.titleBtn.selected = NO;
|
||||
self.lockImageBtn.selected = NO;
|
||||
}
|
||||
}
|
||||
-(void)initSubviews{
|
||||
|
||||
self.lockImageBtn = [[UIButton alloc] init];
|
||||
[self.lockImageBtn setImage:[UIImage imageNamed:@"task_lock_icon_nor"] forState:(UIControlStateNormal)];
|
||||
[self.lockImageBtn setImage:[UIImage imageNamed:@"task_lock_icon_sel"] forState:(UIControlStateSelected)];
|
||||
[self addSubview:self.lockImageBtn];
|
||||
[self.lockImageBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(self);
|
||||
make.height.width.mas_equalTo(21);
|
||||
make.centerY.equalTo(self);
|
||||
}];
|
||||
self.lockImageBtn.userInteractionEnabled = NO;
|
||||
|
||||
self.titleBtn = [[UIButton alloc] init];
|
||||
[self.titleBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateSelected)];
|
||||
[self.titleBtn setTitleColor:RGB16A(0x000000,0.45) forState:(UIControlStateNormal)];
|
||||
self.titleBtn.titleLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
[self addSubview:self.titleBtn];
|
||||
[self.titleBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.bottom.equalTo(self);
|
||||
make.right.equalTo(self.lockImageBtn.mas_left);
|
||||
}];
|
||||
self.titleBtn.userInteractionEnabled = NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -323,10 +323,10 @@
|
||||
[QXMineNetwork postRealNameResultWithOrderNo:faceVerifyResult.orderNo successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
showToast(msg);
|
||||
}];
|
||||
}else{
|
||||
showToast(@"实名认证失败");
|
||||
showToast(@"人脸认证失败");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 盲盒信息
|
||||
@property(nonatomic,strong)NSArray <QXGiftBoxModel*>*gift_box_list;
|
||||
|
||||
@property(nonatomic,strong)QXDayTaskTypeModel*tasks;
|
||||
@property(nonatomic,strong)NSArray<QXDayTaskTypeModel*>* tasks;
|
||||
|
||||
@end
|
||||
|
||||
@@ -41,15 +41,21 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@end
|
||||
|
||||
@interface QXDayTaskTypeModel : NSObject
|
||||
/// 每日特殊任务2
|
||||
@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*daily_tasks_special;
|
||||
/// 每日常规任务
|
||||
@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*daily_tasks;
|
||||
/// 平台任务列表
|
||||
@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*usual_tasks;
|
||||
|
||||
@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*teacher_tasks;
|
||||
///// 每日特殊任务2
|
||||
//@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*daily_tasks_special;
|
||||
///// 每日常规任务
|
||||
//@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*daily_tasks;
|
||||
///// 平台任务列表
|
||||
//@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*usual_tasks;
|
||||
//
|
||||
//@property(nonatomic,strong)NSArray <QXDayTaskListModel*>*teacher_tasks;
|
||||
@property(nonatomic,strong)NSString *task_type_name;
|
||||
@property(nonatomic,strong)NSString *task_type_id;
|
||||
///1 锁 0 开
|
||||
@property(nonatomic,strong)NSString *is_lock;
|
||||
@property(nonatomic,strong)NSArray<QXDayTaskListModel*>*task_list;
|
||||
|
||||
@property(nonatomic,assign)BOOL isSelected;
|
||||
@end
|
||||
|
||||
@interface QXDayTaskListModel : NSObject
|
||||
@@ -76,7 +82,23 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 0 记录次数 1 计时
|
||||
@property(nonatomic,strong)NSString *is_time;
|
||||
/// 奖励类型 1金币 2钻石
|
||||
@property(nonatomic,strong)NSString *reward_type;
|
||||
//@property(nonatomic,strong)NSString *reward_type;
|
||||
/// 任务奖励
|
||||
@property(nonatomic,strong)NSString *reward_str;
|
||||
/**
|
||||
0 不跳转
|
||||
1 跳转实名
|
||||
2 跳转我的相册
|
||||
3 跳转绑定管理
|
||||
4 跳转房间
|
||||
5 跳转申请加入公会
|
||||
6 跳转充值
|
||||
7 签到
|
||||
*/
|
||||
@property(nonatomic,strong)NSString *jump_type;
|
||||
/// 徒弟user id
|
||||
@property(nonatomic,strong)NSString *student_id;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -89,4 +111,26 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic,strong)NSString *createtime;
|
||||
@end
|
||||
|
||||
@interface QXSignAppModel : NSObject
|
||||
/// 第几天
|
||||
@property(nonatomic,strong)NSString *day;
|
||||
/// 日期
|
||||
@property(nonatomic,strong)NSString *sign_in_date;
|
||||
/// 签到状态:1已签到 0未签到
|
||||
@property(nonatomic,strong)NSString *sign_in_status;
|
||||
/// 初级礼盒
|
||||
@property(nonatomic,strong)NSString *sign_in_status_str;
|
||||
/// 是否是当天 0否 1是
|
||||
@property(nonatomic,strong)NSString *is_today;
|
||||
/// 礼物名称
|
||||
@property(nonatomic,strong)NSString *gift_name;
|
||||
/// 数量
|
||||
@property(nonatomic,strong)NSString *num;
|
||||
/// 价格
|
||||
@property(nonatomic,strong)NSString *gift_price;
|
||||
/// 1金币 2礼物 3装扮 4钻石
|
||||
@property(nonatomic,strong)NSString *type;
|
||||
/// 礼物
|
||||
@property(nonatomic,strong)NSString *base_image;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
||||
return @{
|
||||
@"daily_tasks" : @"QXDayTaskListModel",
|
||||
@"usual_tasks" : @"QXDayTaskListModel",
|
||||
@"daily_tasks_special": @"QXDayTaskListModel",
|
||||
@"teacher_tasks": @"QXDayTaskListModel",
|
||||
@"task_list" : @"QXDayTaskListModel",
|
||||
// @"usual_tasks" : @"QXDayTaskListModel",
|
||||
// @"daily_tasks_special": @"QXDayTaskListModel",
|
||||
// @"teacher_tasks": @"QXDayTaskListModel",
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,4 +43,10 @@
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation QXSignAppModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -33,9 +33,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 是否为爵位礼物 0 打开 1 锁住
|
||||
@property (nonatomic,strong)NSString *is_lock;
|
||||
|
||||
/// 是否为爵位礼物 0 打开 1 锁住
|
||||
/// 是否为cp礼物 0 打开 1 锁住
|
||||
@property (nonatomic,strong)NSString *is_cp;
|
||||
|
||||
/// 是否为师徒标签
|
||||
@property (nonatomic,strong)NSString *is_teacher;
|
||||
|
||||
@property (nonatomic,assign)BOOL isSelected;
|
||||
@end
|
||||
|
||||
|
||||
@@ -16,6 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign)NSInteger type;
|
||||
|
||||
@property (nonatomic,strong)NSString* icon;
|
||||
|
||||
@property (nonatomic,strong)NSString* unreadNumber;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -516,6 +516,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
*/
|
||||
+(void)nextSongWithRoomId:(NSString*)room_id
|
||||
now_did:(NSString*)now_did
|
||||
is_auto_next:(NSString*)is_auto_next
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
@@ -947,6 +948,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
领取任务金币
|
||||
*/
|
||||
+(void)dayTaskDrawWithTaskId:(NSString*)task_id
|
||||
student_id:(NSString*)student_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
/**
|
||||
@@ -1394,7 +1396,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/**
|
||||
在线
|
||||
*/
|
||||
+(void)appKeepAliveWithRoomId:(NSString*)room_id;
|
||||
+(void)appKeepAliveWithRoomId:(NSString*)room_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
签约房间主持邀请上签约麦用户拒绝
|
||||
@@ -1402,6 +1406,39 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+(void)signRoomRefuseSignWithRoomId:(NSString*)roomId
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
每日任务跳转房间
|
||||
*/
|
||||
+(void)getRoomTaskJumpRoomWithTaskId:(NSString*)task_id
|
||||
successBlock:(void (^)(NSString* roomId))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
每日签到状态
|
||||
*/
|
||||
+(void)getAppSignTaskListSuccessBlock:(void (^)(NSArray<QXSignAppModel*>* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
每日签到
|
||||
*/
|
||||
+(void)appSignTaskSuccessBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
每日签到状态
|
||||
*/
|
||||
+(void)appSignTaskStatusSuccessBlock:(void (^)(NSString* status))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
每日任务未领取数量
|
||||
*/
|
||||
+(void)appTaskWaitDrawSuccessBlock:(void (^)(NSString* num))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -1052,10 +1052,11 @@
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
+(void)nextSongWithRoomId:(NSString *)room_id now_did:(NSString *)now_did successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
+(void)nextSongWithRoomId:(NSString *)room_id now_did:(NSString *)now_did is_auto_next:(NSString*)is_auto_next successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"room_id":room_id,
|
||||
@"now_did":now_did?now_did:@"",
|
||||
@"is_auto_next":is_auto_next?:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXRoomNextSong parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
@@ -1870,10 +1871,12 @@
|
||||
领取任务金币
|
||||
*/
|
||||
+(void)dayTaskDrawWithTaskId:(NSString*)task_id
|
||||
student_id:(NSString*)student_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"task_id":task_id?task_id:@""
|
||||
@"task_id":task_id?task_id:@"",
|
||||
@"student_id":student_id?:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXDayDrawTaskCoin parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
@@ -2802,11 +2805,15 @@
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)appKeepAliveWithRoomId:(NSString *)room_id{
|
||||
+(void)appKeepAliveWithRoomId:(NSString *)room_id
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXKeepAlive parameters:@{@"room_id":room_id?:@""} needCache:NO success:^(id responseObject) {
|
||||
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -2825,5 +2832,76 @@
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
每日任务跳转房间
|
||||
*/
|
||||
+(void)getRoomTaskJumpRoomWithTaskId:(NSString*)task_id
|
||||
successBlock:(void (^)(NSString* roomId))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXRoomTaskJumpRoom parameters:@{@"task_id":task_id?:@""} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSString *roomId = [NSString stringWithFormat:@"%@",responseObject[@"data"]];
|
||||
successBlock(roomId);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
/**
|
||||
每日签到状态
|
||||
*/
|
||||
+(void)getAppSignTaskListSuccessBlock:(void (^)(NSArray<QXSignAppModel*>* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXAppSignTask parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSArray *list = [NSArray yy_modelArrayWithClass:[QXSignAppModel class] json:responseObject[@"data"]];
|
||||
successBlock(list);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
每日签到
|
||||
*/
|
||||
+(void)appSignTaskSuccessBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXAppSign parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
/**
|
||||
每日签到状态
|
||||
*/
|
||||
+(void)appSignTaskStatusSuccessBlock:(void (^)(NSString* status))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXAppSignStatus parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSString *status = [NSString stringWithFormat:@"%@",responseObject[@"data"]];
|
||||
successBlock(status);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
每日任务未领取数量
|
||||
*/
|
||||
+(void)appTaskWaitDrawSuccessBlock:(void (^)(NSString* num))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXAppTaskWaitDraw parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSString *num = [NSString stringWithFormat:@"%@",responseObject[@"data"][@"num"]];
|
||||
successBlock(num);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -44,14 +44,16 @@ typedef NS_ENUM(NSInteger) {
|
||||
@property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate;
|
||||
@property (nonatomic,assign)BOOL isMore;
|
||||
@property (nonatomic,assign)BOOL singerIsAuth;
|
||||
@property (nonatomic,strong)NSString *taskNumber;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
@interface QXMineServiceSubCell : UICollectionViewCell
|
||||
@property (nonatomic,strong)UIImageView *imageView;
|
||||
@property (nonatomic,strong)UILabel *titleLabel;
|
||||
|
||||
@property (nonatomic,strong)UILabel *unreadLabel;
|
||||
@property (nonatomic,strong)QXServiceModel *model;
|
||||
@property (nonatomic,strong)NSString *unreadNum;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
@property (nonatomic,strong)QXServiceModel *inviteModel;
|
||||
@property (nonatomic,strong)QXServiceModel *singerAuthModel;
|
||||
@property (nonatomic,strong)QXServiceModel *songListModel;
|
||||
@property (nonatomic,strong)QXServiceModel *taskModel;
|
||||
@end
|
||||
|
||||
@implementation QXMineServiceCell
|
||||
@@ -145,6 +146,11 @@
|
||||
_singerIsAuth = singerIsAuth;
|
||||
|
||||
}
|
||||
-(void)setTaskNumber:(NSString *)taskNumber{
|
||||
_taskNumber = taskNumber;
|
||||
self.taskModel.unreadNumber = taskNumber;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.isMore?self.moreArray.count:self.serviceArray.count;
|
||||
}
|
||||
@@ -214,6 +220,7 @@
|
||||
md2.title = @"每日任务";
|
||||
md2.icon = @"service_task";
|
||||
md2.type = QXMineServiceTypeDayTask;
|
||||
self.taskModel = md2;
|
||||
|
||||
QXServiceModel *md3 = [[QXServiceModel alloc] init];
|
||||
md3.title = @"意见反馈";
|
||||
@@ -309,6 +316,13 @@
|
||||
_model = model;
|
||||
self.imageView.image = [UIImage imageNamed:model.icon];
|
||||
self.titleLabel.text = model.title;
|
||||
if (model.unreadNumber.integerValue <= 0) {
|
||||
self.unreadLabel.text = @"0";
|
||||
self.unreadLabel.hidden = YES;
|
||||
}else{
|
||||
self.unreadLabel.text = model.unreadNumber;
|
||||
self.unreadLabel.hidden = NO;
|
||||
}
|
||||
}
|
||||
-(void)initSubviews{
|
||||
UIImageView *imageView = [[UIImageView alloc] init];
|
||||
@@ -329,6 +343,32 @@
|
||||
make.centerX.equalTo(self.contentView);
|
||||
make.height.mas_equalTo(17);
|
||||
}];
|
||||
|
||||
self.unreadLabel = [[UILabel alloc] init];
|
||||
self.unreadLabel.font = [UIFont systemFontOfSize:10];
|
||||
self.unreadLabel.textAlignment = NSTextAlignmentCenter;
|
||||
// self.unreadLabel.text = @"99";
|
||||
self.unreadLabel.hidden = YES;
|
||||
self.unreadLabel.textColor = RGB16(0xffffff);
|
||||
self.unreadLabel.backgroundColor = RGB(255, 19, 55);
|
||||
[self.unreadLabel addRoundedCornersWithRadius:10];
|
||||
[self.contentView addSubview:self.unreadLabel];
|
||||
[self.unreadLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(0);
|
||||
make.right.mas_equalTo(-25);
|
||||
make.width.mas_equalTo(18);
|
||||
make.height.mas_equalTo(18);
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)setUnreadNum:(NSString *)unreadNum{
|
||||
_unreadNum = unreadNum;
|
||||
if (unreadNum.integerValue <= 0) {
|
||||
self.unreadLabel.text = @"0";
|
||||
self.unreadLabel.hidden = YES;
|
||||
}else{
|
||||
self.unreadLabel.text = unreadNum;
|
||||
self.unreadLabel.hidden = NO;
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -8,7 +8,13 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXDayTaskModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol QXDayTaskCellDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
-(void)didClickFinishTaskWithModel:(QXDayTaskListModel *)taskModel;
|
||||
|
||||
@end
|
||||
@interface QXDayTaskCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
|
||||
@@ -16,6 +22,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UIButton *finishBtn;
|
||||
|
||||
@property (strong, nonatomic) QXDayTaskListModel *model;
|
||||
|
||||
@property (weak, nonatomic) id<QXDayTaskCellDelegate>delegate;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
|
||||
@@ -21,15 +21,16 @@
|
||||
-(void)setModel:(QXDayTaskListModel *)model{
|
||||
_model = model;
|
||||
self.titleLabel.text = model.task_name;
|
||||
NSString*subTitle = @"";
|
||||
if (model.reward_type.intValue == 1) {
|
||||
subTitle = [NSString stringWithFormat:@"金币+%@",model.gold_reward];
|
||||
}else{
|
||||
subTitle = [NSString stringWithFormat:@"钻石+%@",model.gold_reward];
|
||||
}
|
||||
NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:subTitle];
|
||||
[attr yy_setColor:RGB16(0xFF8827) range:[subTitle rangeOfString:[NSString stringWithFormat:@"+%@",model.gold_reward]]];
|
||||
self.subTitleLabel.attributedText = attr;
|
||||
// NSString*subTitle = @"";
|
||||
// if (model.reward_type.intValue == 1) {
|
||||
// subTitle = [NSString stringWithFormat:@"金币+%@",model.gold_reward];
|
||||
// }else{
|
||||
// subTitle = [NSString stringWithFormat:@"钻石+%@",model.gold_reward];
|
||||
// }
|
||||
// NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:model.reward_str];
|
||||
// [attr yy_setColor:RGB16(0xFF8827) range:[subTitle rangeOfString:[NSString stringWithFormat:@"+%@",model.gold_reward]]];
|
||||
self.subTitleLabel.text = [model.reward_str isExist]?model.reward_str:@" ";
|
||||
[self.finishBtn setTitle:model.task_type_str forState:(UIControlStateNormal)];
|
||||
[self.iconImageView sd_setImageWithURL:[NSURL URLWithString:model.icon]];
|
||||
if (model.task_status.intValue == 1) {
|
||||
self.finishBtn.enabled = YES;
|
||||
@@ -46,38 +47,21 @@
|
||||
}
|
||||
}
|
||||
- (IBAction)finishAction:(id)sender {
|
||||
if (self.model.task_status.intValue == 1) {
|
||||
if (self.model.task_id.intValue == 9 || self.model.task_id.intValue == 10) {
|
||||
QXGlobal.shareGlobal.taskModel = self.model;
|
||||
if ([[QXGlobal shareGlobal].roomId isEqualToString:self.model.from_id]) {
|
||||
[[QXGlobal shareGlobal] popToRoomViewController];
|
||||
}
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:self.model.from_id isRejoin:NO navagationController:self.viewController.navigationController];
|
||||
}
|
||||
}else if (self.model.task_status.intValue == 2) {
|
||||
MJWeakSelf
|
||||
[QXMineNetwork dayTaskDrawWithTaskId:self.model.task_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"领取成功");
|
||||
weakSelf.model.task_status = @"3";
|
||||
weakSelf.finishBtn.selected = NO;
|
||||
weakSelf.finishBtn.enabled = NO;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickFinishTaskWithModel:)]) {
|
||||
[self.delegate didClickFinishTaskWithModel:self.model];
|
||||
}
|
||||
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
[self.finishBtn addRoundedCornersWithRadius:15];
|
||||
[self.finishBtn setTitleColor:RGB16(0xC134EE) forState:(UIControlStateNormal)];
|
||||
[self.finishBtn setTitleColor:RGB16(0x3ABC6D) forState:(UIControlStateNormal)];
|
||||
[self.finishBtn setTitleColor:UIColor.whiteColor forState:(UIControlStateSelected)];
|
||||
[self.finishBtn setTitleColor:RGB16(0x666666) forState:(UIControlStateDisabled)];
|
||||
[self.finishBtn setBackgroundImage:[UIImage imageWithColor:RGB16(0xC134EE)] forState:(UIControlStateSelected)];
|
||||
[self.finishBtn setBackgroundImage:[UIImage imageWithColor:RGB16(0x3ABC6D)] forState:(UIControlStateSelected)];
|
||||
[self.finishBtn setBackgroundImage:[UIImage imageWithColor:UIColor.clearColor] forState:(UIControlStateNormal)];
|
||||
[self.finishBtn setBackgroundImage:[UIImage imageWithColor:RGB16(0xF1F2F3)] forState:(UIControlStateDisabled)];
|
||||
self.finishBtn.layer.borderColor = RGB16(0xC134EE).CGColor;
|
||||
self.finishBtn.layer.borderColor = RGB16(0x3ABC6D).CGColor;
|
||||
self.finishBtn.layer.borderWidth = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="108" id="KGk-i7-Jjw" customClass="QXDayTaskCell">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="108" id="KGk-i7-Jjw" customClass="QXDayTaskCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="481" height="108"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
@@ -18,23 +18,23 @@
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Zzf-Hx-7yu">
|
||||
<rect key="frame" x="16" y="34" width="40" height="40"/>
|
||||
<rect key="frame" x="16" y="9" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="Xua-MB-4nn"/>
|
||||
<constraint firstAttribute="width" constant="40" id="e6m-v0-EYD"/>
|
||||
<constraint firstAttribute="width" constant="40" id="Nup-9v-MxR"/>
|
||||
<constraint firstAttribute="height" constant="40" id="w2p-VE-pN3"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gZv-uE-Dy3">
|
||||
<rect key="frame" x="62" y="34" width="333" height="17"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gZv-uE-Dy3">
|
||||
<rect key="frame" x="62" y="9" width="333" height="69"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bni-4p-6Qt">
|
||||
<rect key="frame" x="405" y="39" width="60" height="30"/>
|
||||
<rect key="frame" x="405" y="14" width="60" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="NYX-5D-Uw8"/>
|
||||
<constraint firstAttribute="width" constant="60" id="afU-OP-XMX"/>
|
||||
<constraint firstAttribute="height" constant="30" id="AVT-S0-Yru"/>
|
||||
<constraint firstAttribute="width" constant="60" id="UW1-Ri-uwx"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
@@ -47,30 +47,29 @@
|
||||
<action selector="finishAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="O2a-NK-IEM"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eqP-bF-SEp">
|
||||
<rect key="frame" x="62" y="57" width="333" height="17"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eqP-bF-SEp">
|
||||
<rect key="frame" x="62" y="83" width="333" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="textColor" red="0.88627450980392153" green="0.25490196078431371" blue="0.44313725490196076" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="gZv-uE-Dy3" firstAttribute="leading" secondItem="Zzf-Hx-7yu" secondAttribute="trailing" constant="6" id="0aO-hG-r1W"/>
|
||||
<constraint firstItem="bni-4p-6Qt" firstAttribute="leading" secondItem="gZv-uE-Dy3" secondAttribute="trailing" constant="10" id="83a-aB-YJD"/>
|
||||
<constraint firstItem="eqP-bF-SEp" firstAttribute="bottom" secondItem="Zzf-Hx-7yu" secondAttribute="bottom" id="HP4-ka-VMG"/>
|
||||
<constraint firstItem="eqP-bF-SEp" firstAttribute="leading" secondItem="gZv-uE-Dy3" secondAttribute="leading" id="MeK-CK-V0P"/>
|
||||
<constraint firstItem="Zzf-Hx-7yu" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="aGe-7f-yAi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bni-4p-6Qt" secondAttribute="trailing" constant="16" id="crV-1Z-BmV"/>
|
||||
<constraint firstItem="gZv-uE-Dy3" firstAttribute="top" secondItem="Zzf-Hx-7yu" secondAttribute="top" id="itH-bd-9ay"/>
|
||||
<constraint firstItem="bni-4p-6Qt" firstAttribute="leading" secondItem="eqP-bF-SEp" secondAttribute="trailing" constant="10" id="poY-hN-bRh"/>
|
||||
<constraint firstItem="Zzf-Hx-7yu" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="y6a-e4-hfz"/>
|
||||
<constraint firstItem="bni-4p-6Qt" firstAttribute="centerY" secondItem="Zzf-Hx-7yu" secondAttribute="centerY" id="0rH-Y7-jwf"/>
|
||||
<constraint firstItem="gZv-uE-Dy3" firstAttribute="leading" secondItem="Zzf-Hx-7yu" secondAttribute="trailing" constant="6" id="2nM-DG-Grg"/>
|
||||
<constraint firstItem="bni-4p-6Qt" firstAttribute="leading" secondItem="eqP-bF-SEp" secondAttribute="trailing" constant="10" id="ANm-2o-d67"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bni-4p-6Qt" secondAttribute="trailing" constant="16" id="FGd-NP-Bud"/>
|
||||
<constraint firstItem="eqP-bF-SEp" firstAttribute="top" secondItem="gZv-uE-Dy3" secondAttribute="bottom" constant="5" id="Ftb-vc-ugs"/>
|
||||
<constraint firstItem="Zzf-Hx-7yu" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="9" id="JNo-Ml-0Uf"/>
|
||||
<constraint firstItem="Zzf-Hx-7yu" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="LJ1-Ut-byU"/>
|
||||
<constraint firstItem="bni-4p-6Qt" firstAttribute="leading" secondItem="gZv-uE-Dy3" secondAttribute="trailing" constant="10" id="XUO-fj-17G"/>
|
||||
<constraint firstAttribute="bottom" secondItem="eqP-bF-SEp" secondAttribute="bottom" constant="8" id="iSn-GZ-hix"/>
|
||||
<constraint firstItem="gZv-uE-Dy3" firstAttribute="top" secondItem="Zzf-Hx-7yu" secondAttribute="top" id="mgj-C7-FFs"/>
|
||||
<constraint firstItem="eqP-bF-SEp" firstAttribute="leading" secondItem="gZv-uE-Dy3" secondAttribute="leading" id="qVo-gN-l0W"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<constraints>
|
||||
<constraint firstItem="bni-4p-6Qt" firstAttribute="centerY" secondItem="aW0-zy-SZf" secondAttribute="centerY" id="IM5-xV-Df6"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="finishBtn" destination="bni-4p-6Qt" id="K8I-ow-9Uv"/>
|
||||
<outlet property="iconImageView" destination="Zzf-Hx-7yu" id="D8z-6l-i8N"/>
|
||||
|
||||
39
QXLive/Mine(音域)/View/每日任务/QXSignInAppView.h
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// QXSignInAppView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/12/11.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXSignInAppView : UIView
|
||||
@property (nonatomic,copy)void(^cancelBlock)(void);
|
||||
-(void)showInView:(UIView *)view;
|
||||
|
||||
-(void)hide;
|
||||
|
||||
@end
|
||||
|
||||
@interface QXSignInAppSubView : UIView
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
@property (nonatomic,strong)UILabel *dayLabel;
|
||||
@property (nonatomic,strong)UILabel *dayTitleLabel;
|
||||
@property (nonatomic,strong)UIImageView *statusImageView;
|
||||
@property (nonatomic,strong)UIImageView *giftImageView;
|
||||
@property (nonatomic,strong)UILabel *giftNameLabel;
|
||||
@property (nonatomic,strong)QXSignAppModel *model;
|
||||
@end
|
||||
|
||||
|
||||
@interface QXSignInAppResultView : UIView
|
||||
@property (nonatomic,strong)UIImageView *giftImageView;
|
||||
@property (nonatomic,strong)UILabel *giftNameLabel;
|
||||
@property (nonatomic,strong)QXSignAppModel *model;
|
||||
@property (nonatomic,strong)UIButton *happyBtn;
|
||||
@property (nonatomic,copy)void(^happyBlock)(void);
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
407
QXLive/Mine(音域)/View/每日任务/QXSignInAppView.m
Normal file
@@ -0,0 +1,407 @@
|
||||
//
|
||||
// QXSignInAppView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/12/11.
|
||||
//
|
||||
|
||||
#import "QXSignInAppView.h"
|
||||
#import "QXMineNetwork.h"
|
||||
@interface QXSignInAppView()
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UIImageView *bgImageView;
|
||||
@property (nonatomic,strong)QXSignInAppSubView *signView1;
|
||||
@property (nonatomic,strong)QXSignInAppSubView *signView2;
|
||||
@property (nonatomic,strong)QXSignInAppSubView *signView3;
|
||||
@property (nonatomic,strong)QXSignInAppSubView *signView4;
|
||||
@property (nonatomic,strong)QXSignInAppSubView *signView5;
|
||||
@property (nonatomic,strong)QXSignInAppSubView *signView6;
|
||||
@property (nonatomic,strong)QXSignInAppSubView *signView7;
|
||||
@property (nonatomic,strong)NSMutableArray *signViewArray;
|
||||
|
||||
@property (nonatomic,strong)UIButton *signBtn;
|
||||
@property (nonatomic,strong)UIButton *closeBtn;
|
||||
|
||||
@property (nonatomic,strong)QXSignAppModel*todayModel;
|
||||
|
||||
@property (nonatomic,strong)QXSignInAppResultView *resultView;
|
||||
@end
|
||||
@implementation QXSignInAppView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.3];
|
||||
|
||||
self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.5];
|
||||
self.bgView = [[UIView alloc] initWithFrame:CGRectMake((SCREEN_WIDTH-ScaleWidth(331))/2.0, -self.height, ScaleWidth(331), ScaleWidth(446)+50)];
|
||||
// self.bgView.backgroundColor = [UIColor whiteColor];
|
||||
self.bgView.layer.masksToBounds = YES;
|
||||
self.bgView.layer.cornerRadius = 16;
|
||||
[self addSubview:self.bgView];
|
||||
|
||||
|
||||
self.bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"app_sign_task_bg"]];
|
||||
[self.bgView addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.equalTo(self.bgView);
|
||||
make.height.mas_equalTo(ScaleWidth(446));
|
||||
}];
|
||||
|
||||
self.signView1 = [[QXSignInAppSubView alloc] init];
|
||||
[self.signView1 addRoundedCornersWithRadius:4];
|
||||
[self.bgView addSubview:self.signView1];
|
||||
|
||||
self.signView2 = [[QXSignInAppSubView alloc] init];
|
||||
[self.signView2 addRoundedCornersWithRadius:4];
|
||||
[self.bgView addSubview:self.signView2];
|
||||
|
||||
self.signView3 = [[QXSignInAppSubView alloc] init];
|
||||
[self.signView3 addRoundedCornersWithRadius:4];
|
||||
[self.bgView addSubview:self.signView3];
|
||||
|
||||
self.signView4 = [[QXSignInAppSubView alloc] init];
|
||||
[self.signView4 addRoundedCornersWithRadius:4];
|
||||
[self.bgView addSubview:self.signView4];
|
||||
|
||||
self.signView5 = [[QXSignInAppSubView alloc] init];
|
||||
[self.signView5 addRoundedCornersWithRadius:4];
|
||||
[self.bgView addSubview:self.signView5];
|
||||
|
||||
self.signView6 = [[QXSignInAppSubView alloc] init];
|
||||
[self.signView6 addRoundedCornersWithRadius:4];
|
||||
[self.bgView addSubview:self.signView6];
|
||||
|
||||
self.signView7 = [[QXSignInAppSubView alloc] init];
|
||||
[self.signView7 addRoundedCornersWithRadius:4];
|
||||
[self.bgView addSubview:self.signView7];
|
||||
|
||||
|
||||
CGFloat leftMargin = ScaleWidth(22);
|
||||
CGFloat itemSpace = ScaleWidth(6);
|
||||
CGFloat itemWidth = (self.bgView.width - leftMargin*2 - itemSpace*3)/4;
|
||||
CGFloat itemHeight = ScaleWidth(88);
|
||||
[self.signView1 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(leftMargin);
|
||||
make.width.mas_equalTo(itemWidth);
|
||||
make.height.mas_equalTo(itemHeight);
|
||||
make.top.mas_equalTo(ScaleWidth(168));
|
||||
}];
|
||||
|
||||
[self.signView2 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.signView1);
|
||||
make.left.equalTo(self.signView1.mas_right).offset(itemSpace);
|
||||
make.width.mas_equalTo(itemWidth);
|
||||
make.height.mas_equalTo(itemHeight);
|
||||
}];
|
||||
|
||||
|
||||
[self.signView3 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.signView1);
|
||||
make.left.equalTo(self.signView2.mas_right).offset(itemSpace);
|
||||
make.width.mas_equalTo(itemWidth);
|
||||
make.height.mas_equalTo(itemHeight);
|
||||
}];
|
||||
|
||||
|
||||
[self.signView4 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.signView1);
|
||||
make.left.equalTo(self.signView3.mas_right).offset(itemSpace);
|
||||
make.width.mas_equalTo(itemWidth);
|
||||
make.height.mas_equalTo(itemHeight);
|
||||
}];
|
||||
|
||||
|
||||
[self.signView5 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.signView1.mas_bottom).offset(ScaleWidth(10));
|
||||
make.left.equalTo(self.signView1);
|
||||
make.width.mas_equalTo(itemWidth);
|
||||
make.height.mas_equalTo(itemHeight);
|
||||
}];
|
||||
|
||||
[self.signView6 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.signView5);
|
||||
make.left.equalTo(self.signView5.mas_right).offset(itemSpace);
|
||||
make.width.mas_equalTo(itemWidth);
|
||||
make.height.mas_equalTo(itemHeight);
|
||||
}];
|
||||
|
||||
[self.signView7 mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.signView5);
|
||||
make.left.equalTo(self.signView6.mas_right).offset(itemSpace);
|
||||
make.right.mas_equalTo(-leftMargin);
|
||||
make.height.mas_equalTo(itemHeight);
|
||||
}];
|
||||
|
||||
[self.signViewArray addObject:self.signView1];
|
||||
[self.signViewArray addObject:self.signView2];
|
||||
[self.signViewArray addObject:self.signView3];
|
||||
[self.signViewArray addObject:self.signView4];
|
||||
[self.signViewArray addObject:self.signView5];
|
||||
[self.signViewArray addObject:self.signView6];
|
||||
[self.signViewArray addObject:self.signView7];
|
||||
|
||||
self.signBtn = [[UIButton alloc] init];
|
||||
[self.signBtn setBackgroundImage:[UIImage imageNamed:@"sign_app_btn_bg"] forState:(UIControlStateNormal)];
|
||||
[self.signBtn setBackgroundImage:[UIImage imageWithColor:RGB16(0x999999)] forState:(UIControlStateDisabled)];
|
||||
[self.signBtn setTitle:@"立即签到" forState:(UIControlStateNormal)];
|
||||
[self.signBtn setTitle:@"已签到" forState:(UIControlStateDisabled)];
|
||||
[self.signBtn addTarget:self action:@selector(signAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.signBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
|
||||
[self.signBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)];
|
||||
[self.signBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateDisabled)];
|
||||
[self.signBtn addRoundedCornersWithRadius:25];
|
||||
[self.bgView addSubview:self.signBtn];
|
||||
[self.signBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(ScaleWidth(257));
|
||||
make.height.mas_equalTo(50);
|
||||
make.centerX.equalTo(self.bgView);
|
||||
make.bottom.equalTo(self.bgImageView.mas_bottom).offset(-ScaleWidth(20));
|
||||
}];
|
||||
|
||||
|
||||
self.closeBtn = [[UIButton alloc] init];
|
||||
[self.closeBtn setBackgroundImage:[UIImage imageNamed:@"home_white_close"] forState:(UIControlStateNormal)];
|
||||
[self.closeBtn addTarget:self action:@selector(closeAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.bgView addSubview:self.closeBtn];
|
||||
[self.closeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(35);
|
||||
make.height.mas_equalTo(35);
|
||||
make.centerX.equalTo(self.bgView);
|
||||
make.bottom.equalTo(self.bgView);
|
||||
}];
|
||||
|
||||
[self addSubview:self.resultView];
|
||||
self.resultView.hidden = YES;
|
||||
[self.resultView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.equalTo(self.signView1);
|
||||
make.right.equalTo(self.signView4);
|
||||
make.bottom.equalTo(self.signBtn);
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)signAction{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork appSignTaskSuccessBlock:^(NSDictionary * _Nonnull dict) {
|
||||
weakSelf.resultView.hidden = NO;
|
||||
[weakSelf getSignTaskList];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
-(void)getSignTaskList{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getAppSignTaskListSuccessBlock:^(NSArray<QXSignAppModel *> * _Nonnull list) {
|
||||
if (list.count == weakSelf.signViewArray.count) {
|
||||
for (int i = 0;i < list.count; i++) {
|
||||
QXSignAppModel*md = list[i];
|
||||
QXSignInAppSubView *signView = weakSelf.signViewArray[i];
|
||||
signView.model = md;
|
||||
if (md.is_today.intValue == 1) {
|
||||
weakSelf.todayModel = md;
|
||||
weakSelf.resultView.model = weakSelf.todayModel;
|
||||
if (md.sign_in_status.intValue == 1) {
|
||||
weakSelf.signBtn.enabled = NO;
|
||||
}else{
|
||||
weakSelf.signBtn.enabled = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)closeAction{
|
||||
if (self.cancelBlock) {
|
||||
self.cancelBlock();
|
||||
}
|
||||
[self hide];
|
||||
}
|
||||
-(void)showInView:(UIView *)view{
|
||||
[self getSignTaskList];
|
||||
[view addSubview:self];
|
||||
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:1.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
self.bgView.y = (SCREEN_HEIGHT-ScaleWidth(446))/2.0-60;
|
||||
} completion:^(BOOL finished) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)hide{
|
||||
[UIView animateWithDuration:0.3 delay:0 usingSpringWithDamping:0.5 initialSpringVelocity:1.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
self.bgView.y = SCREEN_HEIGHT;
|
||||
} completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
|
||||
-(NSMutableArray *)signViewArray{
|
||||
if (!_signViewArray) {
|
||||
_signViewArray = [NSMutableArray array];
|
||||
}
|
||||
return _signViewArray;
|
||||
}
|
||||
-(QXSignInAppResultView *)resultView{
|
||||
if (!_resultView) {
|
||||
_resultView = [[QXSignInAppResultView alloc] init];
|
||||
MJWeakSelf
|
||||
_resultView.happyBlock = ^{
|
||||
[weakSelf closeAction];
|
||||
};
|
||||
}
|
||||
return _resultView;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXSignInAppSubView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)setModel:(QXSignAppModel *)model{
|
||||
_model = model;
|
||||
self.dayLabel.text = model.day;
|
||||
if (model.sign_in_status.intValue == 1) {
|
||||
self.statusImageView.hidden = NO;
|
||||
self.statusImageView.image = [UIImage imageNamed:@"app_sign_drawed"];
|
||||
self.alpha = 0.5;
|
||||
}else{
|
||||
self.statusImageView.hidden = YES;
|
||||
self.alpha = 1;
|
||||
}
|
||||
self.giftNameLabel.text = [NSString stringWithFormat:@"%@%@",model.gift_name,model.num];
|
||||
[self.giftImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.bgImageView = [[UIImageView alloc] init];
|
||||
self.bgImageView.backgroundColor = RGB16(0xD3FFC8);
|
||||
[self addSubview:self.bgImageView];
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self);
|
||||
}];
|
||||
|
||||
self.dayLabel = [[UILabel alloc] init];
|
||||
self.dayLabel.textColor = RGB16(0xFFC273);
|
||||
self.dayLabel.font = [UIFont fontWithName:@"YouSheBiaoTiHei" size:32];
|
||||
[self addSubview:self.dayLabel];
|
||||
[self.dayLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self).offset(-5);
|
||||
make.left.mas_equalTo(5);
|
||||
}];
|
||||
|
||||
|
||||
self.dayTitleLabel = [[UILabel alloc] init];
|
||||
self.dayTitleLabel.textColor = RGB16(0xFFC273);
|
||||
self.dayTitleLabel.font = [UIFont systemFontOfSize:12];
|
||||
self.dayTitleLabel.text = @"DAY";
|
||||
[self addSubview:self.dayTitleLabel];
|
||||
[self.dayTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self).offset(10);
|
||||
make.left.equalTo(self.dayLabel.mas_right).offset(3);
|
||||
}];
|
||||
|
||||
self.giftImageView = [[UIImageView alloc] init];
|
||||
self.giftImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self addSubview:self.giftImageView];
|
||||
[self.giftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(38);
|
||||
make.centerX.centerY.equalTo(self);
|
||||
}];
|
||||
|
||||
self.giftNameLabel = [[UILabel alloc] init];
|
||||
self.giftNameLabel.textColor = RGB16(0x999999);
|
||||
self.giftNameLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.giftNameLabel.font = [UIFont systemFontOfSize:12];
|
||||
self.giftNameLabel.lineBreakMode = NSLineBreakByTruncatingMiddle;
|
||||
[self addSubview:self.giftNameLabel];
|
||||
[self.giftNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.equalTo(self);
|
||||
make.bottom.mas_equalTo(-6);
|
||||
}];
|
||||
|
||||
self.statusImageView = [[UIImageView alloc] init];
|
||||
[self addSubview:self.statusImageView];
|
||||
[self.statusImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(ScaleWidth(32));
|
||||
make.centerX.centerY.equalTo(self);
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXSignInAppResultView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)setModel:(QXSignAppModel *)model{
|
||||
_model = model;
|
||||
[self.giftImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
self.giftNameLabel.text = [NSString stringWithFormat:@"签到成功 %@%@",model.gift_name,model.num];
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.backgroundColor =RGB16(0xffffff);
|
||||
self.giftImageView = [[UIImageView alloc] init];
|
||||
self.giftImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self addSubview:self.giftImageView];
|
||||
[self.giftImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.height.mas_equalTo(80);
|
||||
make.centerX.equalTo(self);
|
||||
make.top.mas_equalTo(40);
|
||||
}];
|
||||
|
||||
self.giftNameLabel = [[UILabel alloc] init];
|
||||
self.giftNameLabel.font = [UIFont systemFontOfSize:14.f];
|
||||
self.giftNameLabel.textColor = QXConfig.themeColor;
|
||||
[self addSubview:self.giftNameLabel];
|
||||
[self.giftNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(self);
|
||||
make.top.equalTo(self.giftImageView.mas_bottom).offset(20);
|
||||
}];
|
||||
|
||||
self.happyBtn = [[UIButton alloc] init];
|
||||
[self.happyBtn setBackgroundImage:[UIImage imageNamed:@"sign_app_btn_bg"] forState:(UIControlStateNormal)];
|
||||
[self.happyBtn setTitle:@"开心收下" forState:(UIControlStateNormal)];
|
||||
[self.happyBtn addTarget:self action:@selector(happyAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.happyBtn.titleLabel.font = [UIFont boldSystemFontOfSize:14];
|
||||
[self.happyBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)];
|
||||
[self.happyBtn addRoundedCornersWithRadius:25];
|
||||
[self addSubview:self.happyBtn];
|
||||
[self.happyBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(ScaleWidth(257));
|
||||
make.height.mas_equalTo(50);
|
||||
make.centerX.equalTo(self);
|
||||
make.bottom.equalTo(self);
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)happyAction{
|
||||
if (self.happyBlock) {
|
||||
self.happyBlock();
|
||||
}
|
||||
}
|
||||
@end
|
||||
@@ -139,7 +139,7 @@
|
||||
[QXLoginNetwork getSmscodeWithMobile:[QXGlobal shareGlobal].loginModel.mobile type:type successBlock:^(id _Nonnull responseObject) {
|
||||
[weakSelf.codeTextField startTimeDown];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -289,6 +289,10 @@
|
||||
}
|
||||
}
|
||||
-(void)popInviteWithModel:(QXRoomListModel*)model{
|
||||
QXRoomNavigationController*na = (QXRoomNavigationController*)KEYWINDOW.rootViewController;
|
||||
if ([na.visibleViewController isKindOfClass:[QXAlertViewController class]]) {
|
||||
return;
|
||||
}
|
||||
__block QXRoomListModel *roomModel = model;
|
||||
QXInvitePopView *view = [[QXInvitePopView alloc] init];
|
||||
view.model = model;
|
||||
|
||||
22
QXLive/Other/Assets.xcassets/mine/app_sign_drawed.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_sign_drawed@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_sign_drawed@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/mine/app_sign_drawed.imageset/app_sign_drawed@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
QXLive/Other/Assets.xcassets/mine/app_sign_drawed.imageset/app_sign_drawed@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 8.2 KiB |
21
QXLive/Other/Assets.xcassets/mine/app_sign_task_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "app_sign_task_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/mine/app_sign_task_bg.imageset/app_sign_task_bg@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 5.8 KiB |
22
QXLive/Other/Assets.xcassets/mine/sign_app_btn_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "sign_app_btn_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "sign_app_btn_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/mine/sign_app_btn_bg.imageset/sign_app_btn_bg@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
QXLive/Other/Assets.xcassets/mine/sign_app_btn_bg.imageset/sign_app_btn_bg@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 142 KiB |
21
QXLive/Other/Assets.xcassets/mine/task_cp_no_data.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "task_cp_no_data@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/mine/task_cp_no_data.imageset/task_cp_no_data@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 565 KiB |
22
QXLive/Other/Assets.xcassets/mine/task_lock_icon_nor.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "task_lock_icon_nor@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "task_lock_icon_nor@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/mine/task_lock_icon_nor.imageset/task_lock_icon_nor@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
QXLive/Other/Assets.xcassets/mine/task_lock_icon_nor.imageset/task_lock_icon_nor@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
22
QXLive/Other/Assets.xcassets/mine/task_lock_icon_sel.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "task_lock_icon_sel@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "task_lock_icon_sel@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/mine/task_lock_icon_sel.imageset/task_lock_icon_sel@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
QXLive/Other/Assets.xcassets/mine/task_lock_icon_sel.imageset/task_lock_icon_sel@3x.png
vendored
Normal file
|
After Width: | Height: | Size: 7.5 KiB |
21
QXLive/Other/Assets.xcassets/mine/task_master_no_data.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "task_master_no_data@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
QXLive/Other/Assets.xcassets/mine/task_master_no_data.imageset/task_master_no_data@2x.png
vendored
Normal file
|
After Width: | Height: | Size: 551 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 42 KiB |
22
QXLive/Other/Assets.xcassets/room/room_gift_teacher_boom_tag_icon.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_gift_teacher_boom_tag_icon@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "room_gift_teacher_boom_tag_icon@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 10 KiB |
@@ -411,15 +411,15 @@ static NSString * QXBagOutcomeList = @"api/UserGiftPack/get_gift_pack_outcome";
|
||||
|
||||
|
||||
/// 每日任务列表
|
||||
static NSString * QXDayTaskList = @"api/Dailytasks/dailyTasksList";
|
||||
static NSString * QXDayTaskList = @"api/Tasks/dailyTasksList";
|
||||
/// 开启礼盒
|
||||
static NSString * QXDayTaskOpenGift = @"api/Dailytasks/dailyTasksOpenBox";
|
||||
static NSString * QXDayTaskOpenGift = @"api/Tasks/dailyTasksOpenBox";
|
||||
/// 完成每日任务
|
||||
static NSString * QXDayTaskFinished = @"api/Dailytasks/dailyTasksComplete";
|
||||
static NSString * QXDayTaskFinished = @"api/Tasks/dailyTasksComplete";
|
||||
/// 领取每日任务金币奖励
|
||||
static NSString * QXDayDrawTaskCoin = @"api/Dailytasks/dailyTasksReceive";
|
||||
static NSString * QXDayDrawTaskCoin = @"api/Tasks/dailyTasksReceive";
|
||||
/// 礼盒记录
|
||||
static NSString * QXDayGiftBoxRecord = @"api/Dailytasks/dailyTasksBoxRecord";
|
||||
static NSString * QXDayGiftBoxRecord = @"api/Tasks/dailyTasksBoxRecord";
|
||||
/// 置顶关系
|
||||
static NSString * QXTopRelationCard = @"api/Room/top_relation_card";
|
||||
/// 删除关系
|
||||
@@ -552,5 +552,14 @@ static NSString * QXSignDelaySign = @"api/Sign/sign_delay";
|
||||
|
||||
/// 心跳
|
||||
static NSString * QXKeepAlive = @"api/Xintiao/keep_room_heartbeat";
|
||||
|
||||
/// 师徒任务
|
||||
static NSString * QXRoomTaskJumpRoom = @"api/Room/task_jump_room";
|
||||
/// 每日签到状态
|
||||
static NSString * QXAppSignTask = @"api/Tasks/dailyTasksSignList";
|
||||
/// 每日签到
|
||||
static NSString * QXAppSign = @"api/Tasks/dailyTasksSign";
|
||||
/// 每日签到
|
||||
static NSString * QXAppSignStatus = @"api/Tasks/dailyTasksSignStatus";
|
||||
/// 每日任务未领取数量
|
||||
static NSString * QXAppTaskWaitDraw = @"api/Tasks/dailyTasksUnReceiveCount";
|
||||
#endif /* Api_h */
|
||||
|
||||
@@ -86,6 +86,8 @@
|
||||
QXRoomViewController *roomVc = [[QXRoomViewController alloc] init];
|
||||
roomVc.roomId = QXGlobal.shareGlobal.superRoomId;
|
||||
[viewControllers insertObject:roomVc atIndex:i];
|
||||
QXGlobal.shareGlobal.roomVC = roomVc;
|
||||
QXGlobal.shareGlobal.roomId = roomVc.roomId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)QXTimePraizeView *timeView;
|
||||
/// 巡乐会
|
||||
@property (nonatomic,strong)QXMeetActivityView *meetView;
|
||||
/// 任务待领取数量
|
||||
@property (nonatomic,strong)NSString *taskWaitDrawNum;
|
||||
-(void)configBottomTools;
|
||||
-(void)stopHWDMP4;
|
||||
-(void)playHWDMP4;
|
||||
|
||||
@@ -105,10 +105,6 @@ QXRoomUserInfoViewDelegate
|
||||
[QXGlobal.shareGlobal startKeepAlive];
|
||||
// [self performSelector:@selector(test) afterDelay:5];
|
||||
}
|
||||
//-(void)test{
|
||||
// [self roomPKRecieveLoserWantToRunRoadWithUserInfo:nil];
|
||||
//27b36h
|
||||
//}
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
@@ -155,6 +151,7 @@ QXRoomUserInfoViewDelegate
|
||||
});
|
||||
self.navigationController.viewControllers = marr;
|
||||
// self.navigationController.interactivePopGestureRecognizer.enabled = NO;
|
||||
[self getTaskCount];
|
||||
}
|
||||
-(void)viewDidDisappear:(BOOL)animated{
|
||||
[super viewDidDisappear:animated];
|
||||
@@ -301,20 +298,28 @@ QXRoomUserInfoViewDelegate
|
||||
|
||||
}];
|
||||
}
|
||||
-(void)getTaskCount{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork appTaskWaitDrawSuccessBlock:^(NSString * _Nonnull num) {
|
||||
[weakSelf setTaskWaitDrawNum:num];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
#pragma mark - 获取房间信息
|
||||
-(void)joinRoom{
|
||||
MJWeakSelf
|
||||
if (self.roomModel) {
|
||||
[self resetSubviews];
|
||||
[self configRoomDataIsJoin:YES];
|
||||
}else{
|
||||
MJWeakSelf
|
||||
[[QXRoomMessageManager shared] joinGroupWithRoomId:self.roomId];
|
||||
QXGlobal.shareGlobal.roomId = self.roomId;
|
||||
QXGlobal.shareGlobal.roomVC = self;
|
||||
[QXMineNetwork joinRoomWithRoomId:self.roomId successBlock:^(QXRoomModel * _Nonnull roomModel) {
|
||||
weakSelf.roomModel = roomModel;
|
||||
[self resetSubviews];
|
||||
[self configRoomDataIsJoin:YES];
|
||||
[weakSelf resetSubviews];
|
||||
[weakSelf configRoomDataIsJoin:YES];
|
||||
} roomErrorBlock:^(NSString * _Nonnull roomId, NSString * _Nonnull msg) {
|
||||
|
||||
}failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
@@ -2134,5 +2139,10 @@ QXRoomUserInfoViewDelegate
|
||||
}
|
||||
return _dayTaskTagView;
|
||||
}
|
||||
|
||||
-(void)setTaskWaitDrawNum:(NSString *)taskWaitDrawNum{
|
||||
_taskWaitDrawNum = taskWaitDrawNum;
|
||||
self.dayTaskTagView.unreadNum = taskWaitDrawNum;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@@ -202,7 +202,22 @@ NSInteger maxMessageCount = 20;
|
||||
// [self.giftArray removeFirstObject];
|
||||
// }
|
||||
#if DEBUG
|
||||
if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem || model.messageType == QXRoomChatMessageTypeChat) {
|
||||
// if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem || model.messageType == QXRoomChatMessageTypeChat) {
|
||||
// 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];
|
||||
// }
|
||||
#else
|
||||
if (QXGlobal.shareGlobal.isAppStore) {
|
||||
NSString *text = @"";
|
||||
if (model.messageType == QXRoomChatMessageTypeGift || model.messageType == QXRoomChatMessageTypeSystem) {
|
||||
text = model.text;
|
||||
|
||||
@@ -151,7 +151,8 @@
|
||||
}];
|
||||
[self addSubview:self.onLineBgView];
|
||||
[self.onLineBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.equalTo(self.countLabel.mas_left).offset(-5);
|
||||
// make.right.equalTo(self.countLabel.mas_left).offset(-5);
|
||||
make.right.equalTo(self.closeBtn.mas_left).offset(-5);
|
||||
make.left.equalTo(self.leftBgView.mas_right);
|
||||
make.height.equalTo(self.leftBgView);
|
||||
make.top.equalTo(self.leftBgView);
|
||||
@@ -413,6 +414,8 @@
|
||||
QXRoomViewController *roomVc = [[QXRoomViewController alloc] init];
|
||||
roomVc.roomId = QXGlobal.shareGlobal.superRoomId;
|
||||
[viewControllers insertObject:roomVc atIndex:i];
|
||||
QXGlobal.shareGlobal.roomVC = roomVc;
|
||||
QXGlobal.shareGlobal.roomId = roomVc.roomId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXRoomDayTaskTagView : UIView
|
||||
@property (nonatomic,strong)NSString *unreadNum;
|
||||
@property (nonatomic,copy)void(^startBlock)(void);
|
||||
@end
|
||||
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
//
|
||||
|
||||
#import "QXRoomDayTaskTagView.h"
|
||||
|
||||
@interface QXRoomDayTaskTagView()
|
||||
@property (nonatomic,strong)UIImageView *imageView;
|
||||
@property (nonatomic,strong)UILabel *timeLabel;
|
||||
@property (nonatomic,strong)UIButton *btn;
|
||||
@property (nonatomic,strong)UILabel *unreadLabel;
|
||||
@end
|
||||
@implementation QXRoomDayTaskTagView
|
||||
|
||||
@@ -17,7 +19,7 @@
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-400, 80, 60);
|
||||
self.frame = CGRectMake(SCREEN_WIDTH-80, SCREEN_HEIGHT-400, 80, 67);
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
@@ -25,7 +27,7 @@
|
||||
|
||||
-(void)initSubviews{
|
||||
self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"room_day_task"]];
|
||||
self.imageView.frame = CGRectMake(0, 0, 80, 60);
|
||||
self.imageView.frame = CGRectMake(0, 0, 80, 67);
|
||||
[self addSubview:self.imageView];
|
||||
|
||||
self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.imageView.bottom, self.width, 20)];
|
||||
@@ -33,6 +35,23 @@
|
||||
self.timeLabel.font = [UIFont systemFontOfSize:12];
|
||||
self.timeLabel.textColor = RGB16(0xFFEBBD);
|
||||
[self addSubview:self.timeLabel];
|
||||
|
||||
self.unreadLabel = [[UILabel alloc] init];
|
||||
self.unreadLabel.font = [UIFont systemFontOfSize:10];
|
||||
self.unreadLabel.textAlignment = NSTextAlignmentCenter;
|
||||
// self.unreadLabel.text = @"99";
|
||||
self.unreadLabel.hidden = YES;
|
||||
self.unreadLabel.textColor = RGB16(0xffffff);
|
||||
self.unreadLabel.backgroundColor = RGB(255, 19, 55);
|
||||
[self.unreadLabel addRoundedCornersWithRadius:10];
|
||||
[self addSubview:self.unreadLabel];
|
||||
[self.unreadLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(5);
|
||||
make.right.mas_equalTo(-5);
|
||||
make.width.mas_equalTo(20);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
self.btn = [[UIButton alloc] initWithFrame:self.bounds];
|
||||
[self.btn addTarget:self action:@selector(btnClick) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.btn];
|
||||
@@ -45,6 +64,17 @@
|
||||
self.startBlock();
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setUnreadNum:(NSString *)unreadNum{
|
||||
_unreadNum = unreadNum;
|
||||
if (unreadNum.integerValue <= 0) {
|
||||
self.unreadLabel.text = @"0";
|
||||
self.unreadLabel.hidden = YES;
|
||||
}else{
|
||||
self.unreadLabel.text = unreadNum;
|
||||
self.unreadLabel.hidden = NO;
|
||||
}
|
||||
}
|
||||
-(void)handlePan:(UIPanGestureRecognizer*)recognizer{
|
||||
if (recognizer.state == UIGestureRecognizerStateEnded) {
|
||||
NSLog(@"拖动结束");
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
self.todayTitle = @"今日";
|
||||
self.yestoryTitle = @"昨日";
|
||||
self.weekTitle = @"本周";
|
||||
self.lastweekTitle = @"上周";
|
||||
self.lastweekTitle = @"本月";
|
||||
[self.titles removeAllObjects];
|
||||
[self.titles addObject:self.todayTitle];
|
||||
[self.titles addObject:self.yestoryTitle];
|
||||
|
||||
@@ -238,6 +238,10 @@
|
||||
[self stopHWDMP4];
|
||||
_model = nil;
|
||||
}
|
||||
-(void)dealloc{
|
||||
[self.mp4View stopHWDMP4];
|
||||
self.mp4View = nil;
|
||||
}
|
||||
//- (QXEffectSvgaView *)svgaView {
|
||||
// if (!_svgaView) {
|
||||
// _svgaView = [[QXEffectSvgaView alloc] initWithFrame:CGRectZero isAutoPlay:YES];
|
||||
|
||||
@@ -338,6 +338,8 @@
|
||||
QXRoomViewController *roomVc = [[QXRoomViewController alloc] init];
|
||||
roomVc.roomId = QXGlobal.shareGlobal.superRoomId;
|
||||
[viewControllers insertObject:roomVc atIndex:i];
|
||||
QXGlobal.shareGlobal.roomVC = roomVc;
|
||||
QXGlobal.shareGlobal.roomId = roomVc.roomId;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,10 +507,13 @@
|
||||
showToast(@"签约座位暂无人员");
|
||||
return;
|
||||
}
|
||||
self.startBtn.userInteractionEnabled = NO;
|
||||
MJWeakSelf
|
||||
[QXMineNetwork signStartWithRoomId:self.roomModel.room_info.room_id userId:self.signView.pitModel.user_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
weakSelf.startBtn.userInteractionEnabled = YES;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
weakSelf.startBtn.userInteractionEnabled = YES;
|
||||
}];
|
||||
}
|
||||
-(void)delayAction{
|
||||
@@ -543,7 +546,7 @@
|
||||
}];
|
||||
}
|
||||
-(void)applyAction{
|
||||
[QXMineNetwork roomUpSeatWithRoomId:self.roomModel.room_info.room_id pit_number:@"1" isUpSeat:YES successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[QXMineNetwork roomUpSeatWithRoomId:self.roomModel.room_info.room_id pit_number:@"" isUpSeat:YES successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
|
||||
@@ -368,7 +368,7 @@ QXRoomSeatDelegate
|
||||
if ([self.songInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
double time = progress/1000.0+1;
|
||||
if (ceil(time) >= self.songInfo.duration) {
|
||||
[self nextAction];
|
||||
[self nextSongActionIsAuto:YES];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -658,16 +658,20 @@ QXRoomSeatDelegate
|
||||
}
|
||||
|
||||
-(void)nextAction{
|
||||
[self nextSongActionIsAuto:NO];
|
||||
}
|
||||
|
||||
-(void)nextSongActionIsAuto:(BOOL)isAuto{
|
||||
if (self.songInfo) {
|
||||
[QXMineNetwork nextSongWithRoomId:self.roomModel.room_info.room_id now_did:self.songInfo.did successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
[QXMineNetwork nextSongWithRoomId:self.roomModel.room_info.room_id now_did:self.songInfo.did is_auto_next:isAuto?@"1":@"0" successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"成功");
|
||||
// [[QXAgoraEngine sharedEngine] ktv_EndSing];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)endAction{
|
||||
[QXMineNetwork endSongWithRoomId:self.roomModel.room_info.room_id successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)NSString*message;
|
||||
@property (nonatomic,strong)NSString*cancleTitle;
|
||||
@property (nonatomic,strong)NSString*commitTitle;
|
||||
@property (nonatomic,assign)NSInteger autoDismissTime;
|
||||
@property (nonatomic,assign)BOOL isFromController;
|
||||
@property (nonatomic,copy)void(^commitBlock)(void);
|
||||
@property (nonatomic,copy)void(^cancelBlock)(void);
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
@property (nonatomic,strong)UILabel *messageLabel;
|
||||
@property (nonatomic,strong)UIButton *cancelBtn;
|
||||
@property (nonatomic,strong)UIButton *commitBtn;
|
||||
@property (nonatomic,strong)QXTimer *timer;
|
||||
@end
|
||||
|
||||
@implementation QXCustomAlertView
|
||||
@@ -119,7 +120,28 @@
|
||||
[self.commitBtn setTitle:commitTitle forState:(UIControlStateNormal)];
|
||||
}
|
||||
|
||||
-(void)setAutoDismissTime:(NSInteger)autoDismissTime{
|
||||
if (autoDismissTime > 0) {
|
||||
@weakify(self);
|
||||
__block NSInteger timeCount = autoDismissTime;
|
||||
self.timer = [QXTimer scheduledTimerWithTimeInterval:1 repeats:YES queue:dispatch_get_main_queue() block:^{
|
||||
@strongify(self);
|
||||
timeCount--;
|
||||
if (timeCount<=0) {
|
||||
[self.timer invalidate];
|
||||
[self cancelAction];
|
||||
}else{
|
||||
[self.cancelBtn setTitle:[NSString stringWithFormat:@"%@(%ld)",self.cancleTitle,timeCount] forState:(UIControlStateNormal)];
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)cancelAction{
|
||||
if (self.timer) {
|
||||
[self.timer invalidate];
|
||||
self.timer = nil;
|
||||
}
|
||||
if (self.isFromController) {
|
||||
if (self.cancelBlock) {
|
||||
self.cancelBlock();
|
||||
@@ -132,6 +154,10 @@
|
||||
[self hide];
|
||||
}
|
||||
-(void)commitAction{
|
||||
if (self.timer) {
|
||||
[self.timer invalidate];
|
||||
self.timer = nil;
|
||||
}
|
||||
if (self.isFromController) {
|
||||
if (self.commitBlock) {
|
||||
self.commitBlock();
|
||||
@@ -152,9 +178,11 @@
|
||||
self.messageLabel.text = message;
|
||||
}
|
||||
if (cancleTitle) {
|
||||
_cancleTitle = cancleTitle;
|
||||
[self.cancelBtn setTitle:cancleTitle forState:(UIControlStateNormal)];
|
||||
}
|
||||
if (commitTitle) {
|
||||
_commitTitle = commitTitle;
|
||||
[self.commitBtn setTitle:commitTitle forState:(UIControlStateNormal)];
|
||||
}
|
||||
CGFloat messageHeight = [message heightForFont:[UIFont systemFontOfSize:13] width:ScaleWidth(275)-1];
|
||||
|
||||
@@ -121,6 +121,10 @@
|
||||
}
|
||||
if ([roomGiftModel.is_cp isEqualToString:@"1"]) {
|
||||
self.cpImageView.hidden = NO;
|
||||
self.cpImageView.image = [UIImage imageNamed:@"room_gift_heart_boom_tag_icon"];
|
||||
}else if ([roomGiftModel.is_teacher isEqualToString:@"1"]) {
|
||||
self.cpImageView.image = [UIImage imageNamed:@"room_gift_teacher_boom_tag_icon"];
|
||||
self.cpImageView.hidden = NO;
|
||||
}else{
|
||||
self.cpImageView.hidden = YES;
|
||||
}
|
||||
|
||||