This commit is contained in:
启星
2025-12-04 14:11:00 +08:00
parent 2d37ab6844
commit 1c5a908dda
49 changed files with 505 additions and 192 deletions

View File

@@ -15,6 +15,8 @@
@property (nonatomic,strong)NSMutableArray *serviceArray;
@property (nonatomic,strong)NSMutableArray *moreArray;
@property (nonatomic,strong)QXServiceModel *inviteModel;
@property (nonatomic,strong)QXServiceModel *singerAuthModel;
@property (nonatomic,strong)QXServiceModel *songListModel;
@end
@implementation QXMineServiceCell
@@ -109,14 +111,40 @@
self.titleLabel.text = isMore?@"更多":@"常用服务";
if (isMore) {
if ([self.moreArray containsObject:self.inviteModel]) {
return;
}else{
if (QXGlobal.shareGlobal.isOpenRecharge) {
[self.moreArray insertObject:self.inviteModel atIndex:1];
}
}
if (QXGlobal.shareGlobal.isOpenRecharge) {
[self.moreArray insertObject:self.inviteModel atIndex:1];
if (self.singerIsAuth) {
if ([self.moreArray containsObject:self.singerAuthModel]) {
[self.moreArray removeObject:self.singerAuthModel];
}
if ([self.moreArray containsObject:self.songListModel]) {
}else{
NSInteger index = self.moreArray.count-1;
[self.moreArray insertObject:self.songListModel atIndex:index];
}
}else{
if ([self.moreArray containsObject:self.songListModel]) {
[self.moreArray removeObject:self.songListModel];
}
if ([self.moreArray containsObject:self.singerAuthModel]) {
}else{
NSInteger index = self.moreArray.count-1;
[self.moreArray insertObject:self.singerAuthModel atIndex:index];
}
}
}
[self.collectionView reloadData];
}
-(void)setSingerIsAuth:(BOOL)singerIsAuth{
_singerIsAuth = singerIsAuth;
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.isMore?self.moreArray.count:self.serviceArray.count;
}
@@ -160,22 +188,17 @@
md3.icon = @"service_bag";
md3.type = QXMineServiceTypeBackpack;
QXServiceModel *md4 = [[QXServiceModel alloc] init];
md4.title = @"设置";
md4.icon = @"service_setting";
md4.type = QXMineServiceTypeSetting;
QXServiceModel *md5 = [[QXServiceModel alloc] init];
md5.title = @"家族";
md5.icon = @"service_my_family";
md5.type = QXMineServiceTypeFamily;
QXServiceModel *md4 = [[QXServiceModel alloc] init];
md4.title = @"家族";
md4.icon = @"service_my_family";
md4.type = QXMineServiceTypeFamily;
_serviceArray = [NSMutableArray arrayWithArray:@[
md4,
md1,
md2,
md3,
md4,
md5
]];
}
return _serviceArray;
@@ -202,23 +225,29 @@
md4.icon = @"service_customer_service";
md4.type = QXMineServiceTypeCustomerService;
QXServiceModel *md5 = [[QXServiceModel alloc] init];
md5.title = @"歌手认证";
md5.icon = @"service_singer_auth";
md5.type = QXMineServiceTypeSingerAuth;
// QXServiceModel *md5 = [[QXServiceModel alloc] init];
// md5.title = @"歌手认证";
// md5.icon = @"service_singer_auth";
// md5.type = QXMineServiceTypeSingerAuth;
//
// QXServiceModel *md6 = [[QXServiceModel alloc] init];
// md6.title = @"我的歌单";
// md6.icon = @"service_songlist";
// md6.type = QXMineServiceTypeSongList;
QXServiceModel *md6 = [[QXServiceModel alloc] init];
md6.title = @"我的歌单";
md6.icon = @"service_songlist";
md6.type = QXMineServiceTypeSongList;
QXServiceModel *md7 = [[QXServiceModel alloc] init];
md7.title = @"设置";
md7.icon = @"service_setting";
md7.type = QXMineServiceTypeSetting;
_moreArray = [NSMutableArray arrayWithArray:@[
md1,
md2,
md3,
md4,
md5,
md6,
// md5,
// md6,
md7
]];
}
@@ -233,6 +262,25 @@
}
return _inviteModel;
}
-(QXServiceModel *)singerAuthModel{
if (!_singerAuthModel) {
_singerAuthModel = [[QXServiceModel alloc] init];
_singerAuthModel.title = @"歌手认证";
_singerAuthModel.icon = @"service_singer_auth";
_singerAuthModel.type = QXMineServiceTypeSingerAuth;
}
return _singerAuthModel;
}
-(QXServiceModel *)songListModel{
if (!_songListModel) {
_songListModel = [[QXServiceModel alloc] init];
_songListModel.title = @"我的歌单";
_songListModel.icon = @"service_songlist";
_songListModel.type = QXMineServiceTypeSongList;
}
return _songListModel;
}
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code