首次提交

This commit is contained in:
启星
2025-08-08 11:05:33 +08:00
parent 1b3bb91b4a
commit adc1a2a25d
8803 changed files with 708874 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
//
// SPBangDanContainerVC.h
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface SPBangDanContainerVC : BaseViewController
@property(nonatomic, copy) NSString *rid;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,111 @@
//
// SPBangDanContainerVC.m
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "SPBangDanContainerVC.h"
#import "SPBangDanDateVC.h"
@interface SPBangDanContainerVC ()<JXCategoryListContainerViewDelegate, JXCategoryViewDelegate>
@property (nonatomic, strong) NSArray *titles;
@property (nonatomic, strong) JXCategoryImageView *categoryView;
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
@property (nonatomic, strong) UIImageView *bgImgV;
@end
@implementation SPBangDanContainerVC
- (void)viewDidLoad {
[super viewDidLoad];
self.titles = @[@"贡献榜", @"魅力榜", @"房间榜"];
[self showNaviBarWithTitle:@""];
[self createUI];
}
- (void)createUI {
UIImageView *imgV = [[UIImageView alloc] initWithImage:ImageNamed(@"bang_bg_gx")];
[self.view addSubview:imgV];
[self.view sendSubviewToBack:imgV];
self.bgImgV = imgV;
[imgV mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.right.equalTo(self.view);
make.height.mas_equalTo(ScreenWidth/375*360);
}];
[self.view addSubview:self.categoryView];
[self.view addSubview:self.listContainerView];
[self.categoryView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.view).offset(yb_StatusBar_H+10);
make.centerX.equalTo(self.view);
make.width.mas_equalTo(APPW-130);
make.height.mas_equalTo(44);
}];
[self.listContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.categoryView.mas_bottom);
make.left.right.bottom.equalTo(self.view);
}];
}
//
- (JXCategoryImageView *)categoryView {
if (!_categoryView) {
_categoryView = [[JXCategoryImageView alloc] init];
_categoryView.delegate = self;
_categoryView.imageSize = CGSizeMake(54, 21);
_categoryView.contentEdgeInsetLeft = 10;
_categoryView.contentEdgeInsetRight = 10;
_categoryView.imageZoomEnabled = YES;
_categoryView.listContainer = self.listContainerView;
_categoryView.imageNames = @[@"gxb_nor", @"mlb_nor", @"room_nor"];
_categoryView.selectedImageNames = @[@"gxb_sel", @"mlb_sel", @"room_sel"];
}
return _categoryView;
}
//
- (JXCategoryListContainerView *)listContainerView {
if (!_listContainerView) {
_listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
}
return _listContainerView;
}
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
if (index == 0) {
self.bgImgV.image = ImageNamed(@"bang_bg_gx");
}else if (index == 1) {
self.bgImgV.image = ImageNamed(@"bang_bg_ml");
}else if (index == 2) {
self.bgImgV.image = ImageNamed(@"bang_bg_room");
}
}
#pragma mark - JXCategoryListContainerViewDelegate
//
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
return self.titles.count;
}
// <JXCategoryListContentViewDelegate>
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
SPBangDanDateVC *list = [[SPBangDanDateVC alloc] init];
list.rid = self.rid;
list.type = index+1;
return list;
}
@end

View File

@@ -0,0 +1,19 @@
//
// SPBangDanDateVC.h
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface SPBangDanDateVC : BaseViewController <JXCategoryListContentViewDelegate>
@property(nonatomic, copy) NSString *rid;
@property(nonatomic, assign) NSInteger type;//1贡献榜2魅力榜
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,144 @@
//
// SPBangDanDateVC.m
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "SPBangDanDateVC.h"
#import "SPBangDanListVC.h"
@interface SPBangDanDateVC ()<JXCategoryListContainerViewDelegate>
@property (nonatomic, strong) NSArray *titles;
@property (nonatomic, strong) JXCategoryTitleView *categoryView;
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
@end
@implementation SPBangDanDateVC
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = kClearColor;
self.titles = @[@"日榜", @"周榜",@"月榜"];
[self.view addSubview:self.categoryView];
[self.view addSubview:self.listContainerView];
[self.categoryView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.view).offset(10);
make.centerX.equalTo(self.view);
make.width.mas_equalTo(260);
make.height.mas_equalTo(36);
}];
[self.listContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.categoryView.mas_bottom);
make.left.right.bottom.equalTo(self.view);
}];
}
//
- (JXCategoryTitleView *)categoryView {
if (!_categoryView) {
_categoryView = [[JXCategoryTitleView alloc] init];
_categoryView.titleFont = YBMediumFont(15);
_categoryView.titleSelectedFont = YBBoldFont(16);
_categoryView.titleColor = HEXCOLORA(0x999999, 1);
if (self.type == 1){
_categoryView.titleSelectedColor = HEXCOLOR(0xE5A800);
}else if (self.type == 2){
_categoryView.titleSelectedColor = HEXCOLOR(0xE100E1);
}else{
_categoryView.titleSelectedColor = HEXCOLOR(0x00AEE8);
}
_categoryView.backgroundColor = HEXCOLORA(0xFFFFFF, 0.4);
//
if (self.rid.length > 0) {
if (self.type == 1) {
_categoryView.titleSelectedColor = HEXCOLOR(0xE5A800);
_categoryView.titleColor = HEXCOLORA(0xFFFFFF, 1);
}else if (self.type == 2) {
_categoryView.titleSelectedColor = HEXCOLOR(0xE100E1);
_categoryView.titleColor = HEXCOLORA(0xFFFFFF, 1);
}
_categoryView.backgroundColor = HEXCOLORA(0x000000, 0.15);
}
// if (self.type == 3) {
// _categoryView.backgroundColor = HEXCOLORA(0x2B0098, 0.2);
// }
_categoryView.layer.cornerRadius = 17.5;
_categoryView.layer.masksToBounds = YES;
_categoryView.cellSpacing = 0;
_categoryView.cellWidth = 260/self.titles.count;
_categoryView.averageCellSpacingEnabled = NO;
_categoryView.titleLabelMaskEnabled = YES;
_categoryView.listContainer = self.listContainerView;
_categoryView.titles = self.titles;
JXCategoryIndicatorBackgroundView *backgroundView = [[JXCategoryIndicatorBackgroundView alloc] init];
backgroundView.indicatorHeight = 36;
backgroundView.indicatorWidthIncrement = 0;
backgroundView.indicatorCornerRadius = 18;
backgroundView.indicatorColor = kWhiteColor;
// if (self.rid.length > 0) {
// if (self.type == 1) {
// backgroundView.indicatorColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(195/2, 35) direction:FXGradientChangeDirectionHorizontal startColor:HEXCOLOR(0xFF5257) endColor:HEXCOLOR(0xFFB172)];
// }else if (self.type == 2) {
// backgroundView.indicatorColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(195/2, 35) direction:FXGradientChangeDirectionHorizontal startColor:HEXCOLOR(0xEC80FF) endColor:HEXCOLOR(0x409CFF)];
// }
// }
// else {
// if (self.type == 1 || self.type == 3) {
// backgroundView.indicatorColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(195/2, 35) direction:FXGradientChangeDirectionVertical startColor:HEXCOLOR(0x7757FF) endColor:HEXCOLOR(0xD554FF)];
// }else if (self.type == 2) {
// backgroundView.indicatorColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(195/2, 35) direction:FXGradientChangeDirectionVertical startColor:HEXCOLOR(0xFF42B4) endColor:HEXCOLOR(0xFF8ED3)];
// }
// }
// backgroundView.layer.borderWidth = 1;
// backgroundView.layer.borderColor = HEXCOLOR(0xFFFFFF).CGColor;
_categoryView.indicators = @[backgroundView];
}
return _categoryView;
}
//
- (JXCategoryListContainerView *)listContainerView {
if (!_listContainerView) {
_listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
}
return _listContainerView;
}
#pragma mark - JXCategoryListContainerViewDelegate
//
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
return self.titles.count;
}
// <JXCategoryListContentViewDelegate>
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
SPBangDanListVC *list = [[SPBangDanListVC alloc] init];
list.rid = self.rid;
list.type = self.type;
list.dateType = index+1;
return list;
}
#pragma mark - JXCategoryListContentViewDelegate
- (UIView *)listView {
return self.view;
}
@end

