提交
This commit is contained in:
@@ -62,7 +62,6 @@
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
[self getUserInfo];
|
||||
[self.tableView reloadData];
|
||||
[self.tableHeaderView reloadData];
|
||||
}
|
||||
|
||||
@@ -96,6 +95,7 @@
|
||||
[QXMineNetwork getMineInfoSuccessBlock:^(QXUserModel * _Nonnull userModel) {
|
||||
weakSelf.userModel = userModel;
|
||||
weakSelf.tableHeaderView.userModel = userModel;
|
||||
[weakSelf.tableView reloadData];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
@@ -232,7 +232,7 @@
|
||||
}
|
||||
break;
|
||||
case QXMainHeaderOptionTypeBodyPrice:{
|
||||
[QXBodyPriceRuleView showInView:self.view];
|
||||
[QXBodyPriceRuleView showInView:self.view currentBodyValue:self.userModel.market_value coin:self.userModel.market_value_coin bodyValue:self.userModel.market_value_market];
|
||||
}
|
||||
break;
|
||||
case QXMainHeaderOptionTypeWallet:{
|
||||
@@ -307,6 +307,7 @@
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXMineServiceCell *cell = [QXMineServiceCell cellWithTableView:tableView];
|
||||
cell.delegate = self;
|
||||
cell.singerIsAuth = self.userModel.singer_status.intValue==1;
|
||||
if (indexPath.row == 0) {
|
||||
cell.isMore = NO;
|
||||
}else{
|
||||
@@ -316,7 +317,8 @@
|
||||
}
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.row == 0) {
|
||||
return ScaleWidth(168);
|
||||
// return ScaleWidth(168);
|
||||
return ScaleWidth(110);
|
||||
}else{
|
||||
// if (QXGlobal.shareGlobal.isOpenRecharge) {
|
||||
return ScaleWidth(168);
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
-(void)getList{
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[QXMineNetwork getFamilyEarningWithUserId:self.userId successBlock:^(NSArray<QXFamilyEarningModel *> * _Nonnull list) {
|
||||
[QXMineNetwork getFamilyEarningWithUserId:self.userId page:self.page start_time:self.startTime end_time:self.endTime successBlock:^(NSArray<QXFamilyEarningModel *> * _Nonnull list) {
|
||||
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||
if (!strongSelf) {
|
||||
NSLog(@"⚠️ self has been deallocated, skipping hide operation");
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
@interface QXFamilySubViewController ()<UITableViewDelegate,UITableViewDataSource,QXFamilyMemberCellDelegate>
|
||||
@property (nonatomic,strong)UITableView *tableView;
|
||||
@property (nonatomic,strong)QXFamilyModel *model;
|
||||
|
||||
@property (nonatomic,strong)UIView *noDataView;
|
||||
@end
|
||||
|
||||
@implementation QXFamilySubViewController
|
||||
@@ -41,17 +41,22 @@
|
||||
-(void)getList{
|
||||
BOOL isJoin = YES;
|
||||
if (self.index == 0) {
|
||||
isJoin = YES;
|
||||
}else{
|
||||
isJoin = NO;
|
||||
}else{
|
||||
isJoin = YES;
|
||||
}
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getMyFamilyIsJoin:isJoin successBlock:^(QXFamilyModel * _Nonnull model) {
|
||||
weakSelf.model = model;
|
||||
if (weakSelf.model.group_members_lists.count == 0) {
|
||||
weakSelf.tableView.tableFooterView = weakSelf.noDataView;
|
||||
}else{
|
||||
weakSelf.tableView.tableFooterView = nil;
|
||||
}
|
||||
[weakSelf.tableView reloadData];
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
}];
|
||||
}
|
||||
-(void)needRefresh{
|
||||
@@ -128,6 +133,9 @@
|
||||
return 0;
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0) {
|
||||
return;
|
||||
}
|
||||
QXFamilyMemberModel*md = self.model.group_members_lists[indexPath.row];
|
||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
vc.user_id = md.user_id;
|
||||
@@ -154,5 +162,29 @@
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
-(UIView *)noDataView{
|
||||
if (!_noDataView) {
|
||||
_noDataView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ScaleWidth(120)+30)];
|
||||
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"qx_no_data"]];
|
||||
[_noDataView addSubview:imageView];
|
||||
[imageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(ScaleWidth(148));
|
||||
make.height.mas_equalTo(ScaleWidth(99));
|
||||
make.centerX.equalTo(_noDataView);
|
||||
make.top.mas_equalTo(30);
|
||||
}];
|
||||
|
||||
UILabel *titleLabel = [[UILabel alloc] init];
|
||||
titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
titleLabel.text = @"暂无数据";
|
||||
titleLabel.textColor = RGB16(0xffffff);
|
||||
[_noDataView addSubview:titleLabel];
|
||||
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.equalTo(_noDataView);
|
||||
make.top.equalTo(imageView.mas_bottom);
|
||||
}];
|
||||
}
|
||||
return _noDataView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -45,12 +45,18 @@
|
||||
}
|
||||
-(void)initSubViews{
|
||||
self.page = 1;
|
||||
self.countLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, NavContentHeight+12, 200, 17)];
|
||||
self.countLabel.textColor = RGB16A(0x000000,0.45);
|
||||
self.countLabel = [[UILabel alloc] initWithFrame:CGRectMake(16, NavContentHeight+12, 200, 35)];
|
||||
self.countLabel.textColor = RGB16(0x666666);
|
||||
self.countLabel.font = [UIFont systemFontOfSize:12];
|
||||
self.countLabel.text = @"共0首歌";
|
||||
[self.view addSubview:self.countLabel];
|
||||
|
||||
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.view.width-35-16, NavContentHeight+12, 35, 35)];
|
||||
[recordBtn setImage:[[UIImage imageNamed:@"nobility_help_icon"] imageByTintColor:RGB16(0x666666)] forState:(UIControlStateNormal)];
|
||||
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
[recordBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.view addSubview:recordBtn];
|
||||
|
||||
[self.view addSubview:self.tableView];
|
||||
[self getSongList];
|
||||
}
|
||||
@@ -74,7 +80,12 @@
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)helpAction{
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"34"];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
-(void)didSeletedGift:(QXGiftModel *)giftModel giftCount:(nonnull NSString *)giftCount{
|
||||
giftModel.num = giftCount;
|
||||
self.addSongView.giftModel = giftModel;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import "QXRoomSingerAuthViewController.h"
|
||||
#import "QXAudioRecorderView.h"
|
||||
#import "QXMineNetwork.h"
|
||||
|
||||
@interface QXRoomSingerAuthViewController ()<QXAudioRecorderViewDelegate>
|
||||
@property (nonatomic,strong)UIView *contentView;
|
||||
@@ -39,7 +40,11 @@
|
||||
[super setNavgationItems];
|
||||
self.navigationTintColor = RGB16(0xffffff);
|
||||
self.navigationItem.title = @"歌手认证";
|
||||
|
||||
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
|
||||
[recordBtn setImage:[UIImage imageNamed:@"nobility_help_icon"] forState:(UIControlStateNormal)];
|
||||
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
[recordBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:recordBtn];
|
||||
}
|
||||
|
||||
- (void)initSubViews{
|
||||
@@ -71,8 +76,13 @@
|
||||
self.audioRecorderView.delegate = self;
|
||||
self.audioRecorderView.hidden = YES;
|
||||
[self.view addSubview:self.audioRecorderView];
|
||||
[self conifgViews];
|
||||
}
|
||||
-(void)conifgViews{
|
||||
if ([self.singer_status isEqualToString:@"-1"] || [self.singer_status isEqualToString:@"2"]) {
|
||||
self.audioRecorderView.hidden = NO;
|
||||
}else{
|
||||
self.audioRecorderView.hidden = YES;
|
||||
}
|
||||
if ([self.singer_status isEqualToString:@"-1"]) {
|
||||
self.authStatusLabel.text = @"暂未认证";
|
||||
@@ -88,6 +98,12 @@
|
||||
self.authStatusLabel.textColor = RGB16(0xFF2424);
|
||||
}
|
||||
}
|
||||
-(void)helpAction{
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,@"33"];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
#pragma mark - AudioRecorderViewDelegate
|
||||
|
||||
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didChangeState:(AudioRecorderState)state{
|
||||
@@ -112,5 +128,26 @@
|
||||
// 实时更新进度
|
||||
|
||||
}
|
||||
|
||||
-(void)didClickAuthWithFileUrl:(NSURL *)audioFileUrl{
|
||||
NSData *data = [NSData dataWithContentsOfURL:audioFileUrl];
|
||||
@weakify(self)
|
||||
showLoadingInView(self.view);
|
||||
[[QXCOSUploadManager shareManager] audioUploadFile:data withObjectKey:audioFileUrl.lastPathComponent complete:^(NSString * _Nonnull fileUrl, QXCOSUploadImageState state) {
|
||||
@strongify(self);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
hideLoadingInView(self.view);
|
||||
if ([fileUrl isExist]) {
|
||||
[QXMineNetwork singerAuthWithSong:fileUrl successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"上传成功");
|
||||
self.singer_status = @"0";
|
||||
[self conifgViews];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(@"上传失败");
|
||||
}];
|
||||
}else{
|
||||
showToast(@"上传失败");
|
||||
}
|
||||
});
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
self.page = 1;
|
||||
[self getHistorySubsidy];
|
||||
}
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:NO animated:YES];
|
||||
}
|
||||
-(void)getHistorySubsidy{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork dayTaskGiftBoxRecordSuccessBlock:^(NSArray<QXTaskGiftBoxRecordModel *> * _Nonnull list) {
|
||||
|
||||
@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@interface QXFamilyMemberModel : NSObject
|
||||
/// 身价
|
||||
@property(nonatomic,strong)NSString *market_value;
|
||||
/// 0 离线 1 在线
|
||||
/// 2离线 1 在线
|
||||
@property(nonatomic,assign)NSInteger is_online;
|
||||
/// 昵称
|
||||
@property(nonatomic,strong)NSString *nickname;
|
||||
|
||||
@@ -49,14 +49,18 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)NSString *hide_status;
|
||||
/// 当前状态:-1 未认证歌手, 0待审核 1已认证 2被拒绝
|
||||
@property (nonatomic,strong)NSString *singer_status;
|
||||
/// 在线状态
|
||||
@property (nonatomic,assign)BOOL is_online;
|
||||
/// 在线状态 1 在线 2 离线
|
||||
@property (nonatomic,assign)NSInteger is_online;
|
||||
/// 1 能聊天 0不能聊天
|
||||
@property (nonatomic,assign)NSInteger is_can_chat;
|
||||
/// 需要充值金额
|
||||
@property (nonatomic,strong)NSString* can_chat_money;
|
||||
/// 身价
|
||||
@property (nonatomic,strong)NSString* market_value;
|
||||
/// 身价配置 多少金币数
|
||||
@property (nonatomic,strong)NSString* market_value_coin;
|
||||
/// 身价配置 多少身价数
|
||||
@property (nonatomic,strong)NSString* market_value_market;
|
||||
@end
|
||||
|
||||
|
||||
@@ -110,7 +114,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 魅力
|
||||
@property (nonatomic,strong)NSString* charm;
|
||||
|
||||
/// 是否在线
|
||||
/// 是否在线 1在线 2离线
|
||||
@property (nonatomic,assign)NSInteger is_online;
|
||||
|
||||
/// 礼物墙数量
|
||||
|
||||
@@ -1303,6 +1303,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
家族收益详情
|
||||
*/
|
||||
+(void)getFamilyEarningWithUserId:(NSString*)userId
|
||||
page:(NSInteger)page
|
||||
start_time:(NSString*)start_time
|
||||
end_time:(NSString*)end_time
|
||||
successBlock:(void (^)(NSArray<QXFamilyEarningModel*>* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
@@ -1387,6 +1390,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
|
||||
/**
|
||||
在线
|
||||
*/
|
||||
+(void)appKeepAliveWithRoomId:(NSString*)room_id;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -2585,8 +2585,8 @@
|
||||
+(void)getMyFamilyIsJoin:(BOOL)isJoin
|
||||
successBlock:(void (^)(QXFamilyModel* model))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
|
||||
[[QXRequset shareInstance] getWithUrl:QXMyFamily parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
NSString *urlString = isJoin?QXMyJoinFamily:QXMyFamily;
|
||||
[[QXRequset shareInstance] getWithUrl:urlString parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
QXFamilyModel *model = [QXFamilyModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
successBlock(model);
|
||||
@@ -2601,12 +2601,16 @@
|
||||
家族收益详情
|
||||
*/
|
||||
+(void)getFamilyEarningWithUserId:(NSString*)userId
|
||||
page:(NSInteger)page
|
||||
start_time:(NSString*)start_time
|
||||
end_time:(NSString*)end_time
|
||||
successBlock:(void (^)(NSArray<QXFamilyEarningModel*>* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"user_id":userId?:@"",
|
||||
@"page":[NSNumber numberWithInteger:page]
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXHeartBeatSpace parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
[[QXRequset shareInstance] postWithUrl:QXMyFamilyEarnings parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSArray *list = [NSArray yy_modelArrayWithClass:[QXFamilyEarningModel class] json:responseObject[@"data"]];
|
||||
successBlock(list);
|
||||
@@ -2796,4 +2800,11 @@
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)appKeepAliveWithRoomId:(NSString *)room_id{
|
||||
[[QXRequset shareInstance] getWithUrl:QXKeepAlive parameters:@{@"room_id":room_id?:@""} needCache:NO success:^(id responseObject) {
|
||||
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -17,7 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UIButton *commitBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *closeBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIView *bgView;
|
||||
+(void)showInView:(UIView*)view;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *bodyPriceLabel;
|
||||
+(void)showInView:(UIView*)view currentBodyValue:(NSString*)currentBodyValue coin:(NSString*)coin bodyValue:(NSString*)bodyValue;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -10,12 +10,14 @@
|
||||
@implementation QXBodyPriceRuleView
|
||||
|
||||
|
||||
+(void)showInView:(UIView*)view{
|
||||
+(void)showInView:(UIView *)view currentBodyValue:(NSString *)currentBodyValue coin:(NSString *)coin bodyValue:(NSString *)bodyValue{
|
||||
UINib *nib = [UINib nibWithNibName:@"QXBodyPriceRuleView" bundle:[NSBundle mainBundle]];
|
||||
QXBodyPriceRuleView *ruleView = [nib instantiateWithOwner:nil options:nil].firstObject;
|
||||
ruleView.frame = UIScreen.mainScreen.bounds;
|
||||
ruleView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
ruleView.bgView.alpha = 0;
|
||||
ruleView.currentPriceLabel.text = currentBodyValue;
|
||||
ruleView.bodyPriceLabel.text = [NSString stringWithFormat:@"收礼身价,等于通过累计收礼的价值,每%@个金币等于%@身价",coin,bodyValue];
|
||||
[view addSubview:ruleView];
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
ruleView.bgView.alpha = 1;
|
||||
@@ -23,6 +25,8 @@
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)closeAction:(id)sender {
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
self.bgView.alpha = 0;
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="16p-zb-VAB">
|
||||
<rect key="frame" x="0.0" y="0.0" width="117" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="竞拍溢价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DfF-lh-oXh">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DfF-lh-oXh">
|
||||
<rect key="frame" x="34.333333333333343" y="4.3333333333333144" width="48" height="15"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.72549019607843135" green="0.57647058823529407" blue="0.11372549019607843" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
@@ -251,7 +251,7 @@
|
||||
<constraint firstAttribute="height" constant="24" id="Oeu-V9-5eq"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签约竞拍次数越多,签约成交比签约时身价更高,则竞拍溢价就越高" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M4h-lx-wJ4">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="收礼身价,等于 通过累计收礼的价值,每1000个金币等于1身价" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M4h-lx-wJ4">
|
||||
<rect key="frame" x="8" y="32" width="101" height="79"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.92941176470588238" green="0.66666666666666663" blue="0.098039215686274508" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
@@ -368,6 +368,7 @@
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="bgView" destination="bjS-Eu-Wht" id="7GC-AR-cpg"/>
|
||||
<outlet property="bodyPriceLabel" destination="M4h-lx-wJ4" id="jHS-JF-ix4"/>
|
||||
<outlet property="closeBtn" destination="ag3-iq-BzI" id="a0h-Fk-P2z"/>
|
||||
<outlet property="commitBtn" destination="PHh-tS-kNh" id="iOS-08-gnl"/>
|
||||
<outlet property="currentPriceLabel" destination="yoB-8g-xXJ" id="ZmR-gN-kho"/>
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
[weakSelf.delegate didClickOptionType:QXMainHeaderOptionTypeNobility];
|
||||
}
|
||||
}];
|
||||
self.nobilityBgView.hidden = YES;
|
||||
[self addSubview:self.nobilityBgView];
|
||||
|
||||
self.nobilityImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_nobility_bg"]];
|
||||
@@ -347,13 +348,17 @@
|
||||
}
|
||||
|
||||
-(void)reloadData{
|
||||
if ([self.toolsArray containsObject:self.rechargeModel]) {
|
||||
return;
|
||||
}
|
||||
if (QXGlobal.shareGlobal.isOpenRecharge) {
|
||||
self.nobilityBgView.hidden = NO;
|
||||
if ([self.toolsArray containsObject:self.rechargeModel]) {
|
||||
return;
|
||||
}
|
||||
[self.toolsArray insertObject:self.rechargeModel atIndex:0];
|
||||
[self.collectionView reloadData];
|
||||
}else{
|
||||
self.nobilityBgView.hidden = YES;
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.toolsArray.count;
|
||||
@@ -410,6 +415,7 @@
|
||||
self.nameLabel.shimmerColor = [UIColor colorWithHexString:userModel.nickname_color];
|
||||
[self.nameLabel startShimmer];
|
||||
}else{
|
||||
self.nameLabel.shimmerColor = [UIColor clearColor];
|
||||
[self.nameLabel stopShimmer];
|
||||
}
|
||||
self.nameLabel.text = userModel.nickname;
|
||||
|
||||
@@ -43,6 +43,7 @@ typedef NS_ENUM(NSInteger) {
|
||||
@interface QXMineServiceCell : UITableViewCell
|
||||
@property (nonatomic,weak)id<QXMineServiceCellDelegate>delegate;
|
||||
@property (nonatomic,assign)BOOL isMore;
|
||||
@property (nonatomic,assign)BOOL singerIsAuth;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
@property (nonatomic,strong)NSMutableArray *serviceArray;
|
||||
@property (nonatomic,strong)NSMutableArray *moreArray;
|
||||
@property (nonatomic,strong)QXServiceModel *inviteModel;
|
||||
@property (nonatomic,strong)QXServiceModel *singerAuthModel;
|
||||
@property (nonatomic,strong)QXServiceModel *songListModel;
|
||||
@end
|
||||
|
||||
@implementation QXMineServiceCell
|
||||
@@ -109,14 +111,40 @@
|
||||
self.titleLabel.text = isMore?@"更多":@"常用服务";
|
||||
if (isMore) {
|
||||
if ([self.moreArray containsObject:self.inviteModel]) {
|
||||
return;
|
||||
|
||||
}else{
|
||||
if (QXGlobal.shareGlobal.isOpenRecharge) {
|
||||
[self.moreArray insertObject:self.inviteModel atIndex:1];
|
||||
}
|
||||
}
|
||||
if (QXGlobal.shareGlobal.isOpenRecharge) {
|
||||
[self.moreArray insertObject:self.inviteModel atIndex:1];
|
||||
if (self.singerIsAuth) {
|
||||
if ([self.moreArray containsObject:self.singerAuthModel]) {
|
||||
[self.moreArray removeObject:self.singerAuthModel];
|
||||
}
|
||||
if ([self.moreArray containsObject:self.songListModel]) {
|
||||
|
||||
}else{
|
||||
NSInteger index = self.moreArray.count-1;
|
||||
[self.moreArray insertObject:self.songListModel atIndex:index];
|
||||
}
|
||||
}else{
|
||||
if ([self.moreArray containsObject:self.songListModel]) {
|
||||
[self.moreArray removeObject:self.songListModel];
|
||||
}
|
||||
if ([self.moreArray containsObject:self.singerAuthModel]) {
|
||||
|
||||
}else{
|
||||
NSInteger index = self.moreArray.count-1;
|
||||
[self.moreArray insertObject:self.singerAuthModel atIndex:index];
|
||||
}
|
||||
}
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
-(void)setSingerIsAuth:(BOOL)singerIsAuth{
|
||||
_singerIsAuth = singerIsAuth;
|
||||
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.isMore?self.moreArray.count:self.serviceArray.count;
|
||||
}
|
||||
@@ -160,22 +188,17 @@
|
||||
md3.icon = @"service_bag";
|
||||
md3.type = QXMineServiceTypeBackpack;
|
||||
|
||||
QXServiceModel *md4 = [[QXServiceModel alloc] init];
|
||||
md4.title = @"设置";
|
||||
md4.icon = @"service_setting";
|
||||
md4.type = QXMineServiceTypeSetting;
|
||||
|
||||
QXServiceModel *md5 = [[QXServiceModel alloc] init];
|
||||
md5.title = @"家族";
|
||||
md5.icon = @"service_my_family";
|
||||
md5.type = QXMineServiceTypeFamily;
|
||||
QXServiceModel *md4 = [[QXServiceModel alloc] init];
|
||||
md4.title = @"家族";
|
||||
md4.icon = @"service_my_family";
|
||||
md4.type = QXMineServiceTypeFamily;
|
||||
|
||||
_serviceArray = [NSMutableArray arrayWithArray:@[
|
||||
md4,
|
||||
md1,
|
||||
md2,
|
||||
md3,
|
||||
md4,
|
||||
md5
|
||||
]];
|
||||
}
|
||||
return _serviceArray;
|
||||
@@ -202,23 +225,29 @@
|
||||
md4.icon = @"service_customer_service";
|
||||
md4.type = QXMineServiceTypeCustomerService;
|
||||
|
||||
QXServiceModel *md5 = [[QXServiceModel alloc] init];
|
||||
md5.title = @"歌手认证";
|
||||
md5.icon = @"service_singer_auth";
|
||||
md5.type = QXMineServiceTypeSingerAuth;
|
||||
// QXServiceModel *md5 = [[QXServiceModel alloc] init];
|
||||
// md5.title = @"歌手认证";
|
||||
// md5.icon = @"service_singer_auth";
|
||||
// md5.type = QXMineServiceTypeSingerAuth;
|
||||
//
|
||||
// QXServiceModel *md6 = [[QXServiceModel alloc] init];
|
||||
// md6.title = @"我的歌单";
|
||||
// md6.icon = @"service_songlist";
|
||||
// md6.type = QXMineServiceTypeSongList;
|
||||
|
||||
QXServiceModel *md6 = [[QXServiceModel alloc] init];
|
||||
md6.title = @"我的歌单";
|
||||
md6.icon = @"service_songlist";
|
||||
md6.type = QXMineServiceTypeSongList;
|
||||
QXServiceModel *md7 = [[QXServiceModel alloc] init];
|
||||
md7.title = @"设置";
|
||||
md7.icon = @"service_setting";
|
||||
md7.type = QXMineServiceTypeSetting;
|
||||
|
||||
_moreArray = [NSMutableArray arrayWithArray:@[
|
||||
md1,
|
||||
md2,
|
||||
md3,
|
||||
md4,
|
||||
md5,
|
||||
md6,
|
||||
// md5,
|
||||
// md6,
|
||||
md7
|
||||
]];
|
||||
}
|
||||
|
||||
@@ -233,6 +262,25 @@
|
||||
}
|
||||
return _inviteModel;
|
||||
}
|
||||
-(QXServiceModel *)singerAuthModel{
|
||||
if (!_singerAuthModel) {
|
||||
_singerAuthModel = [[QXServiceModel alloc] init];
|
||||
_singerAuthModel.title = @"歌手认证";
|
||||
_singerAuthModel.icon = @"service_singer_auth";
|
||||
_singerAuthModel.type = QXMineServiceTypeSingerAuth;
|
||||
}
|
||||
return _singerAuthModel;
|
||||
}
|
||||
|
||||
-(QXServiceModel *)songListModel{
|
||||
if (!_songListModel) {
|
||||
_songListModel = [[QXServiceModel alloc] init];
|
||||
_songListModel.title = @"我的歌单";
|
||||
_songListModel.icon = @"service_songlist";
|
||||
_songListModel.type = QXMineServiceTypeSongList;
|
||||
}
|
||||
return _songListModel;
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
self.dayLabel.text = [NSString stringWithFormat:@"剩余租期:%@",model.end_day];
|
||||
self.timesLabel.text = [NSString stringWithFormat:@"免费续约次数:%@",model.free_renewal];
|
||||
self.nameLabel.text = model.nickname;
|
||||
[self.todayPriceBtn setTitle:model.today_earnings forState:(UIControlStateNormal)];
|
||||
[self.yestodayPriceBtn setTitle:model.yesterday_earnings forState:(UIControlStateNormal)];
|
||||
[self.todayPriceBtn setTitle:[NSString stringWithFormat:@"%.4f",model.today_earnings.doubleValue] forState:(UIControlStateNormal)];
|
||||
[self.yestodayPriceBtn setTitle:[NSString stringWithFormat:@"%.4f",model.yesterday_earnings.doubleValue] forState:(UIControlStateNormal)];
|
||||
[self.priceBtn setTitle:model.market_value forState:(UIControlStateNormal)];
|
||||
self.onlineLabel.text = model.is_online==1?@"当前在线":@"当前离线";
|
||||
self.continueBtn.hidden = model.is_show_sign.intValue==1?NO:YES;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
// Initialization code
|
||||
}
|
||||
- (IBAction)familyGroupAction:(id)sender {
|
||||
if (self.model.group_members_lists.count == 0) {
|
||||
if (![self.model.group_id isExist]) {
|
||||
showToast(@"家族群至少需要签约一位徒弟");
|
||||
}else{
|
||||
[[QXGlobal shareGlobal] chatWithFamilyGroupId:self.model.group_id cover:self.model.group_owner_info.avatar name:[NSString stringWithFormat:@"%@的家族",self.model.group_owner_info.nickname] navagationController:self.viewController.navigationController];
|
||||
@@ -38,11 +38,12 @@
|
||||
[self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.group_owner_info.nobility_image]];
|
||||
self.nameLabel.text = model.group_owner_info.nickname;
|
||||
self.IdLabel.text = [NSString stringWithFormat:@"ID:%@",model.group_owner_info.user_code];
|
||||
self.priceLabel.text = model.group_earnings;
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.4f",model.group_earnings.doubleValue];
|
||||
[self.timesBtn setTitle:[NSString stringWithFormat:@"签约次数:%@",model.group_members_num] forState:(UIControlStateNormal)];
|
||||
}
|
||||
- (IBAction)moreAction:(id)sender {
|
||||
QXFamilyPriceRecordViewController *vc = [[QXFamilyPriceRecordViewController alloc] init];
|
||||
vc.userId = self.model.user_id;
|
||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
-(void)setModel:(QXUserSongListModel *)model{
|
||||
_model = model;
|
||||
[self.giftImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
self.giftInfoLabel.text = [NSString stringWithFormat:@"x%@%@",model.gift_num,model.gift_name];
|
||||
self.giftInfoLabel.text = [NSString stringWithFormat:@"x%@ %@",model.gift_num,model.gift_name];
|
||||
self.songNameLabel.text = model.song_name;
|
||||
self.giftPriceLabel.text = model.gift_price;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,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="148" id="KGk-i7-Jjw" customClass="QXMineSongListCell">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="148" id="KGk-i7-Jjw" customClass="QXMineSongListCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="520" height="148"/>
|
||||
<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">
|
||||
|
||||
@@ -33,6 +33,9 @@ typedef NS_ENUM(NSInteger, AudioRecorderState) {
|
||||
/// 录音进度更新
|
||||
- (void)qxAudioRecorderView:(QXAudioRecorderView *)recorderView didUpdateProgress:(NSTimeInterval)progress totalDuration:(NSTimeInterval)totalDuration;
|
||||
|
||||
/// 开始认证
|
||||
-(void)didClickAuthWithFileUrl:(NSURL*)audioFileUrl;
|
||||
|
||||
@end
|
||||
|
||||
@interface QXAudioRecorderView : UIView
|
||||
|
||||
@@ -224,33 +224,24 @@
|
||||
|
||||
-(void)authAction{
|
||||
///去认证
|
||||
///去认证
|
||||
if ((int)self.totalDuration < 5) {
|
||||
showToast(@"录音时长不得小于60秒");
|
||||
NSInteger minSecond = 60;
|
||||
#if DEBUG
|
||||
minSecond = 5;
|
||||
# else
|
||||
minSecond = 60;
|
||||
#endif
|
||||
if ((int)self.totalDuration < minSecond) {
|
||||
NSString *toast = [NSString stringWithFormat:@"录音时长不得小于%ld秒",minSecond];
|
||||
showToast(toast);
|
||||
return;
|
||||
}
|
||||
if (self.originalAudioFileURL==nil) {
|
||||
showToast(@"录制文件不存在");
|
||||
return;
|
||||
}
|
||||
NSData *data = [NSData dataWithContentsOfURL:self.originalAudioFileURL];
|
||||
@weakify(self)
|
||||
showLoadingInView(self.viewController.view);
|
||||
[[QXCOSUploadManager shareManager] audioUploadFile:data withObjectKey:self.originalAudioFileURL.lastPathComponent complete:^(NSString * _Nonnull fileUrl, QXCOSUploadImageState state) {
|
||||
@strongify(self);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
hideLoadingInView(self.viewController.view);
|
||||
if ([fileUrl isExist]) {
|
||||
[QXMineNetwork singerAuthWithSong:fileUrl successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"上传成功");
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(@"上传失败");
|
||||
}];
|
||||
}else{
|
||||
showToast(@"上传失败");
|
||||
}
|
||||
});
|
||||
}];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickAuthWithFileUrl:)]) {
|
||||
[self.delegate didClickAuthWithFileUrl:self.originalAudioFileURL];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Gesture Handlers
|
||||
|
||||
Reference in New Issue
Block a user