提交
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user