View File

@@ -0,0 +1,55 @@
//
// SPBangDanHeader.h
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import <UIKit/UIKit.h>
#import "SPBangDanListModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface SPBangDanHeader : UIView
@property (weak, nonatomic) IBOutlet UIView *bgView_1;
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV_1;
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab_1;
@property (weak, nonatomic) IBOutlet UILabel *valueLab_1;
@property (weak, nonatomic) IBOutlet UIImageView *levelImgV_1;
@property (weak, nonatomic) IBOutlet UIImageView *charmImgV_1;
@property (weak, nonatomic) IBOutlet UIView *bgView_2;
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV_2;
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab_2;
@property (weak, nonatomic) IBOutlet UILabel *valueLab_2;
@property (weak, nonatomic) IBOutlet UIImageView *levelImgV_2;
@property (weak, nonatomic) IBOutlet UIImageView *charmImgV_2;
@property (weak, nonatomic) IBOutlet UIView *bgView_3;
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV_3;
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab_3;
@property (weak, nonatomic) IBOutlet UILabel *valueLab_3;
@property (weak, nonatomic) IBOutlet UIImageView *levelImgV_3;
@property (weak, nonatomic) IBOutlet UIImageView *charmImgV_3;
@property (weak, nonatomic) IBOutlet UIImageView *kuangImgV_1;
@property (weak, nonatomic) IBOutlet UIImageView *kuangImgV_2;
@property (weak, nonatomic) IBOutlet UIImageView *kuangImgV_3;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *header_1_width;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *header_1_height;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *header_2_width;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *header_2_height;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *header_3_width;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *header_3_height;
-(void)onUpdateSPBangDanHeader:(NSArray *)arr type:(NSInteger)type;
@property(nonatomic, assign) BOOL isRoomRank;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,139 @@
//
// SPBangDanHeader.m
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "SPBangDanHeader.h"
@implementation SPBangDanHeader
-(void)onUpdateSPBangDanHeader:(NSArray *)arr type:(NSInteger)type {
if (type == 1) {//
self.nicknameLab_1.textColor = self.nicknameLab_2.textColor = self.nicknameLab_3.textColor = HEXCOLOR(0x111111);
}else if(type == 2) {//
self.nicknameLab_1.textColor = self.nicknameLab_2.textColor = self.nicknameLab_3.textColor = HEXCOLOR(0x111111);
}else if(type == 3) {
self.nicknameLab_1.textColor = self.nicknameLab_2.textColor = self.nicknameLab_3.textColor = HEXCOLOR(0x111111);
// self.kuangImgV_1.image = ImageNamed(@"bang_top_1_room");
// self.kuangImgV_2.image = ImageNamed(@"bang_top_2_room");
// self.kuangImgV_3.image = ImageNamed(@"bang_top_3_room");
// self.avatarImgV_1.layer.cornerRadius = self.avatarImgV_2.layer.cornerRadius = self.avatarImgV_3.layer.cornerRadius = 10;
}
if (type == 3) {
[self onUpdateRoomRank:arr type:type];
return;
}
if (arr.count > 0) {
SPBangDanListModel *model = arr[0];
[self.avatarImgV_1 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
self.nicknameLab_1.text = model.nick_name;
[self.levelImgV_1 sd_setImageWithURL:[NSURL URLWithString:model.contribution_image]];
[self.charmImgV_1 sd_setImageWithURL:[NSURL URLWithString:model.charm_image]];
self.valueLab_1.text = model.rank_value;
[self.bgView_1 dg_Tapped:^{
if (self.isRoomRank) {
[UIViewController goUserAlertWithUid:model.uid];
}else {
[UIViewController goUserMainpageWith:model.uid withRid:@""];
}
}];
}
if (arr.count > 1) {
SPBangDanListModel *model = arr[1];
[self.avatarImgV_2 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
self.nicknameLab_2.text = model.nick_name;
[self.levelImgV_2 sd_setImageWithURL:[NSURL URLWithString:model.contribution_image]];
[self.charmImgV_2 sd_setImageWithURL:[NSURL URLWithString:model.charm_image]];
self.valueLab_2.text = model.rank_value;
[self.bgView_2 dg_Tapped:^{
if (self.isRoomRank) {
[UIViewController goUserAlertWithUid:model.uid];
}else {
[UIViewController goUserMainpageWith:model.uid withRid:@""];
}
}];
}
if (arr.count > 2) {
SPBangDanListModel *model = arr[2];
[self.avatarImgV_3 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
self.nicknameLab_3.text = model.nick_name;
[self.levelImgV_3 sd_setImageWithURL:[NSURL URLWithString:model.contribution_image]];
[self.charmImgV_3 sd_setImageWithURL:[NSURL URLWithString:model.charm_image]];
self.valueLab_3.text = model.rank_value;
[self.bgView_3 dg_Tapped:^{
if (self.isRoomRank) {
[UIViewController goUserAlertWithUid:model.uid];
}else {
[UIViewController goUserMainpageWith:model.uid withRid:@""];
}
}];
}
}
- (void)onUpdateRoomRank:(NSArray *)arr type:(NSInteger)type {
if (arr.count > 0) {
SPBangDanListModel *model = arr[0];
[self.avatarImgV_1 sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:kDefaultUserIcon];
self.nicknameLab_1.text = model.room_name;
self.valueLab_1.text = model.total_amount;
[self.bgView_1 dg_Tapped:^{
[UIViewController goMicRoomWithRid:model.rid withPwd:@""];
}];
}
if (arr.count > 1) {
SPBangDanListModel *model = arr[1];
[self.avatarImgV_2 sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:kDefaultUserIcon];
self.nicknameLab_2.text = model.room_name;
self.valueLab_2.text = model.total_amount;
[self.bgView_2 dg_Tapped:^{
[UIViewController goMicRoomWithRid:model.rid withPwd:@""];
}];
}
if (arr.count > 2) {
SPBangDanListModel *model = arr[2];
[self.avatarImgV_3 sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:kDefaultUserIcon];
self.nicknameLab_3.text = model.room_name;
self.valueLab_3.text = model.total_amount;
[self.bgView_3 dg_Tapped:^{
[UIViewController goMicRoomWithRid:model.rid withPwd:@""];
}];
}
}
- (void)setIsRoomRank:(BOOL)isRoomRank {
_isRoomRank = isRoomRank;
if (_isRoomRank == YES){
// self.nicknameLab_1.textColor = self.nicknameLab_2.textColor = self.nicknameLab_3.textColor = HEXCOLOR(0x333333);
// self.kuangImgV_1.image = ImageNamed(@"bang_top_1_room_inroom");
// self.kuangImgV_2.image = ImageNamed(@"bang_top_2_room_inroom");
// self.kuangImgV_3.image = ImageNamed(@"bang_top_3_room_inroom");
// self.valueLab_1.textColor = self.valueLab_2.textColor = self.valueLab_3.textColor = HEXCOLOR(0x333333);
// self.header_1_width.constant = 66;
// self.header_1_height.constant = 66;
// self.avatarImgV_1.layer.cornerRadius = 66/2;
// self.header_2_width.constant = 48;
// self.header_2_height.constant = 48;
// self.avatarImgV_2.layer.cornerRadius = 48/2;
// self.header_3_width.constant = 50;
// self.header_3_height.constant = 50;
// self.avatarImgV_3.layer.cornerRadius = 50/2;
}
// self.nicknameLab_1.textColor = self.nicknameLab_2.textColor = self.nicknameLab_3.textColor = HEXCOLOR(0xFFFFFF);
}
@end

View File

@@ -0,0 +1,254 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
<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"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="SPBangDanHeader">
<rect key="frame" x="0.0" y="0.0" width="375" height="200"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ho6-fI-Hbh">
<rect key="frame" x="125" y="0.0" width="125" height="200"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ogd-ZD-oWT">
<rect key="frame" x="37.5" y="24" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="RAg-Qo-PT0"/>
<constraint firstAttribute="height" constant="50" id="is8-MR-XGZ"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="25"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bang_top_1" translatesAutoresizingMaskIntoConstraints="NO" id="RoJ-iM-7rk">
<rect key="frame" x="28.5" y="15" width="68" height="68"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="chV-lc-aXx">
<rect key="frame" x="36" y="83" width="53.5" height="16"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" red="0.066666666669999999" green="0.066666666669999999" blue="0.066666666669999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="mgn-xM-3kK">
<rect key="frame" x="20.5" y="101" width="40" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Ns6-Nh-cbD"/>
<constraint firstAttribute="width" constant="40" id="f8p-fU-80p"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pe1-Nm-771">
<rect key="frame" x="57" y="158" width="11" height="19.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" red="0.066666666669999999" green="0.066666666669999999" blue="0.066666666669999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="zeX-qq-QrX">
<rect key="frame" x="64.5" y="101" width="40" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="HNz-fW-5oi"/>
<constraint firstAttribute="height" constant="20" id="Zyt-GH-Wfv"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="RoJ-iM-7rk" firstAttribute="centerX" secondItem="ho6-fI-Hbh" secondAttribute="centerX" id="2qU-CO-8ET"/>
<constraint firstItem="Pe1-Nm-771" firstAttribute="top" secondItem="mgn-xM-3kK" secondAttribute="bottom" constant="37" id="9J0-fx-DLi"/>
<constraint firstItem="zeX-qq-QrX" firstAttribute="leading" secondItem="mgn-xM-3kK" secondAttribute="trailing" constant="4" id="BDk-Gm-tXK"/>
<constraint firstItem="RoJ-iM-7rk" firstAttribute="top" secondItem="ho6-fI-Hbh" secondAttribute="top" constant="15" id="C9s-QA-3Bz"/>
<constraint firstItem="mgn-xM-3kK" firstAttribute="top" secondItem="chV-lc-aXx" secondAttribute="bottom" constant="2" id="PRV-rh-opD"/>
<constraint firstItem="chV-lc-aXx" firstAttribute="top" secondItem="RoJ-iM-7rk" secondAttribute="bottom" id="U4G-gI-qj8"/>
<constraint firstAttribute="width" constant="125" id="fUa-0o-XPV"/>
<constraint firstItem="mgn-xM-3kK" firstAttribute="centerX" secondItem="ho6-fI-Hbh" secondAttribute="centerX" constant="-22" id="fVv-bH-dbz"/>
<constraint firstItem="chV-lc-aXx" firstAttribute="centerX" secondItem="ho6-fI-Hbh" secondAttribute="centerX" id="jmY-PY-nZk"/>
<constraint firstItem="Pe1-Nm-771" firstAttribute="centerX" secondItem="ho6-fI-Hbh" secondAttribute="centerX" id="pbf-4v-gmh"/>
<constraint firstItem="ogd-ZD-oWT" firstAttribute="centerX" secondItem="RoJ-iM-7rk" secondAttribute="centerX" id="uZb-oT-b7J"/>
<constraint firstItem="zeX-qq-QrX" firstAttribute="centerY" secondItem="mgn-xM-3kK" secondAttribute="centerY" id="wmG-F6-tVf"/>
<constraint firstItem="ogd-ZD-oWT" firstAttribute="centerY" secondItem="RoJ-iM-7rk" secondAttribute="centerY" id="zjU-Pi-66V"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uFL-s9-XEh">
<rect key="frame" x="0.0" y="0.0" width="125" height="200"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="jAH-nB-Mln">
<rect key="frame" x="40.5" y="48" width="44" height="44"/>
<constraints>
<constraint firstAttribute="width" constant="44" id="6sd-dP-UxL"/>
<constraint firstAttribute="height" constant="44" id="wT4-6L-dpe"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="22"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bang_top_2" translatesAutoresizingMaskIntoConstraints="NO" id="UHh-BK-fEW">
<rect key="frame" x="32.5" y="40" width="60" height="60"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1JW-Db-cQ5">
<rect key="frame" x="36" y="100" width="53.5" height="16"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" red="0.066666666666666666" green="0.066666666666666666" blue="0.066666666666666666" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="QAU-p9-plD">
<rect key="frame" x="20.5" y="118" width="40" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="Kvp-rS-5i6"/>
<constraint firstAttribute="width" constant="40" id="h25-hA-De2"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A7a-YN-oJD">
<rect key="frame" x="57" y="168" width="11" height="19.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" red="0.066666666669999999" green="0.066666666669999999" blue="0.066666666669999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="weg-IT-fSz">
<rect key="frame" x="64.5" y="118" width="40" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="n1H-ss-1Tc"/>
<constraint firstAttribute="width" constant="40" id="r9f-s8-aub"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="weg-IT-fSz" firstAttribute="centerY" secondItem="QAU-p9-plD" secondAttribute="centerY" id="646-r3-4QN"/>
<constraint firstItem="A7a-YN-oJD" firstAttribute="centerX" secondItem="uFL-s9-XEh" secondAttribute="centerX" id="7wo-Ob-06D"/>
<constraint firstItem="A7a-YN-oJD" firstAttribute="top" secondItem="QAU-p9-plD" secondAttribute="bottom" constant="30" id="D6g-g5-Joe"/>
<constraint firstAttribute="width" constant="125" id="Fvx-ZL-HxS"/>
<constraint firstItem="weg-IT-fSz" firstAttribute="leading" secondItem="QAU-p9-plD" secondAttribute="trailing" constant="4" id="Gf6-3Y-g2K"/>
<constraint firstItem="QAU-p9-plD" firstAttribute="centerX" secondItem="uFL-s9-XEh" secondAttribute="centerX" constant="-22" id="Ky9-nL-gkx"/>
<constraint firstItem="1JW-Db-cQ5" firstAttribute="centerX" secondItem="uFL-s9-XEh" secondAttribute="centerX" id="XjZ-lL-0da"/>
<constraint firstItem="1JW-Db-cQ5" firstAttribute="top" secondItem="UHh-BK-fEW" secondAttribute="bottom" id="Y9z-NT-L2T"/>
<constraint firstItem="UHh-BK-fEW" firstAttribute="centerX" secondItem="uFL-s9-XEh" secondAttribute="centerX" id="h5q-Mj-1NO"/>
<constraint firstItem="jAH-nB-Mln" firstAttribute="centerX" secondItem="UHh-BK-fEW" secondAttribute="centerX" id="mdF-Se-PGf"/>
<constraint firstItem="QAU-p9-plD" firstAttribute="top" secondItem="1JW-Db-cQ5" secondAttribute="bottom" constant="2" id="pJC-TD-sxz"/>
<constraint firstItem="jAH-nB-Mln" firstAttribute="centerY" secondItem="UHh-BK-fEW" secondAttribute="centerY" id="uaz-ni-ZTG"/>
<constraint firstItem="UHh-BK-fEW" firstAttribute="top" secondItem="uFL-s9-XEh" secondAttribute="top" constant="40" id="yIT-lI-Cbk"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WJb-2U-hGl">
<rect key="frame" x="250" y="0.0" width="125" height="200"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Mjn-Hl-m9Z">
<rect key="frame" x="40.5" y="48" width="44" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="A2N-a9-4x2"/>
<constraint firstAttribute="width" constant="44" id="sVu-sc-ObA"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="22"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bang_top_3" translatesAutoresizingMaskIntoConstraints="NO" id="SKL-s0-qRh">
<rect key="frame" x="32.5" y="40" width="60" height="60"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="虚位以待" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0et-Cm-OqV">
<rect key="frame" x="36" y="100" width="53.5" height="16"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="13"/>
<color key="textColor" red="0.066666666669999999" green="0.066666666669999999" blue="0.066666666669999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="uSc-Pn-Ion">
<rect key="frame" x="20.5" y="118" width="40" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="ChA-hq-qpU"/>
<constraint firstAttribute="height" constant="20" id="RUP-Br-v9R"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sVb-56-iRH">
<rect key="frame" x="57" y="168" width="11" height="19.5"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" red="0.066666666669999999" green="0.066666666669999999" blue="0.066666666669999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="tvt-42-Vit">
<rect key="frame" x="64.5" y="118" width="40" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="FdV-BM-tn4"/>
<constraint firstAttribute="height" constant="20" id="Zzs-21-zm8"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="sVb-56-iRH" firstAttribute="top" secondItem="uSc-Pn-Ion" secondAttribute="bottom" constant="30" id="3hG-yI-m5e"/>
<constraint firstItem="sVb-56-iRH" firstAttribute="centerX" secondItem="WJb-2U-hGl" secondAttribute="centerX" id="4qg-e2-qS3"/>
<constraint firstItem="Mjn-Hl-m9Z" firstAttribute="centerY" secondItem="SKL-s0-qRh" secondAttribute="centerY" id="8oY-iL-b3m"/>
<constraint firstItem="SKL-s0-qRh" firstAttribute="top" secondItem="WJb-2U-hGl" secondAttribute="top" constant="40" id="Dss-5e-hfv"/>
<constraint firstItem="tvt-42-Vit" firstAttribute="leading" secondItem="uSc-Pn-Ion" secondAttribute="trailing" constant="4" id="Gwj-GI-xVr"/>
<constraint firstItem="SKL-s0-qRh" firstAttribute="centerX" secondItem="WJb-2U-hGl" secondAttribute="centerX" id="PUS-ck-q8a"/>
<constraint firstItem="uSc-Pn-Ion" firstAttribute="centerX" secondItem="WJb-2U-hGl" secondAttribute="centerX" constant="-22" id="RBk-US-nhg"/>
<constraint firstAttribute="width" constant="125" id="WSf-5Z-5g1"/>
<constraint firstItem="tvt-42-Vit" firstAttribute="centerY" secondItem="uSc-Pn-Ion" secondAttribute="centerY" id="c2c-Zn-XkS"/>
<constraint firstItem="0et-Cm-OqV" firstAttribute="centerX" secondItem="WJb-2U-hGl" secondAttribute="centerX" id="meK-G1-Rdy"/>
<constraint firstItem="uSc-Pn-Ion" firstAttribute="top" secondItem="0et-Cm-OqV" secondAttribute="bottom" constant="2" id="mmW-zu-HSK"/>
<constraint firstItem="Mjn-Hl-m9Z" firstAttribute="centerX" secondItem="SKL-s0-qRh" secondAttribute="centerX" id="nOZ-5T-w57"/>
<constraint firstItem="0et-Cm-OqV" firstAttribute="top" secondItem="SKL-s0-qRh" secondAttribute="bottom" id="ouK-PJ-CxA"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="WJb-2U-hGl" secondAttribute="bottom" id="2uO-eJ-OMd"/>
<constraint firstItem="uFL-s9-XEh" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="5eg-VG-cPx"/>
<constraint firstAttribute="trailing" secondItem="WJb-2U-hGl" secondAttribute="trailing" id="6sk-b9-V3s"/>
<constraint firstItem="uFL-s9-XEh" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="McO-MK-j8G"/>
<constraint firstItem="ho6-fI-Hbh" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="NhK-GX-HgC"/>
<constraint firstAttribute="bottom" secondItem="uFL-s9-XEh" secondAttribute="bottom" id="WMv-I8-q05"/>
<constraint firstItem="ho6-fI-Hbh" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="khx-gu-erf"/>
<constraint firstAttribute="bottom" secondItem="ho6-fI-Hbh" secondAttribute="bottom" id="tbt-yH-K1k"/>
<constraint firstItem="WJb-2U-hGl" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="zhd-8Z-F9Q"/>
</constraints>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="avatarImgV_1" destination="ogd-ZD-oWT" id="6Ri-KS-RBZ"/>
<outlet property="avatarImgV_2" destination="jAH-nB-Mln" id="4Ig-ek-pIn"/>
<outlet property="avatarImgV_3" destination="Mjn-Hl-m9Z" id="oGl-5q-4OJ"/>
<outlet property="bgView_1" destination="ho6-fI-Hbh" id="7W1-lD-Q9x"/>
<outlet property="bgView_2" destination="uFL-s9-XEh" id="lnb-kO-AUs"/>
<outlet property="bgView_3" destination="WJb-2U-hGl" id="lai-zh-hWD"/>
<outlet property="charmImgV_1" destination="zeX-qq-QrX" id="FIj-1y-Q1V"/>
<outlet property="charmImgV_2" destination="weg-IT-fSz" id="mQr-25-dFn"/>
<outlet property="charmImgV_3" destination="tvt-42-Vit" id="WBA-lI-vx1"/>
<outlet property="header_1_height" destination="is8-MR-XGZ" id="hNu-hE-IVb"/>
<outlet property="header_1_width" destination="RAg-Qo-PT0" id="PlH-eR-jEE"/>
<outlet property="header_2_height" destination="wT4-6L-dpe" id="qIF-ZH-llx"/>
<outlet property="header_2_width" destination="6sd-dP-UxL" id="BCE-Md-lgW"/>
<outlet property="header_3_height" destination="A2N-a9-4x2" id="w5v-cw-8oy"/>
<outlet property="header_3_width" destination="sVu-sc-ObA" id="kvI-0B-74f"/>
<outlet property="kuangImgV_1" destination="RoJ-iM-7rk" id="bwT-na-DkU"/>
<outlet property="kuangImgV_2" destination="UHh-BK-fEW" id="Cne-Bn-VrX"/>
<outlet property="kuangImgV_3" destination="SKL-s0-qRh" id="YTO-0e-nbw"/>
<outlet property="levelImgV_1" destination="mgn-xM-3kK" id="6Eu-q7-uQN"/>
<outlet property="levelImgV_2" destination="QAU-p9-plD" id="V4X-90-Tc9"/>
<outlet property="levelImgV_3" destination="uSc-Pn-Ion" id="TXA-UG-rbA"/>
<outlet property="nicknameLab_1" destination="chV-lc-aXx" id="RRc-eV-wwY"/>
<outlet property="nicknameLab_2" destination="1JW-Db-cQ5" id="l3I-Ae-ZkZ"/>
<outlet property="nicknameLab_3" destination="0et-Cm-OqV" id="P3O-bH-pqf"/>
<outlet property="valueLab_1" destination="Pe1-Nm-771" id="yUi-eM-gwl"/>
<outlet property="valueLab_2" destination="A7a-YN-oJD" id="kds-5y-mZi"/>
<outlet property="valueLab_3" destination="sVb-56-iRH" id="YoB-8U-WZK"/>
</connections>
<point key="canvasLocation" x="131.15942028985509" y="67.633928571428569"/>
</view>
</objects>
<resources>
<image name="bang_top_1" width="68" height="68"/>
<image name="bang_top_2" width="60" height="60"/>
<image name="bang_top_3" width="60" height="60"/>
<image name="default_userIcon" width="512" height="512"/>
</resources>
</document>

View File

@@ -0,0 +1,28 @@
//
// SPBangDanListCell.h
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import <UIKit/UIKit.h>
#import "SPBangDanListModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface SPBangDanListCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIImageView *bgImgV;
@property (weak, nonatomic) IBOutlet UILabel *orderLab;
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV;
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab;
@property (weak, nonatomic) IBOutlet UIImageView *levelImgV;
@property (weak, nonatomic) IBOutlet UIImageView *charmImgV;
@property (weak, nonatomic) IBOutlet UILabel *valueLab;
@property (weak, nonatomic) IBOutlet UILabel *userIDLabel;
-(void)onUpdateSPBangDanListCell:(SPBangDanListModel *)model index:(NSInteger)index type:(NSInteger)type;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,48 @@
//
// SPBangDanListCell.m
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "SPBangDanListCell.h"
@implementation SPBangDanListCell
- (void)awakeFromNib {
[super awakeFromNib];
}
-(void)onUpdateSPBangDanListCell:(SPBangDanListModel *)model index:(NSInteger)index type:(NSInteger)type {
if (type == 1) {//
[self.levelImgV sd_setImageWithURL:[NSURL URLWithString:model.contribution_image]];
[self.charmImgV sd_setImageWithURL:[NSURL URLWithString:model.charm_image]];
self.valueLab.text = model.rank_value;
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
self.nicknameLab.text = model.nick_name;
self.userIDLabel.text = model.uid;
}else if(type == 2) {//
[self.levelImgV sd_setImageWithURL:[NSURL URLWithString:model.contribution_image]];
[self.charmImgV sd_setImageWithURL:[NSURL URLWithString:model.charm_image]];
self.valueLab.text = model.rank_value;
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
self.nicknameLab.text = model.nick_name;
self.userIDLabel.text = model.uid;
}else if(type == 3) {//
self.valueLab.text = model.total_amount;
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:kDefaultUserIcon];
self.nicknameLab.text = model.room_name;
// self.avatarImgV.layer.cornerRadius = 5;
self.userIDLabel.text = model.room_number;
}
self.orderLab.text = [NSString stringWithFormat:@"%02ld", index+4];
}
@end

View File

@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<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"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="166" id="KGk-i7-Jjw" customClass="SPBangDanListCell">
<rect key="frame" x="0.0" y="0.0" width="375" height="76"/>
<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="375" height="76"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="8jQ-3K-4AA">
<rect key="frame" x="0.0" y="0.0" width="375" height="76"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="4" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QoN-Cr-c3r">
<rect key="frame" x="15" y="28.5" width="11" height="19"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3R1-bh-gyx">
<rect key="frame" x="38" y="16" width="44" height="44"/>
<constraints>
<constraint firstAttribute="height" constant="44" id="5Nk-K6-VDf"/>
<constraint firstAttribute="width" constant="44" id="8k2-CZ-usO"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="22"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
<real key="value" value="0.0"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</userDefinedRuntimeAttribute>
</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="Zpa-89-lCL">
<rect key="frame" x="98" y="16" width="36" height="17"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MkP-zl-nr8">
<rect key="frame" x="349" y="28.5" width="11" height="19"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wZc-kA-Cae">
<rect key="frame" x="227" y="39" width="40" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="I6N-xY-qxF"/>
<constraint firstAttribute="width" constant="40" id="SVO-Gj-k9B"/>
</constraints>
</imageView>
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZeM-cg-CZG">
<rect key="frame" x="98" y="39" width="75" height="20"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="party_ID" translatesAutoresizingMaskIntoConstraints="NO" id="kyi-Ou-p4o">
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
<constraints>
<constraint firstAttribute="width" constant="20" id="JJI-9C-x4Z"/>
<constraint firstAttribute="height" constant="20" id="LEj-sn-Kxo"/>
</constraints>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="03o-b3-9Ud">
<rect key="frame" x="23" y="2.5" width="47" height="15"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="75" id="4pk-zi-t0W"/>
<constraint firstAttribute="trailing" secondItem="03o-b3-9Ud" secondAttribute="trailing" constant="5" id="B2e-0d-ttE"/>
<constraint firstItem="03o-b3-9Ud" firstAttribute="leading" secondItem="ZeM-cg-CZG" secondAttribute="leading" constant="23" id="GiQ-7A-bcA"/>
<constraint firstAttribute="height" constant="20" id="aDz-hG-D1r"/>
<constraint firstItem="kyi-Ou-p4o" firstAttribute="leading" secondItem="ZeM-cg-CZG" secondAttribute="leading" id="hbO-SY-Z1r"/>
<constraint firstItem="kyi-Ou-p4o" firstAttribute="centerY" secondItem="ZeM-cg-CZG" secondAttribute="centerY" id="mLg-gm-2WC"/>
<constraint firstItem="03o-b3-9Ud" firstAttribute="centerY" secondItem="ZeM-cg-CZG" secondAttribute="centerY" id="vV6-oU-7Xs"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<real key="value" value="10"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rUb-1x-xhu">
<rect key="frame" x="183" y="39" width="40" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="0gx-Zd-XXd"/>
<constraint firstAttribute="width" constant="40" id="R7f-Dn-jqo"/>
</constraints>
</imageView>
</subviews>
<constraints>
<constraint firstItem="8jQ-3K-4AA" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="0Mq-XU-5fX"/>
<constraint firstAttribute="trailing" secondItem="8jQ-3K-4AA" secondAttribute="trailing" id="Co2-rA-WB4"/>
<constraint firstAttribute="bottom" secondItem="8jQ-3K-4AA" secondAttribute="bottom" id="IeK-S1-E2u"/>
<constraint firstItem="ZeM-cg-CZG" firstAttribute="leading" secondItem="Zpa-89-lCL" secondAttribute="leading" id="MxL-rw-1CQ"/>
<constraint firstAttribute="trailing" secondItem="MkP-zl-nr8" secondAttribute="trailing" constant="15" id="N8y-BI-hw5"/>
<constraint firstItem="wZc-kA-Cae" firstAttribute="centerY" secondItem="rUb-1x-xhu" secondAttribute="centerY" id="OmT-nO-V7b"/>
<constraint firstItem="QoN-Cr-c3r" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Pj2-fb-gDW"/>
<constraint firstItem="ZeM-cg-CZG" firstAttribute="top" secondItem="Zpa-89-lCL" secondAttribute="bottom" constant="6" id="YLh-Qy-guS"/>
<constraint firstItem="3R1-bh-gyx" firstAttribute="leading" secondItem="QoN-Cr-c3r" secondAttribute="trailing" constant="12" id="ZSg-Km-FHc"/>
<constraint firstItem="rUb-1x-xhu" firstAttribute="leading" secondItem="ZeM-cg-CZG" secondAttribute="trailing" constant="10" id="ejM-qS-ws7"/>
<constraint firstItem="wZc-kA-Cae" firstAttribute="leading" secondItem="rUb-1x-xhu" secondAttribute="trailing" constant="4" id="jpY-6s-2Zw"/>
<constraint firstItem="QoN-Cr-c3r" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="kcN-pu-bt9"/>
<constraint firstItem="Zpa-89-lCL" firstAttribute="top" secondItem="3R1-bh-gyx" secondAttribute="top" id="lmV-Qi-LCM"/>
<constraint firstItem="8jQ-3K-4AA" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="mX8-ej-xqQ"/>
<constraint firstItem="wZc-kA-Cae" firstAttribute="centerY" secondItem="ZeM-cg-CZG" secondAttribute="centerY" id="sde-4R-YRC"/>
<constraint firstItem="Zpa-89-lCL" firstAttribute="leading" secondItem="3R1-bh-gyx" secondAttribute="trailing" constant="16" id="stg-cA-HhJ"/>
<constraint firstItem="3R1-bh-gyx" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="tx2-9L-sFE"/>
<constraint firstItem="MkP-zl-nr8" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="xoL-Bq-zIs"/>
</constraints>
</tableViewCellContentView>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections>
<outlet property="avatarImgV" destination="3R1-bh-gyx" id="9Zy-t2-W0g"/>
<outlet property="bgImgV" destination="8jQ-3K-4AA" id="fiV-Qk-JYN"/>
<outlet property="charmImgV" destination="wZc-kA-Cae" id="ubk-fR-dvJ"/>
<outlet property="levelImgV" destination="rUb-1x-xhu" id="kCQ-VB-3Ly"/>
<outlet property="nicknameLab" destination="Zpa-89-lCL" id="wFu-tM-DSj"/>
<outlet property="orderLab" destination="QoN-Cr-c3r" id="tzQ-Ye-ULs"/>
<outlet property="userIDLabel" destination="03o-b3-9Ud" id="XUF-ZA-G2b"/>
<outlet property="valueLab" destination="MkP-zl-nr8" id="8Vg-jG-lTz"/>
</connections>
<point key="canvasLocation" x="144" y="17"/>
</tableViewCell>
</objects>
<resources>
<image name="party_ID" width="20" height="20"/>
</resources>
</document>

View File

@@ -0,0 +1,34 @@
//
// SPBangDanListModel.h
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface SPBangDanListModel : NSObject
@property(nonatomic, copy) NSString *uid;
@property(nonatomic, copy) NSString *head_pic;
@property(nonatomic, copy) NSString *special_uid;
@property(nonatomic, copy) NSString *nick_name;
@property(nonatomic, copy) NSString *contribution_image;
//@property(nonatomic, copy) NSString *contribution_value;
@property(nonatomic, copy) NSString *charm_image;
//@property(nonatomic, copy) NSString *charm_value;
@property(nonatomic, copy) NSString *rank_value;
//房间榜
@property(nonatomic, copy) NSString *rid;
@property(nonatomic, copy) NSString *total_amount;
@property(nonatomic, copy) NSString *room_name;
@property(nonatomic, copy) NSString *room_cover;
@property(nonatomic, copy) NSString *room_owner_uid;
@property(nonatomic, copy) NSString *room_number;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,12 @@
//
// SPBangDanListModel.m
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "SPBangDanListModel.h"
@implementation SPBangDanListModel
@end

View File

@@ -0,0 +1,23 @@
//
// SPBangDanListVC.h
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "BaseTableViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface SPBangDanListVC : BaseTableViewController <JXCategoryListContentViewDelegate>
//房间ID
@property(nonatomic, copy) NSString *rid;
//1贡献榜2魅力榜
@property(nonatomic, assign) NSInteger type;
//1日 2周 3总
@property(nonatomic, assign) NSInteger dateType;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,177 @@
//
// SPBangDanListVC.m
// SweetParty
//
// Created by bj_szd on 2022/6/8.
//
#import "SPBangDanListVC.h"
#import "SPBangDanListCell.h"
#import "SPBangDanHeader.h"
@interface SPBangDanListVC ()
@property (nonatomic, strong) SPBangDanHeader *topView;
@end
@implementation SPBangDanListVC
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self fetchData];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self createUI];
}
-(void)createUI {
self.view.backgroundColor = kClearColor;
[self.view addSubview:self.topView];
[self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.view).offset(0);
make.left.right.equalTo(self.view);
make.height.mas_equalTo(200);
}];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.topView.mas_bottom).offset(0);
make.bottom.equalTo(self.view).offset(0);
if (self.rid.length > 0) {
make.left.equalTo(self.view).offset(0);
make.right.equalTo(self.view).offset(0);
}else{
make.left.equalTo(self.view).offset(0);
make.right.equalTo(self.view).offset(0);
}
}];
[self.tableView registerNib:[UINib nibWithNibName:@"SPBangDanListCell" bundle:nil] forCellReuseIdentifier:@"SPBangDanListCell"];
self.tableView.rowHeight = 76;
if (self.rid.length > 0) {
self.tableView.backgroundColor = HEXCOLORA(0x347260, 1);
}else {
if (self.type == 1) {
self.tableView.backgroundColor = HEXCOLOR(0xFFFFFF);
}else if (self.type == 2) {
self.tableView.backgroundColor = HEXCOLOR(0xFFFFFF);
}else if (self.type == 3) {
self.tableView.backgroundColor = HEXCOLOR(0xFFFFFF);
}
// self.tableView.layer.borderWidth = 1;
// self.tableView.layer.borderColor = HEXCOLOR(0xFFFFFF).CGColor;
}
// self.tableView.backgroundColor = [kBlackColor colorWithAlphaComponent:0.8];
self.tableView.layer.cornerRadius = 15;
self.tableView.layer.masksToBounds = YES;
self.tableView.contentInset = UIEdgeInsetsMake(15, 0, SAFE_AREA_INSERTS_BOTTOM+15, 0);
}
- (void)fetchData {
NSDictionary *params = @{};
NSString *urlStr = @"";
if (self.rid.length > 0) {
params = @{@"rid":self.rid, @"type":@(self.type),@"time":@(self.dateType)};
urlStr = @"api/room/get_room_rank";
}else {
if (self.type == 3) {//
params = @{@"time":@(self.dateType)};
urlStr = @"/api/room/get_rooms_rank";
}else {
params = @{@"type":@(self.type),@"time":@(self.dateType)};
urlStr = @"api/room/get_user_rank";
}
}
[AFNetworkRequset.shared postRequestWithParams:params Path:urlStr Loading:NO Hud:NO Success:^(id _Nonnull responseDic) {
[self.dataArray removeAllObjects];
[self.tableView reloadData];
NSArray *arr = [SPBangDanListModel mj_objectArrayWithKeyValuesArray:responseDic[@"data"][@"list"]];
NSMutableArray *topMArr = [NSMutableArray arrayWithCapacity:3];
for (NSInteger i = 0; i < arr.count; i++) {
SPBangDanListModel *model = arr[i];
if (i < 3) {
[topMArr addObject:model];
}else {
[self.dataArray addObject:model];
}
}
[self.topView onUpdateSPBangDanHeader:[topMArr copy] type:self.type];
[self.tableView reloadData];
self.topView.isRoomRank = self.rid.length > 0;
} Failure:^(id _Nonnull errorData) {
}];
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.dataArray.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
SPBangDanListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SPBangDanListCell" forIndexPath:indexPath];
cell.selectionStyle = NO;
SPBangDanListModel *model = self.dataArray[indexPath.row];
[cell onUpdateSPBangDanListCell:model index:indexPath.row type:self.type];
if (self.rid.length > 0) {
cell.bgImgV.backgroundColor = kClearColor;
cell.orderLab.textColor = kWhiteColor;
cell.nicknameLab.textColor = kWhiteColor;
cell.userIDLabel.textColor = HEXCOLORA(0xFFFFFF, 0.6);
cell.valueLab.textColor = HEXCOLOR(0xFFFFFF);
}else {
if (self.type == 1) {
cell.bgImgV.backgroundColor = HEXCOLOR(0x6631C9);
}else if (self.type == 2) {
cell.bgImgV.backgroundColor = HEXCOLORA(0xCE2889, 0.3);
}else if (self.type == 3) {
cell.bgImgV.backgroundColor = HEXCOLORA(0xFFFFFF, 0.1);
}
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
SPBangDanListModel *model = self.dataArray[indexPath.row];
if (self.type == 3) {
[UIViewController goMicRoomWithRid:model.rid withPwd:@""];
}else {
if (self.rid.length > 0) {
[UIViewController goUserAlertWithUid:model.uid];
}else {
[UIViewController goUserMainpageWith:model.uid withRid:@""];
}
}
}
#pragma mark - JXCategoryListContentViewDelegate
- (UIView *)listView {
return self.view;
}
- (SPBangDanHeader *)topView {
if (!_topView) {
_topView = [[NSBundle mainBundle] loadNibNamed:@"SPBangDanHeader" owner:self options:nil].firstObject;
}
return _topView;
}
@end