提交
This commit is contained in:
@@ -754,7 +754,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -793,7 +793,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.15;
|
||||
MARKETING_VERSION = 1.1.16;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
@@ -820,7 +820,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = QXLive/QXLive.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 4;
|
||||
CURRENT_PROJECT_VERSION = 5;
|
||||
DEVELOPMENT_TEAM = 8798G5VMH9;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -859,7 +859,7 @@
|
||||
"$(inherited)",
|
||||
"$(SDKROOT)/usr/lib/swift",
|
||||
);
|
||||
MARKETING_VERSION = 1.1.15;
|
||||
MARKETING_VERSION = 1.1.16;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qxcm.qxlive;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
||||
@@ -50,10 +50,7 @@
|
||||
@property (nonatomic,strong)NSString *icon_wd_notselect;
|
||||
*/
|
||||
-(void)getAppTheme{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *themeUrl = [NSString stringWithFormat:@"%@%@",server,QXAppTheme];
|
||||
[[QXRequset shareInstance] getWithUrl:themeUrl parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
[QXConfig defaultConfig];
|
||||
@@ -158,6 +155,8 @@
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
NSLog(@"请求失败");
|
||||
[self alertNetworkError];
|
||||
QXGlobal.shareGlobal.currentServer = RServerUrl;
|
||||
QXGlobal.shareGlobal.currentH5Server = RH5ServerUrl;
|
||||
QXGlobal.shareGlobal.isNeedChangeServer = YES;
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ typedef void (^showFinishBlock)(void);
|
||||
+(instancetype)shareGlobal;
|
||||
@property (nonatomic,assign)BOOL isNeedUpdate;
|
||||
@property (nonatomic,assign)BOOL isNeedChangeServer;
|
||||
@property (nonatomic,strong)NSString *currentServer;
|
||||
@property (nonatomic,strong)NSString *currentH5Server;
|
||||
// 是否登录
|
||||
@property (nonatomic,readonly,assign)BOOL isLogin;
|
||||
@property (nonatomic,assign)BOOL isShowLoginVC;
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
dispatch_once(&onceToken, ^{
|
||||
global = [[self alloc] init];
|
||||
global.isShowLoginVC = NO;
|
||||
global.currentServer = ServerUrl;
|
||||
global.currentH5Server = H5ServerUrl;
|
||||
});
|
||||
return global;
|
||||
}
|
||||
|
||||
@@ -41,10 +41,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
}
|
||||
- (void)loadData {
|
||||
// 1-用户,2房间,3动态&fromId=对应id
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSInteger safeTop = kSafeAreaTop;
|
||||
NSURL* url= [NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/report?id=%@&fromType=%@&fromId=%@&h=%ld",server,[QXGlobal shareGlobal].loginModel.token ,self.reportType,self.fromId,safeTop]];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
|
||||
@@ -33,6 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/**
|
||||
首页banner
|
||||
1 引导 2启动 3首页轮播 4 房间首页轮播 5 公会列表 6 我的主页 7 道具商城
|
||||
*/
|
||||
+(void)homeBannerWithType:(NSString*)type
|
||||
successBlock:(void (^)(NSArray<QXBanner*>* list))successBlock
|
||||
|
||||
@@ -134,9 +134,9 @@ static NSInteger maxCount = 5;
|
||||
|
||||
self.gotoRoomImageView = [[UIImageView alloc] init];
|
||||
if (QXConfig.shared.model) {
|
||||
self.bgImageView.image = [UIImage imageNamed:QXConfig.shared.model.button_qwg];
|
||||
self.gotoRoomImageView.image = [UIImage imageNamed:QXConfig.shared.model.button_qwg];
|
||||
}else{
|
||||
self.bgImageView.image = [UIImage imageNamed:@"home_goto_room"];
|
||||
self.gotoRoomImageView.image = [UIImage imageNamed:@"home_goto_room"];
|
||||
}
|
||||
self.gotoRoomImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self.contentView addSubview:self.gotoRoomImageView];
|
||||
|
||||
@@ -39,10 +39,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
[self.view addSubview:self.contentWebView];
|
||||
[self.view addSubview:self.progressView];
|
||||
[self layoutConstraints];
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@%@?id=%ld",server,QXAppProtocol,self.type]];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
[self.contentWebView loadRequest:request];
|
||||
|
||||
@@ -287,10 +287,7 @@
|
||||
return frame;
|
||||
};
|
||||
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
model.checkBoxImages = @[[UIImage imageNamed:@"login_agreement_nor"],[UIImage imageNamed:@"login_agreement_sel"]];
|
||||
model.checkBoxWH = 30;
|
||||
model.privacyNavBackImage = [UIImage imageNamed:@"back"];
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RAddressOfMQTTServer;
|
||||
}
|
||||
QXLOG(@"当前mqtt-server%@",server);
|
||||
self.username = username;
|
||||
self.password = password;
|
||||
self.cliendId = cliendId;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#import "QXMenuPopView.h"
|
||||
#import "QXReportViewController.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXIMGroupSettingVC.h"
|
||||
@interface QXChatViewController ()<TUIChatConfigDelegate_Classic,QXMenuPopViewDelegate>
|
||||
@property (nonatomic,strong)QXChatTitleView *titleView;
|
||||
@end
|
||||
@@ -54,6 +55,8 @@
|
||||
return YES;
|
||||
}
|
||||
//-(BOOL)onUserAvatarLongPressed:(UIView *)view messageCellData:(TUIMessageCellData *)celldata{
|
||||
//// QXLOG(@"%@被长按了",celldata.senderName);
|
||||
// UIAlertController *al = [UIAlertController alertControllerWithTitle:@"" message:<#(nullable NSString *)#> preferredStyle:<#(UIAlertControllerStyle)#>];
|
||||
// return YES;
|
||||
//}
|
||||
//
|
||||
@@ -76,7 +79,7 @@
|
||||
}
|
||||
-(void)moreAction{
|
||||
if (self.data.groupID.length>0) {
|
||||
QXGuildGroupSettingVC *vc = [[QXGuildGroupSettingVC alloc] init];
|
||||
QXIMGroupSettingVC *vc = [[QXIMGroupSettingVC alloc] init];
|
||||
vc.groupId = self.data.groupID;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}else{
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// QXGroupMemberViewController.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/2.
|
||||
//
|
||||
|
||||
#import "QXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXGroupMemberViewController : QXBaseViewController
|
||||
@property (nonatomic,strong)NSString *groupId;
|
||||
/// 是否为群主 1 是群主 2不是群主
|
||||
@property (nonatomic,strong)NSString*isOwner;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
185
QXLive/Message(音信)/Controller/群聊/QXGroupMemberViewController.m
Normal file
185
QXLive/Message(音信)/Controller/群聊/QXGroupMemberViewController.m
Normal file
@@ -0,0 +1,185 @@
|
||||
//
|
||||
// QXGroupMemberViewController.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/2.
|
||||
//
|
||||
|
||||
#import "QXGroupMemberViewController.h"
|
||||
#import "QXMessageServices.h"
|
||||
#import "QXBlackListCell.h"
|
||||
#import "QXUserHomePageViewController.h"
|
||||
#import "ImSDK_Plus/V2TIMManager+Group.h"
|
||||
@interface QXGroupMemberViewController ()<UITableViewDataSource,UITableViewDelegate,QXBlackListCellDelegate,UITextFieldDelegate>
|
||||
@property (nonatomic,strong)UITableView *tableView;
|
||||
@property (nonatomic,strong)UIView *seachBgView;
|
||||
@property (nonatomic,strong)UIImageView *searchImageView;
|
||||
@property (nonatomic,strong)UITextField *textField;
|
||||
@property (nonatomic,strong)UIButton *searchBtn;
|
||||
@property (nonatomic,assign)BOOL isSearch;
|
||||
@end
|
||||
|
||||
@implementation QXGroupMemberViewController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
-(void)setNavgationItems{
|
||||
[super setNavgationItems];
|
||||
self.navigationItem.title = @"群聊成员";
|
||||
}
|
||||
|
||||
-(void)initSubViews{
|
||||
self.page = 1;
|
||||
|
||||
self.seachBgView = [[UIView alloc] initWithFrame:CGRectMake(16, NavContentHeight, SCREEN_WIDTH-16*2, 35)];
|
||||
self.seachBgView.backgroundColor = [UIColor colorWithHexString:@"#ffffff"];
|
||||
self.seachBgView.layer.masksToBounds = YES;
|
||||
self.seachBgView.layer.cornerRadius = 17.5;
|
||||
[self.view addSubview:self.seachBgView];
|
||||
|
||||
self.searchImageView = [[UIImageView alloc] initWithFrame:CGRectMake(8, 5.5, 24, 24)];
|
||||
self.searchImageView.image = [UIImage imageNamed:@"room_song_search"];
|
||||
[self.seachBgView addSubview:self.searchImageView];
|
||||
|
||||
self.textField = [[UITextField alloc] initWithFrame:CGRectMake(self.searchImageView.right+6, 0, self.seachBgView.width-self.searchImageView.right-6-8, 35)];
|
||||
self.textField.placeholder = @"请输入ID/用户名搜索";
|
||||
self.textField.font = [UIFont systemFontOfSize:14];
|
||||
[self.textField addTarget:self action:@selector(textDidChange:) forControlEvents:(UIControlEventEditingChanged)];
|
||||
self.textField.returnKeyType = UIReturnKeyDone;
|
||||
self.textField.delegate = self;
|
||||
self.textField.textColor = [UIColor colorWithHexString:@"#333333"];
|
||||
[self.seachBgView addSubview:self.textField];
|
||||
self.searchBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.seachBgView.width-60-10, 0, 60, 35)];
|
||||
[self.searchBtn setTitle:@"搜索" forState:(UIControlStateNormal)];
|
||||
self.searchBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.searchBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
[self.searchBtn addTarget:self action:@selector(searchAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.seachBgView addSubview:self.searchBtn];
|
||||
[self.view addSubview:self.tableView];
|
||||
[self getMemberListWithSearch:@""];
|
||||
}
|
||||
|
||||
-(void)getMemberListWithSearch:(NSString*)search{
|
||||
MJWeakSelf
|
||||
[QXMessageServices getGroupMemberListWithPage:self.page search:search guildId:self.groupId successBlock:^(NSArray<QXUserHomeModel *> * _Nonnull list) {
|
||||
if (weakSelf.page == 1) {
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
}
|
||||
[weakSelf.dataArray addObjectsFromArray:list];
|
||||
[weakSelf.tableView reloadData];
|
||||
if (list.count == 0) {
|
||||
weakSelf.tableView.mj_footer.state = MJRefreshStateNoMoreData;
|
||||
}else{
|
||||
[weakSelf.tableView.mj_footer endRefreshing];
|
||||
}
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
[weakSelf.tableView.mj_footer endRefreshing];
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)searchAction:(UIButton*)sender{
|
||||
self.isSearch = YES;
|
||||
[self getMemberListWithSearch:self.textField.text];
|
||||
}
|
||||
|
||||
-(void)textDidChange:(UITextField*)textField{
|
||||
if (textField.text.length == 0) {
|
||||
self.isSearch = NO;
|
||||
[self getMemberListWithSearch:@""];
|
||||
}
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXBlackListCell *cell = [QXBlackListCell cellWithTableView:tableView];
|
||||
cell.isNoIcon = YES;
|
||||
cell.cellType = QXBlackListCellTypeGroupMember;
|
||||
cell.groupMemberModel = self.dataArray[indexPath.row];
|
||||
cell.delegate = self;
|
||||
cell.removeBtn.hidden = !(self.isOwner.intValue==1);
|
||||
return cell;
|
||||
}
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
QXUserHomeModel *model = self.dataArray[indexPath.row];
|
||||
vc.user_id = model.user_id;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
-(void)didClickGroupMemberMoreBtnWithGroupMemberModel:(QXUserHomeModel *)groupMemberModel{
|
||||
UIAlertController*al =[UIAlertController alertControllerWithTitle:@"禁言" message:@"" preferredStyle:(UIAlertControllerStyleActionSheet)];
|
||||
if (groupMemberModel.is_mute.intValue == 1) {
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"解禁" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self muteMemberWithTime:0 groupMemberModel:groupMemberModel];
|
||||
}]];
|
||||
}else{
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"禁言1天" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self muteMemberWithTime:86400 groupMemberModel:groupMemberModel];
|
||||
}]];
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"禁言5天" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self muteMemberWithTime:86400*5 groupMemberModel:groupMemberModel];
|
||||
}]];
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"禁言10天" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self muteMemberWithTime:86400*10 groupMemberModel:groupMemberModel];
|
||||
}]];
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"禁言30天" style:(UIAlertActionStyleDefault) handler:^(UIAlertAction * _Nonnull action) {
|
||||
[self muteMemberWithTime:86400*30 groupMemberModel:groupMemberModel];
|
||||
}]];
|
||||
}
|
||||
[al addAction:[UIAlertAction actionWithTitle:@"取消" style:(UIAlertActionStyleCancel) handler:^(UIAlertAction * _Nonnull action) {
|
||||
|
||||
}]];
|
||||
[self presentViewController:al animated:YES completion:nil];
|
||||
}
|
||||
-(void)muteMemberWithTime:(uint32_t)time groupMemberModel:(QXUserHomeModel*)groupMemberModel{
|
||||
[[V2TIMManager sharedInstance] muteGroupMember:self.groupId member:[NSString stringWithFormat:@"u%@",groupMemberModel.user_id] muteTime:time succ:^{
|
||||
if (time == 0) {
|
||||
showToast(@"解禁成功");
|
||||
}else{
|
||||
showToast(@"禁言成功");
|
||||
}
|
||||
self.page = 1;
|
||||
if (self.isSearch) {
|
||||
[self getMemberListWithSearch:self.textField.text];
|
||||
}else{
|
||||
[self getMemberListWithSearch:@""];
|
||||
}
|
||||
} fail:^(int code, NSString * _Nullable desc) {
|
||||
showToast(desc);
|
||||
}];
|
||||
}
|
||||
-(UITableView *)tableView{
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, self.seachBgView.bottom+10, SCREEN_WIDTH, SCREEN_HEIGHT-self.seachBgView.bottom-10) style:(UITableViewStylePlain)];
|
||||
_tableView.dataSource = self;
|
||||
_tableView.delegate = self;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.rowHeight = 60;
|
||||
MJWeakSelf
|
||||
_tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
weakSelf.page = 1;
|
||||
if (self.isSearch) {
|
||||
[self getMemberListWithSearch:self.textField.text];
|
||||
}else{
|
||||
[self getMemberListWithSearch:@""];
|
||||
}
|
||||
}];
|
||||
_tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||
weakSelf.page++;
|
||||
if (self.isSearch) {
|
||||
[self getMemberListWithSearch:self.textField.text];
|
||||
}else{
|
||||
[self getMemberListWithSearch:@""];
|
||||
}
|
||||
}];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -41,10 +41,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
, 2)];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/union/setGroup?id=%@&guildId=%@",server,QXGlobal.shareGlobal.loginModel.token,self.groupId]];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
[self.contentWebView loadRequest:request];
|
||||
|
||||
16
QXLive/Message(音信)/Controller/群聊/QXIMGroupSettingVC.h
Normal file
16
QXLive/Message(音信)/Controller/群聊/QXIMGroupSettingVC.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QXIMGroupSettingVC.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/2.
|
||||
//
|
||||
|
||||
#import "QXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXIMGroupSettingVC : QXBaseViewController
|
||||
@property (nonatomic,strong)NSString *groupId;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
80
QXLive/Message(音信)/Controller/群聊/QXIMGroupSettingVC.m
Normal file
80
QXLive/Message(音信)/Controller/群聊/QXIMGroupSettingVC.m
Normal file
@@ -0,0 +1,80 @@
|
||||
//
|
||||
// QXIMGroupSettingVC.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/2.
|
||||
//
|
||||
|
||||
#import "QXIMGroupSettingVC.h"
|
||||
#import "QXIMGroupSettingView.h"
|
||||
#import "QXMessageServices.h"
|
||||
#import "QXGroupMemberViewController.h"
|
||||
#import "ImSDK_Plus/V2TIMManager+Group.h"
|
||||
@interface QXIMGroupSettingVC ()<QXIMGroupSettingViewDelegate>
|
||||
@property (nonatomic,strong)UIScrollView *scrollView;
|
||||
@property (nonatomic,strong)QXIMGroupSettingView *settingView;
|
||||
@property (nonatomic,strong)QXGroupSettingInfoModel *model;
|
||||
@end
|
||||
|
||||
@implementation QXIMGroupSettingVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:NO animated:YES];
|
||||
}
|
||||
-(void)setNavgationItems{
|
||||
[super setNavgationItems];
|
||||
self.navigationItem.title = @"群聊设置";
|
||||
}
|
||||
|
||||
-(void)initSubViews{
|
||||
self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, NavContentHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavContentHeight)];
|
||||
self.settingView = [[QXIMGroupSettingView alloc] initWithFrame:self.scrollView.bounds];
|
||||
self.settingView.delegate = self;
|
||||
[self.scrollView addSubview:self.settingView];
|
||||
[self.view addSubview:self.scrollView];
|
||||
[self getGroupInfo];
|
||||
}
|
||||
|
||||
-(void)previewMemberList{
|
||||
QXGroupMemberViewController *vc = [[QXGroupMemberViewController alloc] init];
|
||||
vc.groupId = self.groupId;
|
||||
vc.isOwner = self.model.is_deacon;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
-(void)saveGroupInfoWithGroupId:(NSString *)groupId notice:(NSString *)notice name:(NSString *)name{
|
||||
MJWeakSelf
|
||||
[QXMessageServices setGroupInfoWithGuildId:groupId name:name avatar:@"" notice:notice successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"修改成功");
|
||||
[weakSelf getGroupInfo];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)groupSetMute:(BOOL)isMute muteSwitch:(UISwitch *)muteSwitch{
|
||||
[[V2TIMManager sharedInstance] muteAllGroupMembers:self.groupId isMute:isMute succ:^{
|
||||
|
||||
} fail:^(int code, NSString * _Nullable desc) {
|
||||
if (isMute) {
|
||||
muteSwitch.on = NO;
|
||||
}else{
|
||||
muteSwitch.on = YES;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)getGroupInfo{
|
||||
MJWeakSelf
|
||||
[QXMessageServices getGroupSettingWithGuildId:self.groupId successBlock:^(QXGroupSettingInfoModel * _Nonnull model) {
|
||||
weakSelf.model = model;
|
||||
weakSelf.settingView.model = model;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
@end
|
||||
29
QXLive/Message(音信)/Model/QXGroupSettingInfoModel.h
Normal file
29
QXLive/Message(音信)/Model/QXGroupSettingInfoModel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// QXGroupSettingInfoModel.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/2.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXGroupSettingInfoModel : NSObject
|
||||
/// 群聊id
|
||||
@property (strong,nonatomic)NSString *guild_id;
|
||||
/// 群聊id
|
||||
@property (strong,nonatomic)NSString *name;
|
||||
/// 群公告
|
||||
@property (strong,nonatomic)NSString *notification;
|
||||
/// 群聊头像
|
||||
@property (strong,nonatomic)NSString *guild_cover;
|
||||
/// 是否为群主 1 是群主 2不是群主
|
||||
@property (strong,nonatomic)NSString *is_deacon;
|
||||
/// 群成员列表
|
||||
@property (strong,nonatomic)NSArray <QXUserModel*>*user_list;
|
||||
/// 是否被全员禁言 1 禁言 0未禁言
|
||||
@property (strong,nonatomic)NSString *mute_all_member;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
16
QXLive/Message(音信)/Model/QXGroupSettingInfoModel.m
Normal file
16
QXLive/Message(音信)/Model/QXGroupSettingInfoModel.m
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QXGroupSettingInfoModel.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/2.
|
||||
//
|
||||
|
||||
#import "QXGroupSettingInfoModel.h"
|
||||
|
||||
@implementation QXGroupSettingInfoModel
|
||||
+(NSDictionary<NSString *,id> *)modelContainerPropertyGenericClass{
|
||||
return @{
|
||||
@"user_list" : @"QXUserModel",
|
||||
};
|
||||
}
|
||||
@end
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "QXMessageModel.h"
|
||||
#import "QXGroupSettingInfoModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXMessageServices : NSObject
|
||||
@@ -38,6 +39,34 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
type:(NSString*)type
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
|
||||
/**
|
||||
群聊设置信息
|
||||
*/
|
||||
+(void)getGroupSettingWithGuildId:(NSString*)guild_id
|
||||
successBlock:(void (^)(QXGroupSettingInfoModel *model))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
|
||||
/**
|
||||
群聊成员
|
||||
*/
|
||||
+(void)getGroupMemberListWithPage:(NSInteger)page
|
||||
search:(NSString*)search
|
||||
guildId:(NSString*)guild_id
|
||||
successBlock:(void (^)(NSArray<QXUserHomeModel*> *list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
设置群聊信息
|
||||
*/
|
||||
+(void)setGroupInfoWithGuildId:(NSString*)guild_id
|
||||
name:(NSString*)name
|
||||
avatar:(NSString*)avatar
|
||||
notice:(NSString*)notice
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -68,4 +68,48 @@
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
+(void)getGroupSettingWithGuildId:(NSString*)guild_id
|
||||
successBlock:(void (^)(QXGroupSettingInfoModel *model))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXGroupSettingInfo parameters:@{@"guild_id":guild_id?:@""} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
QXGroupSettingInfoModel *model = [QXGroupSettingInfoModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
successBlock(model);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
+(void)getGroupMemberListWithPage:(NSInteger)page
|
||||
search:(NSString*)search
|
||||
guildId:(NSString*)guild_id
|
||||
successBlock:(void (^)(NSArray<QXUserHomeModel*> *list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
[[QXRequset shareInstance] getWithUrl:QXGroupMemberList parameters:@{@"page":[NSNumber numberWithInteger:page],@"guild_id":guild_id?:@"",@"search":search?:@""} needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSArray *list = [NSArray yy_modelArrayWithClass:[QXUserHomeModel class] json:responseObject[@"data"][@"list"]];
|
||||
successBlock(list);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
+(void)setGroupInfoWithGuildId:(NSString *)guild_id name:(NSString *)name avatar:(NSString *)avatar notice:(NSString *)notice successBlock:(void (^)(NSDictionary * _Nonnull))successBlock failBlock:(void (^)(NSError * _Nonnull, NSString * _Nonnull))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"guild_id":guild_id?:@"",
|
||||
@"name":name?name:@"",
|
||||
@"avatar":avatar?:@"",
|
||||
@"notice":notice?:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXSetGroupInfo parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -20,7 +20,24 @@
|
||||
|
||||
-(void)setModel:(QXMessageListModel *)model{
|
||||
_model = model;
|
||||
self.contentLabel.text = model.content;
|
||||
NSData *data = [model.content dataUsingEncoding:NSUnicodeStringEncoding];
|
||||
// 创建段落样式来设置行间距
|
||||
NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
|
||||
[paragraphStyle setLineSpacing:8]; // 设置行间距为8磅,可根据需要调整
|
||||
|
||||
// 创建options字典,包含文档类型和默认属性
|
||||
NSDictionary *options = @{
|
||||
NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType,
|
||||
NSDefaultAttributesDocumentAttribute: @{
|
||||
NSParagraphStyleAttributeName: paragraphStyle
|
||||
}
|
||||
};
|
||||
// 转换为富文本
|
||||
NSAttributedString *html = [[NSAttributedString alloc] initWithData:data
|
||||
options:options
|
||||
documentAttributes:nil
|
||||
error:nil];
|
||||
self.contentLabel.attributedText = html;
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:model.createtime.longLongValue]; //此处根据项目需求,选择是否除以1000 , 如果时间戳精确到秒则去掉1000
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
|
||||
formatter.dateFormat = @"yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
|
||||
-(void)setModel:(QXMessageListModel *)model{
|
||||
_model = model;
|
||||
self.contentLabel.text = model.content;
|
||||
NSData *data = [model.content dataUsingEncoding:NSUnicodeStringEncoding];
|
||||
NSDictionary *options = @{NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType};
|
||||
NSAttributedString *html = [[NSAttributedString alloc]initWithData:data options:options documentAttributes:nil error:nil];
|
||||
self.contentLabel.attributedText = html;
|
||||
[self.noticeImageView sd_setImageWithURL:[NSURL URLWithString:model.image]];
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:model.createtime.longLongValue]; //此处根据项目需求,选择是否除以1000 , 如果时间戳精确到秒则去掉1000
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
|
||||
|
||||
31
QXLive/Message(音信)/View/群聊设置/QXIMGroupSettingView.h
Normal file
31
QXLive/Message(音信)/View/群聊设置/QXIMGroupSettingView.h
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// QXIMGroupSettingView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/2.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXGroupSettingInfoModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol QXIMGroupSettingViewDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
-(void)previewMemberList;
|
||||
-(void)groupSetMute:(BOOL)isMute muteSwitch:(UISwitch*)muteSwitch;
|
||||
-(void)saveGroupInfoWithGroupId:(NSString*)groupId notice:(NSString*)notice name:(NSString*)name;
|
||||
@end
|
||||
@interface QXIMGroupSettingView : UIView
|
||||
@property (nonatomic,strong)QXGroupSettingInfoModel*model;
|
||||
@property (nonatomic,weak)id<QXIMGroupSettingViewDelegate>delegate;
|
||||
@end
|
||||
|
||||
@interface QXIMGroupMemberCell :UICollectionViewCell
|
||||
@property (nonatomic,strong)UIImageView *headerImageView;
|
||||
@property (nonatomic,strong)UILabel *nameLabel;
|
||||
@property (nonatomic,strong)QXUserModel *model;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
224
QXLive/Message(音信)/View/群聊设置/QXIMGroupSettingView.m
Normal file
224
QXLive/Message(音信)/View/群聊设置/QXIMGroupSettingView.m
Normal file
@@ -0,0 +1,224 @@
|
||||
//
|
||||
// QXIMGroupSettingView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/2.
|
||||
//
|
||||
|
||||
#import "QXIMGroupSettingView.h"
|
||||
#import "QXTextView.h"
|
||||
@interface QXIMGroupSettingView()<UICollectionViewDelegate,UICollectionViewDataSource>
|
||||
@property (nonatomic,strong)UIImageView *guildImageView;
|
||||
@property (nonatomic,strong)UILabel *guildLabel;
|
||||
|
||||
@property (nonatomic,strong)UILabel *groupMemberTitleLabel;
|
||||
@property (nonatomic,strong)UIButton *moreMemberBtn;
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
|
||||
@property (nonatomic,strong)UIView *editGroupNameView;
|
||||
@property (nonatomic,strong)UITextField *editGroupTextField;
|
||||
|
||||
@property (nonatomic,strong)UILabel *noticeTitleLabel;
|
||||
@property (nonatomic,strong)QXTextView *textView;
|
||||
|
||||
@property (nonatomic,strong)UILabel *muteLabel;
|
||||
@property (nonatomic,strong)UISwitch *muteSwitch;
|
||||
@property (nonatomic,strong)NSMutableArray *dataArray;
|
||||
|
||||
@property (nonatomic,strong)UIButton *saveBtn;
|
||||
@end
|
||||
@implementation QXIMGroupSettingView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
|
||||
self.guildImageView = [[UIImageView alloc] initWithFrame:CGRectMake(16, 0, 60, 60)];
|
||||
self.guildImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
[self.guildImageView addRoundedCornersWithRadius:30];
|
||||
[self addSubview:self.guildImageView];
|
||||
|
||||
self.guildLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.guildImageView.right+10, self.guildLabel.top, self.width-self.guildImageView.right-10-16, self.guildImageView.height)];
|
||||
self.guildLabel.textColor = [UIColor colorWithHexString:@"#333333"];
|
||||
self.guildLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self addSubview:self.guildLabel];
|
||||
|
||||
|
||||
self.groupMemberTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.guildImageView.left, self.guildImageView.bottom+15, 100, 20)];
|
||||
self.groupMemberTitleLabel.textColor = RGB16(0x000000);
|
||||
self.groupMemberTitleLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
self.groupMemberTitleLabel.text = @"群组成员";
|
||||
[self addSubview:self.groupMemberTitleLabel];
|
||||
|
||||
self.moreMemberBtn = [[UIButton alloc] initWithFrame:CGRectMake(self.width-100-16, self.groupMemberTitleLabel.top, 100, 20)];
|
||||
[self.moreMemberBtn setTitle:@"查看成员>" forState:(UIControlStateNormal)];
|
||||
[self.moreMemberBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)];
|
||||
self.moreMemberBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.moreMemberBtn addTarget:self action:@selector(moreAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.moreMemberBtn];
|
||||
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
int itemWidth = 60;
|
||||
layout.itemSize = CGSizeMake(itemWidth, itemWidth+20);
|
||||
layout.minimumLineSpacing = 12;
|
||||
layout.minimumInteritemSpacing = 12;
|
||||
// layout.sectionInset = UIEdgeInsetsMake(0, 16, 0, 16);
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(self.guildImageView.left, self.groupMemberTitleLabel.bottom+15, self.width-32, itemWidth+20) collectionViewLayout:layout];
|
||||
[self.collectionView registerClass:[QXIMGroupMemberCell class] forCellWithReuseIdentifier:@"QXIMGroupMemberCell"];
|
||||
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 addSubview:self.collectionView];
|
||||
|
||||
self.editGroupNameView = [[UIView alloc] initWithFrame:CGRectMake(16, self.collectionView.bottom+10, self.width-32, 44)];
|
||||
self.editGroupNameView.backgroundColor = RGB(236, 240, 246);
|
||||
[self.editGroupNameView addRoundedCornersWithRadius:8];
|
||||
[self addSubview:self.editGroupNameView];
|
||||
|
||||
self.editGroupTextField = [[UITextField alloc] initWithFrame:CGRectMake(16, 0, self.editGroupNameView.width-32, 44)];
|
||||
self.editGroupTextField.font = [UIFont systemFontOfSize:14];
|
||||
self.editGroupTextField.textColor = RGB16(0x333333);
|
||||
self.editGroupTextField.placeholder = @"请输入群聊名称";
|
||||
[self.editGroupNameView addSubview:self.editGroupTextField];
|
||||
|
||||
self.noticeTitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.guildImageView.left, self.editGroupNameView.bottom+10, self.width-32, 30)];
|
||||
self.noticeTitleLabel.text = @"群聊公告";
|
||||
self.noticeTitleLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
self.noticeTitleLabel.textColor = RGB16(0x000000);
|
||||
[self addSubview:self.noticeTitleLabel];
|
||||
|
||||
self.textView = [[QXTextView alloc] initWithFrame:CGRectMake(self.guildImageView.left, self.noticeTitleLabel.bottom+10, self.width-32, 120)];
|
||||
self.textView.placehoulder = @"请输入群聊公告";
|
||||
self.textView.placehoulderFont = [UIFont systemFontOfSize:14];
|
||||
self.textView.font = [UIFont systemFontOfSize:14];
|
||||
self.textView.backgroundColor = RGB(236, 240, 246);
|
||||
[self.textView addRoundedCornersWithRadius:8];
|
||||
self.textView.maxLength = 300;
|
||||
[self addSubview:self.textView];
|
||||
|
||||
|
||||
self.muteLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.guildImageView.left, self.textView.bottom+10, 200, 40)];
|
||||
self.muteLabel.text = @"全员禁言";
|
||||
self.muteLabel.textColor = RGB16(0x000000);
|
||||
self.muteLabel.font = [UIFont boldSystemFontOfSize:16];
|
||||
self.muteLabel.hidden = YES;
|
||||
[self addSubview:self.muteLabel];
|
||||
|
||||
self.muteSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(self.width-60-16, self.muteLabel.top+5, 60, 40)];
|
||||
[self.muteSwitch addTarget:self action:@selector(muteAction) forControlEvents:(UIControlEventValueChanged)];
|
||||
self.muteSwitch.hidden = YES;
|
||||
[self addSubview:self.muteSwitch];
|
||||
|
||||
self.saveBtn = [[UIButton alloc] initWithFrame:CGRectMake((self.width-300)/2, self.muteLabel.bottom+10, 300, 40)];
|
||||
[self.saveBtn setTitle:@"确认保存" forState:(UIControlStateNormal)];
|
||||
[self.saveBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
||||
self.saveBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.saveBtn addRoundedCornersWithRadius:20];
|
||||
self.saveBtn.backgroundColor = QXConfig.themeColor;
|
||||
[self.saveBtn addTarget:self action:@selector(saveAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.saveBtn];
|
||||
self.saveBtn.hidden = YES;
|
||||
}
|
||||
-(void)setModel:(QXGroupSettingInfoModel *)model{
|
||||
_model = model;
|
||||
[self.guildImageView sd_setImageWithURL:[NSURL URLWithString:model.guild_cover]];
|
||||
self.guildLabel.text = model.name;
|
||||
self.editGroupTextField.text = model.name;
|
||||
self.textView.text = model.notification;
|
||||
[self.muteSwitch setOn:model.mute_all_member.intValue==1];
|
||||
[self.collectionView reloadData];
|
||||
if (model.is_deacon.intValue == 2) {
|
||||
self.muteSwitch.hidden = YES;
|
||||
self.muteLabel.hidden = YES;
|
||||
self.saveBtn.hidden = YES;
|
||||
self.editGroupTextField.userInteractionEnabled = NO;
|
||||
self.textView.userInteractionEnabled = NO;
|
||||
}else{
|
||||
self.muteSwitch.hidden = NO;
|
||||
self.muteLabel.hidden = NO;
|
||||
self.saveBtn.hidden = NO;
|
||||
self.editGroupTextField.userInteractionEnabled = YES;
|
||||
self.textView.userInteractionEnabled = YES;
|
||||
}
|
||||
}
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.model.user_list.count;
|
||||
}
|
||||
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXIMGroupMemberCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXIMGroupMemberCell" forIndexPath:indexPath];
|
||||
QXUserModel *model = self.model.user_list[indexPath.row];
|
||||
cell.model = model;
|
||||
return cell;
|
||||
}
|
||||
|
||||
-(void)moreAction:(UIButton*)sender{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(previewMemberList)]) {
|
||||
[self.delegate previewMemberList];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)saveAction{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(saveGroupInfoWithGroupId:notice:name:)]) {
|
||||
[self.delegate saveGroupInfoWithGroupId:self.model.guild_id notice:self.textView.text name:self.editGroupTextField.text];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)muteAction{
|
||||
if (self.muteSwitch.isOn) {
|
||||
QXLOG(@"打开全局禁言");
|
||||
}else{
|
||||
QXLOG(@"关闭全局禁言");
|
||||
}
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(groupSetMute:muteSwitch:)]) {
|
||||
[self.delegate groupSetMute:self.muteSwitch.isOn muteSwitch:self.muteSwitch];
|
||||
}
|
||||
}
|
||||
|
||||
-(NSMutableArray *)dataArray{
|
||||
if (!_dataArray) {
|
||||
_dataArray = [NSMutableArray array];
|
||||
}
|
||||
return _dataArray;
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXIMGroupMemberCell
|
||||
|
||||
-(instancetype)initWithFrame:(CGRect)frame{
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
-(void)setModel:(QXUserModel *)model{
|
||||
_model = model;
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:model.avatar]];
|
||||
self.nameLabel.text = model.nickname;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.headerImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.width)];
|
||||
self.headerImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
self.headerImageView.image = [UIImage imageNamed:@"user_header_placehoulder"];
|
||||
[self.headerImageView addRoundedCornersWithRadius:self.width/2];
|
||||
[self.contentView addSubview:self.headerImageView];
|
||||
|
||||
self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, self.headerImageView.bottom, self.width, 20)];
|
||||
self.nameLabel.textColor = RGB16(0x666666);
|
||||
self.nameLabel.font = [UIFont systemFontOfSize:14];
|
||||
self.nameLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.nameLabel.text = @"夏末";
|
||||
[self.contentView addSubview:self.nameLabel];
|
||||
}
|
||||
@end
|
||||
@@ -39,6 +39,7 @@
|
||||
#import "QXBodyPriceRuleView.h"
|
||||
#import "QXFamilyViewController.h"
|
||||
#import "QXNobilityDetailViewController.h"
|
||||
#import "QXPropShopVC.h"
|
||||
#import <WXApi.h>
|
||||
|
||||
@interface QXMineViewController ()<UITableViewDelegate,UITableViewDataSource,QXMineServiceCellDelegate,QXMainHeaderViewDelegate>
|
||||
@@ -246,7 +247,8 @@
|
||||
break;
|
||||
case QXMainHeaderOptionTypeShop:{
|
||||
QXLOG(@"跳转商城");
|
||||
QXPropShopViewController *vc = [[QXPropShopViewController alloc] init];
|
||||
// QXPropShopViewController *vc = [[QXPropShopViewController alloc] init];
|
||||
QXPropShopVC *vc = [[QXPropShopVC alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import "JXCategoryView.h"
|
||||
#import "QXDressSubViewController.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXPropShopViewController.h"
|
||||
#import "QXPropShopVC.h"
|
||||
|
||||
@interface QXDressViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
|
||||
@property (nonatomic,strong)JXCategoryTitleView *categoryView;
|
||||
@@ -40,7 +40,7 @@
|
||||
}
|
||||
|
||||
-(void)recordAction{
|
||||
QXPropShopViewController *vc = [[QXPropShopViewController alloc] init];
|
||||
QXPropShopVC *vc = [[QXPropShopVC alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
|
||||
@@ -138,10 +138,7 @@
|
||||
}
|
||||
|
||||
-(void)helpAction{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
QXHeartBeatLevelRuleView *view = [[QXHeartBeatLevelRuleView alloc] init];
|
||||
NSString *urlStr = [NSString stringWithFormat:@"%@api/Page/page_show?id=31",server];
|
||||
view.rule = urlStr;
|
||||
|
||||
@@ -43,10 +43,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
, 2)];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSInteger safeTop = kSafeAreaTop;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@web/index.html#/pages/union/index?id=%@&h=%ld",server,[QXGlobal shareGlobal].loginModel.token,safeTop];
|
||||
|
||||
|
||||
@@ -60,10 +60,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
, 2)];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSInteger safeTop = kSafeAreaTop;
|
||||
NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/help?id=%@&h=%ld",server,[QXGlobal shareGlobal].loginModel.token,safeTop]];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
|
||||
@@ -82,10 +82,7 @@
|
||||
}];
|
||||
}
|
||||
-(void)helpAction{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"34"];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
|
||||
@@ -99,10 +99,7 @@
|
||||
}
|
||||
}
|
||||
-(void)helpAction{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"33"];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
|
||||
@@ -40,10 +40,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
, 2)];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSInteger safeTop = kSafeAreaTop;
|
||||
NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/other/grade?id=%@&type=%d&h=%ld",server,[QXGlobal shareGlobal].loginModel.token,0,safeTop]];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
|
||||
@@ -176,10 +176,7 @@
|
||||
}
|
||||
-(void)agreementAction{
|
||||
// id = 30;
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"30"];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
|
||||
@@ -56,10 +56,7 @@
|
||||
}
|
||||
|
||||
-(void)helpAction{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"29"];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
|
||||
@@ -108,10 +108,7 @@
|
||||
|
||||
|
||||
-(void)helpAction{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"29"];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
|
||||
@@ -41,10 +41,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
}
|
||||
- (void)loadData {
|
||||
// H5ServerUrl
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSInteger safeTop = kSafeAreaTop;
|
||||
NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/aboutUs?h=%ld",server,safeTop];
|
||||
NSURL* url=[NSURL URLWithString:urlStr];
|
||||
|
||||
18
QXLive/Mine(音域)/Controller/道具商城/QXPropShopSubVC.h
Normal file
18
QXLive/Mine(音域)/Controller/道具商城/QXPropShopSubVC.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// QXPropShopSubVC.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/3.
|
||||
//
|
||||
|
||||
#import "QXBaseViewController.h"
|
||||
#import "JXCategoryView.h"
|
||||
#import "QXUserDressModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXPropShopSubVC : QXBaseViewController<JXCategoryListContentViewDelegate>
|
||||
@property (nonatomic,strong)QXUserDressTypeModel *model;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
110
QXLive/Mine(音域)/Controller/道具商城/QXPropShopSubVC.m
Normal file
110
QXLive/Mine(音域)/Controller/道具商城/QXPropShopSubVC.m
Normal file
@@ -0,0 +1,110 @@
|
||||
//
|
||||
// QXPropShopSubVC.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/3.
|
||||
//
|
||||
|
||||
#import "QXPropShopSubVC.h"
|
||||
#import "QXGiftPlayerManager.h"
|
||||
#import "QXDressShopCell.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXDressShopBuyView.h"
|
||||
#import "QXRechargeViewcController.h"
|
||||
@interface QXPropShopSubVC ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,QXDressShopBuyViewDelegate>
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
@property (nonatomic,strong)QXEffectContentView *fullEffectView;
|
||||
@end
|
||||
|
||||
@implementation QXPropShopSubVC
|
||||
-(UIView *)listView{
|
||||
return self.view;
|
||||
}
|
||||
-(void)listWillAppear{
|
||||
[self getDressList];
|
||||
}
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
-(void)initSubViews{
|
||||
self.bgImageHidden = YES;
|
||||
|
||||
[self.view addSubview:self.collectionView];
|
||||
[self.view addSubview:self.fullEffectView];
|
||||
}
|
||||
-(void)viewDidLayoutSubviews{
|
||||
[super viewDidLayoutSubviews];
|
||||
self.collectionView.frame = CGRectMake(0, 12, SCREEN_WIDTH, self.view.height);
|
||||
}
|
||||
-(void)getDressList{
|
||||
@weakify(self)
|
||||
[QXMineNetwork shopDressListWithType:self.model.id successBlock:^(NSArray<QXShopDressModel *> * _Nonnull list) {
|
||||
@strongify(self);
|
||||
[self.dataArray removeAllObjects];
|
||||
[self.dataArray addObjectsFromArray:list];
|
||||
[self.collectionView reloadData];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXDressShopCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXDressShopCell" forIndexPath:indexPath];
|
||||
cell.model = self.dataArray[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
int width = (SCREEN_WIDTH-15*2-15*2-1)/3;
|
||||
return CGSizeMake((int)width, (int)width-20+87);
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXShopDressModel *model = self.dataArray[indexPath.row];
|
||||
QXDressShopBuyView *buyView = [[QXDressShopBuyView alloc] init];
|
||||
buyView.typeId = self.model.id;
|
||||
buyView.model = model;
|
||||
buyView.delegate = self;
|
||||
[buyView showInView:KEYWINDOW];
|
||||
}
|
||||
|
||||
-(void)didClickRecharge{
|
||||
QXRechargeViewcController *vc = [[QXRechargeViewcController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
-(UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.minimumLineSpacing = 15;
|
||||
layout.minimumInteritemSpacing = 15;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
[_collectionView registerNib:[UINib nibWithNibName:@"QXDressShopCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:@"QXDressShopCell"];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
- (QXEffectContentView *)fullEffectView {
|
||||
if (!_fullEffectView) {
|
||||
_fullEffectView = [[QXEffectContentView alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
_fullEffectView.queue = dispatch_queue_create("qx_room_full_preview_message.com", NULL);
|
||||
_fullEffectView.hidden = YES;
|
||||
}
|
||||
return _fullEffectView;
|
||||
}
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
16
QXLive/Mine(音域)/Controller/道具商城/QXPropShopVC.h
Normal file
16
QXLive/Mine(音域)/Controller/道具商城/QXPropShopVC.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// QXPropShopVC.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/3.
|
||||
//
|
||||
|
||||
#import "QXBaseViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXPropShopVC : QXBaseViewController
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
120
QXLive/Mine(音域)/Controller/道具商城/QXPropShopVC.m
Normal file
120
QXLive/Mine(音域)/Controller/道具商城/QXPropShopVC.m
Normal file
@@ -0,0 +1,120 @@
|
||||
//
|
||||
// QXPropShopVC.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/3.
|
||||
//
|
||||
|
||||
#import "QXPropShopVC.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXPropShopSubVC.h"
|
||||
#import <SDCycleScrollView/SDCycleScrollView.h>
|
||||
#import "QXHomePageNetwork.h"
|
||||
@interface QXPropShopVC ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate,SDCycleScrollViewDelegate>
|
||||
@property (nonatomic,strong)JXCategoryTitleView *categoryView;
|
||||
@property (nonatomic,strong)JXCategoryListContainerView *containerView;
|
||||
@property (nonatomic,strong)NSMutableArray <UIViewController*>*listVCArray;
|
||||
@property (nonatomic,strong)NSMutableArray *titles;
|
||||
@property (nonatomic,strong)SDCycleScrollView *cycleScrollView;
|
||||
@end
|
||||
|
||||
@implementation QXPropShopVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
-(void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:NO animated:YES];
|
||||
}
|
||||
-(void)setNavgationItems{
|
||||
[super setNavgationItems];
|
||||
self.navigationItem.title = QXText(@"道具商城");
|
||||
}
|
||||
- (void)initSubViews{
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
// self.titles = @[QXText(@"头像框"),QXText(@"座驾"),QXText(@"气泡"),QXText(@"个人靓号"),QXText(@"房间靓号"),QXText(@"工会靓号")];
|
||||
self.listVCArray = [NSMutableArray array];
|
||||
self.cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(15, kSafeAreaTop+44, SCREEN_WIDTH-30, 100) delegate:self placeholderImage:nil];
|
||||
self.cycleScrollView.bannerImageViewContentMode = UIViewContentModeScaleAspectFill;
|
||||
self.cycleScrollView.backgroundColor = UIColor.clearColor;
|
||||
[self.cycleScrollView addRoundedCornersWithRadius:8];
|
||||
[self.view addSubview:self.cycleScrollView];
|
||||
self.categoryView = [[JXCategoryTitleView alloc] init];
|
||||
self.categoryView.frame = CGRectMake(15, self.cycleScrollView.bottom, SCREEN_WIDTH-30, 44);
|
||||
self.categoryView.delegate = self;
|
||||
// self.categoryView.titles = self.titles;
|
||||
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"];
|
||||
self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"];
|
||||
self.categoryView.cellWidth = JXCategoryViewAutomaticDimension;
|
||||
self.categoryView.contentEdgeInsetLeft = 0;
|
||||
self.categoryView.cellSpacing = 18;
|
||||
self.categoryView.contentEdgeInsetLeft = 8;
|
||||
// self.categoryView.titleLabelZoomScale = 1.1;
|
||||
self.categoryView.titleLabelZoomEnabled = YES;
|
||||
self.categoryView.titleFont = [UIFont boldSystemFontOfSize:14];
|
||||
self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:16];
|
||||
self.categoryView.averageCellSpacingEnabled = NO;
|
||||
JXCategoryIndicatorImageView *indicatorView = [[JXCategoryIndicatorImageView alloc] init];
|
||||
indicatorView.indicatorImageView.image = [UIImage imageNamed:@"home_slider"];
|
||||
indicatorView.indicatorImageViewSize = CGSizeMake(40, 8);
|
||||
indicatorView.verticalMargin = 11;
|
||||
self.categoryView.indicators = @[indicatorView];
|
||||
self.containerView = [[JXCategoryListContainerView alloc] initWithType:(JXCategoryListContainerType_CollectionView) delegate:self];
|
||||
self.containerView.frame = CGRectMake(0, self.categoryView.bottom, SCREEN_WIDTH, SCREEN_HEIGHT-self.categoryView.bottom);
|
||||
[self.view addSubview:self.categoryView];
|
||||
[self.view addSubview:self.containerView];
|
||||
self.categoryView.listContainer = self.containerView;
|
||||
}
|
||||
-(void)getData{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getDressTypeListSuccessBlock:^(NSArray<QXUserDressTypeModel *> * _Nonnull list) {
|
||||
[weakSelf.dataArray removeAllObjects];
|
||||
[weakSelf.dataArray addObjectsFromArray:list];
|
||||
for (QXUserDressTypeModel*model in list) {
|
||||
[weakSelf.titles addObject:model.name];
|
||||
}
|
||||
weakSelf.categoryView.titles = weakSelf.titles;
|
||||
[weakSelf.categoryView reloadData];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
[self getBanner];
|
||||
}
|
||||
|
||||
-(void)getBanner{
|
||||
@weakify(self)
|
||||
[QXHomePageNetwork homeBannerWithType:@"7" successBlock:^(NSArray<QXBanner *> * _Nonnull list) {
|
||||
@strongify(self)
|
||||
NSMutableArray *arr = [NSMutableArray array];
|
||||
for (QXBanner *banner in list) {
|
||||
[arr addObject:banner.image];
|
||||
}
|
||||
// [self.bannerArry removeAllObjects];
|
||||
// [self.bannerArry addObjectsFromArray:list];
|
||||
// self.appStoreView.bannerArray = list;
|
||||
self.cycleScrollView.imageURLStringsGroup = arr;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
-(NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
|
||||
return self.dataArray.count;
|
||||
}
|
||||
-(id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index{
|
||||
QXPropShopSubVC *vc = [[QXPropShopSubVC alloc] init];
|
||||
QXUserDressTypeModel *model = self.dataArray[index];
|
||||
vc.model = model;
|
||||
return vc;
|
||||
}
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
// self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
|
||||
}
|
||||
-(NSMutableArray *)titles{
|
||||
if (!_titles) {
|
||||
_titles = [NSMutableArray array];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
@end
|
||||
@@ -60,10 +60,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
, 2)];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/prop/propMall?id=%@&is_show=%@",server,[QXGlobal shareGlobal].loginModel.token,QXGlobal.shareGlobal.isAppStore?@"0":@"1"]];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
[self.contentWebView loadRequest:request];
|
||||
|
||||
@@ -62,10 +62,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
, 2)];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSInteger safeTop = kSafeAreaTop;
|
||||
NSURL* url=[NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/other/income??id=%@&h=%ld&is_show=%@",server,[QXGlobal shareGlobal].loginModel.token,safeTop,QXGlobal.shareGlobal.isAppStore?@"0":@"1"]];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
|
||||
@@ -30,6 +30,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic, copy)NSString *user_id;
|
||||
/// 点唱用户昵称
|
||||
@property(nonatomic, copy)NSString *nickname;
|
||||
/// 用户code
|
||||
@property(nonatomic, copy)NSString *user_code;
|
||||
/// 点唱用户头像
|
||||
@property(nonatomic, copy)NSString *avatar;
|
||||
/// 点唱用户装扮
|
||||
|
||||
@@ -45,4 +45,57 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 类型name
|
||||
@property (nonatomic,strong)NSString *name;
|
||||
@end
|
||||
|
||||
@interface QXShopDressModel : NSObject
|
||||
/// 装扮名称
|
||||
@property (nonatomic,strong)NSString *title;
|
||||
/// 装扮id
|
||||
@property (nonatomic,strong)NSString *did;
|
||||
/// 类型:1头像框 2坐骑 3资料展示特效 4光圈 5气泡 6个人靓号 7房间靓号 8工会靓号 100热门
|
||||
@property (nonatomic,strong)NSString *type;
|
||||
/// 展示图片
|
||||
@property (nonatomic,strong)NSString *base_image;
|
||||
/// 播放图像
|
||||
@property (nonatomic,strong)NSString *play_image;
|
||||
/// 实际价格(金币)
|
||||
@property (nonatomic,strong)NSString *price;
|
||||
/// 靓号
|
||||
@property (nonatomic,strong)NSString *special_num;
|
||||
/// 原价
|
||||
@property (nonatomic,strong)NSString *original_price;
|
||||
/// 折扣
|
||||
@property (nonatomic,strong)NSString *discount;
|
||||
/// 折扣字段
|
||||
@property (nonatomic,strong)NSString *discount_str;
|
||||
|
||||
@end
|
||||
|
||||
@class QXShopUserModel,QXShopDressInfoModel,QXShopDressPriceModel;
|
||||
@interface QXShopDressDetailModel : NSObject
|
||||
@property (nonatomic,strong)QXShopUserModel *user_info;
|
||||
@property (nonatomic,strong)QXShopDressInfoModel *decorate;
|
||||
@end
|
||||
|
||||
@interface QXShopUserModel :NSObject
|
||||
@property (nonatomic,strong)NSString *user_id;
|
||||
@property (nonatomic,strong)NSString *user_coin;
|
||||
@end
|
||||
|
||||
@interface QXShopDressInfoModel :NSObject
|
||||
@property (nonatomic,strong)NSString *title;
|
||||
@property (nonatomic,strong)NSArray<QXShopDressPriceModel*> *price_list;
|
||||
@property (nonatomic,strong)NSString *price;
|
||||
@property (nonatomic,strong)NSString *base_image;
|
||||
@end
|
||||
|
||||
|
||||
@interface QXShopDressPriceModel : NSObject
|
||||
@property (nonatomic,strong)NSString*price;
|
||||
@property (nonatomic,strong)NSString*discount;
|
||||
@property (nonatomic,strong)NSString*day;
|
||||
@property (nonatomic,strong)NSString*month;
|
||||
@property (nonatomic,strong)NSString*end_time;
|
||||
@property (nonatomic,assign)BOOL isSelected;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -16,3 +16,39 @@
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation QXShopDressModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation QXShopDressDetailModel
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"user_info" : [QXShopUserModel class],
|
||||
@"decorate" : [QXShopDressInfoModel class]
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@implementation QXShopUserModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
@implementation QXShopDressInfoModel
|
||||
|
||||
+ (NSDictionary *)modelContainerPropertyGenericClass {
|
||||
return @{@"price_list" : [QXShopDressPriceModel class],
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
@implementation QXShopDressPriceModel
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -132,6 +132,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 是否使用靓号 0未使用 1 已使用
|
||||
@property (nonatomic,strong)NSString *is_use_code;
|
||||
|
||||
@property (nonatomic,strong)NSString *in_room_id;
|
||||
|
||||
@property (nonatomic,strong)NSString *is_mute;
|
||||
|
||||
@property (nonatomic,strong)QXUserCpInfoModel *cp_info;
|
||||
|
||||
@property (nonatomic,strong)QXUserHomeModel *master;
|
||||
|
||||
@@ -1471,6 +1471,28 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
+(void)getAppConfigSuccessBlock:(void (^)(QXConfigModel* config))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
/**
|
||||
道具商城装饰列表
|
||||
*/
|
||||
+(void)shopDressListWithType:(NSString*)type
|
||||
successBlock:(void (^)(NSArray< QXShopDressModel*>* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
道具商城装饰详情
|
||||
*/
|
||||
+(void)shopDressDetailWithDid:(NSString*)did
|
||||
successBlock:(void (^)(QXShopDressDetailModel*model))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
|
||||
/**
|
||||
购买道具
|
||||
*/
|
||||
+(void)shopDressBuyWithDid:(NSString*)did
|
||||
day:(NSString*)day
|
||||
num:(NSString*)num
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@@ -2975,4 +2975,64 @@
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
道具商城装饰列表
|
||||
*/
|
||||
+(void)shopDressListWithType:(NSString*)type
|
||||
successBlock:(void (^)(NSArray< QXShopDressModel*>* list))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"type":type?:@"",
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXShopDressList parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
NSArray*list = [NSArray yy_modelArrayWithClass:[QXShopDressModel class] json:responseObject[@"data"]];
|
||||
successBlock(list);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
道具商城装饰详情
|
||||
*/
|
||||
+(void)shopDressDetailWithDid:(NSString*)did
|
||||
successBlock:(void (^)(QXShopDressDetailModel*model))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"did":did?:@"",
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXShopDressDetail parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
QXShopDressDetailModel *model = [QXShopDressDetailModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
successBlock(model);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
|
||||
/**
|
||||
购买道具
|
||||
*/
|
||||
+(void)shopDressBuyWithDid:(NSString*)did
|
||||
day:(NSString*)day
|
||||
num:(NSString*)num
|
||||
successBlock:(void (^)(NSDictionary* dict))successBlock
|
||||
failBlock:(void (^)(NSError * error, NSString * msg))failBlock{
|
||||
NSDictionary *parameters =@{
|
||||
@"did":did?:@"",
|
||||
@"day":day?:@"",
|
||||
@"num":num?:@""
|
||||
};
|
||||
[[QXRequset shareInstance] postWithUrl:QXShopBuyDress parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (successBlock) {
|
||||
successBlock(responseObject[@"data"]);
|
||||
}
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
failBlock(error,msg);
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
25
QXLive/Mine(音域)/View/个性装扮/QXDressShopBuyView.h
Normal file
25
QXLive/Mine(音域)/View/个性装扮/QXDressShopBuyView.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// QXDressShopBuyView.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/3.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXUserDressModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol QXDressShopBuyViewDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
-(void)didClickRecharge;
|
||||
|
||||
@end
|
||||
@interface QXDressShopBuyView : UIView
|
||||
@property (nonatomic,strong)NSString *typeId;
|
||||
@property (nonatomic,strong)QXShopDressModel *model;
|
||||
@property (nonatomic,weak)id<QXDressShopBuyViewDelegate>delegate;
|
||||
-(void)showInView:(UIView *)view;
|
||||
-(void)hide;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
329
QXLive/Mine(音域)/View/个性装扮/QXDressShopBuyView.m
Normal file
329
QXLive/Mine(音域)/View/个性装扮/QXDressShopBuyView.m
Normal file
@@ -0,0 +1,329 @@
|
||||
//
|
||||
// QXDressShopBuyView.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/3.
|
||||
//
|
||||
|
||||
#import "QXDressShopBuyView.h"
|
||||
#import "QXSettingCell.h"
|
||||
#import "QXMineNetwork.h"
|
||||
#import "QXSelectAuctionInfoView.h"
|
||||
#import "QXGiftPlayerManager.h"
|
||||
|
||||
@interface QXDressShopBuyView()<UIGestureRecognizerDelegate,UITableViewDataSource,UITableViewDelegate,UICollectionViewDataSource,UICollectionViewDelegate,QXSettingCellDelegate>
|
||||
@property (nonatomic,strong)UIView *bgView;
|
||||
@property (nonatomic,strong)UITableView *tableView;
|
||||
@property (nonatomic,strong)QXSeatHeaderView *headerView;
|
||||
@property (nonatomic,strong)UIImageView *dressImageView;
|
||||
@property (nonatomic,strong)NSArray *titleArray;
|
||||
@property (nonatomic,strong)NSDictionary *cellValueDict;
|
||||
@property (nonatomic,strong)NSDictionary *cellTypeDict;
|
||||
@property (nonatomic,strong)UICollectionView *collectionView;
|
||||
|
||||
@property (nonatomic,strong)QXShopDressDetailModel *infoModel;
|
||||
@property (nonatomic,strong)QXShopDressPriceModel* selectedPriceModel;
|
||||
|
||||
@property (nonatomic,strong)QXEffectContentView *fullEffectView;
|
||||
|
||||
|
||||
@property (nonatomic,strong)UIButton* coinBtn;
|
||||
@property (nonatomic,strong)UIButton* rechargeBtn;
|
||||
@property (nonatomic,strong)UIButton* payBtn;
|
||||
|
||||
@property (nonatomic,strong)NSString* num;
|
||||
@end
|
||||
|
||||
@implementation QXDressShopBuyView
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.frame = [UIScreen mainScreen].bounds;
|
||||
[self initSubviews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initSubviews{
|
||||
self.num = @"1";
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hide)];
|
||||
tap.delegate = self;
|
||||
[self addGestureRecognizer:tap];
|
||||
self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:0.3];
|
||||
|
||||
self.bgView = [[UIView alloc] initWithFrame:CGRectMake(0, ScaleWidth(144), SCREEN_WIDTH, kSafeAreaBottom+ScaleWidth(429))];
|
||||
self.bgView.backgroundColor = UIColor.whiteColor;
|
||||
[self.bgView addRoundedCornersWithRadius:16 byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)];
|
||||
[self addSubview:self.bgView];
|
||||
|
||||
self.headerView = [[QXSeatHeaderView alloc] initWithFrame:CGRectMake((self.width-80)/2, 10, 80, 80)];
|
||||
self.headerView.hidden = YES;
|
||||
[self.bgView addSubview:self.headerView];
|
||||
|
||||
self.dressImageView = [[UIImageView alloc] initWithFrame:CGRectMake((self.width-80)/2, 10, 80, 80)];
|
||||
self.dressImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
self.dressImageView.hidden = YES;
|
||||
[self.bgView addSubview:self.dressImageView];
|
||||
|
||||
|
||||
self.cellValueDict = [NSMutableDictionary dictionaryWithDictionary:@{
|
||||
@"商品名称":@"",
|
||||
@"商品价格":@"",
|
||||
@"有效期至":@"",
|
||||
@"购买时长":@"",
|
||||
@"购买次数":self.num,
|
||||
@"商品总价":@"",
|
||||
@"商品单价":@""
|
||||
}];
|
||||
|
||||
self.cellTypeDict = [NSMutableDictionary dictionaryWithDictionary:@{
|
||||
@"商品名称":[NSNumber numberWithInteger:QXSettingCellTypeOnlyDetail],
|
||||
@"商品价格":[NSNumber numberWithInteger:QXSettingCellTypeNormal],
|
||||
@"有效期至":[NSNumber numberWithInteger:QXSettingCellTypeOnlyDetail],
|
||||
@"购买时长":[NSNumber numberWithInteger:QXSettingCellTypeOnlyDetail],
|
||||
@"购买次数":[NSNumber numberWithInteger:QXSettingCellTypeBuyCount],
|
||||
@"商品总价":[NSNumber numberWithInteger:QXSettingCellTypeNormal],
|
||||
@"商品单价":[NSNumber numberWithInteger:QXSettingCellTypeNormal],
|
||||
}];
|
||||
[self.bgView addSubview:self.tableView];
|
||||
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.minimumLineSpacing = 12;
|
||||
layout.minimumInteritemSpacing = 12;
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
|
||||
NSInteger itemWidth = (SCREEN_WIDTH-15*2-12*3)/4;
|
||||
layout.itemSize = CGSizeMake(itemWidth, 44);
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
|
||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, self.tableView.bottom+5, self.bgView.width, 60) collectionViewLayout:layout];
|
||||
[self.collectionView registerClass:[QXSelectAuctionInfoCell class] forCellWithReuseIdentifier:@"QXSelectAuctionInfoCell"];
|
||||
self.collectionView.delegate = self;
|
||||
self.collectionView.dataSource = self;
|
||||
self.collectionView.showsHorizontalScrollIndicator = NO;
|
||||
self.collectionView.showsVerticalScrollIndicator = NO;
|
||||
self.collectionView.bounces = NO;
|
||||
self.collectionView.backgroundColor = [UIColor clearColor];
|
||||
[self.bgView addSubview:self.collectionView];
|
||||
|
||||
self.coinBtn = [[UIButton alloc] initWithFrame:CGRectMake(16, self.collectionView.bottom+15, (self.width-32)/2-6, 25)];
|
||||
self.coinBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
|
||||
[self.coinBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)];
|
||||
self.coinBtn.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
[self.coinBtn setImage:[UIImage imageNamed:@"mine_recharge_corn"] forState:(UIControlStateNormal)];
|
||||
[self.bgView addSubview:self.coinBtn];
|
||||
|
||||
self.rechargeBtn = [[UIButton alloc] initWithFrame:CGRectMake((self.width)/2+3, self.collectionView.bottom+15, (self.width-32)/2-6, 25)];
|
||||
self.rechargeBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
||||
[self.rechargeBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
self.rechargeBtn.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
[self.rechargeBtn addTarget:self action:@selector(rechargeAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.rechargeBtn setTitle:@"去充值" forState:(UIControlStateNormal)];
|
||||
[self.bgView addSubview:self.rechargeBtn];
|
||||
|
||||
self.payBtn = [[UIButton alloc] initWithFrame:CGRectMake((self.width-280)/2, self.coinBtn.bottom+10, 280, 40)];
|
||||
self.payBtn.backgroundColor = QXConfig.themeColor;
|
||||
[self.payBtn addRoundedCornersWithRadius:20];
|
||||
[self.payBtn setTitleColor:RGB16(0xffffff) forState:(UIControlStateNormal)];
|
||||
self.payBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.payBtn addTarget:self action:@selector(payAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.payBtn setTitle:@"确认支付" forState:(UIControlStateNormal)];
|
||||
[self.bgView addSubview:self.payBtn];
|
||||
|
||||
[self addSubview:self.fullEffectView];
|
||||
}
|
||||
-(void)rechargeAction{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickRecharge)]) {
|
||||
[self.delegate didClickRecharge];
|
||||
}
|
||||
[self hide];
|
||||
}
|
||||
|
||||
-(void)payAction{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork shopDressBuyWithDid:self.model.did day:self.selectedPriceModel.day num:self.num successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
showToast(@"购买成功");
|
||||
[weakSelf hide];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)setModel:(QXShopDressModel *)model{
|
||||
_model = model;
|
||||
[self.cellValueDict setValue:model.title forKey:@"商品名称"];
|
||||
if ([self.typeId isEqualToString:@"2"]) {
|
||||
/// 预览座驾
|
||||
self.fullEffectView.hidden = NO;
|
||||
[self.fullEffectView previewEffectWith:self.model.play_image];
|
||||
}
|
||||
if ([self.typeId isEqualToString:@"12"]) {
|
||||
self.titleArray = @[@"商品名称",@"商品单价",@"购买次数",@"商品总价"];
|
||||
}else{
|
||||
self.titleArray = @[@"商品名称",@"商品价格",@"有效期至",@"购买时长"];
|
||||
}
|
||||
[self getDressInfo];
|
||||
}
|
||||
-(void)setTypeId:(NSString *)typeId{
|
||||
_typeId = typeId;
|
||||
|
||||
}
|
||||
-(void)getDressInfo{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork shopDressDetailWithDid:self.model.did successBlock:^(QXShopDressDetailModel * _Nonnull model) {
|
||||
weakSelf.infoModel = model;
|
||||
if ([weakSelf.typeId isEqualToString:@"1"]) {
|
||||
weakSelf.headerView.hidden = NO;
|
||||
[weakSelf.headerView setHeadIcon:QXGlobal.shareGlobal.loginModel.avatar dress:weakSelf.model.play_image];
|
||||
}else{
|
||||
weakSelf.dressImageView.hidden = NO;
|
||||
[weakSelf.dressImageView sd_setImageWithURL:[NSURL URLWithString:weakSelf.model.base_image]];
|
||||
}
|
||||
QXShopDressPriceModel *price = model.decorate.price_list.firstObject;
|
||||
if (price) {
|
||||
weakSelf.selectedPriceModel = price;
|
||||
weakSelf.selectedPriceModel.isSelected = YES;
|
||||
[weakSelf.cellValueDict setValue:price.price forKey:@"商品价格"];
|
||||
[weakSelf.cellValueDict setValue:price.end_time forKey:@"有效期至"];
|
||||
}else{
|
||||
[weakSelf.cellValueDict setValue:model.decorate.price forKey:@"商品单价"];
|
||||
[weakSelf.cellValueDict setValue:model.decorate.price forKey:@"商品总价"];
|
||||
}
|
||||
[weakSelf.coinBtn setTitle:model.user_info.user_coin forState:(UIControlStateNormal)];
|
||||
[weakSelf.tableView reloadData];
|
||||
[weakSelf.collectionView reloadData];
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
showToast(msg);
|
||||
}];
|
||||
}
|
||||
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
|
||||
return touch.view == self;
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
return self.titleArray.count;
|
||||
}
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXSettingCell *cell = [QXSettingCell cellWithTableView:tableView];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.needLine = NO;
|
||||
cell.delegate = self;
|
||||
NSString *title = self.titleArray[indexPath.row];
|
||||
cell.titleLabel.text = title;
|
||||
NSNumber *type = self.cellTypeDict[title];;
|
||||
cell.cellType = type.integerValue;
|
||||
NSString *value = self.cellValueDict[title];;
|
||||
if (type.integerValue == QXSettingCellTypeBuyCount) {
|
||||
cell.textField.text = value;
|
||||
}else{
|
||||
cell.detailLabel.text = value;
|
||||
}
|
||||
if ([title isEqualToString:@"商品价格"] || [title isEqualToString:@"商品单价"] || [title isEqualToString:@"商品总价"]) {
|
||||
cell.rightArrow.image = [UIImage imageNamed:@"mine_recharge_corn"];
|
||||
}else{
|
||||
cell.rightArrow.image = [UIImage imageNamed:@"arrowRight"];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
//-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
// QXUserHomePageViewController *vc = [[QXUserHomePageViewController alloc] init];
|
||||
// QXUserHomeModel *model = self.dataArray[indexPath.row];
|
||||
// vc.user_id = model.user_id;
|
||||
// [self.navigationController pushViewController:vc animated:YES];
|
||||
//}
|
||||
|
||||
|
||||
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
|
||||
return self.infoModel.decorate.price_list.count;
|
||||
}
|
||||
|
||||
-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXSelectAuctionInfoCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"QXSelectAuctionInfoCell" forIndexPath:indexPath];
|
||||
cell.priceModel = self.infoModel.decorate.price_list[indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
-(CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
int width = (SCREEN_WIDTH-15*2-15*3-1)/4;
|
||||
return CGSizeMake((int)width, 60);
|
||||
}
|
||||
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
|
||||
QXShopDressPriceModel *model = self.infoModel.decorate.price_list[indexPath.row];
|
||||
if (model.isSelected) {
|
||||
return;
|
||||
}
|
||||
self.selectedPriceModel.isSelected = NO;
|
||||
model.isSelected = YES;
|
||||
self.selectedPriceModel = model;
|
||||
[self.cellValueDict setValue:model.price forKey:@"商品价格"];
|
||||
[self.cellValueDict setValue:model.end_time forKey:@"有效期至"];
|
||||
[collectionView reloadData];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
-(void)reductionDidClickWithTotalNum:(NSString *)totalNum{
|
||||
self.num = totalNum;
|
||||
[self.cellValueDict setValue:[NSString stringWithFormat:@"%ld",self.infoModel.decorate.price.integerValue*totalNum.integerValue] forKey:@"商品总价"];
|
||||
[self.cellValueDict setValue:totalNum forKey:@"购买次数"];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
-(void)addDidClickWithTotalNum:(NSString *)totalNum{
|
||||
self.num = totalNum;
|
||||
[self.cellValueDict setValue:[NSString stringWithFormat:@"%ld",self.infoModel.decorate.price.integerValue*totalNum.integerValue] forKey:@"商品总价"];
|
||||
[self.cellValueDict setValue:totalNum forKey:@"购买次数"];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
-(UITableView *)tableView{
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 100, SCREEN_WIDTH, 44*4) style:(UITableViewStylePlain)];
|
||||
_tableView.dataSource = self;
|
||||
_tableView.delegate = self;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.rowHeight = 44;
|
||||
_tableView.scrollEnabled = NO;
|
||||
|
||||
// MJWeakSelf
|
||||
// _tableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
// weakSelf.page = 1;
|
||||
// if (self.isSearch) {
|
||||
// [self getMemberListWithSearch:self.textField.text];
|
||||
// }else{
|
||||
// [self getMemberListWithSearch:@""];
|
||||
// }
|
||||
// }];
|
||||
// _tableView.mj_footer = [MJRefreshBackNormalFooter footerWithRefreshingBlock:^{
|
||||
// weakSelf.page++;
|
||||
// if (self.isSearch) {
|
||||
// [self getMemberListWithSearch:self.textField.text];
|
||||
// }else{
|
||||
// [self getMemberListWithSearch:@""];
|
||||
// }
|
||||
// }];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
- (QXEffectContentView *)fullEffectView {
|
||||
if (!_fullEffectView) {
|
||||
_fullEffectView = [[QXEffectContentView alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
_fullEffectView.queue = dispatch_queue_create("qx_room_full_preview_dress.com", NULL);
|
||||
_fullEffectView.hidden = YES;
|
||||
}
|
||||
return _fullEffectView;
|
||||
}
|
||||
|
||||
-(void)showInView:(UIView *)view{
|
||||
self.bgView.y = SCREEN_HEIGHT;
|
||||
[view addSubview:self];
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.bgView.y = SCREEN_HEIGHT- ScaleWidth(429)-kSafeAreaBottom;
|
||||
}];
|
||||
}
|
||||
-(void)hide{
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.bgView.y = SCREEN_HEIGHT;
|
||||
} completion:^(BOOL finished) {
|
||||
[self removeFromSuperview];
|
||||
}];
|
||||
}
|
||||
@end
|
||||
21
QXLive/Mine(音域)/View/个性装扮/QXDressShopCell.h
Normal file
21
QXLive/Mine(音域)/View/个性装扮/QXDressShopCell.h
Normal file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// QXDressShopCell.h
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/3.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXUserDressModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXDressShopCell : UICollectionViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIView *discountView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *discountLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *coinBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *dressImageView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
|
||||
@property (nonatomic,strong)QXShopDressModel *model;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
34
QXLive/Mine(音域)/View/个性装扮/QXDressShopCell.m
Normal file
34
QXLive/Mine(音域)/View/个性装扮/QXDressShopCell.m
Normal file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// QXDressShopCell.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2026/1/3.
|
||||
//
|
||||
|
||||
#import "QXDressShopCell.h"
|
||||
#import "NSString+QX.h"
|
||||
@implementation QXDressShopCell
|
||||
-(void)setModel:(QXShopDressModel *)model{
|
||||
_model = model;
|
||||
[self.dressImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
if (model.discount.intValue == 0) {
|
||||
self.discountView.hidden = YES;
|
||||
NSString *coin = [NSString stringWithFormat:@"%@",model.price];
|
||||
NSAttributedString *str = [[NSAttributedString alloc] initWithString:coin];
|
||||
[self.coinBtn setAttributedTitle:str forState:(UIControlStateNormal)];
|
||||
}else{
|
||||
self.discountView.hidden = NO;
|
||||
self.discountLabel.text = model.discount_str;
|
||||
NSString *coin = [NSString stringWithFormat:@"%@ %@",model.price,model.original_price];
|
||||
NSAttributedString *str = [coin deleteLineWithTextColor:RGB16(0xAAAAAA) lineColor:RGB16(0xAAAAAA) range:[coin rangeOfString:model.original_price]];
|
||||
[self.coinBtn setAttributedTitle:str forState:(UIControlStateNormal)];
|
||||
}
|
||||
self.nameLabel.text = model.title;
|
||||
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
@end
|
||||
121
QXLive/Mine(音域)/View/个性装扮/QXDressShopCell.xib
Normal file
121
QXLive/Mine(音域)/View/个性装扮/QXDressShopCell.xib
Normal file
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="QXDressShopCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="184" height="255"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="184" height="255"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Dk6-F8-SZP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="184" height="255"/>
|
||||
<subviews>
|
||||
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4am-5U-OxQ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="184" height="255"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" backgroundImage="room_sound_sel"/>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="y5y-aj-t1M">
|
||||
<rect key="frame" x="10" y="25" width="164" height="164"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="y5y-aj-t1M" secondAttribute="height" multiplier="41:41" id="vf4-u8-SEf"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wAe-Wu-GdR">
|
||||
<rect key="frame" x="10" y="202" width="164" height="17"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="0.84705882349999995" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LKX-Lq-grF">
|
||||
<rect key="frame" x="0.0" y="224" width="184" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="nCM-S8-qPl"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="10" image="mine_recharge_corn">
|
||||
<color key="titleColor" red="0.20000000000000001" green="0.1647058824" blue="0.27450980390000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="wAe-Wu-GdR" secondAttribute="trailing" constant="10" id="4l5-tf-dHY"/>
|
||||
<constraint firstAttribute="trailing" secondItem="y5y-aj-t1M" secondAttribute="trailing" constant="10" id="8tW-xy-rNX"/>
|
||||
<constraint firstItem="LKX-Lq-grF" firstAttribute="leading" secondItem="Dk6-F8-SZP" secondAttribute="leading" id="Bku-Uc-H0J"/>
|
||||
<constraint firstAttribute="trailing" secondItem="LKX-Lq-grF" secondAttribute="trailing" id="CR4-xQ-8RZ"/>
|
||||
<constraint firstItem="4am-5U-OxQ" firstAttribute="top" secondItem="Dk6-F8-SZP" secondAttribute="top" id="Dqq-F4-TPQ"/>
|
||||
<constraint firstItem="y5y-aj-t1M" firstAttribute="leading" secondItem="Dk6-F8-SZP" secondAttribute="leading" constant="10" id="O7o-UU-Rbi"/>
|
||||
<constraint firstItem="4am-5U-OxQ" firstAttribute="leading" secondItem="Dk6-F8-SZP" secondAttribute="leading" id="ZBu-XF-tEe"/>
|
||||
<constraint firstAttribute="trailing" secondItem="4am-5U-OxQ" secondAttribute="trailing" id="dxw-EB-f8P"/>
|
||||
<constraint firstItem="wAe-Wu-GdR" firstAttribute="leading" secondItem="Dk6-F8-SZP" secondAttribute="leading" constant="10" id="hxk-qp-2ck"/>
|
||||
<constraint firstAttribute="bottom" secondItem="LKX-Lq-grF" secondAttribute="bottom" constant="10" id="oS4-Tt-gOf"/>
|
||||
<constraint firstAttribute="bottom" secondItem="4am-5U-OxQ" secondAttribute="bottom" id="pai-6w-zAv"/>
|
||||
<constraint firstItem="y5y-aj-t1M" firstAttribute="top" secondItem="Dk6-F8-SZP" secondAttribute="top" constant="25" id="u79-eL-PJP"/>
|
||||
<constraint firstItem="LKX-Lq-grF" firstAttribute="top" secondItem="wAe-Wu-GdR" secondAttribute="bottom" constant="5" id="wNu-JQ-pzA"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sKm-3x-Ef8">
|
||||
<rect key="frame" x="124" y="0.0" width="60" height="20"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="gift_number_bg" translatesAutoresizingMaskIntoConstraints="NO" id="4xk-yW-32h">
|
||||
<rect key="frame" x="0.0" y="0.0" width="60" height="20"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="限时折扣" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hAj-KB-4Js">
|
||||
<rect key="frame" x="0.0" y="0.0" width="60" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="11"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="hAj-KB-4Js" firstAttribute="top" secondItem="sKm-3x-Ef8" secondAttribute="top" id="2UL-xP-7kf"/>
|
||||
<constraint firstItem="4xk-yW-32h" firstAttribute="leading" secondItem="sKm-3x-Ef8" secondAttribute="leading" id="B5B-mJ-vpH"/>
|
||||
<constraint firstAttribute="width" constant="60" id="PHR-gi-0rJ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="4xk-yW-32h" secondAttribute="bottom" id="SKa-ex-9xi"/>
|
||||
<constraint firstItem="4xk-yW-32h" firstAttribute="top" secondItem="sKm-3x-Ef8" secondAttribute="top" id="gVC-eV-BnP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="4xk-yW-32h" secondAttribute="trailing" id="goc-Iq-YWw"/>
|
||||
<constraint firstAttribute="height" constant="20" id="ldE-sf-AMU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hAj-KB-4Js" secondAttribute="trailing" id="mV4-yr-bU0"/>
|
||||
<constraint firstAttribute="bottom" secondItem="hAj-KB-4Js" secondAttribute="bottom" id="sdF-z2-lHE"/>
|
||||
<constraint firstItem="hAj-KB-4Js" firstAttribute="leading" secondItem="sKm-3x-Ef8" secondAttribute="leading" id="uCg-wP-BlM"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="sKm-3x-Ef8" secondAttribute="trailing" id="0MQ-kl-OTZ"/>
|
||||
<constraint firstItem="sKm-3x-Ef8" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="Jeb-Bx-hRa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Dk6-F8-SZP" secondAttribute="trailing" id="he1-Wd-4sp"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Dk6-F8-SZP" secondAttribute="bottom" id="hk0-6c-dvp"/>
|
||||
<constraint firstItem="Dk6-F8-SZP" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="qim-H8-hEu"/>
|
||||
<constraint firstItem="Dk6-F8-SZP" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="wuf-Dl-jmZ"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="184" height="264"/>
|
||||
<connections>
|
||||
<outlet property="coinBtn" destination="LKX-Lq-grF" id="L7t-JU-Jpo"/>
|
||||
<outlet property="discountLabel" destination="hAj-KB-4Js" id="bQn-8N-kPI"/>
|
||||
<outlet property="discountView" destination="sKm-3x-Ef8" id="98e-Ej-PFV"/>
|
||||
<outlet property="dressImageView" destination="y5y-aj-t1M" id="J6k-H2-XLx"/>
|
||||
<outlet property="nameLabel" destination="wAe-Wu-GdR" id="gc7-QK-lh1"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="241.22137404580153" y="95.070422535211279"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="gift_number_bg" width="34" height="16"/>
|
||||
<image name="mine_recharge_corn" width="20" height="20"/>
|
||||
<image name="room_sound_sel" width="100" height="136"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -38,10 +38,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSString *urlStr = [NSString stringWithFormat:@"%@web/index.html#/pages/other/taskDesc",server];
|
||||
NSURL* url=[NSURL URLWithString:urlStr];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
|
||||
@@ -27,6 +27,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
QXBlackListCellTypeRank,
|
||||
/// 访客
|
||||
QXBlackListCellTypeVisit,
|
||||
/// 群聊成员
|
||||
QXBlackListCellTypeGroupMember,
|
||||
}QXBlackListCellType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol QXBlackListCellDelegate <NSObject>
|
||||
@@ -40,6 +42,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
-(void)didHugSeatWithModel:(QXRoomUserInfoModel*)model isUpSeat:(BOOL)isUpSeat;
|
||||
|
||||
-(void)didClickGroupMemberMoreBtnWithGroupMemberModel:(QXUserHomeModel*)groupMemberModel;
|
||||
|
||||
@end
|
||||
@interface QXBlackListCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *headerImageView;
|
||||
@@ -62,6 +66,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)QXRoomUserInfoModel *onlineUser;
|
||||
|
||||
@property (nonatomic,strong)QXRoomOnlineList *rankModel;
|
||||
|
||||
@property (nonatomic,strong)QXUserHomeModel *groupMemberModel;
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
|
||||
@@ -46,6 +46,12 @@
|
||||
}
|
||||
}
|
||||
break;
|
||||
case QXBlackListCellTypeGroupMember:{
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(didClickGroupMemberMoreBtnWithGroupMemberModel:)]) {
|
||||
[self.delegate didClickGroupMemberMoreBtnWithGroupMemberModel:self.groupMemberModel];
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -270,10 +276,32 @@
|
||||
self.removeBtn.hidden = YES;
|
||||
}
|
||||
break;
|
||||
|
||||
case QXBlackListCellTypeGroupMember:{
|
||||
self.removeBtn.hidden = NO;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setGroupMemberModel:(QXUserHomeModel *)groupMemberModel{
|
||||
_groupMemberModel = groupMemberModel;
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:groupMemberModel.avatar]];
|
||||
self.nameLabel.text = groupMemberModel.nickname;
|
||||
if (groupMemberModel.sex.intValue == 1) {
|
||||
self.sexImageView.image = [UIImage imageNamed:@"user_sex_boy"];
|
||||
self.sexImageView.hidden = NO;
|
||||
}else if(groupMemberModel.sex.intValue == 2){
|
||||
self.sexImageView.image = [UIImage imageNamed:@"user_sex_girl"];
|
||||
self.sexImageView.hidden = NO;
|
||||
}else{
|
||||
self.sexImageView.hidden = YES;
|
||||
}
|
||||
BOOL isMute = groupMemberModel.is_mute.intValue == 1;
|
||||
[self.removeBtn setTitle:isMute?@"解禁":@"禁言" forState:(UIControlStateNormal)];
|
||||
}
|
||||
-(void)setIsNoIcon:(BOOL)isNoIcon{
|
||||
_isNoIcon = isNoIcon;
|
||||
}
|
||||
|
||||
@@ -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="124" id="KGk-i7-Jjw" customClass="QXBlackListCell">
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="124" id="KGk-i7-Jjw" customClass="QXBlackListCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="516" height="124"/>
|
||||
<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,10 +18,20 @@ typedef NS_ENUM(NSInteger) {
|
||||
/// 标题在上 详情在下 带箭头
|
||||
QXSettingCellTypeTitleTopAndArrow,
|
||||
/// 标题在上 详情在下 不带箭头
|
||||
QXSettingCellTypeTitleTopNoArrow
|
||||
QXSettingCellTypeTitleTopNoArrow,
|
||||
/// 购买数量
|
||||
QXSettingCellTypeBuyCount
|
||||
}QXSettingCellType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@protocol QXSettingCellDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
-(void)reductionDidClickWithTotalNum:(NSString*)totalNum;
|
||||
|
||||
-(void)addDidClickWithTotalNum:(NSString*)totalNum;
|
||||
|
||||
@end
|
||||
@interface QXSettingCell : UITableViewCell
|
||||
@property (strong, nonatomic) UILabel *titleLabel;
|
||||
@property (strong, nonatomic) UILabel *detailLabel;
|
||||
@@ -31,6 +41,14 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (strong, nonatomic) UIView *lineView;
|
||||
@property (assign, nonatomic) QXSettingCellType cellType;
|
||||
@property (assign, nonatomic) BOOL needLine;
|
||||
|
||||
@property (strong, nonatomic) UIView *buyCountView;
|
||||
@property (strong, nonatomic) UIButton *reductionBtn;
|
||||
@property (strong, nonatomic) UITextField *textField;
|
||||
@property (strong, nonatomic) UIButton *addBtn;
|
||||
|
||||
@property (weak, nonatomic) id<QXSettingCellDelegate> delegate;
|
||||
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
_cellType = cellType;
|
||||
switch (cellType) {
|
||||
case QXSettingCellTypeNormal:{
|
||||
self.buyCountView.hidden = YES;
|
||||
self.detailLabel.hidden = NO;
|
||||
self.rightArrow.hidden = NO;
|
||||
self.btnSwitch.hidden = YES;
|
||||
@@ -49,6 +50,7 @@
|
||||
}
|
||||
break;
|
||||
case QXSettingCellTypeOnlyArrow:{
|
||||
self.buyCountView.hidden = YES;
|
||||
self.detailLabel.hidden = YES;
|
||||
self.rightArrow.hidden = NO;
|
||||
self.rightConstraint.constant = 16;
|
||||
@@ -66,6 +68,7 @@
|
||||
}
|
||||
break;
|
||||
case QXSettingCellTypeOnlyDetail:{
|
||||
self.buyCountView.hidden = YES;
|
||||
self.detailLabel.hidden = NO;
|
||||
self.rightArrow.hidden = YES;
|
||||
self.btnSwitch.hidden = YES;
|
||||
@@ -83,6 +86,7 @@
|
||||
}
|
||||
break;
|
||||
case QXSettingCellTypeSwitch:{
|
||||
self.buyCountView.hidden = YES;
|
||||
self.detailLabel.hidden = YES;
|
||||
self.rightArrow.hidden = YES;
|
||||
self.btnSwitch.hidden = NO;
|
||||
@@ -99,6 +103,7 @@
|
||||
}
|
||||
break;
|
||||
case QXSettingCellTypeTitleTopAndArrow:{
|
||||
self.buyCountView.hidden = YES;
|
||||
self.detailLabel.hidden = NO;
|
||||
self.rightArrow.hidden = NO;
|
||||
self.btnSwitch.hidden = YES;
|
||||
@@ -118,6 +123,7 @@
|
||||
}
|
||||
break;
|
||||
case QXSettingCellTypeTitleTopNoArrow:{
|
||||
self.buyCountView.hidden = YES;
|
||||
self.detailLabel.hidden = NO;
|
||||
self.rightArrow.hidden = YES;
|
||||
self.btnSwitch.hidden = YES;
|
||||
@@ -136,6 +142,19 @@
|
||||
}];
|
||||
}
|
||||
break;
|
||||
case QXSettingCellTypeBuyCount:{
|
||||
self.detailLabel.hidden = YES;
|
||||
self.rightArrow.hidden = YES;
|
||||
self.btnSwitch.hidden = YES;
|
||||
self.buyCountView.hidden = NO;
|
||||
[self.titleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(16);
|
||||
make.top.mas_equalTo(9);
|
||||
make.height.mas_equalTo(21);
|
||||
make.right.equalTo(self.contentView).offset(-10);
|
||||
}];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -193,6 +212,56 @@
|
||||
make.height.mas_equalTo(0.5);
|
||||
make.bottom.equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
self.buyCountView = [[UIView alloc] init];
|
||||
self.buyCountView.hidden = YES;
|
||||
[self.contentView addSubview:self.buyCountView];
|
||||
[self.buyCountView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-16);
|
||||
make.height.mas_equalTo(30);
|
||||
make.centerY.equalTo(self.contentView);
|
||||
make.width.mas_equalTo(110);
|
||||
}];
|
||||
|
||||
self.reductionBtn = [[UIButton alloc] init];
|
||||
[self.reductionBtn setTitle:@"-" forState:(UIControlStateNormal)];
|
||||
self.reductionBtn.titleLabel.font = [UIFont boldSystemFontOfSize:18];
|
||||
[self.reductionBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)];
|
||||
self.reductionBtn.backgroundColor = RGB(236, 240, 246);
|
||||
[self.reductionBtn addTarget:self action:@selector(reductionAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.buyCountView addSubview:self.reductionBtn];
|
||||
[self.reductionBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.bottom.equalTo(self.buyCountView);
|
||||
make.width.mas_equalTo(30);
|
||||
}];
|
||||
|
||||
self.addBtn = [[UIButton alloc] init];
|
||||
[self.addBtn setTitle:@"+" forState:(UIControlStateNormal)];
|
||||
self.addBtn.titleLabel.font = [UIFont boldSystemFontOfSize:18];
|
||||
self.addBtn.backgroundColor = RGB(236, 240, 246);
|
||||
[self.addBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)];
|
||||
[self.addBtn addTarget:self action:@selector(addAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.buyCountView addSubview:self.addBtn];
|
||||
[self.addBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.top.bottom.equalTo(self.buyCountView);
|
||||
make.width.mas_equalTo(30);
|
||||
}];
|
||||
|
||||
self.textField = [[UITextField alloc] init];
|
||||
self.textField.font = [UIFont systemFontOfSize:14];
|
||||
self.textField.textColor = RGB16(0x333333);
|
||||
self.textField.textAlignment = NSTextAlignmentCenter;
|
||||
self.textField.backgroundColor = RGB(236, 240, 246);
|
||||
self.textField.userInteractionEnabled = NO;
|
||||
self.textField.text = @"1";
|
||||
[self.buyCountView addSubview:self.textField];
|
||||
[self.textField mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.reductionBtn.mas_right).offset(3);
|
||||
make.right.equalTo(self.addBtn.mas_left).offset(-3);
|
||||
make.top.bottom.equalTo(self.buyCountView);
|
||||
}];
|
||||
|
||||
|
||||
}
|
||||
-(void)setNeedLine:(BOOL)needLine{
|
||||
_needLine = needLine;
|
||||
@@ -201,6 +270,26 @@
|
||||
//- (void)btnSwitchAction:(UIButton *)sender {
|
||||
//// sender.selected = !sender.selected;
|
||||
//}
|
||||
|
||||
-(void)addAction{
|
||||
NSInteger number = self.textField.text.integerValue;
|
||||
self.textField.text = [NSString stringWithFormat:@"%ld",number+=1];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(addDidClickWithTotalNum:)]) {
|
||||
[self.delegate addDidClickWithTotalNum:self.textField.text];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)reductionAction{
|
||||
NSInteger number = self.textField.text.integerValue;
|
||||
if (number <= 1) {
|
||||
showToast(@"商品数量不能少于1个");
|
||||
return;
|
||||
}
|
||||
self.textField.text = [NSString stringWithFormat:@"%ld",number-=1];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(reductionDidClickWithTotalNum:)]) {
|
||||
[self.delegate reductionDidClickWithTotalNum:self.textField.text];
|
||||
}
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
|
||||
@@ -83,10 +83,7 @@
|
||||
[self hide];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlStr = [NSString stringWithFormat:@"%@api/Page/page_show?id=28",server];
|
||||
NSURL* url=[NSURL URLWithString:urlStr];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
|
||||
@@ -209,10 +209,7 @@ static NSInteger HTTP_ERROR_CODE = 0;
|
||||
return nil;
|
||||
}
|
||||
if (!([urlString hasPrefix:@"http"] || [urlString hasPrefix:@"https"])) {
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
urlString = [NSString stringWithFormat:@"%@%@",server,urlString];
|
||||
}
|
||||
NSLog(@"发起请求 --- URL : %@",urlString);
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "Frame 1321316289@2x.png",
|
||||
"filename" : "room_sound_sel@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "Frame 1321316289@3x.png",
|
||||
"filename" : "room_sound_sel@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 89 KiB |
BIN
QXLive/Other/Assets.xcassets/room/room_sound_sel.imageset/room_sound_sel@2x.png
vendored
Normal file
BIN
QXLive/Other/Assets.xcassets/room/room_sound_sel.imageset/room_sound_sel@2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
BIN
QXLive/Other/Assets.xcassets/room/room_sound_sel.imageset/room_sound_sel@3x.png
vendored
Normal file
BIN
QXLive/Other/Assets.xcassets/room/room_sound_sel.imageset/room_sound_sel@3x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 132 KiB |
@@ -27,8 +27,8 @@ static NSString* RH5ServerUrl = @"https://test.vespa.qxyushen.top/h5/";
|
||||
//static NSString* H5ServerUrl = @"https://vespa.qxyushen.top/h5/";
|
||||
static NSString* ServerUrl = @"https://yushengapi.qxyushen.top/";
|
||||
static NSString* H5ServerUrl = @"https://yushengapi.qxyushen.top/h5/";
|
||||
static NSString* RServerUrl = @"https://qixinghuishen.qxhs.xyz/";
|
||||
static NSString* RH5ServerUrl = @"https://qixinghuishen.qxhs.xyz/h5/";
|
||||
static NSString* RServerUrl = @"https://details.qxhs.xyz/";
|
||||
static NSString* RH5ServerUrl = @"https://details.qxhs.xyz/h5/";
|
||||
#endif
|
||||
#pragma mark - 引导页
|
||||
/// 引导页
|
||||
@@ -578,4 +578,19 @@ static NSString * QXActivityStatus = @"api/BlindBoxTurntable/blind_box_status";
|
||||
static NSString * QXBeforeJoinRoom = @"api/Room/before_join_room_check";
|
||||
/// APP配置
|
||||
static NSString * QXRedpacketConfig = @"api/Redpacket/appConfig";
|
||||
|
||||
|
||||
/// 群聊相关
|
||||
/// 群聊设置详情
|
||||
static NSString * QXGroupSettingInfo = @"api/Guild/get_guild_info";
|
||||
/// 群聊成员
|
||||
static NSString * QXGroupMemberList = @"api/Guild/member_list";
|
||||
/// 设置群聊信息
|
||||
static NSString * QXSetGroupInfo = @"api/Guild/set_guild_info";
|
||||
/// 道具商城列表
|
||||
static NSString * QXShopDressList = @"api/Decorate/get_decorate_list";
|
||||
/// 道具商城商品详情
|
||||
static NSString * QXShopDressDetail = @"api/Decorate/get_decorate_detail";
|
||||
/// 购买装扮
|
||||
static NSString * QXShopBuyDress = @"api/Decorate/pay_decorate";
|
||||
#endif /* Api_h */
|
||||
|
||||
@@ -44,9 +44,11 @@
|
||||
}
|
||||
}
|
||||
if (haveMe == NO) {
|
||||
self.upSeatBtn.selected = NO;
|
||||
self.bottomView.status = 1;
|
||||
[[QXAgoraEngine sharedEngine] setClientRoleBroadcaster:NO];
|
||||
}else{
|
||||
self.upSeatBtn.selected = YES;
|
||||
self.bottomView.status = 2;
|
||||
if ([QXAgoraEngine sharedEngine].isOpenMic) {
|
||||
[self.bottomView setMuteAudioStatus:1];
|
||||
|
||||
@@ -33,6 +33,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 是否为最小化房间进来
|
||||
@property (nonatomic,assign)BOOL isReJoin;
|
||||
|
||||
@property (nonatomic,strong)UIButton *upSeatBtn;
|
||||
|
||||
@property (nonatomic,strong)QXRoomModel* roomModel;
|
||||
/// 麦位视图
|
||||
@property (nonatomic,strong)QXRoomSeatView *seatContentView;
|
||||
|
||||
@@ -59,7 +59,6 @@ QXRoomUserInfoViewDelegate
|
||||
|
||||
@property (nonatomic,strong)UIButton *soundBtn;
|
||||
|
||||
@property (nonatomic,strong)UIButton *upSeatBtn;
|
||||
/// 排麦按钮
|
||||
@property (nonatomic,strong)QXUpSeatCountView *micTeamView;
|
||||
|
||||
|
||||
@@ -182,10 +182,7 @@
|
||||
|
||||
-(void)helpAction{
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"24"];
|
||||
vc.urlStr = urlString;
|
||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "QXRoomRelationModel.h"
|
||||
#import "QXUserDressModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QXSelectAuctionInfoView : UIView
|
||||
@@ -26,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong) QXRoomRelationModel *model;
|
||||
|
||||
@property (nonatomic,strong) QXRoomRelationModel *timeModel;
|
||||
@property (nonatomic,strong) QXShopDressPriceModel *priceModel;
|
||||
@property (nonatomic,strong) UIButton *selectedBtn;
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
@@ -428,6 +428,15 @@
|
||||
self.selectedBtn.layer.borderWidth = 1;
|
||||
self.selectedBtn.selected = timeModel.isSelected;
|
||||
}
|
||||
-(void)setPriceModel:(QXShopDressPriceModel *)priceModel{
|
||||
_priceModel = priceModel;
|
||||
[self.selectedBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateSelected)];
|
||||
[self.selectedBtn setTitleColor:RGB16(0x333333) forState:(UIControlStateNormal)];
|
||||
[self.selectedBtn setTitle:priceModel.day forState:(UIControlStateNormal)];
|
||||
self.selectedBtn.layer.borderColor = RGB16(0xF1F2F3).CGColor;
|
||||
self.selectedBtn.layer.borderWidth = 1;
|
||||
self.selectedBtn.selected = priceModel.isSelected;
|
||||
}
|
||||
-(void)initSubviews{
|
||||
self.selectedBtn = [[UIButton alloc] init];
|
||||
[self.selectedBtn setBackgroundImage:[UIImage imageNamed:@"room_sound_sel"] forState:(UIControlStateSelected)];
|
||||
|
||||
@@ -798,10 +798,7 @@
|
||||
|
||||
-(void)helpAction{
|
||||
self.isFromRule = YES;
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@api/Page/page_show?id=25",server]]];
|
||||
[self.webView loadRequest:request];
|
||||
self.backBtn.hidden = NO;
|
||||
|
||||
@@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (weak, nonatomic) IBOutlet UIButton *endBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *upBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *userNameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *userCodeLabel;
|
||||
@property (nonatomic,copy)void(^moveSuccessBlock)(void);
|
||||
+(instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
@@ -96,7 +96,12 @@
|
||||
NSString *time = [NSString stringWithFormat:@"%02ld:%02ld",model.duration/60,model.duration%60];
|
||||
self.posterLabel.text = [NSString stringWithFormat:@"%@ %@",time,model.singer];
|
||||
self.songNameLabel.text = model.song_name;
|
||||
if (self.isSearch) {
|
||||
|
||||
}else{
|
||||
self.userNameLabel.text = model.nickname;
|
||||
self.userCodeLabel.text = [NSString stringWithFormat:@"ID:%@",model.user_code];
|
||||
}
|
||||
}
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
@@ -11,17 +11,17 @@
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="163" id="KGk-i7-Jjw" customClass="QXRoomSongListCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="466" height="163"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="163"/>
|
||||
<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">
|
||||
<rect key="frame" x="0.0" y="0.0" width="466" height="163"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="163"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dAY-R1-1Xw">
|
||||
<rect key="frame" x="16" y="55.666666666666657" width="52" height="52"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="52" id="Fmc-qu-edY"/>
|
||||
<constraint firstAttribute="width" constant="52" id="xh7-0d-x9a"/>
|
||||
<constraint firstAttribute="height" constant="52" id="NBB-1Q-2tH"/>
|
||||
<constraint firstAttribute="width" constant="52" id="plW-hX-zZF"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
|
||||
@@ -31,30 +31,31 @@
|
||||
</userDefinedRuntimeAttributes>
|
||||
</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="cEo-4m-Uk0">
|
||||
<rect key="frame" x="74" y="59.666666666666657" width="35.333333333333343" height="18"/>
|
||||
<rect key="frame" x="74" y="57.666666666666657" width="120" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="b1c-op-Skx"/>
|
||||
<constraint firstAttribute="height" constant="18" id="5fP-VA-JBf"/>
|
||||
<constraint firstAttribute="width" constant="120" id="G21-tc-va9"/>
|
||||
</constraints>
|
||||
<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>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="王富贵" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SNA-M2-7Y8">
|
||||
<rect key="frame" x="74" y="85.666666666666671" width="200" height="18"/>
|
||||
<rect key="frame" x="74" y="87.666666666666671" width="80" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="XKi-Bc-Kyd"/>
|
||||
<constraint firstAttribute="width" constant="200" id="cZF-LW-Eez"/>
|
||||
<constraint firstAttribute="width" constant="80" id="ALV-ue-FJK"/>
|
||||
<constraint firstAttribute="height" constant="18" id="Ijx-j2-2GC"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="prN-Cg-NVp">
|
||||
<rect key="frame" x="398" y="66.666666666666671" width="52" height="30"/>
|
||||
<rect key="frame" x="307" y="66.666666666666671" width="52" height="30"/>
|
||||
<color key="backgroundColor" red="0.050980392156862744" green="1" blue="0.72549019607843135" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="52" id="ErL-3b-xUl"/>
|
||||
<constraint firstAttribute="height" constant="30" id="M8O-GG-Lcl"/>
|
||||
<constraint firstAttribute="width" constant="52" id="cKb-lQ-1Vm"/>
|
||||
<constraint firstAttribute="height" constant="30" id="rVs-z1-fA7"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
@@ -72,10 +73,10 @@
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nCl-nA-G1H">
|
||||
<rect key="frame" x="353" y="64" width="35" height="35"/>
|
||||
<rect key="frame" x="262" y="64" width="35" height="35"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="35" id="bWm-9A-ja7"/>
|
||||
<constraint firstAttribute="width" constant="35" id="l70-bk-etp"/>
|
||||
<constraint firstAttribute="height" constant="35" id="lnn-Qg-FNs"/>
|
||||
<constraint firstAttribute="width" constant="35" id="rZW-C0-ucH"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="room_song_up"/>
|
||||
@@ -83,41 +84,55 @@
|
||||
<action selector="upAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="lXk-rU-fQZ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wAY-Bl-81T">
|
||||
<rect key="frame" x="284" y="94.666666666666671" width="59" height="0.0"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="张三" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wAY-Bl-81T">
|
||||
<rect key="frame" x="204" y="57.666666666666657" width="60" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="8g8-R3-JIJ"/>
|
||||
<constraint firstAttribute="width" constant="60" id="QfP-ac-mHC"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ID:123567" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aET-0G-opo">
|
||||
<rect key="frame" x="204" y="87.666666666666671" width="60" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="05u-LP-7ec"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="qXL-2G-G3j"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="SNA-M2-7Y8" firstAttribute="leading" secondItem="cEo-4m-Uk0" secondAttribute="leading" id="1ia-Qn-gkV"/>
|
||||
<constraint firstItem="wAY-Bl-81T" firstAttribute="centerY" secondItem="SNA-M2-7Y8" secondAttribute="centerY" id="5fU-Uw-Sf8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="prN-Cg-NVp" secondAttribute="trailing" constant="16" id="DSL-WP-A3K"/>
|
||||
<constraint firstItem="cEo-4m-Uk0" firstAttribute="top" secondItem="dAY-R1-1Xw" secondAttribute="top" constant="4" id="Kno-Zg-rp2"/>
|
||||
<constraint firstItem="SNA-M2-7Y8" firstAttribute="bottom" secondItem="dAY-R1-1Xw" secondAttribute="bottom" constant="-4" id="SXZ-zo-2j2"/>
|
||||
<constraint firstItem="wAY-Bl-81T" firstAttribute="leading" secondItem="SNA-M2-7Y8" secondAttribute="trailing" constant="10" id="VB3-n2-Huh"/>
|
||||
<constraint firstItem="cEo-4m-Uk0" firstAttribute="leading" secondItem="dAY-R1-1Xw" secondAttribute="trailing" constant="6" id="YcA-Ji-ToE"/>
|
||||
<constraint firstItem="nCl-nA-G1H" firstAttribute="leading" secondItem="wAY-Bl-81T" secondAttribute="trailing" constant="10" id="cVf-2A-n8b"/>
|
||||
<constraint firstItem="nCl-nA-G1H" firstAttribute="centerY" secondItem="prN-Cg-NVp" secondAttribute="centerY" id="fbA-GF-fge"/>
|
||||
<constraint firstItem="dAY-R1-1Xw" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="vH3-3z-2SL"/>
|
||||
<constraint firstItem="prN-Cg-NVp" firstAttribute="leading" secondItem="nCl-nA-G1H" secondAttribute="trailing" constant="10" id="ze3-qs-gsC"/>
|
||||
<constraint firstItem="aET-0G-opo" firstAttribute="centerX" secondItem="wAY-Bl-81T" secondAttribute="centerX" id="10c-lY-OlU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="prN-Cg-NVp" secondAttribute="trailing" constant="16" id="62V-hz-rxE"/>
|
||||
<constraint firstItem="SNA-M2-7Y8" firstAttribute="bottom" secondItem="dAY-R1-1Xw" secondAttribute="bottom" constant="-2" id="Ko7-CT-Afi"/>
|
||||
<constraint firstItem="wAY-Bl-81T" firstAttribute="leading" secondItem="cEo-4m-Uk0" secondAttribute="trailing" constant="10" id="Qer-9r-Y1x"/>
|
||||
<constraint firstItem="nCl-nA-G1H" firstAttribute="centerY" secondItem="prN-Cg-NVp" secondAttribute="centerY" id="RRX-DO-fm6"/>
|
||||
<constraint firstItem="aET-0G-opo" firstAttribute="centerY" secondItem="SNA-M2-7Y8" secondAttribute="centerY" id="VMm-Vd-par"/>
|
||||
<constraint firstItem="cEo-4m-Uk0" firstAttribute="top" secondItem="dAY-R1-1Xw" secondAttribute="top" constant="2" id="aLp-aS-Nzb"/>
|
||||
<constraint firstItem="cEo-4m-Uk0" firstAttribute="leading" secondItem="dAY-R1-1Xw" secondAttribute="trailing" constant="6" id="f6B-5H-nGY"/>
|
||||
<constraint firstItem="prN-Cg-NVp" firstAttribute="leading" secondItem="nCl-nA-G1H" secondAttribute="trailing" constant="10" id="ffO-uu-aav"/>
|
||||
<constraint firstItem="SNA-M2-7Y8" firstAttribute="leading" secondItem="cEo-4m-Uk0" secondAttribute="leading" id="m1o-Xa-Fco"/>
|
||||
<constraint firstItem="dAY-R1-1Xw" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="mNt-cv-Nzb"/>
|
||||
<constraint firstItem="dAY-R1-1Xw" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="otK-Jd-8hd"/>
|
||||
<constraint firstItem="wAY-Bl-81T" firstAttribute="centerY" secondItem="cEo-4m-Uk0" secondAttribute="centerY" id="ro4-gd-j6P"/>
|
||||
<constraint firstItem="prN-Cg-NVp" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="spv-BE-DSf"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<constraints>
|
||||
<constraint firstItem="prN-Cg-NVp" firstAttribute="centerY" secondItem="aW0-zy-SZf" secondAttribute="centerY" id="XhU-js-NUE"/>
|
||||
<constraint firstItem="dAY-R1-1Xw" firstAttribute="centerY" secondItem="aW0-zy-SZf" secondAttribute="centerY" id="liM-Yh-tyy"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="coverImageView" destination="dAY-R1-1Xw" id="13P-C0-xc8"/>
|
||||
<outlet property="endBtn" destination="prN-Cg-NVp" id="fEr-hy-Kvr"/>
|
||||
<outlet property="posterLabel" destination="SNA-M2-7Y8" id="c1y-Cd-Ze0"/>
|
||||
<outlet property="songNameLabel" destination="cEo-4m-Uk0" id="EIf-pB-ruW"/>
|
||||
<outlet property="upBtn" destination="nCl-nA-G1H" id="e7A-2b-WE7"/>
|
||||
<outlet property="userCodeLabel" destination="aET-0G-opo" id="Ylo-AL-rGK"/>
|
||||
<outlet property="userNameLabel" destination="wAY-Bl-81T" id="jHd-10-kev"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="250.38167938931298" y="40.492957746478872"/>
|
||||
<point key="canvasLocation" x="250.38167938931298" y="39.7887323943662"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import "QXRoomSongListCell.h"
|
||||
#import "QXAgoraEngine.h"
|
||||
#import "QXMineNetwork.h"
|
||||
|
||||
#import "QXCustomAlertView.h"
|
||||
@interface QXRoomSongListSubView()<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate>
|
||||
@property (nonatomic,strong)UIView *searchBgView;
|
||||
@property (nonatomic,strong)UIImageView *searchIcon;
|
||||
@@ -196,10 +196,49 @@
|
||||
};
|
||||
return cell;
|
||||
}
|
||||
//-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
//
|
||||
//}
|
||||
//-(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
// if (self.isCompere && !self.isSearch) {
|
||||
// return YES;
|
||||
// }
|
||||
// return NO;
|
||||
//}
|
||||
//-(UISwipeActionsConfiguration *)tableView:(UITableView *)tableView trailingSwipeActionsConfigurationForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
// QXSongListModel *model = self.dataArray[indexPath.row];
|
||||
// MJWeakSelf
|
||||
// UIContextualAction *deletAction = [UIContextualAction contextualActionWithStyle:(UIContextualActionStyleDestructive) title:@"删除" handler:^(UIContextualAction * _Nonnull action, __kindof UIView * _Nonnull sourceView, void (^ _Nonnull completionHandler)(BOOL)) {
|
||||
// [weakSelf deleteSongWithModel:model];
|
||||
// completionHandler(YES);
|
||||
// }];
|
||||
// UISwipeActionsConfiguration *config = [UISwipeActionsConfiguration configurationWithActions:@[deletAction]];
|
||||
// return config;
|
||||
//}
|
||||
-(void)deleteSongWithModel:(QXSongListModel*)model{
|
||||
QXCustomAlertView *alertView = [[QXCustomAlertView alloc] init];
|
||||
[alertView showInView:self title:@"您确定要删除歌曲吗" message:[NSString stringWithFormat:@"歌曲名称:%@\n演唱者:%@ ",model.song_name,model.nickname] cancleTitle:@"取消" commitTitle:@"确定"];
|
||||
MJWeakSelf
|
||||
alertView.commitBlock = ^{
|
||||
// [QXMineNetwork mineUserAddAndDeleteAndEditWithType:2 Id:model.id songName:model.song_name giftId:model.gift_id giftNum:model.gift_num successBlock:^(NSDictionary * _Nonnull dict) {
|
||||
// showToast(@"删除成功");
|
||||
// weakSelf.page = 1;
|
||||
// [weakSelf getSongList];
|
||||
// } failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
// showToast(@"删除失败");
|
||||
// }];
|
||||
};
|
||||
}
|
||||
|
||||
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
// QXSongListModel *model = self.dataArray[indexPath.row];
|
||||
// [[QXAgoraEngine sharedEngine] ktv_EndSing];
|
||||
// [[QXAgoraEngine sharedEngine] ktv_StartSing:YES withSong:model];
|
||||
if (self.isCompere && !self.isSearch) {
|
||||
QXSongListModel *model = self.dataArray[indexPath.row];
|
||||
[self deleteSongWithModel:model];
|
||||
}
|
||||
|
||||
}
|
||||
-(NSMutableArray *)dataArray{
|
||||
if (!_dataArray) {
|
||||
|
||||
@@ -1082,10 +1082,7 @@
|
||||
/// 亲密
|
||||
Id = @"22";
|
||||
}
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,Id];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
|
||||
@@ -497,10 +497,7 @@
|
||||
|
||||
}
|
||||
-(void)helpAction{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",server,@"32"];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
@@ -760,7 +757,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 签约开始
|
||||
-(void)signDidStartWithEndTime:(NSString *)endTime signId:(NSString *)signId signDay:(NSString*)signDay signValue:(NSString*)signValue{
|
||||
QXSignAlertView *startView = [[QXSignAlertView alloc] initWithType:(QXSignAlerTypeStart)];
|
||||
[startView showInView:self.viewController.view];
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
@property(nonatomic,assign) BOOL isAlreadyShowChirld;
|
||||
@property(nonatomic,strong) QXAppVersionView *appUpdateView;
|
||||
@property (nonatomic,strong)NSString* signStatus;
|
||||
@property (nonatomic,assign)BOOL isShowSign;
|
||||
@end
|
||||
|
||||
@implementation QXTabbarController
|
||||
@@ -55,7 +56,8 @@
|
||||
[self setupTabbar];
|
||||
[self configChildVC];
|
||||
[self getSignStatus];
|
||||
[self performSelector:@selector(signAction) afterDelay:60];
|
||||
[self needShowSign];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(needShowSign) name:noticeTencentLogin object:nil];
|
||||
[self getAppConfig];
|
||||
}
|
||||
|
||||
@@ -163,6 +165,9 @@
|
||||
//
|
||||
// }];
|
||||
}
|
||||
-(void)needShowSign{
|
||||
[self performSelector:@selector(signAction) afterDelay:60];
|
||||
}
|
||||
-(void)getSignStatus{
|
||||
MJWeakSelf
|
||||
[QXMineNetwork appSignTaskStatusSuccessBlock:^(NSString * _Nonnull status) {
|
||||
@@ -175,10 +180,14 @@
|
||||
if (!QXGlobal.shareGlobal.isLogin) {
|
||||
return;
|
||||
}
|
||||
if (self.isShowSign) {
|
||||
return;
|
||||
}
|
||||
if (self.signStatus.intValue == 1) {
|
||||
return;
|
||||
}else{
|
||||
[self popSignTask];
|
||||
self.isShowSign = YES;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,7 @@
|
||||
return self;
|
||||
}
|
||||
-(void)uploadFile:(id)file withObjectKey:(NSString *)key path:(NSString *)path complete:(void (^)(NSString * _Nonnull, QXCOSUploadImageState))complete {
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -102,10 +99,7 @@
|
||||
}
|
||||
|
||||
-(void)audioUploadFile:(id)file withObjectKey:(NSString *)key complete:(void (^)(NSString * fileUrl, QXCOSUploadImageState state))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -176,10 +170,7 @@
|
||||
}
|
||||
|
||||
-(void)uploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void (^)(NSArray<NSString *> * _Nullable, QXCOSUploadImageState))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -276,10 +267,7 @@
|
||||
}
|
||||
|
||||
-(void)activityUploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void (^)(NSArray<NSString *> * _Nonnull, QXCOSUploadImageState))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
|
||||
@@ -88,7 +88,14 @@
|
||||
[attr yy_setColor:self.lengthColor range:[str rangeOfString:length]];
|
||||
self.maxCountLabel.attributedText = attr;
|
||||
}
|
||||
|
||||
-(void)setText:(NSString *)text{
|
||||
[super setText:text];
|
||||
if (self.text.length == 0) {
|
||||
self.placehoulderLabel.hidden = NO;
|
||||
}else{
|
||||
self.placehoulderLabel.hidden = YES;
|
||||
}
|
||||
}
|
||||
-(void)setMaxLength:(NSInteger)maxLength{
|
||||
_maxLength = maxLength;
|
||||
NSString *length = [NSString stringWithFormat:@"%ld",self.maxLength - self.text.length];
|
||||
|
||||
@@ -41,10 +41,7 @@ static void *WKWebBrowserContext = &WKWebBrowserContext;
|
||||
, 2)];
|
||||
}
|
||||
- (void)loadData {
|
||||
NSString *server = H5ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RH5ServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentH5Server;
|
||||
NSInteger safeTop = kSafeAreaTop;
|
||||
NSURL* url= [NSURL URLWithString:[NSString stringWithFormat:@"%@web/index.html#/pages/feedback/teenage?id=%@&h=%ld",server,[QXGlobal shareGlobal].loginModel.token,safeTop]];
|
||||
NSURLRequest *request =[NSURLRequest requestWithURL:url];
|
||||
|
||||
@@ -71,14 +71,11 @@
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":self.giftModel.gift_bag?self.giftModel.gift_bag:@"",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
[self.collectionView reloadData];
|
||||
[weakSelf.collectionView reloadData];
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
|
||||
}];
|
||||
|
||||
@@ -125,10 +125,7 @@
|
||||
@"gift_bag_id":self.giftModel.gift_bag,
|
||||
@"page":[NSNumber numberWithInteger:self.page]
|
||||
};
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"];
|
||||
if (self.myRecordBtn.selected) {
|
||||
url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"];
|
||||
|
||||
@@ -348,10 +348,7 @@ static NSInteger toSlowCount = 4;
|
||||
// return;
|
||||
// }
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":self.giftModel.gift_bag?self.giftModel.gift_bag:@"",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
@@ -409,10 +406,7 @@ static NSInteger toSlowCount = 4;
|
||||
};
|
||||
self.isDrawing = YES;
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
QXDrawGiftResultModel *model = [QXDrawGiftResultModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.drawResultModel = model;
|
||||
@@ -521,11 +515,21 @@ static NSInteger toSlowCount = 4;
|
||||
}
|
||||
|
||||
-(void)startFastAnimate{
|
||||
[self stopFastAnimate];
|
||||
self.currentGiftView = self.allViewsArray.firstObject;
|
||||
self.currentGiftView.isSelected = YES;
|
||||
[self stopFastAnimate];
|
||||
if (_fastTimer == nil) {
|
||||
_fastTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0));
|
||||
|
||||
// 修复2:创建一个新的定时器
|
||||
// 建议使用串行队列,避免多线程问题
|
||||
static dispatch_queue_t fastTimerQueue;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
fastTimerQueue = dispatch_queue_create("com.yourcompany.fastTimerQueue", DISPATCH_QUEUE_SERIAL);
|
||||
});
|
||||
|
||||
_fastTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, fastTimerQueue);
|
||||
if (!_fastTimer) {
|
||||
return; // 创建失败处理
|
||||
}
|
||||
// dispatch_source_set_timer(_fastTimer,
|
||||
// dispatch_time(DISPATCH_TIME_NOW, 0),
|
||||
@@ -556,7 +560,10 @@ static NSInteger toSlowCount = 4;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// 再次检查 strongSelf 是否存在
|
||||
__strong typeof(weakSelf) strongSelfInMain = weakSelf;
|
||||
if (!strongSelfInMain) return;
|
||||
if (!strongSelfInMain) {
|
||||
QXLOG(@"不在主线程");
|
||||
return;
|
||||
}
|
||||
|
||||
// 使用局部变量进行计算,避免频繁访问属性
|
||||
roundCount++;
|
||||
@@ -642,10 +649,7 @@ static NSInteger toSlowCount = 4;
|
||||
NSDictionary *parameters = @{
|
||||
@"send_id":self.drawResultModel.blind_box_turntable_id?self.drawResultModel.blind_box_turntable_id:@""
|
||||
};
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/gift_send"] parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
@@ -654,10 +658,18 @@ static NSInteger toSlowCount = 4;
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)stopFastAnimate{
|
||||
if (_fastTimer != nil) {
|
||||
dispatch_source_cancel(_fastTimer);
|
||||
_fastTimer = nil;
|
||||
- (void)stopFastAnimate {
|
||||
// 1. 使用局部变量捕获,防止后续被修改
|
||||
dispatch_source_t timer = _fastTimer;
|
||||
_fastTimer = nil; // 2. 先立即置空实例变量
|
||||
|
||||
if (timer) {
|
||||
// 3. 在定时器自己的队列上同步执行取消操作
|
||||
// 如果创建时用的全局队列,这里也用全局队列,但建议用串行队列
|
||||
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||
dispatch_sync(queue, ^{
|
||||
dispatch_source_cancel(timer);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -761,10 +773,7 @@ static NSInteger toSlowCount = 4;
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
- (void)dealloc {
|
||||
if (_fastTimer) {
|
||||
dispatch_source_cancel(_fastTimer);
|
||||
_fastTimer = nil;
|
||||
}
|
||||
[self stopFastAnimate];
|
||||
NSLog(@"%@ dealloc", NSStringFromClass([self class]));
|
||||
}
|
||||
@end
|
||||
@@ -862,7 +871,15 @@ static NSInteger toSlowCount = 4;
|
||||
}
|
||||
-(void)setIsSelected:(BOOL)isSelected{
|
||||
_isSelected = isSelected;
|
||||
if (isSelected) {
|
||||
QXLOG(@"礼物%@设置了选中",self.giftModel.gift_name);
|
||||
}else{
|
||||
QXLOG(@"礼物%@设置了未选中",self.giftModel.gift_name);
|
||||
}
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.bgImageView.image = [UIImage imageNamed:isSelected?@"sky_item_sel":@"sky_item_nor"];
|
||||
});
|
||||
|
||||
}
|
||||
- (void)startPulseAnimationWithLayer {
|
||||
CABasicAnimation *pulseAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
|
||||
|
||||
@@ -65,10 +65,7 @@
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"11",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
|
||||
@@ -118,10 +118,7 @@
|
||||
@"gift_bag_id":@"11",
|
||||
@"page":[NSNumber numberWithInteger:self.page]
|
||||
};
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"];
|
||||
if (self.myRecordBtn.selected) {
|
||||
url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"];
|
||||
|
||||
@@ -368,10 +368,7 @@ static NSInteger toSlowCount = 4;
|
||||
// return;
|
||||
// }
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"11",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
@@ -423,10 +420,7 @@ static NSInteger toSlowCount = 4;
|
||||
};
|
||||
self.isDrawing = YES;
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
QXDrawGiftResultModel *model = [QXDrawGiftResultModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.drawResultModel = model;
|
||||
@@ -656,10 +650,7 @@ static NSInteger toSlowCount = 4;
|
||||
NSDictionary *parameters = @{
|
||||
@"send_id":self.drawResultModel.blind_box_turntable_id?self.drawResultModel.blind_box_turntable_id:@""
|
||||
};
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/gift_send"] parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
|
||||
@@ -63,10 +63,7 @@
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/xlh"] parameters:@{@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXActivityXLHModel *model = [QXActivityXLHModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
|
||||
@@ -105,10 +105,7 @@
|
||||
@"room_id":self.roomId?self.roomId:@"",
|
||||
@"page":[NSNumber numberWithInteger:self.page]
|
||||
};
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
if ([type isEqualToString:@"1"]) {
|
||||
NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_xlh_all_record"];
|
||||
[[QXRequset shareInstance] postWithUrl:url parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
|
||||
@@ -79,10 +79,7 @@
|
||||
@"room_id":self.roomId?self.roomId:@"",
|
||||
@"page":[NSNumber numberWithInteger:self.page]
|
||||
};
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_xlh_my_record"];
|
||||
[[QXRequset shareInstance] postWithUrl:url parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
if (weakSelf.page == 1) {
|
||||
|
||||
@@ -354,10 +354,7 @@
|
||||
// return;
|
||||
// }
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/xlh"] parameters:@{@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXActivityXLHModel *model = [QXActivityXLHModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
@@ -405,10 +402,7 @@
|
||||
self.isDrawing = YES;
|
||||
self.resultView.times = num;
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/xlh_draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
weakSelf.resultArray = [NSArray yy_modelArrayWithClass:[QXDrawGiftModel class] json:responseObject[@"data"]];
|
||||
[weakSelf getMyWallet];
|
||||
|
||||
@@ -66,10 +66,7 @@
|
||||
return;
|
||||
}
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"12",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
|
||||
@@ -118,10 +118,7 @@
|
||||
@"gift_bag_id":@"12",
|
||||
@"page":[NSNumber numberWithInteger:self.page]
|
||||
};
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
NSString *url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"];
|
||||
if (self.myRecordBtn.selected) {
|
||||
url = [NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_my_record"];
|
||||
|
||||
@@ -375,10 +375,7 @@ static NSInteger toSlowCount = 4;
|
||||
// return;
|
||||
// }
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/get_gift_list"] parameters:@{@"gift_bag_id":@"12",@"room_id":self.roomId?self.roomId:@""} needCache:NO success:^(id responseObject) {
|
||||
QXGiftActivityModel *model = [QXGiftActivityModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.model = model;
|
||||
@@ -430,10 +427,7 @@ static NSInteger toSlowCount = 4;
|
||||
};
|
||||
self.isDrawing = YES;
|
||||
MJWeakSelf
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/draw_gift"] parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
QXDrawGiftResultModel *model = [QXDrawGiftResultModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
weakSelf.drawResultModel = model;
|
||||
@@ -663,10 +657,7 @@ static NSInteger toSlowCount = 4;
|
||||
NSDictionary *parameters = @{
|
||||
@"send_id":self.drawResultModel.blind_box_turntable_id?self.drawResultModel.blind_box_turntable_id:@""
|
||||
};
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] postWithUrl:[NSString stringWithFormat:@"%@%@",server,@"api/BlindBoxTurntable/gift_send"] parameters:parameters needCache:NO success:^(id responseObject) {
|
||||
|
||||
} fail:^(NSError *error, NSString *msg, NSURLSessionDataTask *task) {
|
||||
|
||||
Reference in New Issue
Block a user