首次提交
This commit is contained in:
63
SweetParty/主类/RCMic/Room/BJOperationView/BJMicRoomOperationAlert.h
Executable file
63
SweetParty/主类/RCMic/Room/BJOperationView/BJMicRoomOperationAlert.h
Executable file
@@ -0,0 +1,63 @@
|
||||
//
|
||||
// BJMicRoomOperationAlert.h
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by ybb on 2021/4/19.
|
||||
// Copyright © 2021 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RCMicRoomViewModel.h"
|
||||
#import "BJOperationAlertUserModel.h"
|
||||
#import "RCMicParticipantViewModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSUInteger, BJOperationAlertType) {
|
||||
BJOperationAlertTypeZeroBtn,
|
||||
BJOperationAlertTypeFiveBtn,
|
||||
BJOperationAlertTypeOnlyMeiLiBtn,
|
||||
BJOperationAlertTypeClickSelf,
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSUInteger, BJOperation) {
|
||||
BJOperationChat,
|
||||
BJOperationGift,
|
||||
BJOperationHome,
|
||||
BJOperationSiliaoTa,
|
||||
BJOperationAtTa,
|
||||
|
||||
BJOperationDonate,
|
||||
|
||||
BJOperationForceUp,
|
||||
BJOperationForceDown,
|
||||
BJOperationVoiceOpen,
|
||||
BJOperationVoiceClose,
|
||||
BJOperationMsgOpen,
|
||||
BJOperationMsgClose,
|
||||
BJOperationKickRoom,
|
||||
BJOperationClearCharm,
|
||||
BJOperationLockSeat,
|
||||
|
||||
BJOperationSelfDownMic,
|
||||
};
|
||||
|
||||
@protocol BJMicRoomOperationAlertDelegate <NSObject>
|
||||
|
||||
- (void)operationAlertTrigerAction:(BJOperation)operation targetUserModel:(BJOperationAlertUserModel *)tUserModel area:(RCMicParticipantViewModel *)aModel;
|
||||
|
||||
@end
|
||||
|
||||
@interface BJMicRoomOperationAlert : UIView
|
||||
|
||||
|
||||
+ (BJMicRoomOperationAlert *)initOperationAlertWithRoomModel:(RCMicRoomViewModel *)roomModel;
|
||||
|
||||
- (void)loadUserDataAndShowWithUid:(NSString *)uid style:(BJOperationAlertType)styleType area:(RCMicParticipantViewModel *)aModel;
|
||||
|
||||
@property (nonatomic, weak) id<BJMicRoomOperationAlertDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
543
SweetParty/主类/RCMic/Room/BJOperationView/BJMicRoomOperationAlert.m
Executable file
543
SweetParty/主类/RCMic/Room/BJOperationView/BJMicRoomOperationAlert.m
Executable file
@@ -0,0 +1,543 @@
|
||||
//
|
||||
// BJMicRoomOperationAlert.m
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by ybb on 2021/4/19.
|
||||
// Copyright © 2021 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJMicRoomOperationAlert.h"
|
||||
#import "YYMicAlertGiftView.h"
|
||||
#import "YYMicAlertMiyouView.h"
|
||||
#import "SPTrendReportVC.h"
|
||||
|
||||
//80 + 80 + 60 头部+中间+底部
|
||||
@interface BJMicRoomOperationAlert ()
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *userNameL;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *genderImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *liangImg;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *userIdL;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *levelContributeImgview;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *levelCharmImgview;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *jueweiImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *signLab;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *middleBtnsView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *mainViewH;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *qianyueLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *qinmiLab;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *dynamicViewHeightCon;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *cpBgView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *cpBorderImgV_1;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *cpBorderImgV_2;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *heartImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV_1;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab_1;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV_2;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab_2;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *valueLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *cpLevelLab;
|
||||
@property (weak, nonatomic) IBOutlet UIView *zhizuorenView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *zhizuorenImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIView *botBgView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *downMicBtn;
|
||||
|
||||
@property (nonatomic, strong) RCMicRoomViewModel *roomModel; //pass value when init
|
||||
@property (nonatomic, strong) BJOperationAlertUserModel *userModel;
|
||||
|
||||
@property (nonatomic, assign) BJOperationAlertType alertType;
|
||||
@property (nonatomic, strong) RCMicParticipantViewModel *areaModel;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIButton *msgBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *sendBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *guanZhuBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *zhuanZengBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *clearCharmBtn;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *msgBtnWidthCon;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *xinrenImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *shenjiaLab;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *blackBtn;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BJMicRoomOperationAlert
|
||||
|
||||
- (void)awakeFromNib{
|
||||
[super awakeFromNib];
|
||||
|
||||
WEAK_SELF
|
||||
[self.zhizuorenView dg_Tapped:^{
|
||||
[UIViewController goUserMainpageWith:weakSelf.userModel.producer_uid withRid:@""];
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
|
||||
self.cpBgView.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(APPW-30, 120) direction:FXGradientChangeDirectionVertical startColor:HEXCOLOR(0xFFFFFF) endColor:HEXCOLOR(0xC9FFEF)];
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// _middleBtnsView.backgroundColor = UIColor.whiteColor;
|
||||
}
|
||||
|
||||
+ (BJMicRoomOperationAlert *)initOperationAlertWithRoomModel:(RCMicRoomViewModel *)roomModel {
|
||||
BJMicRoomOperationAlert *alert = LoadNib(NSStringFromClass(BJMicRoomOperationAlert.class));
|
||||
alert.frame = UIScreen.mainScreen.bounds;
|
||||
alert.roomModel = roomModel;
|
||||
return alert;
|
||||
}
|
||||
- (IBAction)cancelMethod:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)loadUserDataAndShowWithUid:(NSString *)uid style:(BJOperationAlertType)styleType area:(RCMicParticipantViewModel *)aModel {
|
||||
_alertType = styleType;
|
||||
_areaModel = aModel;
|
||||
|
||||
_clearCharmBtn.hidden = styleType==BJOperationAlertTypeZeroBtn;
|
||||
self.msgBtnWidthCon.constant = styleType==BJOperationAlertTypeZeroBtn ? ScreenWidth/3 : ScreenWidth/4;
|
||||
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
[self.avatarImgView dg_Tapped:^{
|
||||
if (weakSelf.delegate) {
|
||||
[weakSelf.delegate operationAlertTrigerAction:BJOperationHome targetUserModel:weakSelf.userModel area:weakSelf.areaModel];
|
||||
}
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
NSDictionary *dict = @{@"rid":C_string(_roomModel.roomInfo.roomId),
|
||||
@"uid":C_string(uid),
|
||||
};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
[SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/room/get_room_user_info" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
BJOperationAlertUserModel *model = [BJOperationAlertUserModel mj_objectWithKeyValues:result.content];
|
||||
weakSelf.userModel = model;
|
||||
[weakSelf refreshUIWhenGetUserModel];
|
||||
[MainWindow() addSubview:weakSelf];
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - 私有方法
|
||||
|
||||
- (void)refreshUIWhenGetUserModel {
|
||||
// refresh ui base self role and user role
|
||||
|
||||
[_middleBtnsView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; //等同于for循环移除子视图
|
||||
_botBgView.hidden = NO;
|
||||
_downMicBtn.hidden = YES;
|
||||
//中间按钮部分
|
||||
if (_alertType == BJOperationAlertTypeFiveBtn) {
|
||||
_middleBtnsView.hidden = NO;
|
||||
_dynamicViewHeightCon.constant = 70;
|
||||
_mainViewH.constant = 330;
|
||||
|
||||
//一共5项,上下麦+开禁麦+开禁打字+踢出房间+清空魅力值
|
||||
NSMutableArray *mutArr = NSMutableArray.array;
|
||||
[mutArr addObject:@(BJOperationForceDown)];
|
||||
|
||||
if (_userModel.user_micro_status.integerValue == 1) {
|
||||
[mutArr addObject:@(BJOperationVoiceClose)]; //当前正常,点击禁麦
|
||||
}else {
|
||||
[mutArr addObject:@(BJOperationVoiceOpen)]; //当前禁言中,点击取消禁言
|
||||
}
|
||||
if (_userModel.user_world_status.integerValue == 1) {
|
||||
[mutArr addObject:@(BJOperationMsgClose)]; //当前正常,点击禁打字
|
||||
}else {
|
||||
[mutArr addObject:@(BJOperationMsgOpen)]; //当前禁言中,点击取消禁打字
|
||||
}
|
||||
[mutArr addObject:@(BJOperationKickRoom)];
|
||||
[mutArr addObject:@(BJOperationLockSeat)];
|
||||
[self initMiddleBtnViewWithArr:mutArr.copy];
|
||||
|
||||
}else if (_alertType == BJOperationAlertTypeZeroBtn) {
|
||||
_middleBtnsView.hidden = YES;
|
||||
_dynamicViewHeightCon.constant = 0;
|
||||
_mainViewH.constant = 260;
|
||||
}else if (_alertType == BJOperationAlertTypeOnlyMeiLiBtn) {
|
||||
_middleBtnsView.hidden = YES;
|
||||
_dynamicViewHeightCon.constant = 0;
|
||||
_mainViewH.constant = 260;
|
||||
|
||||
NSArray *types = @[@(BJOperationClearCharm)];
|
||||
[self initMiddleBtnViewWithArr:types];
|
||||
}else if (_alertType == BJOperationAlertTypeClickSelf) {
|
||||
_middleBtnsView.hidden = YES;
|
||||
_dynamicViewHeightCon.constant = 0;
|
||||
_mainViewH.constant = 260;
|
||||
|
||||
_botBgView.hidden = YES;
|
||||
_downMicBtn.hidden = [self.roomModel currentParticipantInfo]==nil;
|
||||
}
|
||||
//CP信息
|
||||
if (_userModel.user_cp_info.is_have_cp == 1) {
|
||||
self.cpBgView.hidden = NO;
|
||||
_mainViewH.constant += 120;
|
||||
|
||||
YYMineCPModel *model = _userModel.user_cp_info;
|
||||
[self.avatarImgV_1 sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nicknameLab_1.text = model.nick_name;
|
||||
[self.cpBorderImgV_1 sd_setImageWithURL:[NSURL URLWithString:model.win_base_image]];
|
||||
|
||||
[self.avatarImgV_2 sd_setImageWithURL:[NSURL URLWithString:model.receive_head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nicknameLab_2.text = model.receive_nick_name;
|
||||
[self.cpBorderImgV_2 sd_setImageWithURL:[NSURL URLWithString:model.receive_win_base_image]];
|
||||
|
||||
self.cpLevelLab.text = [NSString stringWithFormat:@"LV%@", model.cp_level];
|
||||
self.valueLab.text = [NSString stringWithFormat:@"%@/%@", model.now_value, model.next_value];
|
||||
}else {
|
||||
self.cpBgView.hidden = YES;
|
||||
}
|
||||
|
||||
//顶部信息部分
|
||||
[_avatarImgView sd_setImageWithURL:URL(C_string(_userModel.head_pic)) placeholderImage:kDefaultUserIcon];
|
||||
_userNameL.text = C_string(_userModel.nick_name);
|
||||
_signLab.text = _userModel.autograph;
|
||||
_genderImgV.image = [_userModel.sex integerValue]==1 ? ImageNamed(@"Gender_boy") : ImageNamed(@"Gender_girl");
|
||||
//贡献等级 图片+等级
|
||||
// _userLevel1.text = [NSString stringWithFormat:@"贡献%@", _userModel.contribution_level];
|
||||
[_levelContributeImgview sd_setImageWithURL:URL(C_string(_userModel.contribution_level_image)) placeholderImage:yb_place_img];
|
||||
//魅力等级 图片+等级
|
||||
// _userLevel2.text = [NSString stringWithFormat:@"魅力%@", _userModel.charm_level];
|
||||
[_levelCharmImgview sd_setImageWithURL:URL(C_string(_userModel.charm_level_image)) placeholderImage:yb_place_img];
|
||||
[self.jueweiImgV sd_setImageWithURL:[NSURL URLWithString:_userModel.nobility_image]];
|
||||
if ([_userModel.is_follow integerValue]==2) {
|
||||
self.guanZhuBtn.selected = YES;
|
||||
}else{
|
||||
self.guanZhuBtn.selected = NO;
|
||||
}
|
||||
if ([_userModel.is_can_recharge intValue]==1) {
|
||||
self.zhuanZengBtn.hidden = NO;
|
||||
}else{
|
||||
self.zhuanZengBtn.hidden = YES;
|
||||
}
|
||||
if ([_userModel.special_uid isEqualToString:@"0"]){
|
||||
self.liangImg.image = userID_simgple;
|
||||
_userIdL.text = [NSString stringWithFormat:@"%@", C_string(_userModel.uid)];
|
||||
}else{
|
||||
self.liangImg.image = userID_liang;
|
||||
_userIdL.text = [NSString stringWithFormat:@"%@", C_string(_userModel.special_uid)];
|
||||
}
|
||||
self.qianyueLab.text = [NSString stringWithFormat:@"签约艺人%@", _userModel.sign_contract_num];
|
||||
self.qinmiLab.text = [NSString stringWithFormat:@"亲密关系%@", _userModel.relation_num];
|
||||
|
||||
if (_userModel.is_have_producer == 1) {
|
||||
self.zhizuorenView.hidden = NO;
|
||||
[self.zhizuorenImgV sd_setImageWithURL:URL(_userModel.producer_head_pic) placeholderImage:kDefaultUserIcon];
|
||||
}else {
|
||||
self.zhizuorenView.hidden = YES;
|
||||
}
|
||||
|
||||
// self.xinrenImgV.hidden = _userModel.is_new != 1;
|
||||
self.shenjiaLab.text = [NSString stringWithFormat:@"%ld", _userModel.social];
|
||||
}
|
||||
|
||||
- (void)initMiddleBtnViewWithArr:(NSArray *)typesArr {
|
||||
// UIView *lastBtnView;
|
||||
for (int i=0; i<typesArr.count; i++) {
|
||||
BJOperation theOperation = [typesArr[i] integerValue];
|
||||
|
||||
NSInteger btnWidth = APPW/typesArr.count;
|
||||
UIView *btnView = [[UIView alloc] initWithFrame:CGRectMake(btnWidth*i, 0, btnWidth, 70)];
|
||||
[_middleBtnsView addSubview:btnView];
|
||||
|
||||
UIImageView *btnImg = [[UIImageView alloc] initWithFrame:CGRectMake((btnWidth-44)/2, 0, 44, 44)];
|
||||
btnImg.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[btnView addSubview:btnImg];
|
||||
|
||||
UILabel *btnlabel = [FZYControl createLabelWithFrame:CGRectMake(0, btnImg.bottom+6, btnWidth, 15) Font:YBMediumFont(10) Text:@"" color:HEXCOLORA(0xFFFFFF, 1) textAlignment:NSTextAlignmentCenter];
|
||||
[btnView addSubview:btnlabel];
|
||||
|
||||
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
btn.frame = btnView.bounds;
|
||||
btn.backgroundColor = UIColor.clearColor;
|
||||
[btn setTitle:@"" forState:UIControlStateNormal];
|
||||
// [btn addTarget:self action:@selector(clearCharmValue) forControlEvents:UIControlEventTouchUpInside];
|
||||
[btnView addSubview:btn];
|
||||
|
||||
// lastBtnView = btnView;
|
||||
[self setupBtn:btn withIcon:btnImg WithLabel:btnlabel WithType:theOperation];
|
||||
self.blackBtn.selected = _userModel.is_room_black == 1;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setupBtn:(UIButton *)btn withIcon:(UIImageView *)icon WithLabel:(UILabel *)titleL WithType:(BJOperation)operation {
|
||||
//设置文字,图片,点击事件
|
||||
/*
|
||||
BJOperationForceUp,
|
||||
BJOperationForceDown,
|
||||
BJOperationVoiceOpen,
|
||||
BJOperationVoiceClose,
|
||||
BJOperationMsgOpen,
|
||||
BJOperationMsgClose,
|
||||
BJOperationKickRoom,
|
||||
BJOperationClearCharm,
|
||||
*/
|
||||
[btn removeTarget:nil action:NULL forControlEvents:UIControlEventAllEvents];
|
||||
|
||||
if (operation == BJOperationForceUp) {
|
||||
icon.image = ImageNamed(@"room_alert_up");
|
||||
titleL.text = @"上麦";
|
||||
[btn addTarget:self action:@selector(forceUpMic) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
else if (operation == BJOperationForceDown){
|
||||
icon.image = ImageNamed(@"room_alert_down");
|
||||
titleL.text = @"下麦";
|
||||
[btn addTarget:self action:@selector(forceDownMic) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
else if (operation == BJOperationVoiceOpen){
|
||||
icon.image = ImageNamed(@"room_alert_voice_yes");
|
||||
titleL.text = @"开麦";
|
||||
[btn addTarget:self action:@selector(enableVoice) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
else if (operation == BJOperationVoiceClose){
|
||||
icon.image = ImageNamed(@"room_alert_voice_no");
|
||||
titleL.text = @"闭麦";
|
||||
[btn addTarget:self action:@selector(disableVoice) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
else if (operation == BJOperationMsgOpen){
|
||||
icon.image = ImageNamed(@"room_alert_word_yes");
|
||||
titleL.text = @"解除禁言";
|
||||
[btn addTarget:self action:@selector(enableWordMsg) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
else if (operation == BJOperationMsgClose){
|
||||
icon.image = ImageNamed(@"room_alert_word_no");
|
||||
titleL.text = @"禁言";
|
||||
[btn addTarget:self action:@selector(disableWordMsg) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
else if (operation == BJOperationKickRoom){
|
||||
icon.image = ImageNamed(@"room_alert_kick");
|
||||
titleL.text = @"踢出房间";
|
||||
[btn addTarget:self action:@selector(kickUpRoom) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
else if (operation == BJOperationLockSeat){
|
||||
icon.image = ImageNamed(@"room_alert_lock");
|
||||
titleL.text = @"封闭座位";
|
||||
[btn addTarget:self action:@selector(lockSeat) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
}
|
||||
/** 用户关注 */
|
||||
- (void)getFollowRequest
|
||||
{
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
[dict setValue:self.userModel.uid forKey:@"follow_uid"];
|
||||
WEAK_SELF;
|
||||
[BJHttpTool getFollowWithParameters:dict success:^(id response) {
|
||||
[SVProgressHUD showSuccessWithStatus:response[@"msg"]];
|
||||
weakSelf.userModel.is_follow = @"2";
|
||||
// [weakSelf.focusBtn setImage:ImageNamed(@"homepage_hasFocus") forState:UIControlStateNormal];
|
||||
// [weakSelf getPlayerHomePageRequest];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
/** 用户取消关注 */
|
||||
- (void)getCancelFollowRequest
|
||||
{
|
||||
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
|
||||
[dict setValue:self.userModel.uid forKey:@"follow_uid"];
|
||||
WEAK_SELF;
|
||||
[BJHttpTool getCancel_followWithParameters:dict success:^(id response) {
|
||||
[SVProgressHUD showSuccessWithStatus:response[@"msg"]];
|
||||
weakSelf.userModel.is_follow = @"1";
|
||||
// [weakSelf.focusBtn setImage:ImageNamed(@"homepage_focus") forState:UIControlStateNormal];
|
||||
// [weakSelf getPlayerHomePageRequest];
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (IBAction)onBlack:(id)sender {
|
||||
NSDictionary *params = @{@"rid":_roomModel.roomInfo.roomId, @"black_id":_userModel.uid, @"status":_userModel.is_room_black==1 ? @"2" : @"1"};
|
||||
[[AFNetworkRequset shared] postRequestWithParams:params Path:@"/api/room/exec_room_user_black" Loading:YES Hud:YES Success:^(id _Nonnull responseDic) {
|
||||
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
|
||||
- (IBAction)onReport:(id)sender {
|
||||
SPTrendReportVC *vc = [[SPTrendReportVC alloc] init];
|
||||
vc.userId = self.userModel.uid;
|
||||
[vc pushSelf];
|
||||
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)onGiftList:(id)sender {
|
||||
YYMicAlertGiftView *view = LoadNib(@"YYMicAlertGiftView");
|
||||
view.frame = [UIScreen mainScreen].bounds;
|
||||
view.model = self.userModel;
|
||||
[MainWindow() addSubview:view];
|
||||
}
|
||||
|
||||
- (IBAction)onQianyueList:(id)sender {
|
||||
YYMicAlertMiyouView *view = LoadNib(@"YYMicAlertMiyouView");
|
||||
view.frame = [UIScreen mainScreen].bounds;
|
||||
[MainWindow() addSubview:view];
|
||||
[view onUpdateUIWith:2 uid:self.userModel.uid];
|
||||
}
|
||||
|
||||
- (IBAction)onQinmiList:(id)sender {
|
||||
YYMicAlertMiyouView *view = LoadNib(@"YYMicAlertMiyouView");
|
||||
view.frame = [UIScreen mainScreen].bounds;
|
||||
[MainWindow() addSubview:view];
|
||||
[view onUpdateUIWith:1 uid:self.userModel.uid];
|
||||
}
|
||||
|
||||
- (IBAction)onSiliaoTa:(id)sender {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationSiliaoTa targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)onAtTa:(id)sender {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationAtTa targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)backBtnTouched:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)onDuplicateID:(id)sender {
|
||||
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
||||
if ([self.userModel.special_uid integerValue] > 0) {
|
||||
pasteboard.string = self.userModel.special_uid;
|
||||
}else {
|
||||
pasteboard.string = self.userModel.uid;
|
||||
}
|
||||
|
||||
[HelpPageDefine showMessage:@"ID已复制"];
|
||||
}
|
||||
|
||||
- (IBAction)botChatTouched:(id)sender {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationChat targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)botGiftTouched:(id)sender {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationGift targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
//关注
|
||||
- (IBAction)botFocusTouched:(UIButton *)sender {
|
||||
sender.selected = !sender.selected;
|
||||
if ([self.userModel.is_follow integerValue]==1) {
|
||||
[self getFollowRequest];
|
||||
}else{
|
||||
[self getCancelFollowRequest];
|
||||
}
|
||||
}
|
||||
|
||||
//转赠
|
||||
- (IBAction)donateBtnTouched:(id)sender {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationDonate targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)clearAction:(id)sender {
|
||||
[self clearCharmValue];
|
||||
}
|
||||
|
||||
#pragma mark - middle btn action
|
||||
|
||||
- (void)forceDownMic {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationForceDown targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)forceUpMic {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationForceUp targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)disableVoice {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationVoiceClose targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)enableVoice {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationVoiceOpen targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)disableWordMsg {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationMsgClose targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)enableWordMsg {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationMsgOpen targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)kickUpRoom {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationKickRoom targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)clearCharmValue {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationClearCharm targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)lockSeat {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationLockSeat targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)onDownMic:(id)sender {
|
||||
if (_delegate) {
|
||||
[_delegate operationAlertTrigerAction:BJOperationSelfDownMic targetUserModel:_userModel area:_areaModel];
|
||||
}
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
614
SweetParty/主类/RCMic/Room/BJOperationView/BJMicRoomOperationAlert.xib
Executable file
614
SweetParty/主类/RCMic/Room/BJOperationView/BJMicRoomOperationAlert.xib
Executable file
@@ -0,0 +1,614 @@
|
||||
<?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="Stack View standard spacing" 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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="BJMicRoomOperationAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Jed-J0-kMM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<action selector="backBtnTouched:" destination="iN0-l3-epB" eventType="touchUpInside" id="ZIj-ek-2YF"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RP3-t6-Qsf" userLabel="main">
|
||||
<rect key="frame" x="0.0" y="377" width="375" height="450"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="room_alert_bg" translatesAutoresizingMaskIntoConstraints="NO" id="ocM-Td-SVT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="450"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2y8-1Y-f92" userLabel="head">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rWI-e9-NBg">
|
||||
<rect key="frame" x="15" y="15" width="75" height="75"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="75" id="Yyl-21-Km4"/>
|
||||
<constraint firstAttribute="width" constant="75" id="qys-Ej-BdG"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="37.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zwx-uG-Zy8">
|
||||
<rect key="frame" x="26" y="70" width="53" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="EC0-jM-7s5"/>
|
||||
<constraint firstAttribute="width" constant="53" id="Pdr-K4-31b"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<state key="normal" image="room_bot_guanzhu">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<state key="selected" image="room_bot_yiguanzhu"/>
|
||||
<connections>
|
||||
<action selector="botFocusTouched:" destination="iN0-l3-epB" eventType="touchUpInside" id="cva-2u-BIJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="用户名" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ru0-WP-TUs">
|
||||
<rect key="frame" x="95" y="16" width="46" height="18"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Gender_boy" translatesAutoresizingMaskIntoConstraints="NO" id="APD-8G-pvq">
|
||||
<rect key="frame" x="146" y="17.5" width="15" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="15" id="1RA-Vj-rFo"/>
|
||||
<constraint firstAttribute="width" constant="15" id="Z9S-dL-tmZ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.96470588239999999" green="0.96470588239999999" blue="0.96470588239999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EqL-px-RDf">
|
||||
<rect key="frame" x="95" y="70" width="99.5" height="20"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="party_ID" translatesAutoresizingMaskIntoConstraints="NO" id="dMf-ll-wle">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="448-1N-uyy"/>
|
||||
<constraint firstAttribute="width" constant="20" id="81A-eU-udm"/>
|
||||
</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="pjk-c5-01z">
|
||||
<rect key="frame" x="23" y="3" width="46.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GCv-za-4nD">
|
||||
<rect key="frame" x="74.5" y="0.0" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="4cq-BT-h3J"/>
|
||||
<constraint firstAttribute="height" constant="20" id="a6A-oH-Ty0"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="mine_fuzhi">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="onDuplicateID:" destination="iN0-l3-epB" eventType="touchUpInside" id="jxg-O4-wdN"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="pjk-c5-01z" firstAttribute="centerY" secondItem="EqL-px-RDf" secondAttribute="centerY" id="4fj-EZ-KNu"/>
|
||||
<constraint firstItem="dMf-ll-wle" firstAttribute="leading" secondItem="EqL-px-RDf" secondAttribute="leading" id="4zZ-vn-E1x"/>
|
||||
<constraint firstAttribute="trailing" secondItem="GCv-za-4nD" secondAttribute="trailing" constant="5" id="Cfm-vW-lAH"/>
|
||||
<constraint firstItem="pjk-c5-01z" firstAttribute="leading" secondItem="EqL-px-RDf" secondAttribute="leading" constant="23" id="Drp-K1-Zeh"/>
|
||||
<constraint firstAttribute="height" constant="20" id="GQf-Md-rQv"/>
|
||||
<constraint firstItem="dMf-ll-wle" firstAttribute="centerY" secondItem="EqL-px-RDf" secondAttribute="centerY" id="Spj-Bt-Gjk"/>
|
||||
<constraint firstItem="GCv-za-4nD" firstAttribute="centerY" secondItem="EqL-px-RDf" secondAttribute="centerY" id="ZNc-eX-zSv"/>
|
||||
<constraint firstItem="GCv-za-4nD" firstAttribute="leading" secondItem="pjk-c5-01z" secondAttribute="trailing" constant="5" id="erO-KO-Ise"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="SlD-vc-ATT">
|
||||
<rect key="frame" x="95" y="42.5" width="40" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="ktn-7t-k6N"/>
|
||||
<constraint firstAttribute="width" constant="40" id="pii-qp-FFQ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.96470588239999999" green="0.96470588239999999" blue="0.96470588239999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="FVz-n7-ZVi">
|
||||
<rect key="frame" x="140" y="42.5" width="40" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="N5G-b8-paM"/>
|
||||
<constraint firstAttribute="height" constant="20" id="aFg-20-4Cf"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.96470588239999999" green="0.96470588239999999" blue="0.96470588239999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="wGf-82-Ra3">
|
||||
<rect key="frame" x="186" y="37.5" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="BpB-qv-Mco"/>
|
||||
<constraint firstAttribute="height" constant="30" id="Kez-CB-m3t"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oR5-2Y-kvw">
|
||||
<rect key="frame" x="299" y="59" width="61" height="24"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="room_alert_report"/>
|
||||
<connections>
|
||||
<action selector="onReport:" destination="iN0-l3-epB" eventType="touchUpInside" id="WRJ-oq-TO6"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rYq-cj-Jn4">
|
||||
<rect key="frame" x="299" y="20" width="61" height="24"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="room_alert_black"/>
|
||||
<state key="selected" image="room_alert_black_cancel"/>
|
||||
<connections>
|
||||
<action selector="onBlack:" destination="iN0-l3-epB" eventType="touchUpInside" id="KPF-2j-2WF"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="APD-8G-pvq" firstAttribute="centerY" secondItem="ru0-WP-TUs" secondAttribute="centerY" id="3b3-UZ-cI6"/>
|
||||
<constraint firstItem="rWI-e9-NBg" firstAttribute="leading" secondItem="2y8-1Y-f92" secondAttribute="leading" constant="15" id="5O3-Md-BrG"/>
|
||||
<constraint firstItem="APD-8G-pvq" firstAttribute="leading" secondItem="ru0-WP-TUs" secondAttribute="trailing" constant="5" id="5qd-2c-Cdm"/>
|
||||
<constraint firstItem="FVz-n7-ZVi" firstAttribute="leading" secondItem="SlD-vc-ATT" secondAttribute="trailing" constant="5" id="KS0-Nx-IOg"/>
|
||||
<constraint firstItem="EqL-px-RDf" firstAttribute="bottom" secondItem="rWI-e9-NBg" secondAttribute="bottom" id="Mwh-4C-YE7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rYq-cj-Jn4" secondAttribute="trailing" constant="15" id="NlJ-fT-8Gp"/>
|
||||
<constraint firstItem="rWI-e9-NBg" firstAttribute="top" secondItem="2y8-1Y-f92" secondAttribute="top" constant="15" id="QgB-Ct-fr8"/>
|
||||
<constraint firstAttribute="height" constant="100" id="TfX-pq-hzF"/>
|
||||
<constraint firstItem="wGf-82-Ra3" firstAttribute="leading" secondItem="FVz-n7-ZVi" secondAttribute="trailing" constant="6" id="UX5-2y-nS3"/>
|
||||
<constraint firstItem="ru0-WP-TUs" firstAttribute="leading" secondItem="rWI-e9-NBg" secondAttribute="trailing" constant="5" id="ZcQ-1Q-ddd"/>
|
||||
<constraint firstItem="wGf-82-Ra3" firstAttribute="centerY" secondItem="FVz-n7-ZVi" secondAttribute="centerY" id="aIv-qA-e7N"/>
|
||||
<constraint firstItem="zwx-uG-Zy8" firstAttribute="bottom" secondItem="rWI-e9-NBg" secondAttribute="bottom" id="az2-En-jfM"/>
|
||||
<constraint firstItem="ru0-WP-TUs" firstAttribute="top" secondItem="2y8-1Y-f92" secondAttribute="top" constant="16" id="dsd-iG-t9Z"/>
|
||||
<constraint firstItem="SlD-vc-ATT" firstAttribute="centerY" secondItem="rWI-e9-NBg" secondAttribute="centerY" id="dye-i3-h9F"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oR5-2Y-kvw" secondAttribute="trailing" constant="15" id="f3d-uy-EcQ"/>
|
||||
<constraint firstItem="rYq-cj-Jn4" firstAttribute="top" secondItem="2y8-1Y-f92" secondAttribute="top" constant="20" id="hiV-ZU-M2v"/>
|
||||
<constraint firstItem="zwx-uG-Zy8" firstAttribute="centerX" secondItem="rWI-e9-NBg" secondAttribute="centerX" id="ltA-M0-0A2"/>
|
||||
<constraint firstItem="SlD-vc-ATT" firstAttribute="leading" secondItem="rWI-e9-NBg" secondAttribute="trailing" constant="5" id="ngj-Vi-dGA"/>
|
||||
<constraint firstItem="FVz-n7-ZVi" firstAttribute="centerY" secondItem="SlD-vc-ATT" secondAttribute="centerY" id="rJD-tC-aHQ"/>
|
||||
<constraint firstItem="oR5-2Y-kvw" firstAttribute="top" secondItem="rYq-cj-Jn4" secondAttribute="bottom" constant="15" id="txK-si-vyI"/>
|
||||
<constraint firstItem="EqL-px-RDf" firstAttribute="leading" secondItem="rWI-e9-NBg" secondAttribute="trailing" constant="5" id="wD7-d6-tsi"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RUE-ad-h85" userLabel="dynamicBtn">
|
||||
<rect key="frame" x="0.0" y="100" width="375" height="70"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="70" id="nw8-74-v9v"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b3d-yH-zuh">
|
||||
<rect key="frame" x="15" y="368" width="345" height="44"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.07035526612988946" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="44" id="Edh-Uj-EIP"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="我要下麦"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="22"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="onDownMic:" destination="iN0-l3-epB" eventType="touchUpInside" id="L1s-uu-2OJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9NG-Yt-X0L">
|
||||
<rect key="frame" x="0.0" y="180" width="375" height="48"/>
|
||||
<subviews>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VlR-jS-NrL">
|
||||
<rect key="frame" x="132.5" y="-0.5" width="110" height="49"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="room_alert_qianyue"/>
|
||||
<connections>
|
||||
<action selector="onQianyueList:" destination="iN0-l3-epB" eventType="touchUpInside" id="tbj-uh-RB0"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DQf-Hq-6RJ">
|
||||
<rect key="frame" x="15" y="0.0" width="165" height="48"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="room_alert_gift"/>
|
||||
<connections>
|
||||
<action selector="onGiftList:" destination="iN0-l3-epB" eventType="touchUpInside" id="TDR-VL-kRi"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RIX-TI-Ieb">
|
||||
<rect key="frame" x="195" y="0.0" width="165" height="48"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="room_alert_qinmi"/>
|
||||
<connections>
|
||||
<action selector="onQinmiList:" destination="iN0-l3-epB" eventType="touchUpInside" id="qsK-0o-ow3"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签约艺人" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4PD-B7-EbG">
|
||||
<rect key="frame" x="177.5" y="17" width="49.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="亲密关系" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BIV-2Q-WKr">
|
||||
<rect key="frame" x="240" y="17" width="49.5" height="14.5"/>
|
||||
<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" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="RIX-TI-Ieb" firstAttribute="width" secondItem="DQf-Hq-6RJ" secondAttribute="width" id="16N-HO-eSs"/>
|
||||
<constraint firstItem="BIV-2Q-WKr" firstAttribute="leading" secondItem="RIX-TI-Ieb" secondAttribute="leading" constant="45" id="47S-4L-aer"/>
|
||||
<constraint firstItem="VlR-jS-NrL" firstAttribute="centerY" secondItem="9NG-Yt-X0L" secondAttribute="centerY" id="6TT-dW-BDa"/>
|
||||
<constraint firstItem="BIV-2Q-WKr" firstAttribute="centerY" secondItem="RIX-TI-Ieb" secondAttribute="centerY" id="6cQ-Cl-6Vg"/>
|
||||
<constraint firstAttribute="height" constant="48" id="A2g-zL-paK"/>
|
||||
<constraint firstItem="VlR-jS-NrL" firstAttribute="centerX" secondItem="9NG-Yt-X0L" secondAttribute="centerX" id="TwN-zU-G3N"/>
|
||||
<constraint firstItem="RIX-TI-Ieb" firstAttribute="leading" secondItem="DQf-Hq-6RJ" secondAttribute="trailing" constant="15" id="Uec-HC-Czg"/>
|
||||
<constraint firstItem="RIX-TI-Ieb" firstAttribute="top" secondItem="9NG-Yt-X0L" secondAttribute="top" id="Vbn-Xk-VXz"/>
|
||||
<constraint firstItem="DQf-Hq-6RJ" firstAttribute="leading" secondItem="9NG-Yt-X0L" secondAttribute="leading" constant="15" id="ZmT-4C-na8"/>
|
||||
<constraint firstItem="4PD-B7-EbG" firstAttribute="centerY" secondItem="VlR-jS-NrL" secondAttribute="centerY" id="dfN-q6-kX7"/>
|
||||
<constraint firstItem="DQf-Hq-6RJ" firstAttribute="centerY" secondItem="9NG-Yt-X0L" secondAttribute="centerY" id="kvS-sE-lSP"/>
|
||||
<constraint firstAttribute="bottom" secondItem="RIX-TI-Ieb" secondAttribute="bottom" id="oNa-RC-jxW"/>
|
||||
<constraint firstItem="RIX-TI-Ieb" firstAttribute="centerY" secondItem="9NG-Yt-X0L" secondAttribute="centerY" id="qpt-Ip-GHL"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DQf-Hq-6RJ" secondAttribute="bottom" id="uN5-Mj-AMc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="RIX-TI-Ieb" secondAttribute="trailing" constant="15" id="vsT-sV-c6p"/>
|
||||
<constraint firstItem="DQf-Hq-6RJ" firstAttribute="top" secondItem="9NG-Yt-X0L" secondAttribute="top" id="yZD-2P-HTZ"/>
|
||||
<constraint firstItem="4PD-B7-EbG" firstAttribute="leading" secondItem="VlR-jS-NrL" secondAttribute="leading" constant="45" id="zy8-8D-4jf"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oy3-4G-wZt">
|
||||
<rect key="frame" x="15" y="243" width="345" height="120"/>
|
||||
<subviews>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="room_alert_cp_bg" translatesAutoresizingMaskIntoConstraints="NO" id="xd7-FE-JRa">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="120"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Nh9-Qf-3lB">
|
||||
<rect key="frame" x="-7.5" y="0.0" width="110" height="110"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="110" id="b9b-aj-u3D"/>
|
||||
<constraint firstAttribute="width" constant="110" id="ea2-mf-Kxe"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="3w8-5q-6CN">
|
||||
<rect key="frame" x="242.5" y="0.0" width="110" height="110"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="110" id="TQh-Hx-pBf"/>
|
||||
<constraint firstAttribute="width" constant="110" id="j2I-lm-lfk"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="80J-bB-Paf">
|
||||
<rect key="frame" x="48.5" y="23" width="54" height="54"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="54" id="iDd-Ve-hXs"/>
|
||||
<constraint firstAttribute="height" constant="54" id="qmp-Ss-4QP"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="27"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dOH-HL-E6E">
|
||||
<rect key="frame" x="89.5" y="60" width="16" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="5f5-u4-Ooh"/>
|
||||
<constraint firstAttribute="width" constant="16" id="7nZ-Dp-uNg"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="旺仔.牛奶" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DsU-9n-aOD">
|
||||
<rect key="frame" x="49" y="91" width="53.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<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" image="mine_cp_heart" translatesAutoresizingMaskIntoConstraints="NO" id="7UL-Pm-fJl">
|
||||
<rect key="frame" x="130.5" y="19" width="84" height="62"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="62" id="7XS-Vv-hd4"/>
|
||||
<constraint firstAttribute="width" constant="84" id="LTa-8L-oqa"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="x5a-EE-q2R">
|
||||
<rect key="frame" x="242.5" y="23" width="54" height="54"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="54" id="Vv9-21-n46"/>
|
||||
<constraint firstAttribute="height" constant="54" id="rKA-Il-buW"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="27"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="旺仔.牛奶" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Vg9-tl-T8O">
|
||||
<rect key="frame" x="243" y="91" width="53.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<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="oIq-SS-bLd">
|
||||
<rect key="frame" x="283.5" y="60" width="16" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="16" id="1o1-Cw-kNx"/>
|
||||
<constraint firstAttribute="height" constant="16" id="Fdz-eV-57N"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="6696" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="J0g-HW-Z4S">
|
||||
<rect key="frame" x="158" y="87" width="29" height="17.5"/>
|
||||
<fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="15"/>
|
||||
<color key="textColor" red="0.94901960784313721" green="0.46666666666666667" blue="0.74117647058823533" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LV1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gw6-Sb-1Se">
|
||||
<rect key="frame" x="161.5" y="41.5" width="22.5" height="17.5"/>
|
||||
<fontDescription key="fontDescription" name="DINAlternate-Bold" family="DIN Alternate" pointSize="15"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="oIq-SS-bLd" firstAttribute="trailing" secondItem="x5a-EE-q2R" secondAttribute="trailing" constant="3" id="29C-wh-EYV"/>
|
||||
<constraint firstItem="oIq-SS-bLd" firstAttribute="bottom" secondItem="x5a-EE-q2R" secondAttribute="bottom" constant="-1" id="449-V1-XET"/>
|
||||
<constraint firstItem="x5a-EE-q2R" firstAttribute="leading" secondItem="80J-bB-Paf" secondAttribute="trailing" constant="140" id="4Wg-Z5-0hE"/>
|
||||
<constraint firstItem="gw6-Sb-1Se" firstAttribute="centerY" secondItem="7UL-Pm-fJl" secondAttribute="centerY" id="52r-MV-lVa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="xd7-FE-JRa" secondAttribute="trailing" id="5E2-NT-h5q"/>
|
||||
<constraint firstItem="dOH-HL-E6E" firstAttribute="bottom" secondItem="80J-bB-Paf" secondAttribute="bottom" constant="-1" id="9c7-in-1sa"/>
|
||||
<constraint firstItem="7UL-Pm-fJl" firstAttribute="centerX" secondItem="oy3-4G-wZt" secondAttribute="centerX" id="HG6-Uc-vTT"/>
|
||||
<constraint firstItem="Vg9-tl-T8O" firstAttribute="centerX" secondItem="x5a-EE-q2R" secondAttribute="centerX" id="I7G-gn-cOx"/>
|
||||
<constraint firstItem="3w8-5q-6CN" firstAttribute="leading" secondItem="x5a-EE-q2R" secondAttribute="leading" id="NEl-B2-leS"/>
|
||||
<constraint firstItem="xd7-FE-JRa" firstAttribute="top" secondItem="oy3-4G-wZt" secondAttribute="top" id="QDd-LS-ZQB"/>
|
||||
<constraint firstItem="DsU-9n-aOD" firstAttribute="centerX" secondItem="80J-bB-Paf" secondAttribute="centerX" id="RhR-3o-PAl"/>
|
||||
<constraint firstItem="Nh9-Qf-3lB" firstAttribute="trailing" secondItem="80J-bB-Paf" secondAttribute="trailing" id="XT3-Lg-pif"/>
|
||||
<constraint firstAttribute="height" constant="120" id="cBz-iG-BM8"/>
|
||||
<constraint firstItem="DsU-9n-aOD" firstAttribute="top" secondItem="80J-bB-Paf" secondAttribute="bottom" constant="14" id="dMm-Iw-MW2"/>
|
||||
<constraint firstItem="80J-bB-Paf" firstAttribute="centerX" secondItem="oy3-4G-wZt" secondAttribute="centerX" constant="-97" id="e1l-f3-wu4"/>
|
||||
<constraint firstAttribute="bottom" secondItem="xd7-FE-JRa" secondAttribute="bottom" id="hFl-Fd-2lG"/>
|
||||
<constraint firstItem="Nh9-Qf-3lB" firstAttribute="centerY" secondItem="80J-bB-Paf" secondAttribute="centerY" constant="5" id="hiU-4k-lgd"/>
|
||||
<constraint firstItem="dOH-HL-E6E" firstAttribute="trailing" secondItem="80J-bB-Paf" secondAttribute="trailing" constant="3" id="htx-Bt-JU2"/>
|
||||
<constraint firstItem="80J-bB-Paf" firstAttribute="top" secondItem="oy3-4G-wZt" secondAttribute="top" constant="23" id="i9z-nX-HqB"/>
|
||||
<constraint firstItem="7UL-Pm-fJl" firstAttribute="centerY" secondItem="80J-bB-Paf" secondAttribute="centerY" id="iiX-D1-jd7"/>
|
||||
<constraint firstItem="J0g-HW-Z4S" firstAttribute="centerX" secondItem="oy3-4G-wZt" secondAttribute="centerX" id="k9K-4j-SRD"/>
|
||||
<constraint firstItem="Vg9-tl-T8O" firstAttribute="top" secondItem="x5a-EE-q2R" secondAttribute="bottom" constant="14" id="lif-Jy-4TD"/>
|
||||
<constraint firstItem="gw6-Sb-1Se" firstAttribute="centerX" secondItem="7UL-Pm-fJl" secondAttribute="centerX" id="njp-gB-2kc"/>
|
||||
<constraint firstItem="3w8-5q-6CN" firstAttribute="centerY" secondItem="x5a-EE-q2R" secondAttribute="centerY" constant="5" id="pca-JW-QZl"/>
|
||||
<constraint firstItem="J0g-HW-Z4S" firstAttribute="top" secondItem="7UL-Pm-fJl" secondAttribute="bottom" constant="6" id="qlu-zC-6zT"/>
|
||||
<constraint firstItem="x5a-EE-q2R" firstAttribute="centerY" secondItem="80J-bB-Paf" secondAttribute="centerY" id="ro3-Ql-xf3"/>
|
||||
<constraint firstItem="xd7-FE-JRa" firstAttribute="leading" secondItem="oy3-4G-wZt" secondAttribute="leading" id="u0V-aD-xKy"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="467-Lx-Vf1" userLabel="bot">
|
||||
<rect key="frame" x="0.0" y="360" width="375" height="60"/>
|
||||
<subviews>
|
||||
<stackView opaque="NO" contentMode="scaleAspectFit" distribution="fillEqually" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="lCa-6O-Rq7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XVm-DS-G98">
|
||||
<rect key="frame" x="0.0" y="0.0" width="68.5" height="60"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<state key="normal" title="@Ta">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="onAtTa:" destination="iN0-l3-epB" eventType="touchUpInside" id="HI9-Mo-ajB"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qh8-WR-tJt">
|
||||
<rect key="frame" x="76.5" y="0.0" width="68.5" height="60"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<state key="normal" title="清魅力">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="clearAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="5MJ-Ko-uEx"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JMP-G1-bP9">
|
||||
<rect key="frame" x="153" y="0.0" width="69" height="60"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<state key="normal" title="私信">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="onSiliaoTa:" destination="iN0-l3-epB" eventType="touchUpInside" id="enJ-gl-ttv"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZNq-Kg-UeH">
|
||||
<rect key="frame" x="230" y="0.0" width="68.5" height="60"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<state key="normal" title="送礼">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="botGiftTouched:" destination="iN0-l3-epB" eventType="touchUpInside" id="coU-8H-bh2"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="foF-n0-KlT">
|
||||
<rect key="frame" x="306.5" y="0.0" width="68.5" height="60"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<state key="normal" title="转赠">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="donateBtnTouched:" destination="iN0-l3-epB" eventType="touchUpInside" id="TSo-l1-78p"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="JMP-G1-bP9" firstAttribute="top" secondItem="lCa-6O-Rq7" secondAttribute="top" id="AEO-a6-Sx5"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ZNq-Kg-UeH" secondAttribute="bottom" id="BiO-IW-GbQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="JMP-G1-bP9" secondAttribute="bottom" id="He2-iB-oaa"/>
|
||||
<constraint firstItem="ZNq-Kg-UeH" firstAttribute="top" secondItem="lCa-6O-Rq7" secondAttribute="top" id="aqU-29-2x8"/>
|
||||
<constraint firstItem="XVm-DS-G98" firstAttribute="top" secondItem="lCa-6O-Rq7" secondAttribute="top" id="hYU-Og-nyG"/>
|
||||
<constraint firstAttribute="bottom" secondItem="XVm-DS-G98" secondAttribute="bottom" id="vhn-an-0yK"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="lCa-6O-Rq7" secondAttribute="bottom" id="DqX-jF-EO0"/>
|
||||
<constraint firstItem="lCa-6O-Rq7" firstAttribute="top" secondItem="467-Lx-Vf1" secondAttribute="top" id="WQW-FR-uxr"/>
|
||||
<constraint firstAttribute="height" constant="60" id="hHD-Zm-xJg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="lCa-6O-Rq7" secondAttribute="trailing" id="mii-Tk-hXA"/>
|
||||
<constraint firstItem="lCa-6O-Rq7" firstAttribute="leading" secondItem="467-Lx-Vf1" secondAttribute="leading" id="zJg-BK-2f8"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="RUE-ad-h85" firstAttribute="leading" secondItem="RP3-t6-Qsf" secondAttribute="leading" id="1RL-5D-R0k"/>
|
||||
<constraint firstItem="b3d-yH-zuh" firstAttribute="leading" secondItem="RP3-t6-Qsf" secondAttribute="leading" constant="15" id="57n-Cv-SC2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2y8-1Y-f92" secondAttribute="trailing" id="7z2-IA-G7X"/>
|
||||
<constraint firstItem="oy3-4G-wZt" firstAttribute="leading" secondItem="RP3-t6-Qsf" secondAttribute="leading" constant="15" id="8PK-b9-aUk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ocM-Td-SVT" secondAttribute="bottom" id="EtK-vV-Ff3"/>
|
||||
<constraint firstItem="2y8-1Y-f92" firstAttribute="leading" secondItem="RP3-t6-Qsf" secondAttribute="leading" id="JOL-pC-bW3"/>
|
||||
<constraint firstItem="ocM-Td-SVT" firstAttribute="top" secondItem="RP3-t6-Qsf" secondAttribute="top" id="NB8-Rf-MFI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9NG-Yt-X0L" secondAttribute="trailing" id="NZK-A5-85R"/>
|
||||
<constraint firstItem="b3d-yH-zuh" firstAttribute="centerY" secondItem="467-Lx-Vf1" secondAttribute="centerY" id="P26-FC-U4f"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oy3-4G-wZt" secondAttribute="trailing" constant="15" id="Peb-Su-nkL"/>
|
||||
<constraint firstItem="9NG-Yt-X0L" firstAttribute="leading" secondItem="RP3-t6-Qsf" secondAttribute="leading" id="V0V-eQ-Ac0"/>
|
||||
<constraint firstAttribute="trailing" secondItem="467-Lx-Vf1" secondAttribute="trailing" id="Vw3-2B-aDc"/>
|
||||
<constraint firstAttribute="bottom" secondItem="467-Lx-Vf1" secondAttribute="bottom" constant="30" id="eC0-Dc-osh"/>
|
||||
<constraint firstAttribute="trailing" secondItem="b3d-yH-zuh" secondAttribute="trailing" constant="15" id="hQg-2H-bhR"/>
|
||||
<constraint firstItem="9NG-Yt-X0L" firstAttribute="top" secondItem="RUE-ad-h85" secondAttribute="bottom" constant="10" id="m24-nw-LPt"/>
|
||||
<constraint firstItem="2y8-1Y-f92" firstAttribute="top" secondItem="RP3-t6-Qsf" secondAttribute="top" id="nPD-tb-LBq"/>
|
||||
<constraint firstItem="RUE-ad-h85" firstAttribute="top" secondItem="2y8-1Y-f92" secondAttribute="bottom" id="pbD-Hv-ZmY"/>
|
||||
<constraint firstAttribute="trailing" secondItem="RUE-ad-h85" secondAttribute="trailing" id="rZ9-Lv-OaF"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ocM-Td-SVT" secondAttribute="trailing" id="vA8-q4-JDv"/>
|
||||
<constraint firstItem="ocM-Td-SVT" firstAttribute="leading" secondItem="RP3-t6-Qsf" secondAttribute="leading" id="x1L-b9-8QV"/>
|
||||
<constraint firstAttribute="height" constant="450" id="xH5-Z4-d7e"/>
|
||||
<constraint firstItem="oy3-4G-wZt" firstAttribute="top" secondItem="9NG-Yt-X0L" secondAttribute="bottom" constant="15" id="xvd-c5-tYz"/>
|
||||
<constraint firstItem="467-Lx-Vf1" firstAttribute="leading" secondItem="RP3-t6-Qsf" secondAttribute="leading" id="y2K-ZB-jOg"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="15"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.5" colorSpace="custom" customColorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Jed-J0-kMM" secondAttribute="trailing" id="09k-YV-pHg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Jed-J0-kMM" secondAttribute="bottom" id="3XM-1P-YMl"/>
|
||||
<constraint firstAttribute="bottom" secondItem="RP3-t6-Qsf" secondAttribute="bottom" constant="-15" id="52e-Ud-UrC"/>
|
||||
<constraint firstItem="Jed-J0-kMM" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="9Sn-bS-knp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="RP3-t6-Qsf" secondAttribute="trailing" id="fuf-xR-pQq"/>
|
||||
<constraint firstItem="RP3-t6-Qsf" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="nfy-nW-HVV"/>
|
||||
<constraint firstItem="Jed-J0-kMM" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="zyv-1s-bfN"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="avatarImgV_1" destination="80J-bB-Paf" id="AfV-Mr-PFI"/>
|
||||
<outlet property="avatarImgV_2" destination="x5a-EE-q2R" id="9ye-WX-fiY"/>
|
||||
<outlet property="avatarImgView" destination="rWI-e9-NBg" id="pV4-eW-v37"/>
|
||||
<outlet property="blackBtn" destination="rYq-cj-Jn4" id="gHE-qZ-PGc"/>
|
||||
<outlet property="botBgView" destination="467-Lx-Vf1" id="RjI-rO-Doz"/>
|
||||
<outlet property="clearCharmBtn" destination="qh8-WR-tJt" id="XsO-ZP-JcE"/>
|
||||
<outlet property="cpBgView" destination="oy3-4G-wZt" id="igv-2t-VIN"/>
|
||||
<outlet property="cpBorderImgV_1" destination="Nh9-Qf-3lB" id="3l0-Vr-cWF"/>
|
||||
<outlet property="cpBorderImgV_2" destination="3w8-5q-6CN" id="64c-jS-Bw1"/>
|
||||
<outlet property="cpLevelLab" destination="gw6-Sb-1Se" id="9Ye-h5-8ck"/>
|
||||
<outlet property="downMicBtn" destination="b3d-yH-zuh" id="5HG-IV-Rop"/>
|
||||
<outlet property="dynamicViewHeightCon" destination="nw8-74-v9v" id="J3z-NP-hGR"/>
|
||||
<outlet property="genderImgV" destination="APD-8G-pvq" id="oN6-pv-Qbb"/>
|
||||
<outlet property="guanZhuBtn" destination="zwx-uG-Zy8" id="n8n-jG-Sx5"/>
|
||||
<outlet property="heartImgV" destination="7UL-Pm-fJl" id="mBa-bF-gr4"/>
|
||||
<outlet property="jueweiImgV" destination="wGf-82-Ra3" id="dCY-Zn-InR"/>
|
||||
<outlet property="levelCharmImgview" destination="FVz-n7-ZVi" id="bNF-n2-7oy"/>
|
||||
<outlet property="levelContributeImgview" destination="SlD-vc-ATT" id="Ep8-Dm-qMh"/>
|
||||
<outlet property="mainViewH" destination="xH5-Z4-d7e" id="LIi-Js-uye"/>
|
||||
<outlet property="middleBtnsView" destination="RUE-ad-h85" id="tNx-e7-g60"/>
|
||||
<outlet property="nicknameLab_1" destination="DsU-9n-aOD" id="gNr-p7-BtV"/>
|
||||
<outlet property="nicknameLab_2" destination="Vg9-tl-T8O" id="rD7-AW-Y4C"/>
|
||||
<outlet property="qianyueLab" destination="4PD-B7-EbG" id="WJc-d1-v86"/>
|
||||
<outlet property="qinmiLab" destination="BIV-2Q-WKr" id="EBV-XE-FFP"/>
|
||||
<outlet property="sendBtn" destination="ZNq-Kg-UeH" id="BHU-3f-Ctz"/>
|
||||
<outlet property="userIdL" destination="pjk-c5-01z" id="odt-Wg-1l2"/>
|
||||
<outlet property="userNameL" destination="ru0-WP-TUs" id="rxT-J5-1X7"/>
|
||||
<outlet property="valueLab" destination="J0g-HW-Z4S" id="oFz-F1-Q0j"/>
|
||||
<outlet property="zhuanZengBtn" destination="foF-n0-KlT" id="Knr-GY-wK2"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-2549" y="15"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="Gender_boy" width="16" height="16"/>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
<image name="mine_cp_heart" width="98" height="98"/>
|
||||
<image name="mine_fuzhi" width="16" height="16"/>
|
||||
<image name="party_ID" width="20" height="20"/>
|
||||
<image name="room_alert_bg" width="375" height="432"/>
|
||||
<image name="room_alert_black" width="61" height="24"/>
|
||||
<image name="room_alert_black_cancel" width="85" height="24"/>
|
||||
<image name="room_alert_cp_bg" width="349" height="106"/>
|
||||
<image name="room_alert_gift" width="165" height="48"/>
|
||||
<image name="room_alert_qianyue" width="110" height="49"/>
|
||||
<image name="room_alert_qinmi" width="165" height="48"/>
|
||||
<image name="room_alert_report" width="61" height="24"/>
|
||||
<image name="room_bot_guanzhu" width="53" height="20"/>
|
||||
<image name="room_bot_yiguanzhu" width="53" height="20"/>
|
||||
</resources>
|
||||
</document>
|
||||
54
SweetParty/主类/RCMic/Room/BJOperationView/BJOperationAlertUserModel.h
Executable file
54
SweetParty/主类/RCMic/Room/BJOperationView/BJOperationAlertUserModel.h
Executable file
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// BJOperationAlertUserModel.h
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by ybb on 2021/4/19.
|
||||
// Copyright © 2021 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "YYMineCPModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJOperationAlertUserModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *uid; //": 1000786,
|
||||
@property (nonatomic, copy) NSString *head_pic; //": "http://cdn.guduxin
|
||||
@property (nonatomic, copy) NSString *sex; //": 0,
|
||||
@property (nonatomic, copy) NSString *birthday; //": "2021-04-09",
|
||||
@property (nonatomic, copy) NSString *special_uid; //": 0,
|
||||
@property (nonatomic, copy) NSString *ry_uid; //": 1000786,
|
||||
@property (nonatomic, copy) NSString *ry_token; //": "E9W1ATJ8YnrMn2dFzDBsVwGsF86WI
|
||||
@property (nonatomic, copy) NSString *charm_level; //": 1,
|
||||
@property (nonatomic, copy) NSString *contribution_level; //": 1,
|
||||
@property (nonatomic, copy) NSString *nick_name; //": "深情的耳机83",
|
||||
@property (nonatomic, copy) NSString *is_follow; //": 1,
|
||||
@property (nonatomic, copy) NSString *user_micro_status; //": 1,
|
||||
@property (nonatomic, copy) NSString *user_world_status; //": 1,
|
||||
@property (nonatomic, copy) NSString *user_type; //": 5,
|
||||
@property (nonatomic, copy) NSString *avatar_play_image; //": "",
|
||||
@property (nonatomic, copy) NSString *charm_level_image; //": "http://cdn.guduxingqiu.cloud//uploads/user
|
||||
@property (nonatomic, copy) NSString *contribution_level_image; //": "http://cdn.guduxingqiu.cloud//u
|
||||
@property(nonatomic, copy) NSString *is_can_recharge;
|
||||
@property (nonatomic, copy) NSString *is_admin;
|
||||
@property (nonatomic, copy) NSString *autograph;
|
||||
@property (nonatomic, copy) NSString *nobility_image;
|
||||
|
||||
@property (nonatomic, strong) YYMineCPModel *user_cp_info;//用户cp信息
|
||||
@property (nonatomic, copy) NSString *sign_contract_num;//艺人数量
|
||||
@property (nonatomic, copy) NSString *relation_num;//关系数量
|
||||
|
||||
@property (nonatomic, assign) NSInteger is_have_producer;//是否有制作人 1是2否
|
||||
@property (nonatomic, copy) NSString *producer_uid;//制作人uid
|
||||
@property (nonatomic, copy) NSString *producer_nick_name;
|
||||
@property (nonatomic, copy) NSString *producer_head_pic;
|
||||
|
||||
@property (nonatomic, assign) NSInteger is_new;//是否是新人
|
||||
@property (nonatomic, assign) NSInteger social;//身价
|
||||
|
||||
@property(nonatomic, assign) NSInteger is_room_black;//1已拉黑 2不拉黑
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
13
SweetParty/主类/RCMic/Room/BJOperationView/BJOperationAlertUserModel.m
Executable file
13
SweetParty/主类/RCMic/Room/BJOperationView/BJOperationAlertUserModel.m
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// BJOperationAlertUserModel.m
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by ybb on 2021/4/19.
|
||||
// Copyright © 2021 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJOperationAlertUserModel.h"
|
||||
|
||||
@implementation BJOperationAlertUserModel
|
||||
|
||||
@end
|
||||
21
SweetParty/主类/RCMic/Room/BJRoomManager.h
Executable file
21
SweetParty/主类/RCMic/Room/BJRoomManager.h
Executable file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// BJRoomManager.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/18.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJRoomManager : NSObject
|
||||
|
||||
singleton_interface(BJRoomManager)
|
||||
|
||||
+ (void)goMicRoomWithRid:(NSString *)rId withPwd:(nullable NSString *)pwd;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
104
SweetParty/主类/RCMic/Room/BJRoomManager.m
Executable file
104
SweetParty/主类/RCMic/Room/BJRoomManager.m
Executable file
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// BJRoomManager.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/18.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJRoomManager.h"
|
||||
#import "BJFloatRoomManager.h"
|
||||
#import "SARoomPswAlert.h"
|
||||
#import "RCMicRoomViewController.h"
|
||||
|
||||
@interface BJRoomManager ()
|
||||
|
||||
@property (nonatomic, copy) NSString *nowRid, *nowPwd;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BJRoomManager
|
||||
|
||||
singleton_implementation(BJRoomManager)
|
||||
|
||||
|
||||
+ (void)goMicRoomWithRid:(NSString *)rId withPwd:(nullable NSString *)pwd {
|
||||
//有浮标
|
||||
if (BJFloatRoomManager.sharedBJFloatRoomManager.viewModel) {
|
||||
if ([BJFloatRoomManager.sharedBJFloatRoomManager.viewModel.roomInfo.roomId isEqualToString:rId]) {
|
||||
[BJFloatRoomManager.sharedBJFloatRoomManager reEnterSameRoom];
|
||||
return;
|
||||
}else {
|
||||
[BJFloatRoomManager.sharedBJFloatRoomManager closeFloatWindow];
|
||||
}
|
||||
}
|
||||
//没有浮标但在堆栈nav
|
||||
RCMicRoomViewController *curRoom;
|
||||
for (UIViewController *each in UIViewController.currentViewController.navigationController.viewControllers) {
|
||||
if ([each isKindOfClass:RCMicRoomViewController.class]) {
|
||||
curRoom = (RCMicRoomViewController *)each;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (curRoom) {
|
||||
if ([curRoom.yb_rid isEqualToString:rId]) {
|
||||
[UIViewController.currentViewController.navigationController popToViewController:curRoom animated:YES];
|
||||
return;
|
||||
}else {
|
||||
[curRoom doThingsBeforeQuitRoom];
|
||||
}
|
||||
}
|
||||
|
||||
//进入新的房间
|
||||
BJRoomManager.sharedBJRoomManager.nowRid = rId;
|
||||
BJRoomManager.sharedBJRoomManager.nowPwd = pwd;
|
||||
|
||||
NSDictionary *dict = @{@"rid":C_string(rId)};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
if (pwd.length > 0) {
|
||||
[paras setObject:C_string(pwd) forKey:@"password"];
|
||||
}
|
||||
|
||||
[SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/room/enter_room_info" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
[result.content safeStringForKey:@""];
|
||||
RCMicRoomInfo *model = [RCMicRoomInfo mj_objectWithKeyValues:result.content];
|
||||
if (model.room_status.integerValue == 1 || model.room_status.integerValue == 3) {
|
||||
GVUSER.publicType = @"0";// ??
|
||||
GVUSER.is_calculator = model.is_calculator;// ??
|
||||
GVUSER.is_open_blindXlh = model.open_blind_box_term;
|
||||
RCMicRoomViewController *next = [[RCMicRoomViewController alloc] initWithRoomInfo:model Role:RCMicRoleType_Audience]; //退出房间不保持,所以刚进来都是audience
|
||||
[next pushSelf];
|
||||
}else {
|
||||
//room_status 2是封禁
|
||||
[SVProgressHUD showInfoWithStatus:@"房间被封禁"];
|
||||
}
|
||||
}else if (result.errorCode == 202 && BJRoomManager.sharedBJRoomManager.nowPwd.length==0) {
|
||||
// show pwd input
|
||||
[BJRoomManager.sharedBJRoomManager showPwdView];
|
||||
}
|
||||
else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)showPwdView {
|
||||
SARoomPswAlert *view = [[NSBundle mainBundle] loadNibNamed:@"SARoomPswAlert" owner:self options:nil].firstObject;
|
||||
view.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
|
||||
[KEYWINDOW addSubview:view];
|
||||
|
||||
WEAK_SELF
|
||||
view.onConfirmBlock = ^(NSString * _Nonnull pwd) {
|
||||
[BJRoomManager goMicRoomWithRid:weakSelf.nowRid withPwd:pwd];
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
32
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiAlert.h
Executable file
32
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiAlert.h
Executable file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// RoomFluctuationOfWheatView.h
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by feifei on 2019/9/2.
|
||||
// Copyright © 2019 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BaseView.h"
|
||||
#import "BJRoomBaomaiAlert.h"
|
||||
#import "RCMicRoomViewModel.h"
|
||||
|
||||
@class BJRoomBaomaiModel;
|
||||
|
||||
@interface BJRoomBaomaiAlert : BaseView
|
||||
|
||||
@property (nonatomic , copy) void(^searchButtonClickBlock)(NSString *userid);
|
||||
|
||||
@property (nonatomic , copy) void(^quDingButtonClickBlock)(BJRoomBaomaiModel *model);
|
||||
|
||||
@property (nonatomic, copy) void(^onClickUserBlock)(NSString *uid);
|
||||
|
||||
- (instancetype)initWithRoomModel:(RCMicRoomViewModel *)viewModel;
|
||||
|
||||
/// 显示框
|
||||
/// @param parent 父试图
|
||||
/// @param haveSearch 是否有搜索栏
|
||||
- (void)showOnView:(UIView *)parent haveSearchTf:(BOOL)haveSearch;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
419
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiAlert.m
Executable file
419
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiAlert.m
Executable file
@@ -0,0 +1,419 @@
|
||||
//
|
||||
// RoomFluctuationOfWheatView.m
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by feifei on 2019/9/2.
|
||||
// Copyright © 2019 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJRoomBaomaiAlert.h"
|
||||
#import "BJRoomBaomaiCell.h"
|
||||
#import "YYXQPickTimeAlert.h"
|
||||
|
||||
@interface BJRoomBaomaiAlert ()<UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate>
|
||||
|
||||
@property (nonatomic, strong) RCMicRoomViewModel *roomModel;
|
||||
|
||||
@property (nonatomic, strong) UIView *mainView;
|
||||
@property (nonatomic, strong) UILabel *titelLB;
|
||||
@property (nonatomic, strong) UITextField *searchTF;
|
||||
@property (nonatomic, strong) UIButton *searchBtn;
|
||||
@property (nonatomic, strong) UITableView *tableView;
|
||||
|
||||
@property (nonatomic, assign) BOOL haveSearchTf; //是否有搜索框
|
||||
|
||||
@property (nonatomic, assign) BOOL isSearching; //当前正在展示搜索出来的结果,只有一个section
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray<BJRoomBaomaiModel *> *mic_user;
|
||||
@property (nonatomic, strong) NSMutableArray<BJRoomBaomaiModel *> *room_user;
|
||||
@property (nonatomic, strong) NSMutableArray<BJRoomBaomaiModel *> *searchArry;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BJRoomBaomaiAlert
|
||||
|
||||
- (NSMutableArray<BJRoomBaomaiModel *> *)mic_user {
|
||||
if (!_mic_user) {
|
||||
_mic_user = NSMutableArray.array;
|
||||
}
|
||||
return _mic_user;
|
||||
}
|
||||
|
||||
- (NSMutableArray<BJRoomBaomaiModel *> *)room_user {
|
||||
if (!_room_user) {
|
||||
_room_user = NSMutableArray.array;
|
||||
}
|
||||
return _room_user;
|
||||
}
|
||||
|
||||
- (NSMutableArray<BJRoomBaomaiModel *> *)searchArry {
|
||||
if (!_searchArry) {
|
||||
_searchArry = NSMutableArray.array;
|
||||
}
|
||||
return _searchArry;
|
||||
}
|
||||
|
||||
#pragma mark - Intial
|
||||
|
||||
- (instancetype)initWithRoomModel:(RCMicRoomViewModel *)viewModel {
|
||||
if (self = [super initWithFrame:UIScreen.mainScreen.bounds]) {
|
||||
self.roomModel = viewModel;
|
||||
self.backgroundColor = HEXCOLORA(0x000000, 0.5);
|
||||
[self setUpUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setUpUI {
|
||||
//返回按钮
|
||||
UIButton *clearBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
clearBtn.frame = self.bounds;
|
||||
clearBtn.backgroundColor = UIColor.clearColor;
|
||||
[clearBtn setTitle:@"" forState:UIControlStateNormal];
|
||||
[clearBtn addTarget:self action:@selector(removeAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self addSubview:clearBtn];
|
||||
|
||||
//主图
|
||||
self.mainView.frame = CGRectMake(0, APPH-400-yb_HomeIndicator_H, APPW, 400+yb_HomeIndicator_H); //有效高度 400+底部间距
|
||||
[self addSubview:self.mainView];
|
||||
|
||||
self.titelLB.frame = CGRectMake(0, 15, APPW, 20);
|
||||
[self.mainView addSubview:self.titelLB];
|
||||
|
||||
self.searchTF.frame = CGRectMake(22, _titelLB.bottom+14, APPW-44-80, 35);
|
||||
[self.mainView addSubview:self.searchTF];
|
||||
|
||||
self.searchBtn.frame = CGRectMake(_searchTF.right+30, 0, 50, 30);
|
||||
self.searchBtn.centerY = _searchTF.centerY;
|
||||
[self.mainView addSubview:self.searchBtn];
|
||||
|
||||
self.tableView.frame = CGRectMake(0, _searchTF.bottom, APPW, 400-_searchTF.bottom);
|
||||
[self.mainView addSubview:self.tableView];
|
||||
|
||||
}
|
||||
|
||||
- (void)showOnView:(UIView *)parent haveSearchTf:(BOOL)haveSearch {
|
||||
_haveSearchTf = haveSearch;
|
||||
[parent addSubview:self];
|
||||
|
||||
|
||||
//设置动画前的状态
|
||||
_searchTF.hidden = haveSearch==NO;
|
||||
if (haveSearch) {
|
||||
_searchTF.hidden = _searchBtn.hidden = NO;
|
||||
_titelLB.text = @"抱麦";
|
||||
self.tableView.frame = CGRectMake(0, _searchTF.bottom, APPW, 400-_searchTF.bottom);
|
||||
}else {
|
||||
_titelLB.text = @"成员";
|
||||
_searchTF.hidden = _searchBtn.hidden = YES;
|
||||
self.tableView.frame = CGRectMake(0, _titelLB.bottom, APPW, 400-_titelLB.bottom);
|
||||
}
|
||||
_mainView.y = APPH;
|
||||
[self layoutIfNeeded];
|
||||
|
||||
//动画
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
self.mainView.y = APPH-400-yb_HomeIndicator_H;
|
||||
}];
|
||||
|
||||
//请求数据
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadListData {
|
||||
NSDictionary *dict = @{@"rid":C_string(_roomModel.roomInfo.roomId),
|
||||
@"page":C_string(@"1"),
|
||||
@"page_limit":C_string(@"999"),
|
||||
};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
//uid 参数
|
||||
_isSearching = _searchTF.text.length > 0;
|
||||
if (_searchTF.text.length > 0) {
|
||||
[paras setObject:_searchTF.text forKey:@"uid"];
|
||||
}
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/room/get_room_user_list" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
// [SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
[self checkResult:result.content];
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)checkResult:(NSDictionary *)result {
|
||||
[self.searchArry removeAllObjects];
|
||||
|
||||
if (_isSearching) {
|
||||
// NSArray *upArr = [result safeArrayForKey:@"micro_user_list"];
|
||||
// if (upArr.count > 0) {
|
||||
// NSArray *models = [BJRoomBaomaiModel mj_objectArrayWithKeyValuesArray:upArr];
|
||||
// [self.searchArry addObjectsFromArray:models];
|
||||
// }
|
||||
|
||||
NSArray *downArr = [result safeArrayForKey:@"unmicro_user_list"];
|
||||
if (downArr.count > 0) {
|
||||
NSArray *models = [BJRoomBaomaiModel mj_objectArrayWithKeyValuesArray:downArr];
|
||||
[self.searchArry addObjectsFromArray:models];
|
||||
}
|
||||
}
|
||||
else {
|
||||
[self.mic_user removeAllObjects];
|
||||
[self.room_user removeAllObjects];
|
||||
NSArray *upArr = [result safeArrayForKey:@"micro_user_list"];
|
||||
if (upArr.count > 0) {
|
||||
NSArray *models = [BJRoomBaomaiModel mj_objectArrayWithKeyValuesArray:upArr];
|
||||
[self.mic_user addObjectsFromArray:models];
|
||||
}
|
||||
|
||||
NSArray *downArr = [result safeArrayForKey:@"unmicro_user_list"];
|
||||
if (downArr.count > 0) {
|
||||
NSArray *models = [BJRoomBaomaiModel mj_objectArrayWithKeyValuesArray:downArr];
|
||||
[self.room_user addObjectsFromArray:models];
|
||||
}
|
||||
}
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (void)removeAction {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)tfValueChanged {
|
||||
NSLog(@"%@", _searchTF.text);
|
||||
|
||||
if (_searchTF.text.length == 0) {
|
||||
_isSearching = NO;
|
||||
[_tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)inviteUserWith:(BJRoomBaomaiModel *)model {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[_roomModel bj_inviteParticipant:model.uid error:^(BOOL isOk) {
|
||||
if (isOk) {
|
||||
// [SVProgressHUD showInfoWithStatus:@"上麦成功"];
|
||||
|
||||
V2TIMMessage *message = [[V2TIMManager sharedInstance] createCustomMessage:[@(BJIMMsgType_BeUpMic).stringValue mj_JSONData]];
|
||||
[[V2TIMManager sharedInstance] sendMessage:message
|
||||
receiver:model.uid
|
||||
groupID:nil
|
||||
priority:V2TIM_PRIORITY_DEFAULT
|
||||
onlineUserOnly:YES
|
||||
offlinePushInfo:nil
|
||||
progress:nil
|
||||
succ:^{
|
||||
// 单聊自定义消息发送成功
|
||||
} fail:^(int code, NSString *desc) {
|
||||
// 单聊自定义消息发送失败
|
||||
}];
|
||||
|
||||
[weakSelf loadListData];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)xq_baomaiWith:(BJRoomBaomaiModel *)model time:(NSString *)time {
|
||||
NSDictionary *params = @{@"uid":model.uid, @"rid":C_string(self.roomModel.roomInfo.roomId), @"micro_id":C_string(GVUSER.position), @"time":time};
|
||||
[[AFNetworkRequset shared] postRequestWithParams:params Path:@"/api/room/room_owner_up_micro" Loading:YES Hud:YES Success:^(id _Nonnull responseDic) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self removeFromSuperview];
|
||||
});
|
||||
} Failure:^(id _Nonnull errorData) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)doSearch {
|
||||
if (_searchTF.text.length > 0) {
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
[self endEditing:YES];
|
||||
}
|
||||
|
||||
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
|
||||
[self doSearch];
|
||||
return YES;
|
||||
}
|
||||
|
||||
#pragma mark Table view data source
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
if (_isSearching) {
|
||||
return 1;
|
||||
}
|
||||
return 2;
|
||||
}
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
if (_isSearching) {
|
||||
return self.searchArry.count;
|
||||
}else{
|
||||
if (section == 0) {
|
||||
return self.mic_user.count;
|
||||
}else if (section == 1) {
|
||||
return self.room_user.count;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
BJRoomBaomaiCell *cell = [BJRoomBaomaiCell cellWithTableView:tableView];
|
||||
cell.timeLabel.hidden = YES;
|
||||
if (_haveSearchTf) {
|
||||
if (indexPath.section == 0) {
|
||||
cell.quDingButton.hidden = YES;
|
||||
}else {
|
||||
cell.quDingButton.hidden = NO;
|
||||
}
|
||||
}else {
|
||||
cell.quDingButton.hidden = YES;
|
||||
}
|
||||
|
||||
//定model
|
||||
BJRoomBaomaiModel *model;
|
||||
if (_isSearching) {
|
||||
model = self.searchArry[indexPath.row];
|
||||
}else{
|
||||
if (indexPath.section == 0) {
|
||||
model = self.mic_user[indexPath.row];
|
||||
}else{
|
||||
model = self.room_user[indexPath.row];
|
||||
}
|
||||
}
|
||||
cell.model = model;
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
cell.quDingButtonClickBlock = ^(BJRoomBaomaiModel *model) {
|
||||
NSLog(@"------------------%@", GVUSER.position);
|
||||
if (weakSelf.roomModel.roomInfo.is_blind_date == 1 && [GVUSER.position integerValue] < 6) {
|
||||
YYXQPickTimeAlert *view = LoadNib(@"YYXQPickTimeAlert");
|
||||
view.frame = [UIScreen mainScreen].bounds;
|
||||
[KEYWINDOW addSubview:view];
|
||||
view.onConfirmBlock = ^(NSString * _Nonnull time) {
|
||||
[weakSelf xq_baomaiWith:model time:time];
|
||||
};
|
||||
}else {
|
||||
[weakSelf inviteUserWith:model];
|
||||
}
|
||||
// [weakSelf inviteUserWith:model];
|
||||
};
|
||||
|
||||
return cell;
|
||||
}
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
UIView *headerView = [ControlCreator createView:nil rect:CGRectMake(0, 0, ScreenViewWidth, 40) backguoundColor:[UIColor whiteColor]];
|
||||
UILabel *headerLB = [ControlCreator createLabel:headerView rect:CGRectMake(12, 10, ScreenViewWidth, 20) text:@"" font:Font(14) color:mainViceColor backguoundColor:[UIColor clearColor] align:NSTextAlignmentLeft lines:1];
|
||||
if (_isSearching) {
|
||||
return nil;
|
||||
}
|
||||
if (section == 0) {
|
||||
headerLB.text = NSStringFormat(@"麦上用户%ld/8", (long)self.mic_user.count);
|
||||
}else{
|
||||
headerLB.text = NSStringFormat(@"麦下用户%ld人", (long)self.room_user.count);
|
||||
}
|
||||
|
||||
return headerView;
|
||||
}
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
//定model
|
||||
BJRoomBaomaiModel *model;
|
||||
if (_isSearching) {
|
||||
model = self.searchArry[indexPath.row];
|
||||
}else{
|
||||
if (indexPath.section == 0) {
|
||||
model = self.mic_user[indexPath.row];
|
||||
}else{
|
||||
model = self.room_user[indexPath.row];
|
||||
}
|
||||
}
|
||||
if (self.onClickUserBlock) {
|
||||
self.onClickUserBlock(model.uid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark Table view delegate
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return 90;
|
||||
}
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
if (_isSearching) {
|
||||
return 0.001;
|
||||
}
|
||||
return 40;
|
||||
}
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 0.00001;
|
||||
}
|
||||
|
||||
#pragma mark - getter methodsb
|
||||
|
||||
- (UIView *)mainView{
|
||||
if (!_mainView) {
|
||||
_mainView = [ControlCreator createView:nil rect:CGRectZero backguoundColor:[UIColor whiteColor]];
|
||||
_mainView.layer.masksToBounds = YES;
|
||||
_mainView.layer.cornerRadius = 7;
|
||||
}
|
||||
return _mainView;
|
||||
}
|
||||
- (UILabel *)titelLB{
|
||||
if (!_titelLB) {
|
||||
_titelLB = [ControlCreator createLabel:nil rect:CGRectZero text:@"抱麦" font:Font(15) color:[UIColor blackColor] backguoundColor:[UIColor clearColor] align:NSTextAlignmentCenter lines:1];
|
||||
}
|
||||
return _titelLB;
|
||||
}
|
||||
|
||||
- (UITextField *)searchTF{
|
||||
if (!_searchTF) {
|
||||
_searchTF = [ControlCreator createTextField:nil rect:CGRectMake(0, 0, 0, 0) placeholder:@"输入用户ID" placeholderColor:nil text:@"" font:Font(12) color:mainViceColor backguoundColor:MHColorFromHexString(@"#F8F8F8")];
|
||||
_searchTF.layer.masksToBounds = YES;
|
||||
_searchTF.layer.cornerRadius = 17.5;
|
||||
_searchTF.keyboardType = UIKeyboardTypeNumberPad;
|
||||
UIView *leftTFView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 15, 35)];
|
||||
leftTFView.backgroundColor = [UIColor clearColor];
|
||||
_searchTF.leftView = leftTFView;
|
||||
_searchTF.leftViewMode = UITextFieldViewModeAlways;
|
||||
[_searchTF addTarget:self action:@selector(tfValueChanged) forControlEvents:UIControlEventEditingChanged];
|
||||
_searchTF.delegate = self;
|
||||
}
|
||||
return _searchTF;
|
||||
}
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
||||
_tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
|
||||
_tableView.dataSource = self;
|
||||
_tableView.delegate = self;
|
||||
_tableView.backgroundView = nil;
|
||||
_tableView.showsVerticalScrollIndicator = NO;
|
||||
_tableView.backgroundColor = [UIColor whiteColor];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.separatorColor=[UIColor clearColor];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (UIButton *)searchBtn {
|
||||
if (!_searchBtn) {
|
||||
_searchBtn = [ControlCreator createButton:nil rect:CGRectZero text:@"确定" font:YBFont(14) color:UIColor.whiteColor backguoundColor:MLControlsColor imageName:nil target:self action:@selector(doSearch)];
|
||||
_searchBtn.layer.masksToBounds = YES;
|
||||
_searchBtn.layer.cornerRadius = 15;
|
||||
}
|
||||
return _searchBtn;
|
||||
}
|
||||
|
||||
@end
|
||||
33
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiCell.h
Executable file
33
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiCell.h
Executable file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// RoomFluctuationOfWheatCell.h
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by apple on 2020/4/11.
|
||||
// Copyright © 2020 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "BJRoomBaomaiModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJRoomBaomaiCell : UITableViewCell
|
||||
@property (nonatomic, strong) UIView *bgView;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *icon;
|
||||
@property (nonatomic, strong) UILabel *nickName;
|
||||
@property (nonatomic, strong) UILabel *uid;
|
||||
|
||||
@property (nonatomic, strong) UIView *lineView;
|
||||
/**/
|
||||
@property(nonatomic, strong) UILabel *timeLabel;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *typeImgV;//身份
|
||||
|
||||
@property (nonatomic , copy) void(^quDingButtonClickBlock)(BJRoomBaomaiModel *model);
|
||||
|
||||
@property (nonatomic, strong) BJRoomBaomaiModel *model;
|
||||
@property (nonatomic, strong) UIButton *quDingButton;
|
||||
+ (instancetype)cellWithTableView:(UITableView *)tableView;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
238
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiCell.m
Executable file
238
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiCell.m
Executable file
@@ -0,0 +1,238 @@
|
||||
//
|
||||
// RoomFluctuationOfWheatCell.m
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by apple on 2020/4/11.
|
||||
// Copyright © 2020 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJRoomBaomaiCell.h"
|
||||
#import "LiangView.h"
|
||||
@interface BJRoomBaomaiCell ()
|
||||
/*靓号ID*/
|
||||
//@property(nonatomic, strong) UIButton *liangBtn;
|
||||
|
||||
//新的靓号ID
|
||||
@property(nonatomic, strong) LiangView *liangView;
|
||||
@end
|
||||
@implementation BJRoomBaomaiCell
|
||||
|
||||
#pragma mark - 快速创建cell
|
||||
+ (instancetype)cellWithTableView:(UITableView *)tableView{
|
||||
static NSString *ID = @"BJRoomBaomaiCell";
|
||||
|
||||
BJRoomBaomaiCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
|
||||
|
||||
if (cell == nil) {
|
||||
cell = [[BJRoomBaomaiCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
|
||||
// cell.selectedBackgroundView = cell.seletView ;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.contentView.backgroundColor = [UIColor clearColor];
|
||||
cell.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self addSomeViews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)quDingButtonClick:(UIButton *)sender{
|
||||
! self.quDingButtonClickBlock ?: self.quDingButtonClickBlock(self.model);
|
||||
}
|
||||
- (void)setModel:(BJRoomBaomaiModel *)model{
|
||||
_model = model;
|
||||
if ([model.is_mic integerValue] == 1) {
|
||||
self.bgView.hidden = YES;
|
||||
[self.quDingButton setTitle:@"下麦" forState:UIControlStateNormal];
|
||||
}else{
|
||||
self.bgView.hidden = YES;
|
||||
[self.quDingButton setTitle:@"上麦" forState:UIControlStateNormal];
|
||||
}
|
||||
[self.quDingButton.titleLabel setFont:Font(12)];
|
||||
[self.icon sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:[UIImage imageNamed:@"default_userIcon"]];
|
||||
self.nickName.text = model.nick_name;
|
||||
// if (model.special_uid.length>2) {
|
||||
// self.liangBtn.hidden = NO;
|
||||
// self.uid.hidden = YES;
|
||||
// CGSize size = [NSStringFormat(@"%@",model.uid) sizeWithFont:FONT_12 hiegth:20];
|
||||
// [self.liangBtn setTitle:NSStringFormat(@"%@",model.uid) forState:UIControlStateNormal];
|
||||
// [self.liangBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.left.equalTo(self.nickName);
|
||||
// make.centerY.equalTo(self.icon);
|
||||
// make.width.mas_equalTo(size.width+30);
|
||||
// make.height.mas_equalTo(22);
|
||||
// }];
|
||||
// }else{
|
||||
// self.liangBtn.hidden = YES;
|
||||
// self.uid.hidden = NO;
|
||||
// self.uid.text = NSStringFormat(@"ID: %@",model.uid);
|
||||
// }
|
||||
self.timeLabel.text = [NSString stringWithFormat:@"申请时间:%@",model.add_time];
|
||||
|
||||
if (model.special_uid.length>1) {
|
||||
self.uid.hidden = YES;
|
||||
self.liangView.hidden = NO;
|
||||
CGSize size = [model.special_uid sizeWithFont:FONT_12 hiegth:20];
|
||||
[self.liangView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(size.width+30);
|
||||
}];
|
||||
self.liangView.uid.text = model.special_uid;
|
||||
}else{
|
||||
self.liangView.hidden = YES;
|
||||
self.uid.hidden = NO;
|
||||
self.uid.text = NSStringFormat(@"ID: %@",model.uid);
|
||||
// [self.uid setTitle:[NSString stringWithFormat:@"ID:%@",model.uid] forState:UIControlStateNormal];
|
||||
// [self.uid setImage:nil forState:UIControlStateNormal];
|
||||
// self.uid.ba_padding = 0;
|
||||
}
|
||||
|
||||
//1房主 2管理 3主持 5普通用户
|
||||
if (model.user_type == 1) {
|
||||
self.typeImgV.image = ImageNamed(@"room_type_owner");
|
||||
}else if (model.user_type == 2) {
|
||||
self.typeImgV.image = ImageNamed(@"room_type_manager");
|
||||
}else if (model.user_type == 3) {
|
||||
self.typeImgV.image = ImageNamed(@"room_type_host");
|
||||
}else {
|
||||
self.typeImgV.image = nil;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)addSomeViews{
|
||||
|
||||
[self.contentView addSubview:self.bgView];
|
||||
[self.contentView addSubview:self.icon];
|
||||
[self.contentView addSubview:self.nickName];
|
||||
[self.contentView addSubview:self.uid];
|
||||
[self.contentView addSubview:self.quDingButton];
|
||||
[self.contentView addSubview:self.lineView];
|
||||
[self.contentView addSubview:self.liangView];
|
||||
[self.contentView addSubview:self.typeImgV];
|
||||
|
||||
UILabel *timeLab = [ControlCreator createLabel:nil rect:CGRectZero text:@"" font:FONT_12 color:COLOR_666666 backguoundColor:nil align:NSTextAlignmentLeft lines:1];
|
||||
[self.contentView addSubview:timeLab];
|
||||
[timeLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.nickName);
|
||||
make.bottom.equalTo(self.icon);
|
||||
}];
|
||||
|
||||
self.timeLabel = timeLab;
|
||||
|
||||
|
||||
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self).offset(5);
|
||||
make.bottom.mas_equalTo(self);
|
||||
make.left.mas_equalTo(self).offset(12);
|
||||
make.right.mas_equalTo(self).offset(-12);
|
||||
}];
|
||||
[self.icon mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.bgView.mas_centerY);
|
||||
make.height.mas_equalTo(70);
|
||||
make.left.mas_equalTo(self.bgView.mas_left).offset(10);
|
||||
make.width.mas_equalTo(70);
|
||||
}];
|
||||
[self.nickName mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.icon.mas_right).offset(10);
|
||||
make.top.mas_equalTo(self.icon).offset(12);
|
||||
}];
|
||||
[self.uid mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.icon.mas_right).offset(10);
|
||||
make.top.mas_equalTo(self.nickName.mas_bottom).offset(15);
|
||||
}];
|
||||
[self.quDingButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self).offset(-15);
|
||||
make.centerY.mas_equalTo(self.bgView.mas_centerY);
|
||||
make.height.mas_equalTo(30);
|
||||
make.width.mas_equalTo(60);
|
||||
}];
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self);
|
||||
make.left.mas_equalTo(self.bgView).offset(13);
|
||||
make.right.mas_equalTo(self).offset(-13);
|
||||
make.height.mas_equalTo(1);
|
||||
}];
|
||||
//靓号
|
||||
self.liangView.hidden = YES;
|
||||
[self.liangView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.nickName);
|
||||
make.centerY.equalTo(self.uid);
|
||||
make.width.mas_equalTo(100);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
[self.typeImgV mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.nickName.mas_right).offset(5);
|
||||
make.centerY.equalTo(self.nickName);
|
||||
make.width.mas_equalTo(37);
|
||||
make.height.mas_equalTo(18);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
- (UIView *)bgView{
|
||||
if (!_bgView) {
|
||||
_bgView = [ControlCreator createView:nil rect:CGRectZero backguoundColor:[UIColor whiteColor]];
|
||||
_bgView.layer.cornerRadius = 7;
|
||||
_bgView.layer.shadowOffset = CGSizeMake(0,1);
|
||||
_bgView.layer.masksToBounds = NO;
|
||||
_bgView.layer.shadowColor = mainQianColor.CGColor;
|
||||
_bgView.layer.shadowOpacity = 0.5f;
|
||||
_bgView.hidden = YES;
|
||||
}
|
||||
return _bgView;
|
||||
}
|
||||
|
||||
- (UIImageView *)icon{
|
||||
if (!_icon) {
|
||||
_icon = [ControlCreator createImageView:self rect:CGRectMake(0, 0, 0, 0) imageName:@"default_userIcon" backguoundColor:MLControlsHuiColor];
|
||||
_icon.layer.masksToBounds = YES;
|
||||
_icon.layer.cornerRadius = 35;
|
||||
}
|
||||
return _icon;
|
||||
}
|
||||
- (UILabel *)nickName{
|
||||
if (!_nickName) {
|
||||
_nickName = [ControlCreator createLabel:self rect:CGRectZero text:@"" font:Font(14) color:mainViceColor backguoundColor:[UIColor clearColor] align:NSTextAlignmentLeft lines:1];
|
||||
}
|
||||
return _nickName;
|
||||
}
|
||||
- (UILabel *)uid{
|
||||
if (!_uid) {
|
||||
_uid = [ControlCreator createLabel:self rect:CGRectZero text:@"ID:" font:Font(12) color:mainQianColor backguoundColor:[UIColor clearColor] align:NSTextAlignmentLeft lines:1];
|
||||
}
|
||||
return _uid;
|
||||
}
|
||||
- (UIButton *)quDingButton{
|
||||
if (!_quDingButton) {
|
||||
_quDingButton = [ControlCreator createButton:self rect:CGRectZero text:@"" font:Font1(12) color:[UIColor whiteColor] backguoundColor:MLControlsColor imageName:@"" target:self action:@selector(quDingButtonClick:)];
|
||||
_quDingButton.layer.masksToBounds = YES;
|
||||
_quDingButton.layer.cornerRadius = 15;
|
||||
}
|
||||
return _quDingButton;
|
||||
}
|
||||
- (UIView *)lineView{
|
||||
if (!_lineView) {
|
||||
_lineView = [ControlCreator createView:nil rect:CGRectZero backguoundColor:MLControlsHuiColor];
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
- (LiangView *)liangView{
|
||||
if (!_liangView) {
|
||||
_liangView = [[NSBundle mainBundle] loadNibNamed:@"LiangView" owner:nil options:nil].lastObject;
|
||||
}
|
||||
return _liangView;
|
||||
}
|
||||
|
||||
- (UIImageView *)typeImgV {
|
||||
if (!_typeImgV) {
|
||||
_typeImgV = [ControlCreator createImageView:self rect:CGRectZero imageName:nil backguoundColor:nil];
|
||||
}
|
||||
return _typeImgV;
|
||||
}
|
||||
|
||||
@end
|
||||
34
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiModel.h
Executable file
34
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiModel.h
Executable file
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// MLRoomAdminModel.h
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by aa on 2019/7/10.
|
||||
// Copyright © 2019 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface BJRoomBaomaiModel : NSObject
|
||||
|
||||
|
||||
/*昵称*/
|
||||
@property(nonatomic, strong) NSString *nick_name;
|
||||
/*ID*/
|
||||
@property(nonatomic, strong) NSString *uid;
|
||||
/*靓号ID*/
|
||||
@property(nonatomic, strong) NSString *special_uid;
|
||||
/*头像*/
|
||||
@property(nonatomic, strong) NSString *head_pic;
|
||||
@property (nonatomic, strong) NSString *is_mic;
|
||||
/*申请上麦时间*/
|
||||
@property(nonatomic, strong) NSString *add_time;
|
||||
//自定义
|
||||
/**/
|
||||
//@property(nonatomic, assign) NSInteger type;
|
||||
|
||||
//前端自行添加
|
||||
@property (nonatomic, assign) BOOL is_admin;
|
||||
|
||||
@property (nonatomic, assign) NSInteger user_type;//1房主 2管理 3主持 5普通用户
|
||||
|
||||
@end
|
||||
19
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiModel.m
Executable file
19
SweetParty/主类/RCMic/Room/BaoMaiView/BJRoomBaomaiModel.m
Executable file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// MLRoomAdminModel.m
|
||||
// QiaoYuYueWan
|
||||
//
|
||||
// Created by aa on 2019/7/10.
|
||||
// Copyright © 2019 QiaoYuYueWan. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJRoomBaomaiModel.h"
|
||||
|
||||
@implementation BJRoomBaomaiModel
|
||||
|
||||
+ (NSDictionary *)mj_replacedKeyFromPropertyName{
|
||||
return @{
|
||||
// @"userID" : @"id",
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
||||
24
SweetParty/主类/RCMic/Room/Box/BJRoomExploreAlert.h
Executable file
24
SweetParty/主类/RCMic/Room/Box/BJRoomExploreAlert.h
Executable file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// WYY_BaoXiangView.h
|
||||
// miliao
|
||||
//
|
||||
// Created by 翟三美 on 2020/9/25.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RCMicRoomViewModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJRoomExploreAlert : UIView
|
||||
|
||||
+ (BJRoomExploreAlert *)initExploreWith:(RCMicRoomViewModel *)model;
|
||||
|
||||
/// show 出来
|
||||
- (void)showOnView:(nullable UIView *)parent;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
360
SweetParty/主类/RCMic/Room/Box/BJRoomExploreAlert.m
Executable file
360
SweetParty/主类/RCMic/Room/Box/BJRoomExploreAlert.m
Executable file
@@ -0,0 +1,360 @@
|
||||
//
|
||||
// WYY_BaoXiangView.m
|
||||
// miliao
|
||||
//
|
||||
// Created by 翟三美 on 2020/9/25.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJRoomExploreAlert.h"
|
||||
#import "BJBoxRankAlert.h"
|
||||
#import "BJBoxRecordAlert.h"
|
||||
#import "BJBoxRuleAlert.h"
|
||||
#import "BJBoxPoolAlert.h"
|
||||
#import "BJBoxResultAlert.h"
|
||||
#import "BJBoxAwardModel.h"
|
||||
#import "QiuQiuBoxGiftView.h"
|
||||
|
||||
@interface BJRoomExploreAlert ()
|
||||
|
||||
//普通,疯狂,背景图
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *back_bgImg;
|
||||
//背景view
|
||||
@property (weak, nonatomic) IBOutlet UIView *mainView;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *priceTipLab; //20探险币/次
|
||||
//1开
|
||||
@property (strong, nonatomic) IBOutlet UIButton *oneBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *oneCoinLab;
|
||||
//10开
|
||||
@property (strong, nonatomic) IBOutlet UIButton *tenBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *tenCoinLab;
|
||||
//100开
|
||||
@property (strong, nonatomic) IBOutlet UIButton *baiBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *baiCoinLab;
|
||||
//手气榜
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *shouqiImg;
|
||||
//规则说明
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *guizeImg;
|
||||
//中奖纪录
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *jiLuImg;
|
||||
//本期奖池
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *jiangChiImg;
|
||||
@property (weak, nonatomic) IBOutlet UIView *moneyBgView;
|
||||
//余额
|
||||
@property (strong, nonatomic) IBOutlet UILabel *moneyLab;
|
||||
//充值
|
||||
@property (weak, nonatomic) IBOutlet UIButton *leftBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *midBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *rightBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIView *giftBgView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *startBtn;
|
||||
|
||||
@property (nonatomic, strong) RCMicRoomViewModel *viewModel;
|
||||
|
||||
@property(nonatomic, assign) NSInteger boxType;
|
||||
@property(nonatomic, assign) NSInteger currentTimes; //当前要抽的次数
|
||||
@property(nonatomic, strong) BJBoxResultAlert *resultView;
|
||||
@property(nonatomic, strong) NSArray *listModel;
|
||||
|
||||
@property(nonatomic, assign) NSInteger coin_value_1;
|
||||
@property(nonatomic, assign) NSInteger coin_value_2;
|
||||
|
||||
@property (nonatomic, strong) QiuQiuBoxGiftView *giftView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BJRoomExploreAlert
|
||||
|
||||
+ (BJRoomExploreAlert *)initExploreWith:(RCMicRoomViewModel *)model {
|
||||
|
||||
BJRoomExploreAlert *view = LoadNib(NSStringFromClass(BJRoomExploreAlert.class));
|
||||
view.frame = UIScreen.mainScreen.bounds;
|
||||
view.backgroundColor = HEXCOLORA(0x000000, 0.3);
|
||||
view.viewModel = model;
|
||||
|
||||
[view initSubView];
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
- (void)initSubView {
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
|
||||
self.currentTimes = 1;
|
||||
_boxType = 3;
|
||||
|
||||
_coin_value_1 = BJPassData.sharedBJPassData.boxValue_3;
|
||||
_coin_value_2 = BJPassData.sharedBJPassData.boxValue_4;
|
||||
|
||||
[self changeBoxUIBaseType];
|
||||
[self changeLabPrice];
|
||||
|
||||
[self.giftBgView addSubview:self.giftView];
|
||||
[self.giftView onUpdateQiuQiuBoxGiftView:_boxType];
|
||||
|
||||
//手气榜
|
||||
[self.shouqiImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:603];
|
||||
}];
|
||||
//规则说明
|
||||
[self.guizeImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:600];
|
||||
}];
|
||||
//本期奖池
|
||||
[self.jiangChiImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:601];
|
||||
}];
|
||||
//中奖纪录
|
||||
[self.jiLuImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:602];
|
||||
}];
|
||||
|
||||
//获取宝箱信息,余额情况
|
||||
[self loadData];
|
||||
}
|
||||
|
||||
-(void)changeLabPrice {
|
||||
NSInteger onePrice = _coin_value_1;
|
||||
if (self.boxType == 3) {
|
||||
onePrice = _coin_value_1;
|
||||
}else if(self.boxType == 4) {
|
||||
onePrice = _coin_value_2;
|
||||
}
|
||||
self.oneCoinLab.text = [NSString stringWithFormat:@"%ld金币", onePrice];
|
||||
self.tenCoinLab.text = [NSString stringWithFormat:@"%ld金币", onePrice*10];
|
||||
self.baiCoinLab.text = [NSString stringWithFormat:@"%ld金币", onePrice*100];
|
||||
|
||||
_priceTipLab.text = [NSString stringWithFormat:@"%ld金币/次", (long)onePrice];
|
||||
}
|
||||
|
||||
- (void)loadData
|
||||
{
|
||||
NSDictionary *dict = @{};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/user/get_user_money" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
NSString *moneyText = [result.content safeStringForKey:@"integral"];
|
||||
self.moneyLab.text = NSStringFormat(@"%@", moneyText);
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - public
|
||||
|
||||
- (void)showOnView:(nullable UIView *)parent {
|
||||
if (parent) {
|
||||
[parent addSubview:self];
|
||||
}else {
|
||||
[MainWindow() addSubview:self];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (void)changeBoxUIBaseType {
|
||||
if(_boxType == 3) {
|
||||
_back_bgImg.image = ImageNamed(@"explore_bg");
|
||||
|
||||
[self.oneBtn setImage:ImageNamed(@"explore_1_ss") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"explore_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"explore_100") forState:UIControlStateNormal];
|
||||
|
||||
self.shouqiImg.image = ImageNamed(@"explore_rank");
|
||||
self.guizeImg.image = ImageNamed(@"explore_rule");
|
||||
self.jiLuImg.image = ImageNamed(@"explore_record");
|
||||
self.jiangChiImg.image = ImageNamed(@"explore_pool");
|
||||
|
||||
}else if(_boxType == 4) {
|
||||
_back_bgImg.image = ImageNamed(@"explore_bg_adv");
|
||||
|
||||
[self.oneBtn setImage:ImageNamed(@"explore_1_ss_gao") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"explore_10_gao") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"explore_100_gao") forState:UIControlStateNormal];
|
||||
|
||||
self.shouqiImg.image = ImageNamed(@"explore_rank_gao");
|
||||
self.guizeImg.image = ImageNamed(@"explore_rule_gao");
|
||||
self.jiLuImg.image = ImageNamed(@"explore_record_gao");
|
||||
self.jiangChiImg.image = ImageNamed(@"explore_pool_gao");
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)dismissAction:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)leftClickedButton:(id)sender {
|
||||
_boxType = 3;
|
||||
_currentTimes = 1;
|
||||
[self changeBoxUIBaseType];
|
||||
[self changeLabPrice];
|
||||
[self.giftView onUpdateQiuQiuBoxGiftView:_boxType];
|
||||
}
|
||||
- (IBAction)centerClickedButton:(id)sender {
|
||||
_boxType = 4;
|
||||
_currentTimes = 1;
|
||||
[self changeBoxUIBaseType];
|
||||
[self changeLabPrice];
|
||||
[self.giftView onUpdateQiuQiuBoxGiftView:_boxType];
|
||||
}
|
||||
- (IBAction)rightClickedButton:(id)sender {
|
||||
_boxType = 3;
|
||||
_currentTimes = 1;
|
||||
[self changeBoxUIBaseType];
|
||||
[self changeLabPrice];
|
||||
}
|
||||
|
||||
#pragma mark - 4个按钮
|
||||
- (void)buttonClickMethod:(NSInteger)tag {
|
||||
switch (tag) {
|
||||
case 600:{
|
||||
//说明
|
||||
BJBoxRuleAlert *view = [[BJBoxRuleAlert alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 601:{
|
||||
BJBoxPoolAlert *view = [[BJBoxPoolAlert alloc] initWithFrame:CGRectZero];
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 602:{
|
||||
//中奖记录
|
||||
BJBoxRecordAlert *view = [[BJBoxRecordAlert alloc] initWithFrame:CGRectZero];
|
||||
view.frame = UIScreen.mainScreen.bounds;
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 603:{
|
||||
BJBoxRankAlert *view = [[BJBoxRankAlert alloc] initWithFrame:CGRectZero];
|
||||
[view showOnView:UIViewController.currentViewController.view roomId:_viewModel.roomInfo.roomId WithType:_boxType];
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 3 个开奖按钮
|
||||
|
||||
- (IBAction)oneButtonClick:(UIButton *)sender {
|
||||
self.currentTimes = 1;
|
||||
|
||||
if (_boxType == 3) {
|
||||
[self.oneBtn setImage:ImageNamed(@"explore_1_ss") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"explore_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"explore_100") forState:UIControlStateNormal];
|
||||
}else {
|
||||
[self.oneBtn setImage:ImageNamed(@"explore_1_ss_gao") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"explore_10_gao") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"explore_100_gao") forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
// [self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
- (IBAction)tenButtonClick:(UIButton *)sender {
|
||||
self.currentTimes = 10;
|
||||
|
||||
if (_boxType == 3) {
|
||||
[self.oneBtn setImage:ImageNamed(@"explore_1") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"explore_10_ss") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"explore_100") forState:UIControlStateNormal];
|
||||
}else {
|
||||
[self.oneBtn setImage:ImageNamed(@"explore_1_gao") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"explore_10_ss_gao") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"explore_100_gao") forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
// [self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
- (IBAction)baiButtonClick:(UIButton *)sender {
|
||||
self.currentTimes = 50;
|
||||
|
||||
if (_boxType == 3) {
|
||||
[self.oneBtn setImage:ImageNamed(@"explore_1") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"explore_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"explore_100_ss") forState:UIControlStateNormal];
|
||||
}else {
|
||||
[self.oneBtn setImage:ImageNamed(@"explore_1_gao") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"explore_10_gao") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"explore_100_ss_gao") forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
// [self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
|
||||
- (IBAction)onStart:(id)sender {
|
||||
[self openBoxWithTimes:self.currentTimes];
|
||||
self.startBtn.userInteractionEnabled = NO;
|
||||
}
|
||||
|
||||
- (void)openBoxWithTimes:(NSInteger )keysNum {
|
||||
self.resultView.hidden = YES;
|
||||
NSDictionary *dict = @{@"open_num":@(keysNum),
|
||||
@"bs":@(0),
|
||||
@"tid":@(_boxType).stringValue,
|
||||
@"rid":C_string(_viewModel.roomInfo.roomId)};
|
||||
|
||||
[RCMicHTTP postWithURLString:@"/api/box/open_box" parameters:dict response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
//奖品、价值、余额
|
||||
NSString *leftMoney = [result.content safeStringForKey:@"user_money"];
|
||||
self.moneyLab.text = NSStringFormat(@"%@", leftMoney);
|
||||
|
||||
NSArray *giftArr = [BJBoxAwardModel mj_objectArrayWithKeyValuesArray:result.content[@"win_gift_list"]];
|
||||
BJBoxAwardModel *bigestObj = giftArr.firstObject;
|
||||
for (BJBoxAwardModel *obj in giftArr) {
|
||||
if ([obj.gift_price integerValue] > [bigestObj.gift_price integerValue]) {
|
||||
bigestObj = obj;
|
||||
}
|
||||
}
|
||||
WEAK_SELF
|
||||
[self.giftView onStartWithGid:bigestObj.gid endBlock:^{
|
||||
weakSelf.resultView.hidden = NO;
|
||||
[weakSelf.resultView showOnView:weakSelf WithResult:result.content withPara:dict withType:weakSelf.boxType];
|
||||
|
||||
weakSelf.startBtn.userInteractionEnabled = YES;
|
||||
}];
|
||||
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
self.startBtn.userInteractionEnabled = YES;
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
self.startBtn.userInteractionEnabled = YES;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - laze
|
||||
|
||||
- (BJBoxResultAlert *)resultView{
|
||||
if (!_resultView) {
|
||||
_resultView = [[BJBoxResultAlert alloc] initWithFrame:CGRectZero];
|
||||
WEAK_SELF
|
||||
_resultView.refreshCoinBlock = ^(NSString * _Nonnull leftMoney) {
|
||||
weakSelf.moneyLab.text = NSStringFormat(@"%@", leftMoney);
|
||||
};
|
||||
_resultView.tryAgainBlock = ^{
|
||||
[weakSelf openBoxWithTimes:weakSelf.currentTimes];
|
||||
};
|
||||
}
|
||||
return _resultView;
|
||||
}
|
||||
|
||||
- (QiuQiuBoxGiftView *)giftView {
|
||||
if (!_giftView) {
|
||||
_giftView = [[QiuQiuBoxGiftView alloc] initWithFrame:self.giftBgView.bounds];
|
||||
}
|
||||
return _giftView;
|
||||
}
|
||||
|
||||
@end
|
||||
330
SweetParty/主类/RCMic/Room/Box/BJRoomExploreAlert.xib
Executable file
330
SweetParty/主类/RCMic/Room/Box/BJRoomExploreAlert.xib
Executable file
@@ -0,0 +1,330 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina5_9" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
||||
<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="BJRoomExploreAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tje-Pr-Pb3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<action selector="dismissAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="cwK-Qt-7XF"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DE3-Zd-f02">
|
||||
<rect key="frame" x="0.0" y="324" width="375" height="450"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="explore_bg" translatesAutoresizingMaskIntoConstraints="NO" id="K0N-Ur-ZOH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="450"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EHS-KM-U9h" userLabel="ten">
|
||||
<rect key="frame" x="130" y="364" width="115" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C3B-bm-XNo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="115" height="50"/>
|
||||
<state key="normal" image="explore_10"/>
|
||||
<connections>
|
||||
<action selector="tenButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="eCD-N9-Vmw"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="扭十次" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nEO-IT-sI6">
|
||||
<rect key="frame" x="36" y="12" width="43" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="nEO-IT-sI6" firstAttribute="centerX" secondItem="EHS-KM-U9h" secondAttribute="centerX" id="GkC-tH-inZ"/>
|
||||
<constraint firstItem="C3B-bm-XNo" firstAttribute="top" secondItem="EHS-KM-U9h" secondAttribute="top" id="QcW-nY-yJU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="C3B-bm-XNo" secondAttribute="trailing" id="WwI-9a-0QY"/>
|
||||
<constraint firstAttribute="bottom" secondItem="C3B-bm-XNo" secondAttribute="bottom" id="Z28-aO-mdY"/>
|
||||
<constraint firstItem="nEO-IT-sI6" firstAttribute="top" secondItem="EHS-KM-U9h" secondAttribute="top" constant="12" id="ll3-b0-yjG"/>
|
||||
<constraint firstItem="C3B-bm-XNo" firstAttribute="leading" secondItem="EHS-KM-U9h" secondAttribute="leading" id="sKC-3S-cSK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DW0-CQ-NPh" userLabel="bai">
|
||||
<rect key="frame" x="230" y="364" width="115" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7ed-gE-Hqb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="115" height="50"/>
|
||||
<state key="normal" image="explore_100"/>
|
||||
<connections>
|
||||
<action selector="baiButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="c95-qW-pSH"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="扭百次" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rhd-3k-g63">
|
||||
<rect key="frame" x="36" y="12" width="43" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="rhd-3k-g63" firstAttribute="top" secondItem="DW0-CQ-NPh" secondAttribute="top" constant="12" id="Dd0-vE-gko"/>
|
||||
<constraint firstItem="rhd-3k-g63" firstAttribute="centerX" secondItem="DW0-CQ-NPh" secondAttribute="centerX" id="F0U-Nj-iWv"/>
|
||||
<constraint firstAttribute="trailing" secondItem="7ed-gE-Hqb" secondAttribute="trailing" id="JVd-f7-XgV"/>
|
||||
<constraint firstAttribute="bottom" secondItem="7ed-gE-Hqb" secondAttribute="bottom" id="M4h-2i-OQy"/>
|
||||
<constraint firstItem="7ed-gE-Hqb" firstAttribute="top" secondItem="DW0-CQ-NPh" secondAttribute="top" id="Mxs-Xf-pUx"/>
|
||||
<constraint firstItem="7ed-gE-Hqb" firstAttribute="leading" secondItem="DW0-CQ-NPh" secondAttribute="leading" id="bkL-OW-Fcy"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3wf-If-kn8" userLabel="one">
|
||||
<rect key="frame" x="30" y="364" width="115" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oGl-sc-W6c">
|
||||
<rect key="frame" x="0.0" y="0.0" width="115" height="50"/>
|
||||
<state key="normal" image="explore_10_ss"/>
|
||||
<connections>
|
||||
<action selector="oneButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="y4d-6t-IwJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="扭一次" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n3g-rH-4Ad">
|
||||
<rect key="frame" x="36" y="12" width="43" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="oGl-sc-W6c" secondAttribute="bottom" id="aop-mt-wvQ"/>
|
||||
<constraint firstItem="oGl-sc-W6c" firstAttribute="leading" secondItem="3wf-If-kn8" secondAttribute="leading" id="b5H-qb-BhR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oGl-sc-W6c" secondAttribute="trailing" id="iHe-vk-UDi"/>
|
||||
<constraint firstItem="oGl-sc-W6c" firstAttribute="top" secondItem="3wf-If-kn8" secondAttribute="top" id="jo6-4W-bp5"/>
|
||||
<constraint firstItem="n3g-rH-4Ad" firstAttribute="centerX" secondItem="3wf-If-kn8" secondAttribute="centerX" id="svp-g1-3HU"/>
|
||||
<constraint firstItem="n3g-rH-4Ad" firstAttribute="top" secondItem="3wf-If-kn8" secondAttribute="top" constant="12" id="xFO-DC-jtX"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" tag="600" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="explore_record" translatesAutoresizingMaskIntoConstraints="NO" id="hAG-YO-f3q">
|
||||
<rect key="frame" x="342" y="137" width="31" height="47"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" tag="602" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="explore_rule" translatesAutoresizingMaskIntoConstraints="NO" id="8IQ-PT-HYQ">
|
||||
<rect key="frame" x="342" y="78" width="31" height="47"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4js-Qv-ZxA">
|
||||
<rect key="frame" x="47.666666666666657" y="70" width="140" height="60"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<action selector="leftClickedButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="Qdx-no-05Z"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oCw-hu-dLV">
|
||||
<rect key="frame" x="187.66666666666663" y="70" width="140" height="60"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="140" id="8Qp-KX-wea"/>
|
||||
<constraint firstAttribute="height" constant="60" id="QrD-AX-qOS"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<action selector="centerClickedButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="b95-pz-aoY"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ag1-Kv-n68">
|
||||
<rect key="frame" x="247.66666666666663" y="20" width="120" height="60"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<action selector="centerClickedButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="uX2-tJ-BJ9"/>
|
||||
<action selector="rightClickedButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="0Rn-Nv-gxz"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" tag="601" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="explore_pool" translatesAutoresizingMaskIntoConstraints="NO" id="Jnr-RY-Dyg">
|
||||
<rect key="frame" x="342" y="255" width="31" height="47"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4F7-ei-daQ" userLabel="moneyBgView">
|
||||
<rect key="frame" x="139.66666666666666" y="120" width="96" height="20"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuan_coin" translatesAutoresizingMaskIntoConstraints="NO" id="abb-j7-hNQ">
|
||||
<rect key="frame" x="4" y="4" width="11" height="12"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99999999" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qxC-tO-RS5">
|
||||
<rect key="frame" x="23" y="2.6666666666666847" width="63" height="14.666666666666664"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.48627450980392156" green="0.39215686274509803" blue="0.24705882352941178" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="qxC-tO-RS5" firstAttribute="leading" secondItem="4F7-ei-daQ" secondAttribute="leading" constant="23" id="FDW-9h-F8g"/>
|
||||
<constraint firstAttribute="height" constant="20" id="MHg-Rq-3na"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qxC-tO-RS5" secondAttribute="trailing" constant="10" id="bDa-8X-3Sv"/>
|
||||
<constraint firstItem="abb-j7-hNQ" firstAttribute="centerY" secondItem="4F7-ei-daQ" secondAttribute="centerY" id="lI8-Yh-EHN"/>
|
||||
<constraint firstItem="abb-j7-hNQ" firstAttribute="leading" secondItem="4F7-ei-daQ" secondAttribute="leading" constant="4" id="lpG-QQ-feo"/>
|
||||
<constraint firstItem="qxC-tO-RS5" firstAttribute="centerY" secondItem="4F7-ei-daQ" secondAttribute="centerY" id="uac-yn-t5z"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="1" green="0.62745098039215685" blue="0.28235294117647058" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ji9-4f-xjg">
|
||||
<rect key="frame" x="335" y="60" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="eJJ-MA-eU3"/>
|
||||
<constraint firstAttribute="height" constant="30" id="n1r-Eb-ufG"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="zhuan_close"/>
|
||||
<connections>
|
||||
<action selector="dismissAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="PtA-Rb-z8G"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" tag="603" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="explore_rank" translatesAutoresizingMaskIntoConstraints="NO" id="SQg-28-k7S">
|
||||
<rect key="frame" x="342" y="196" width="31" height="47"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t62-w2-SsU" userLabel="moneyBgView">
|
||||
<rect key="frame" x="146" y="414" width="83" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99999999" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RDB-c4-S2h">
|
||||
<rect key="frame" x="10" y="2.6666666666666279" width="63" height="14.666666666666664"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.48627450979999998" green="0.3921568627" blue="0.2470588235" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="RDB-c4-S2h" firstAttribute="leading" secondItem="t62-w2-SsU" secondAttribute="leading" constant="10" id="3XU-Ou-E9g"/>
|
||||
<constraint firstAttribute="height" constant="20" id="CEl-La-nep"/>
|
||||
<constraint firstAttribute="trailing" secondItem="RDB-c4-S2h" secondAttribute="trailing" constant="10" id="JWb-ks-HlV"/>
|
||||
<constraint firstItem="RDB-c4-S2h" firstAttribute="centerY" secondItem="t62-w2-SsU" secondAttribute="centerY" id="ucj-48-JTo"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="1" green="0.62745098040000002" blue="0.28235294119999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="10"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iab-P6-0rE">
|
||||
<rect key="frame" x="52.333333333333343" y="148.33333333333331" width="278" height="212"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="278" id="MNw-Gg-zCf"/>
|
||||
<constraint firstAttribute="height" constant="212" id="uav-uy-bCK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bak-sJ-Ixq">
|
||||
<rect key="frame" x="126.66666666666669" y="223.66666666666663" width="129" height="61"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="explore_start"/>
|
||||
<connections>
|
||||
<action selector="onStart:" destination="iN0-l3-epB" eventType="touchUpInside" id="c8F-GR-Axx"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Jnr-RY-Dyg" firstAttribute="centerX" secondItem="8IQ-PT-HYQ" secondAttribute="centerX" id="0z7-rm-jXt"/>
|
||||
<constraint firstAttribute="width" secondItem="DE3-Zd-f02" secondAttribute="height" multiplier="375:450" id="4Tx-Tl-MIU"/>
|
||||
<constraint firstItem="K0N-Ur-ZOH" firstAttribute="top" secondItem="DE3-Zd-f02" secondAttribute="top" id="5Gn-po-l9K"/>
|
||||
<constraint firstItem="4js-Qv-ZxA" firstAttribute="height" secondItem="oCw-hu-dLV" secondAttribute="height" id="5wZ-Vn-0Io"/>
|
||||
<constraint firstItem="SQg-28-k7S" firstAttribute="centerX" secondItem="8IQ-PT-HYQ" secondAttribute="centerX" id="C62-Aw-kM6"/>
|
||||
<constraint firstItem="hAG-YO-f3q" firstAttribute="centerX" secondItem="8IQ-PT-HYQ" secondAttribute="centerX" id="FJq-go-oJi"/>
|
||||
<constraint firstItem="4js-Qv-ZxA" firstAttribute="width" secondItem="oCw-hu-dLV" secondAttribute="width" id="Hef-l1-aaK"/>
|
||||
<constraint firstItem="4F7-ei-daQ" firstAttribute="top" secondItem="DE3-Zd-f02" secondAttribute="top" constant="120" id="IEy-E4-eTb"/>
|
||||
<constraint firstItem="oCw-hu-dLV" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" constant="70" id="Ii9-kx-fcK"/>
|
||||
<constraint firstAttribute="bottom" secondItem="EHS-KM-U9h" secondAttribute="bottom" constant="36" id="LLO-fF-FAL"/>
|
||||
<constraint firstItem="hAG-YO-f3q" firstAttribute="top" secondItem="8IQ-PT-HYQ" secondAttribute="bottom" constant="12" id="MfH-nG-oc8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Ji9-4f-xjg" secondAttribute="trailing" constant="10" id="NJ9-fy-ODV"/>
|
||||
<constraint firstItem="4F7-ei-daQ" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" id="NvY-Ra-YZV"/>
|
||||
<constraint firstItem="EHS-KM-U9h" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" id="QOY-GS-UXm"/>
|
||||
<constraint firstItem="iab-P6-0rE" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" multiplier="1.02" id="U5P-aE-BcI"/>
|
||||
<constraint firstItem="EHS-KM-U9h" firstAttribute="leading" secondItem="3wf-If-kn8" secondAttribute="trailing" constant="-15" id="VtB-QP-W96"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8IQ-PT-HYQ" secondAttribute="trailing" constant="2" id="WVV-I5-bG0"/>
|
||||
<constraint firstAttribute="trailing" secondItem="K0N-Ur-ZOH" secondAttribute="trailing" id="XGG-XG-1r4"/>
|
||||
<constraint firstItem="oCw-hu-dLV" firstAttribute="leading" secondItem="4js-Qv-ZxA" secondAttribute="trailing" id="c69-xe-VO0"/>
|
||||
<constraint firstItem="DW0-CQ-NPh" firstAttribute="centerY" secondItem="3wf-If-kn8" secondAttribute="centerY" id="d98-2U-zJ2"/>
|
||||
<constraint firstItem="DW0-CQ-NPh" firstAttribute="leading" secondItem="EHS-KM-U9h" secondAttribute="trailing" constant="-15" id="fOH-Oy-BUF"/>
|
||||
<constraint firstItem="EHS-KM-U9h" firstAttribute="centerY" secondItem="3wf-If-kn8" secondAttribute="centerY" id="fi8-4D-VOi"/>
|
||||
<constraint firstItem="t62-w2-SsU" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" id="kvQ-Ns-Hlz"/>
|
||||
<constraint firstItem="bak-sJ-Ixq" firstAttribute="centerY" secondItem="iab-P6-0rE" secondAttribute="centerY" id="lCb-zl-ioR"/>
|
||||
<constraint firstItem="Ji9-4f-xjg" firstAttribute="top" secondItem="DE3-Zd-f02" secondAttribute="top" constant="60" id="mVy-Db-Xmi"/>
|
||||
<constraint firstItem="K0N-Ur-ZOH" firstAttribute="leading" secondItem="DE3-Zd-f02" secondAttribute="leading" id="p43-Hs-uXk"/>
|
||||
<constraint firstItem="4js-Qv-ZxA" firstAttribute="centerY" secondItem="oCw-hu-dLV" secondAttribute="centerY" id="tPU-9V-YiR"/>
|
||||
<constraint firstItem="oCw-hu-dLV" firstAttribute="top" secondItem="DE3-Zd-f02" secondAttribute="top" constant="70" id="tpQ-Pi-cSA"/>
|
||||
<constraint firstItem="t62-w2-SsU" firstAttribute="top" secondItem="EHS-KM-U9h" secondAttribute="bottom" id="txC-vS-OJf"/>
|
||||
<constraint firstItem="Jnr-RY-Dyg" firstAttribute="top" secondItem="SQg-28-k7S" secondAttribute="bottom" constant="12" id="uxI-dk-jHH"/>
|
||||
<constraint firstItem="SQg-28-k7S" firstAttribute="top" secondItem="hAG-YO-f3q" secondAttribute="bottom" constant="12" id="wZr-db-HsH"/>
|
||||
<constraint firstItem="iab-P6-0rE" firstAttribute="centerY" secondItem="DE3-Zd-f02" secondAttribute="centerY" multiplier="1.13" id="xnR-ZU-zvd"/>
|
||||
<constraint firstItem="8IQ-PT-HYQ" firstAttribute="top" secondItem="DE3-Zd-f02" secondAttribute="top" constant="78" id="y36-vU-tfJ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="K0N-Ur-ZOH" secondAttribute="bottom" id="zaM-3T-ixx"/>
|
||||
<constraint firstItem="bak-sJ-Ixq" firstAttribute="centerX" secondItem="iab-P6-0rE" secondAttribute="centerX" id="znT-ov-Abs"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="tje-Pr-Pb3" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="1dS-AR-jhe"/>
|
||||
<constraint firstItem="DE3-Zd-f02" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="A12-yb-tJ9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DE3-Zd-f02" secondAttribute="bottom" constant="38" id="COA-zy-jwl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tje-Pr-Pb3" secondAttribute="trailing" id="Fo0-tj-8JV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DE3-Zd-f02" secondAttribute="trailing" id="Iil-nj-nGk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="tje-Pr-Pb3" secondAttribute="bottom" id="O2m-WD-n3u"/>
|
||||
<constraint firstItem="tje-Pr-Pb3" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="s8f-io-j3G"/>
|
||||
</constraints>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="back_bgImg" destination="K0N-Ur-ZOH" id="WEW-e0-Fh7"/>
|
||||
<outlet property="baiBtn" destination="7ed-gE-Hqb" id="Tf7-Qs-QpP"/>
|
||||
<outlet property="giftBgView" destination="iab-P6-0rE" id="BC1-g9-DDc"/>
|
||||
<outlet property="guizeImg" destination="8IQ-PT-HYQ" id="Lyh-BD-prg"/>
|
||||
<outlet property="jiLuImg" destination="hAG-YO-f3q" id="yTW-YJ-QeE"/>
|
||||
<outlet property="jiangChiImg" destination="Jnr-RY-Dyg" id="dcx-rW-hSW"/>
|
||||
<outlet property="leftBtn" destination="4js-Qv-ZxA" id="fdY-Vf-jVl"/>
|
||||
<outlet property="mainView" destination="DE3-Zd-f02" id="CDi-as-t3E"/>
|
||||
<outlet property="midBtn" destination="oCw-hu-dLV" id="vqB-KT-ByC"/>
|
||||
<outlet property="moneyBgView" destination="4F7-ei-daQ" id="bf5-Y0-p5c"/>
|
||||
<outlet property="moneyLab" destination="qxC-tO-RS5" id="JUE-OU-ad1"/>
|
||||
<outlet property="oneBtn" destination="oGl-sc-W6c" id="3bH-kG-r6b"/>
|
||||
<outlet property="priceTipLab" destination="RDB-c4-S2h" id="Le9-gA-hNq"/>
|
||||
<outlet property="rightBtn" destination="ag1-Kv-n68" id="afF-AQ-4hc"/>
|
||||
<outlet property="shouqiImg" destination="SQg-28-k7S" id="5h9-xg-H8Q"/>
|
||||
<outlet property="startBtn" destination="bak-sJ-Ixq" id="QLZ-hz-shs"/>
|
||||
<outlet property="tenBtn" destination="C3B-bm-XNo" id="69U-wn-aVn"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="48.799999999999997" y="54.679802955665025"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="explore_10" width="115" height="50"/>
|
||||
<image name="explore_100" width="115" height="50"/>
|
||||
<image name="explore_10_ss" width="115" height="50"/>
|
||||
<image name="explore_bg" width="375" height="450.5"/>
|
||||
<image name="explore_pool" width="31" height="47"/>
|
||||
<image name="explore_rank" width="31" height="47"/>
|
||||
<image name="explore_record" width="31" height="47"/>
|
||||
<image name="explore_rule" width="31" height="47"/>
|
||||
<image name="explore_start" width="129" height="61"/>
|
||||
<image name="zhuan_close" width="21" height="21"/>
|
||||
<image name="zhuan_coin" width="11" height="12"/>
|
||||
</resources>
|
||||
</document>
|
||||
24
SweetParty/主类/RCMic/Room/Box/BjRoomBoxAlert.h
Executable file
24
SweetParty/主类/RCMic/Room/Box/BjRoomBoxAlert.h
Executable file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// WYY_BaoXiangView.h
|
||||
// miliao
|
||||
//
|
||||
// Created by 翟三美 on 2020/9/25.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RCMicRoomViewModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BjRoomBoxAlert : UIView
|
||||
|
||||
+ (BjRoomBoxAlert *)initBoxWith:(RCMicRoomViewModel *)model;
|
||||
|
||||
/// show 出来
|
||||
- (void)showOnView:(nullable UIView *)parent;
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
348
SweetParty/主类/RCMic/Room/Box/BjRoomBoxAlert.m
Executable file
348
SweetParty/主类/RCMic/Room/Box/BjRoomBoxAlert.m
Executable file
@@ -0,0 +1,348 @@
|
||||
//
|
||||
// WYY_BaoXiangView.m
|
||||
// miliao
|
||||
//
|
||||
// Created by 翟三美 on 2020/9/25.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BjRoomBoxAlert.h"
|
||||
#import "BJBoxRankAlert.h"
|
||||
#import "BJBoxRecordAlert.h"
|
||||
#import "BJBoxRuleAlert.h"
|
||||
#import "BJBoxPoolAlert.h"
|
||||
#import "BJBoxResultAlert.h"
|
||||
#import "BJBoxAwardModel.h"
|
||||
#import "SPOpenConfirmAlert.h"
|
||||
|
||||
@interface BjRoomBoxAlert ()
|
||||
|
||||
//普通,疯狂,背景图
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *back_bgImg;
|
||||
//背景view
|
||||
@property (weak, nonatomic) IBOutlet UIView *mainView;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *priceTipLab; //20探险币/次
|
||||
//1开
|
||||
@property (strong, nonatomic) IBOutlet UIButton *oneBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *oneCoinLab;
|
||||
//10开
|
||||
@property (strong, nonatomic) IBOutlet UIButton *tenBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *tenCoinLab;
|
||||
//100开
|
||||
@property (strong, nonatomic) IBOutlet UIButton *baiBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *baiCoinLab;
|
||||
//手气榜
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *shouqiImg;
|
||||
//规则说明
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *guizeImg;
|
||||
//中奖纪录
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *jiLuImg;
|
||||
//本期奖池
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *jiangChiImg;
|
||||
@property (weak, nonatomic) IBOutlet UIView *moneyBgView;
|
||||
//余额
|
||||
@property (strong, nonatomic) IBOutlet UILabel *moneyLab;
|
||||
//充值
|
||||
@property (weak, nonatomic) IBOutlet UIButton *leftBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *midBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *rightBtn;
|
||||
|
||||
@property (nonatomic, strong) RCMicRoomViewModel *viewModel;
|
||||
|
||||
@property(nonatomic, assign) NSInteger boxType; // 1金 2钻 3sliver
|
||||
@property(nonatomic, assign) NSInteger currentTimes; //当前要抽的次数
|
||||
@property(nonatomic, strong) BJBoxResultAlert *resultView;
|
||||
@property(nonatomic, strong) NSArray *listModel; /*结果数据源*/
|
||||
|
||||
@property(nonatomic, assign) NSInteger coin_value_1;
|
||||
@property(nonatomic, assign) NSInteger coin_value_2;
|
||||
@property(nonatomic, assign) NSInteger coin_value_3;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BjRoomBoxAlert
|
||||
|
||||
+ (BjRoomBoxAlert *)initBoxWith:(RCMicRoomViewModel *)model {
|
||||
|
||||
BjRoomBoxAlert *view = LoadNib(NSStringFromClass(BjRoomBoxAlert.class));
|
||||
view.frame = UIScreen.mainScreen.bounds;
|
||||
view.backgroundColor = HEXCOLORA(0x000000, 0.3);
|
||||
view.viewModel = model;
|
||||
|
||||
[view initSubView];
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
- (void)initSubView {
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
|
||||
self.currentTimes = 1;
|
||||
_boxType = 1;
|
||||
|
||||
_coin_value_1 = BJPassData.sharedBJPassData.boxValue_1;
|
||||
_coin_value_2 = BJPassData.sharedBJPassData.boxValue_2;
|
||||
_coin_value_3 = BJPassData.sharedBJPassData.boxValue_3;
|
||||
|
||||
[self changeBoxUIBaseType];
|
||||
[self changeLabPrice];
|
||||
|
||||
//手气榜
|
||||
[self.shouqiImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:603];
|
||||
}];
|
||||
//规则说明
|
||||
[self.guizeImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:600];
|
||||
}];
|
||||
//本期奖池
|
||||
[self.jiangChiImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:601];
|
||||
}];
|
||||
//中奖纪录
|
||||
[self.jiLuImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:602];
|
||||
}];
|
||||
|
||||
//获取宝箱信息,余额情况
|
||||
[self loadData];
|
||||
}
|
||||
|
||||
-(void)changeLabPrice {
|
||||
NSInteger onePrice = _coin_value_1;
|
||||
if (self.boxType == 1) {
|
||||
onePrice = _coin_value_1;
|
||||
}else if(self.boxType == 2) {
|
||||
onePrice = _coin_value_2;
|
||||
}else if(self.boxType == 3) {
|
||||
onePrice = _coin_value_3;
|
||||
}
|
||||
self.oneCoinLab.text = [NSString stringWithFormat:@"%ld金币", onePrice];
|
||||
self.tenCoinLab.text = [NSString stringWithFormat:@"%ld金币", onePrice*10];
|
||||
self.baiCoinLab.text = [NSString stringWithFormat:@"%ld金币", onePrice*100];
|
||||
|
||||
_priceTipLab.text = [NSString stringWithFormat:@"%ld金币/次,连抽几率更高", (long)onePrice];
|
||||
}
|
||||
|
||||
- (void)loadData
|
||||
{
|
||||
NSDictionary *dict = @{};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/user/get_user_money" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
NSString *moneyText = [result.content safeStringForKey:@"integral"];
|
||||
self.moneyLab.text = NSStringFormat(@"%@", moneyText);
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - public
|
||||
|
||||
- (void)showOnView:(nullable UIView *)parent {
|
||||
if (parent) {
|
||||
[parent addSubview:self];
|
||||
}else {
|
||||
[MainWindow() addSubview:self];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (void)changeBoxUIBaseType {
|
||||
if(_boxType == 1) {
|
||||
_back_bgImg.image = ImageNamed(@"box_cover_1");
|
||||
|
||||
[self.oneBtn setImage:ImageNamed(@"box_1_s") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_100") forState:UIControlStateNormal];
|
||||
}else if(_boxType == 2) {
|
||||
_back_bgImg.image = ImageNamed(@"box_cover_2");
|
||||
|
||||
[self.oneBtn setImage:ImageNamed(@"box_2_1_s") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_2_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_2_100") forState:UIControlStateNormal];
|
||||
}else if(_boxType == 3) {
|
||||
_back_bgImg.image = ImageNamed(@"box_cover_3");
|
||||
|
||||
[self.oneBtn setImage:ImageNamed(@"box_3_1_s") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_3_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_3_100") forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)dismissAction:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)leftClickedButton:(id)sender {
|
||||
_boxType = 1;
|
||||
self.leftBtn.selected = YES;
|
||||
self.midBtn.selected = self.rightBtn.selected = NO;
|
||||
[self changeBoxUIBaseType];
|
||||
[self changeLabPrice];
|
||||
}
|
||||
- (IBAction)centerClickedButton:(id)sender {
|
||||
_boxType = 2;
|
||||
self.midBtn.selected = YES;
|
||||
self.leftBtn.selected = self.rightBtn.selected = NO;
|
||||
[self changeBoxUIBaseType];
|
||||
[self changeLabPrice];
|
||||
}
|
||||
- (IBAction)rightClickedButton:(id)sender {
|
||||
_boxType = 3;
|
||||
self.rightBtn.selected = YES;
|
||||
self.leftBtn.selected = self.midBtn.selected = NO;
|
||||
[self changeBoxUIBaseType];
|
||||
[self changeLabPrice];
|
||||
}
|
||||
|
||||
#pragma mark - 4个按钮
|
||||
- (void)buttonClickMethod:(NSInteger)tag {
|
||||
switch (tag) {
|
||||
case 600:{
|
||||
//说明
|
||||
BJBoxRuleAlert *view = [[BJBoxRuleAlert alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 601:{
|
||||
BJBoxPoolAlert *view = [[BJBoxPoolAlert alloc] initWithFrame:CGRectZero];
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 602:{
|
||||
//中奖记录
|
||||
BJBoxRecordAlert *view = [[BJBoxRecordAlert alloc] initWithFrame:CGRectZero];
|
||||
view.frame = UIScreen.mainScreen.bounds;
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 603:{
|
||||
BJBoxRankAlert *view = [[BJBoxRankAlert alloc] initWithFrame:CGRectZero];
|
||||
[view showOnView:UIViewController.currentViewController.view roomId:_viewModel.roomInfo.roomId WithType:_boxType];
|
||||
}break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - 3 个开奖按钮
|
||||
|
||||
- (IBAction)oneButtonClick:(UIButton *)sender {
|
||||
self.currentTimes = 1;
|
||||
|
||||
[self changeBtn];
|
||||
[self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
- (IBAction)tenButtonClick:(UIButton *)sender {
|
||||
self.currentTimes = 10;
|
||||
|
||||
[self changeBtn];
|
||||
[self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
- (IBAction)baiButtonClick:(UIButton *)sender {
|
||||
self.currentTimes = 100;
|
||||
|
||||
[self changeBtn];
|
||||
[self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
|
||||
- (void)changeBtn {
|
||||
if(_boxType == 1) {
|
||||
if (self.currentTimes == 1) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_1_s") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_100") forState:UIControlStateNormal];
|
||||
}else if (self.currentTimes == 10) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_1") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_10_s") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_100") forState:UIControlStateNormal];
|
||||
}else if (self.currentTimes == 100) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_1") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_100_s") forState:UIControlStateNormal];
|
||||
}
|
||||
}else if(_boxType == 2) {
|
||||
if (self.currentTimes == 1) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_2_1_s") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_2_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_2_100") forState:UIControlStateNormal];
|
||||
}else if (self.currentTimes == 10) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_2_1") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_2_10_s") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_2_100") forState:UIControlStateNormal];
|
||||
}else if (self.currentTimes == 100) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_2_1") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_2_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_2_100_s") forState:UIControlStateNormal];
|
||||
}
|
||||
}else if(_boxType == 3) {
|
||||
if (self.currentTimes == 1) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_3_1_s") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_3_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_3_100") forState:UIControlStateNormal];
|
||||
}else if (self.currentTimes == 10) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_3_1") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_3_10_s") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_3_100") forState:UIControlStateNormal];
|
||||
}else if (self.currentTimes == 100) {
|
||||
[self.oneBtn setImage:ImageNamed(@"box_3_1") forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:ImageNamed(@"box_3_10") forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:ImageNamed(@"box_3_100_s") forState:UIControlStateNormal];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)onStart:(id)sender {
|
||||
[self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
|
||||
- (void)openBoxWithTimes:(NSInteger )keysNum {
|
||||
self.resultView.hidden = YES;
|
||||
NSDictionary *dict = @{@"open_num":@(keysNum),
|
||||
@"bs":@(0),
|
||||
@"tid":@(_boxType).stringValue,
|
||||
@"rid":C_string(_viewModel.roomInfo.roomId)};
|
||||
|
||||
[RCMicHTTP postWithURLString:@"/api/box/open_box" parameters:dict response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
//奖品、价值、余额
|
||||
NSString *leftMoney = [result.content safeStringForKey:@"user_money"];
|
||||
self.moneyLab.text = NSStringFormat(@"%@", leftMoney);
|
||||
self.resultView.hidden = NO;
|
||||
[self.resultView showOnView:self WithResult:result.content withPara:dict withType:self.boxType];
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - laze
|
||||
|
||||
- (BJBoxResultAlert *)resultView{
|
||||
if (!_resultView) {
|
||||
_resultView = [[BJBoxResultAlert alloc] initWithFrame:CGRectZero];
|
||||
WEAK_SELF
|
||||
_resultView.refreshCoinBlock = ^(NSString * _Nonnull leftMoney) {
|
||||
weakSelf.moneyLab.text = NSStringFormat(@"%@", leftMoney);
|
||||
};
|
||||
_resultView.tryAgainBlock = ^{
|
||||
[weakSelf openBoxWithTimes:weakSelf.currentTimes];
|
||||
};
|
||||
}
|
||||
return _resultView;
|
||||
}
|
||||
|
||||
@end
|
||||
295
SweetParty/主类/RCMic/Room/Box/BjRoomBoxAlert.xib
Executable file
295
SweetParty/主类/RCMic/Room/Box/BjRoomBoxAlert.xib
Executable file
@@ -0,0 +1,295 @@
|
||||
<?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="retina5_9" 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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="BjRoomBoxAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tje-Pr-Pb3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<action selector="dismissAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="cwK-Qt-7XF"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DE3-Zd-f02">
|
||||
<rect key="frame" x="0.0" y="332" width="375" height="480"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="box_cover_1" translatesAutoresizingMaskIntoConstraints="NO" id="K0N-Ur-ZOH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="480"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EHS-KM-U9h" userLabel="ten">
|
||||
<rect key="frame" x="129.33333333333334" y="403" width="116.66666666666666" height="37"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C3B-bm-XNo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="116.66666666666667" height="37"/>
|
||||
<state key="normal" image="box_10"/>
|
||||
<connections>
|
||||
<action selector="tenButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="eCD-N9-Vmw"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="C3B-bm-XNo" firstAttribute="top" secondItem="EHS-KM-U9h" secondAttribute="top" id="QcW-nY-yJU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="C3B-bm-XNo" secondAttribute="trailing" id="WwI-9a-0QY"/>
|
||||
<constraint firstAttribute="bottom" secondItem="C3B-bm-XNo" secondAttribute="bottom" id="Z28-aO-mdY"/>
|
||||
<constraint firstItem="C3B-bm-XNo" firstAttribute="leading" secondItem="EHS-KM-U9h" secondAttribute="leading" id="sKC-3S-cSK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DW0-CQ-NPh" userLabel="bai">
|
||||
<rect key="frame" x="251" y="403" width="116" height="37"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7ed-gE-Hqb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="116" height="37"/>
|
||||
<state key="normal" image="box_100"/>
|
||||
<connections>
|
||||
<action selector="baiButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="c95-qW-pSH"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="7ed-gE-Hqb" secondAttribute="trailing" id="JVd-f7-XgV"/>
|
||||
<constraint firstAttribute="bottom" secondItem="7ed-gE-Hqb" secondAttribute="bottom" id="M4h-2i-OQy"/>
|
||||
<constraint firstItem="7ed-gE-Hqb" firstAttribute="top" secondItem="DW0-CQ-NPh" secondAttribute="top" id="Mxs-Xf-pUx"/>
|
||||
<constraint firstItem="7ed-gE-Hqb" firstAttribute="leading" secondItem="DW0-CQ-NPh" secondAttribute="leading" id="bkL-OW-Fcy"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3wf-If-kn8" userLabel="one">
|
||||
<rect key="frame" x="8.3333333333333286" y="403" width="116" height="37"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oGl-sc-W6c">
|
||||
<rect key="frame" x="0.0" y="0.0" width="116" height="37"/>
|
||||
<state key="normal" image="box_1_s"/>
|
||||
<connections>
|
||||
<action selector="oneButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="y4d-6t-IwJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="oGl-sc-W6c" secondAttribute="bottom" id="aop-mt-wvQ"/>
|
||||
<constraint firstItem="oGl-sc-W6c" firstAttribute="leading" secondItem="3wf-If-kn8" secondAttribute="leading" id="b5H-qb-BhR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oGl-sc-W6c" secondAttribute="trailing" id="iHe-vk-UDi"/>
|
||||
<constraint firstItem="oGl-sc-W6c" firstAttribute="top" secondItem="3wf-If-kn8" secondAttribute="top" id="jo6-4W-bp5"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" tag="602" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="box_rule" translatesAutoresizingMaskIntoConstraints="NO" id="8IQ-PT-HYQ">
|
||||
<rect key="frame" x="15" y="346" width="40" height="49"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" selected="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4js-Qv-ZxA">
|
||||
<rect key="frame" x="15" y="92" width="105" height="34"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="105" id="TBi-c1-qCE"/>
|
||||
<constraint firstAttribute="height" constant="34" id="avW-ai-LSS"/>
|
||||
</constraints>
|
||||
<state key="normal" image="box_1_nor"/>
|
||||
<state key="selected" image="box_1_sel"/>
|
||||
<connections>
|
||||
<action selector="leftClickedButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="Qdx-no-05Z"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oCw-hu-dLV">
|
||||
<rect key="frame" x="135" y="92" width="105" height="34"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="34" id="rJd-wq-JGn"/>
|
||||
<constraint firstAttribute="width" constant="105" id="xDu-Jd-2uw"/>
|
||||
</constraints>
|
||||
<state key="normal" image="box_2_nor"/>
|
||||
<state key="selected" image="box_2_sel"/>
|
||||
<connections>
|
||||
<action selector="centerClickedButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="b95-pz-aoY"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ag1-Kv-n68">
|
||||
<rect key="frame" x="255" y="92" width="105" height="34"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="34" id="JsU-3U-ic1"/>
|
||||
<constraint firstAttribute="width" constant="105" id="RJR-wD-8GD"/>
|
||||
</constraints>
|
||||
<state key="normal" image="box_3_nor"/>
|
||||
<state key="selected" image="box_3_sel"/>
|
||||
<connections>
|
||||
<action selector="centerClickedButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="uX2-tJ-BJ9"/>
|
||||
<action selector="rightClickedButton:" destination="iN0-l3-epB" eventType="touchUpInside" id="0Rn-Nv-gxz"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" tag="601" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="box_pool" translatesAutoresizingMaskIntoConstraints="NO" id="Jnr-RY-Dyg">
|
||||
<rect key="frame" x="320" y="285" width="40" height="49"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4F7-ei-daQ" userLabel="moneyBgView">
|
||||
<rect key="frame" x="74" y="356" width="227" height="39"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="money_bg" translatesAutoresizingMaskIntoConstraints="NO" id="abb-j7-hNQ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="227" height="39"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99999999" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qxC-tO-RS5">
|
||||
<rect key="frame" x="82" y="1.9999999999999991" width="63" height="14.666666666666664"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.40784313725490196" blue="0.086274509803921567" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="wallet_jinbi" translatesAutoresizingMaskIntoConstraints="NO" id="eil-Dc-OJ3">
|
||||
<rect key="frame" x="65" y="2" width="15" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="15" id="7Oi-5d-bEN"/>
|
||||
<constraint firstAttribute="height" constant="15" id="7Sl-gf-m8X"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="20金币/次,连开几率更高" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fmQ-2s-iAN">
|
||||
<rect key="frame" x="54.33333333333335" y="25" width="118.66666666666669" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" red="0.59999999999999998" green="0.40784313725490196" blue="0.086274509803921567" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="227" id="32d-Q4-fnD"/>
|
||||
<constraint firstItem="qxC-tO-RS5" firstAttribute="centerY" secondItem="eil-Dc-OJ3" secondAttribute="centerY" id="4TM-pX-uGT"/>
|
||||
<constraint firstItem="qxC-tO-RS5" firstAttribute="top" secondItem="4F7-ei-daQ" secondAttribute="top" constant="2" id="5hf-uV-wDo"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fmQ-2s-iAN" secondAttribute="bottom" constant="2" id="HOB-ok-dQ3"/>
|
||||
<constraint firstItem="fmQ-2s-iAN" firstAttribute="centerX" secondItem="4F7-ei-daQ" secondAttribute="centerX" id="OHw-NF-pYn"/>
|
||||
<constraint firstItem="qxC-tO-RS5" firstAttribute="centerX" secondItem="4F7-ei-daQ" secondAttribute="centerX" id="PD0-ik-TCC"/>
|
||||
<constraint firstAttribute="height" constant="39" id="bgw-5u-RbP"/>
|
||||
<constraint firstItem="abb-j7-hNQ" firstAttribute="leading" secondItem="4F7-ei-daQ" secondAttribute="leading" id="eH8-4L-0GW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="abb-j7-hNQ" secondAttribute="bottom" id="fad-Db-RG3"/>
|
||||
<constraint firstAttribute="trailing" secondItem="abb-j7-hNQ" secondAttribute="trailing" id="v2Q-9b-9JX"/>
|
||||
<constraint firstItem="abb-j7-hNQ" firstAttribute="top" secondItem="4F7-ei-daQ" secondAttribute="top" id="w4H-ER-l9V"/>
|
||||
<constraint firstItem="qxC-tO-RS5" firstAttribute="leading" secondItem="eil-Dc-OJ3" secondAttribute="trailing" constant="2" id="wo9-Ly-XWr"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" tag="603" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="box_rank" translatesAutoresizingMaskIntoConstraints="NO" id="SQg-28-k7S">
|
||||
<rect key="frame" x="320" y="346" width="40" height="49"/>
|
||||
</imageView>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ji9-4f-xjg">
|
||||
<rect key="frame" x="335" y="60" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="eJJ-MA-eU3"/>
|
||||
<constraint firstAttribute="height" constant="30" id="n1r-Eb-ufG"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="zhuan_close"/>
|
||||
<connections>
|
||||
<action selector="dismissAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="PtA-Rb-z8G"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RnY-Dw-TLZ">
|
||||
<rect key="frame" x="167.66666666666666" y="292" width="40" height="40"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="box_start"/>
|
||||
<connections>
|
||||
<action selector="onStart:" destination="iN0-l3-epB" eventType="touchUpInside" id="oHG-Ld-ODh"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" tag="600" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="box_record" translatesAutoresizingMaskIntoConstraints="NO" id="hAG-YO-f3q">
|
||||
<rect key="frame" x="15" y="285" width="40" height="49"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="RnY-Dw-TLZ" firstAttribute="centerY" secondItem="DE3-Zd-f02" secondAttribute="centerY" multiplier="1.3" id="21d-Sq-Oqx"/>
|
||||
<constraint firstAttribute="width" secondItem="DE3-Zd-f02" secondAttribute="height" multiplier="375:480" id="4Tx-Tl-MIU"/>
|
||||
<constraint firstItem="K0N-Ur-ZOH" firstAttribute="top" secondItem="DE3-Zd-f02" secondAttribute="top" id="5Gn-po-l9K"/>
|
||||
<constraint firstItem="oCw-hu-dLV" firstAttribute="leading" secondItem="4js-Qv-ZxA" secondAttribute="trailing" constant="15" id="76O-NW-rnT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="SQg-28-k7S" secondAttribute="trailing" constant="15" id="7gr-RX-15J"/>
|
||||
<constraint firstItem="EHS-KM-U9h" firstAttribute="top" secondItem="4F7-ei-daQ" secondAttribute="bottom" constant="8" id="BzN-Xj-0ZJ"/>
|
||||
<constraint firstItem="3wf-If-kn8" firstAttribute="top" secondItem="8IQ-PT-HYQ" secondAttribute="bottom" constant="8" id="BzV-we-uvc"/>
|
||||
<constraint firstItem="hAG-YO-f3q" firstAttribute="leading" secondItem="DE3-Zd-f02" secondAttribute="leading" constant="15" id="L26-hP-p6j"/>
|
||||
<constraint firstAttribute="bottom" secondItem="EHS-KM-U9h" secondAttribute="bottom" constant="40" id="LLO-fF-FAL"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Ji9-4f-xjg" secondAttribute="trailing" constant="10" id="NJ9-fy-ODV"/>
|
||||
<constraint firstItem="EHS-KM-U9h" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" id="QOY-GS-UXm"/>
|
||||
<constraint firstItem="EHS-KM-U9h" firstAttribute="leading" secondItem="3wf-If-kn8" secondAttribute="trailing" constant="5" id="VtB-QP-W96"/>
|
||||
<constraint firstAttribute="trailing" secondItem="K0N-Ur-ZOH" secondAttribute="trailing" id="XGG-XG-1r4"/>
|
||||
<constraint firstItem="ag1-Kv-n68" firstAttribute="centerY" secondItem="4js-Qv-ZxA" secondAttribute="centerY" id="Z3o-2d-vON"/>
|
||||
<constraint firstItem="oCw-hu-dLV" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" id="Z6T-N9-xNC"/>
|
||||
<constraint firstItem="oCw-hu-dLV" firstAttribute="top" secondItem="DE3-Zd-f02" secondAttribute="top" constant="92" id="a6Q-KE-spO"/>
|
||||
<constraint firstItem="DW0-CQ-NPh" firstAttribute="top" secondItem="SQg-28-k7S" secondAttribute="bottom" constant="8" id="bIe-kK-0jp"/>
|
||||
<constraint firstItem="ag1-Kv-n68" firstAttribute="leading" secondItem="oCw-hu-dLV" secondAttribute="trailing" constant="15" id="clw-bp-Qrh"/>
|
||||
<constraint firstItem="DW0-CQ-NPh" firstAttribute="centerY" secondItem="3wf-If-kn8" secondAttribute="centerY" id="d98-2U-zJ2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Jnr-RY-Dyg" secondAttribute="trailing" constant="15" id="dSC-o0-bfD"/>
|
||||
<constraint firstItem="oCw-hu-dLV" firstAttribute="centerY" secondItem="4js-Qv-ZxA" secondAttribute="centerY" id="fAz-Ed-T6m"/>
|
||||
<constraint firstItem="DW0-CQ-NPh" firstAttribute="leading" secondItem="EHS-KM-U9h" secondAttribute="trailing" constant="5" id="fOH-Oy-BUF"/>
|
||||
<constraint firstItem="EHS-KM-U9h" firstAttribute="centerY" secondItem="3wf-If-kn8" secondAttribute="centerY" id="fi8-4D-VOi"/>
|
||||
<constraint firstItem="8IQ-PT-HYQ" firstAttribute="top" secondItem="hAG-YO-f3q" secondAttribute="bottom" constant="12" id="jbD-JE-6yU"/>
|
||||
<constraint firstItem="Ji9-4f-xjg" firstAttribute="top" secondItem="DE3-Zd-f02" secondAttribute="top" constant="60" id="mVy-Db-Xmi"/>
|
||||
<constraint firstItem="K0N-Ur-ZOH" firstAttribute="leading" secondItem="DE3-Zd-f02" secondAttribute="leading" id="p43-Hs-uXk"/>
|
||||
<constraint firstItem="8IQ-PT-HYQ" firstAttribute="leading" secondItem="DE3-Zd-f02" secondAttribute="leading" constant="15" id="qCm-ox-pBY"/>
|
||||
<constraint firstItem="SQg-28-k7S" firstAttribute="top" secondItem="Jnr-RY-Dyg" secondAttribute="bottom" constant="12" id="rTv-k8-Ide"/>
|
||||
<constraint firstItem="4F7-ei-daQ" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" id="sCp-bP-J2e"/>
|
||||
<constraint firstItem="RnY-Dw-TLZ" firstAttribute="centerX" secondItem="DE3-Zd-f02" secondAttribute="centerX" id="tRv-f8-bSj"/>
|
||||
<constraint firstAttribute="bottom" secondItem="K0N-Ur-ZOH" secondAttribute="bottom" id="zaM-3T-ixx"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="tje-Pr-Pb3" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="1dS-AR-jhe"/>
|
||||
<constraint firstItem="DE3-Zd-f02" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="A12-yb-tJ9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tje-Pr-Pb3" secondAttribute="trailing" id="Fo0-tj-8JV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DE3-Zd-f02" secondAttribute="trailing" id="Iil-nj-nGk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="tje-Pr-Pb3" secondAttribute="bottom" id="O2m-WD-n3u"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DE3-Zd-f02" secondAttribute="bottom" id="Z77-oL-TLV"/>
|
||||
<constraint firstItem="tje-Pr-Pb3" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="s8f-io-j3G"/>
|
||||
</constraints>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="back_bgImg" destination="K0N-Ur-ZOH" id="WEW-e0-Fh7"/>
|
||||
<outlet property="baiBtn" destination="7ed-gE-Hqb" id="Tf7-Qs-QpP"/>
|
||||
<outlet property="guizeImg" destination="8IQ-PT-HYQ" id="Lyh-BD-prg"/>
|
||||
<outlet property="jiLuImg" destination="hAG-YO-f3q" id="yTW-YJ-QeE"/>
|
||||
<outlet property="jiangChiImg" destination="Jnr-RY-Dyg" id="dcx-rW-hSW"/>
|
||||
<outlet property="leftBtn" destination="4js-Qv-ZxA" id="fdY-Vf-jVl"/>
|
||||
<outlet property="mainView" destination="DE3-Zd-f02" id="CDi-as-t3E"/>
|
||||
<outlet property="midBtn" destination="oCw-hu-dLV" id="vqB-KT-ByC"/>
|
||||
<outlet property="moneyBgView" destination="4F7-ei-daQ" id="bf5-Y0-p5c"/>
|
||||
<outlet property="moneyLab" destination="qxC-tO-RS5" id="JUE-OU-ad1"/>
|
||||
<outlet property="oneBtn" destination="oGl-sc-W6c" id="3bH-kG-r6b"/>
|
||||
<outlet property="priceTipLab" destination="fmQ-2s-iAN" id="kJ5-Yc-b8L"/>
|
||||
<outlet property="rightBtn" destination="ag1-Kv-n68" id="afF-AQ-4hc"/>
|
||||
<outlet property="shouqiImg" destination="SQg-28-k7S" id="5h9-xg-H8Q"/>
|
||||
<outlet property="tenBtn" destination="C3B-bm-XNo" id="69U-wn-aVn"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="48.799999999999997" y="54.679802955665025"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="box_10" width="116.5" height="37"/>
|
||||
<image name="box_100" width="116" height="37"/>
|
||||
<image name="box_1_nor" width="105" height="33"/>
|
||||
<image name="box_1_s" width="116" height="37"/>
|
||||
<image name="box_1_sel" width="105" height="33"/>
|
||||
<image name="box_2_nor" width="105" height="34"/>
|
||||
<image name="box_2_sel" width="105" height="34"/>
|
||||
<image name="box_3_nor" width="105" height="34"/>
|
||||
<image name="box_3_sel" width="105" height="34"/>
|
||||
<image name="box_cover_1" width="375" height="480"/>
|
||||
<image name="box_pool" width="40" height="49"/>
|
||||
<image name="box_rank" width="40" height="49"/>
|
||||
<image name="box_record" width="40" height="49"/>
|
||||
<image name="box_rule" width="40" height="49"/>
|
||||
<image name="box_start" width="39.5" height="39.5"/>
|
||||
<image name="money_bg" width="227" height="39"/>
|
||||
<image name="wallet_jinbi" width="24" height="24"/>
|
||||
<image name="zhuan_close" width="21" height="21"/>
|
||||
</resources>
|
||||
</document>
|
||||
22
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftItemV.h
Executable file
22
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftItemV.h
Executable file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// QiuQiuBoxGiftItemV.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2022/5/20.
|
||||
// Copyright © 2022 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QiuQiuBoxGiftItemV : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *imgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *priceLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bgImgV;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
21
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftItemV.m
Executable file
21
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftItemV.m
Executable file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// QiuQiuBoxGiftItemV.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2022/5/20.
|
||||
// Copyright © 2022 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QiuQiuBoxGiftItemV.h"
|
||||
|
||||
@implementation QiuQiuBoxGiftItemV
|
||||
|
||||
/*
|
||||
// Only override drawRect: if you perform custom drawing.
|
||||
// An empty implementation adversely affects performance during animation.
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
// Drawing code
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
65
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftItemV.xib
Executable file
65
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftItemV.xib
Executable file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" 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="19519"/>
|
||||
<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="QiuQiuBoxGiftItemV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="88" height="68"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="explore_item_bg" translatesAutoresizingMaskIntoConstraints="NO" id="wCm-3O-EEQ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="88" height="68"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9oy-1b-hGk">
|
||||
<rect key="frame" x="21.5" y="11.5" width="45" height="45"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="45" id="6I3-OH-PVV"/>
|
||||
<constraint firstAttribute="height" constant="45" id="Nhx-CD-2Ka"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kfo-3x-Hrx">
|
||||
<rect key="frame" x="28" y="59.5" width="32" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.84313725490196079" green="0.3529411764705882" blue="0.90980392156862744" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="reO-zv-oI1">
|
||||
<rect key="frame" x="32" y="74" width="24" height="11"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="9"/>
|
||||
<color key="textColor" red="0.93333333333333335" green="0.42745098039215684" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="wCm-3O-EEQ" secondAttribute="bottom" id="5cC-QR-f0Z"/>
|
||||
<constraint firstItem="kfo-3x-Hrx" firstAttribute="top" secondItem="9oy-1b-hGk" secondAttribute="bottom" constant="3" id="7kM-PS-RAd"/>
|
||||
<constraint firstItem="9oy-1b-hGk" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="EgY-Na-2qO"/>
|
||||
<constraint firstItem="9oy-1b-hGk" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="N4m-Gb-Kiz"/>
|
||||
<constraint firstItem="wCm-3O-EEQ" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Oqq-iV-efa"/>
|
||||
<constraint firstItem="wCm-3O-EEQ" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="SjW-AH-jgN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wCm-3O-EEQ" secondAttribute="trailing" id="Uve-yD-Cbl"/>
|
||||
<constraint firstItem="kfo-3x-Hrx" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="p5X-CD-4yI"/>
|
||||
<constraint firstItem="reO-zv-oI1" firstAttribute="top" secondItem="kfo-3x-Hrx" secondAttribute="bottom" id="q2Q-3S-3xU"/>
|
||||
<constraint firstItem="reO-zv-oI1" firstAttribute="centerX" secondItem="kfo-3x-Hrx" secondAttribute="centerX" id="ugx-dI-EOc"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="bgImgV" destination="wCm-3O-EEQ" id="1Xu-YR-8Ct"/>
|
||||
<outlet property="imgV" destination="9oy-1b-hGk" id="Ave-fM-GGq"/>
|
||||
<outlet property="nameLab" destination="kfo-3x-Hrx" id="7Gm-XH-uxS"/>
|
||||
<outlet property="priceLab" destination="reO-zv-oI1" id="D55-fY-IBL"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="213.04347826086959" y="136.60714285714286"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="explore_item_bg" width="59" height="61"/>
|
||||
</resources>
|
||||
</document>
|
||||
21
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftView.h
Executable file
21
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftView.h
Executable file
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// QiuQiuBoxGiftView.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2022/5/20.
|
||||
// Copyright © 2022 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QiuQiuBoxGiftView : UIView
|
||||
|
||||
- (void)onUpdateQiuQiuBoxGiftView:(NSInteger)type;
|
||||
|
||||
- (void)onStartWithGid:(NSString *)gid endBlock:(void (^)(void))endBlock;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
190
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftView.m
Executable file
190
SweetParty/主类/RCMic/Room/Box/QiuQiuBoxGiftView.m
Executable file
@@ -0,0 +1,190 @@
|
||||
//
|
||||
// QiuQiuBoxGiftView.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2022/5/20.
|
||||
// Copyright © 2022 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QiuQiuBoxGiftView.h"
|
||||
#import "QiuQiuBoxGiftItemV.h"
|
||||
#import "BJBoxPoolModel.h"
|
||||
#import "ZWTimer.h"
|
||||
|
||||
@interface QiuQiuBoxGiftView () <ZWTimerDelegate>
|
||||
|
||||
@property(nonatomic, strong)NSMutableArray *giftItems;
|
||||
|
||||
@property(nonatomic, strong)NSArray *dataArray;
|
||||
|
||||
@property(nonatomic, strong) ZWTimer *timer;
|
||||
@property(nonatomic, assign) float totalTime;
|
||||
|
||||
@property(nonatomic, strong) QiuQiuBoxGiftItemV *lastItem;
|
||||
@property(nonatomic, strong) QiuQiuBoxGiftItemV *currentItem;
|
||||
@property(nonatomic, assign) NSInteger currentIndex;
|
||||
@property(nonatomic, assign) NSInteger resultIndex;
|
||||
|
||||
@property (nonatomic, copy) void(^onEndBlock)(void);
|
||||
|
||||
@property(nonatomic, assign) NSInteger type;
|
||||
|
||||
@end
|
||||
|
||||
@implementation QiuQiuBoxGiftView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.giftItems = [NSMutableArray arrayWithCapacity:0];
|
||||
|
||||
[self createUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)onStartWithGid:(NSString *)gid endBlock:(void (^)(void))endBlock {
|
||||
self.onEndBlock = endBlock;
|
||||
|
||||
NSInteger resultIndex = 0;
|
||||
for (NSInteger i = 0; i < self.dataArray.count; i++) {
|
||||
BJBoxPoolModel *model = self.dataArray[i];
|
||||
if ([gid isEqualToString:model.gid]) {
|
||||
resultIndex = i;
|
||||
}
|
||||
}
|
||||
self.resultIndex = resultIndex;
|
||||
|
||||
self.totalTime = 0;
|
||||
[self.timer startTimer:0.1 delegate:self repeats:YES];
|
||||
}
|
||||
|
||||
-(void)onTimerFired:(ZWTimer *)timer {
|
||||
self.totalTime += 0.1;
|
||||
self.currentIndex += 1;
|
||||
if (self.currentIndex >= self.giftItems.count) {
|
||||
self.currentIndex = 0;
|
||||
}
|
||||
[self onChangeItemUI];
|
||||
|
||||
if (self.resultIndex == self.currentIndex && self.totalTime >= 2) {
|
||||
[self.timer stopTimer];
|
||||
|
||||
if (self.onEndBlock) {
|
||||
self.onEndBlock();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-(void)onChangeItemUI {
|
||||
if (self.currentIndex < self.giftItems.count) {
|
||||
self.lastItem = self.currentItem;
|
||||
self.currentItem = self.giftItems[self.currentIndex];
|
||||
}
|
||||
if (self.lastItem) {
|
||||
UIImage *image = [UIImage imageNamed:self.type == 3?@"explore_item_bg":@"explore_item_bg_gao"];
|
||||
self.lastItem.bgImgV.image = image;
|
||||
}
|
||||
if (self.currentItem) {
|
||||
UIImage *image = [UIImage imageNamed:self.type == 3?@"explore_item_bg_sel":@"explore_item_bg_sel_gao"];
|
||||
self.currentItem.bgImgV.image = image;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onUpdateQiuQiuBoxGiftView:(NSInteger)type {
|
||||
self.type = type;
|
||||
|
||||
NSDictionary *dict = @{@"tid":@(type)};
|
||||
[RCMicHTTP postWithURLString:@"/api/box/get_box_list" parameters:dict response:^(RCMicHTTPResult *result) {
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSArray.class]) {
|
||||
NSArray *arr = [BJBoxPoolModel mj_objectArrayWithKeyValuesArray:result.content];
|
||||
if (arr.count > 10) {
|
||||
self.dataArray = [arr subarrayWithRange:NSMakeRange(0, 10)];
|
||||
}else {
|
||||
self.dataArray = arr;
|
||||
}
|
||||
[self onUpdateGiftItems:type];
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)onUpdateGiftItems:(NSInteger)type {
|
||||
for (QiuQiuBoxGiftItemV *itemV in self.giftItems) {
|
||||
itemV.hidden = YES;
|
||||
}
|
||||
|
||||
for (NSInteger i = 0; i < self.dataArray.count; i++) {
|
||||
if (i < self.giftItems.count) {
|
||||
BJBoxPoolModel *model = self.dataArray[i];
|
||||
QiuQiuBoxGiftItemV *itemV = self.giftItems[i];
|
||||
itemV.hidden = NO;
|
||||
[itemV.imgV sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
itemV.nameLab.text = model.gift_name;
|
||||
itemV.priceLab.text = [NSString stringWithFormat:@"%@金币", model.gift_price];
|
||||
|
||||
if (type == 3) {
|
||||
itemV.bgImgV.image = [UIImage imageNamed:@"explore_item_bg"];
|
||||
}else {
|
||||
itemV.bgImgV.image = [UIImage imageNamed:@"explore_item_bg_gao"];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[self onChangeItemUI];
|
||||
}
|
||||
|
||||
- (void)createUI {
|
||||
for (NSInteger i = 0; i < 10; i++) {
|
||||
QiuQiuBoxGiftItemV *item = [[NSBundle mainBundle] loadNibNamed:@"QiuQiuBoxGiftItemV" owner:self options:nil].firstObject;
|
||||
[self addSubview:item];
|
||||
[self.giftItems addObject:item];
|
||||
|
||||
CGFloat itemW = 62;
|
||||
CGFloat itemH = 64;
|
||||
CGFloat spaceX = 10;
|
||||
CGFloat spaceY = 10;
|
||||
|
||||
if (i < 4) {
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self).offset(i*(itemW+spaceX));
|
||||
make.top.equalTo(self);
|
||||
make.size.mas_equalTo(CGSizeMake(itemW, itemH));
|
||||
}];
|
||||
}else if (i == 4) {
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self).offset(3*(itemW+spaceX));
|
||||
make.top.equalTo(self).offset((itemH+spaceY));
|
||||
make.size.mas_equalTo(CGSizeMake(itemW, itemH));
|
||||
}];
|
||||
}else if (i < 9) {
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self).offset((8-i)*(itemW+spaceX));
|
||||
make.top.equalTo(self).offset(2*(itemH+spaceY));
|
||||
make.size.mas_equalTo(CGSizeMake(itemW, itemH));
|
||||
}];
|
||||
}else if (i == 9) {
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self);
|
||||
make.top.equalTo(self).offset((itemH+spaceY));
|
||||
make.size.mas_equalTo(CGSizeMake(itemW, itemH));
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (ZWTimer *)timer {
|
||||
if (_timer == nil) {
|
||||
_timer = [[ZWTimer alloc] init];
|
||||
}
|
||||
return _timer;
|
||||
}
|
||||
|
||||
@end
|
||||
26
SweetParty/主类/RCMic/Room/Box/SPOpenConfirmAlert.h
Executable file
26
SweetParty/主类/RCMic/Room/Box/SPOpenConfirmAlert.h
Executable file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// SPOpenConfirmAlert.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2022/6/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface SPOpenConfirmAlert : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bgImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *closeBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *contentLab;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *confirmBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *noTipsBtn;
|
||||
|
||||
@property (nonatomic, copy) void(^onConfirmBlock)(void);
|
||||
|
||||
- (void)onShowWithType:(NSInteger)type price:(NSInteger)price;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
60
SweetParty/主类/RCMic/Room/Box/SPOpenConfirmAlert.m
Executable file
60
SweetParty/主类/RCMic/Room/Box/SPOpenConfirmAlert.m
Executable file
@@ -0,0 +1,60 @@
|
||||
//
|
||||
// SPOpenConfirmAlert.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2022/6/16.
|
||||
//
|
||||
|
||||
#import "SPOpenConfirmAlert.h"
|
||||
|
||||
@interface SPOpenConfirmAlert ()
|
||||
|
||||
@property (nonatomic, assign) NSInteger type;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SPOpenConfirmAlert
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
}
|
||||
|
||||
- (void)onShowWithType:(NSInteger)type price:(NSInteger)price {
|
||||
[MainWindow() addSubview:self];
|
||||
|
||||
self.type = type;
|
||||
|
||||
if (self.type == 8) {
|
||||
self.contentLab.text = [NSString stringWithFormat:@"是否确认花费(%ld金币)进行抽奖?", price];
|
||||
|
||||
self.bgImgV.image = ImageNamed(@"zhuan_tips_bg");
|
||||
[self.closeBtn setImage:ImageNamed(@"zhuan_tips_close") forState:UIControlStateNormal];
|
||||
self.confirmBtn.backgroundColor = HEXCOLOR(0x8A51F4);
|
||||
}else {
|
||||
self.contentLab.text = [NSString stringWithFormat:@"是否确认花费(%ld金币)进行钓鱼?", price];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)onClose:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)onConfirm:(id)sender {
|
||||
if (self.noTipsBtn.selected == YES) {
|
||||
NSString *keyStr = [NSString stringWithFormat:@"close_open_tips_%ld", self.type];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:keyStr];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
}
|
||||
|
||||
[self removeFromSuperview];
|
||||
if (self.onConfirmBlock) {
|
||||
self.onConfirmBlock();
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)onNoTips:(id)sender {
|
||||
self.noTipsBtn.selected = !self.noTipsBtn.selected;
|
||||
}
|
||||
|
||||
@end
|
||||
147
SweetParty/主类/RCMic/Room/Box/SPOpenConfirmAlert.xib
Executable file
147
SweetParty/主类/RCMic/Room/Box/SPOpenConfirmAlert.xib
Executable file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" 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="19519"/>
|
||||
<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="SPOpenConfirmAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lnj-gg-ObB">
|
||||
<rect key="frame" x="37" y="315.5" width="340" height="265"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="box_tips_bg" translatesAutoresizingMaskIntoConstraints="NO" id="FZg-Jc-dd5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="340" height="265"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LEu-YG-W0Y">
|
||||
<rect key="frame" x="300" y="8" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="0zr-N8-iyV"/>
|
||||
<constraint firstAttribute="width" constant="30" id="dxJ-0R-wTd"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="box_tips_close"/>
|
||||
<connections>
|
||||
<action selector="onClose:" destination="iN0-l3-epB" eventType="touchUpInside" id="MRq-C7-UHY"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="是否确认花费" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AL4-9e-78N">
|
||||
<rect key="frame" x="30" y="90" width="280" height="19.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qy1-6c-fPt">
|
||||
<rect key="frame" x="60" y="162" width="98" height="32"/>
|
||||
<color key="backgroundColor" red="0.83921568627450982" green="0.83921568627450982" blue="0.83921568627450982" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="98" id="RvP-xn-nNs"/>
|
||||
<constraint firstAttribute="height" constant="32" id="eiG-th-dBN"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="取消">
|
||||
<color key="titleColor" red="0.37647058823529411" green="0.37647058823529411" blue="0.37647058823529411" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="onClose:" destination="iN0-l3-epB" eventType="touchUpInside" id="x8c-zo-nAM"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NnT-YC-0Il">
|
||||
<rect key="frame" x="182" y="162" width="98" height="32"/>
|
||||
<color key="backgroundColor" red="1" green="0.67843137254901964" blue="0.039215686274509803" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="98" id="MMV-Kk-iIS"/>
|
||||
<constraint firstAttribute="height" constant="32" id="weo-Bo-2MI"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="确定">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="16"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="onConfirm:" destination="iN0-l3-epB" eventType="touchUpInside" id="6fm-fg-TGp"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="不再提示" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mlc-cO-pDN">
|
||||
<rect key="frame" x="155.5" y="216.5" width="49.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="euv-Q7-deJ">
|
||||
<rect key="frame" x="125.5" y="209" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="6YT-uD-VB6"/>
|
||||
<constraint firstAttribute="height" constant="30" id="bHb-Jd-pgN"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="box_tips_nor"/>
|
||||
<state key="selected" image="box_tips_sel"/>
|
||||
<connections>
|
||||
<action selector="onNoTips:" destination="iN0-l3-epB" eventType="touchUpInside" id="kxO-8O-1Hp"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="NnT-YC-0Il" secondAttribute="trailing" constant="60" id="1Bp-6v-Oq4"/>
|
||||
<constraint firstItem="mlc-cO-pDN" firstAttribute="centerX" secondItem="lnj-gg-ObB" secondAttribute="centerX" constant="10" id="2iu-nB-9Mi"/>
|
||||
<constraint firstAttribute="height" constant="265" id="5zN-MA-WLN"/>
|
||||
<constraint firstAttribute="width" constant="340" id="6FW-Q0-OI6"/>
|
||||
<constraint firstItem="mlc-cO-pDN" firstAttribute="leading" secondItem="euv-Q7-deJ" secondAttribute="trailing" id="AVU-vb-A3T"/>
|
||||
<constraint firstItem="AL4-9e-78N" firstAttribute="top" secondItem="lnj-gg-ObB" secondAttribute="top" constant="90" id="D8S-L1-oHA"/>
|
||||
<constraint firstItem="AL4-9e-78N" firstAttribute="leading" secondItem="lnj-gg-ObB" secondAttribute="leading" constant="30" id="Eyf-yf-8Tf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="FZg-Jc-dd5" secondAttribute="trailing" id="NXv-4f-0I3"/>
|
||||
<constraint firstItem="FZg-Jc-dd5" firstAttribute="leading" secondItem="lnj-gg-ObB" secondAttribute="leading" id="O9i-iP-Ziu"/>
|
||||
<constraint firstAttribute="bottom" secondItem="mlc-cO-pDN" secondAttribute="bottom" constant="34" id="Rt8-fd-6m8"/>
|
||||
<constraint firstItem="qy1-6c-fPt" firstAttribute="leading" secondItem="lnj-gg-ObB" secondAttribute="leading" constant="60" id="VEC-RM-WAx"/>
|
||||
<constraint firstItem="qy1-6c-fPt" firstAttribute="top" secondItem="lnj-gg-ObB" secondAttribute="top" constant="162" id="bje-F2-2OZ"/>
|
||||
<constraint firstItem="NnT-YC-0Il" firstAttribute="centerY" secondItem="qy1-6c-fPt" secondAttribute="centerY" id="c57-tB-PGF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="FZg-Jc-dd5" secondAttribute="bottom" id="fVQ-mF-96v"/>
|
||||
<constraint firstItem="FZg-Jc-dd5" firstAttribute="top" secondItem="lnj-gg-ObB" secondAttribute="top" id="faq-cp-X5D"/>
|
||||
<constraint firstItem="euv-Q7-deJ" firstAttribute="centerY" secondItem="mlc-cO-pDN" secondAttribute="centerY" id="gSA-Of-Sxq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="AL4-9e-78N" secondAttribute="trailing" constant="30" id="keC-Ix-LpV"/>
|
||||
<constraint firstItem="LEu-YG-W0Y" firstAttribute="top" secondItem="lnj-gg-ObB" secondAttribute="top" constant="8" id="xh5-ha-yD7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="LEu-YG-W0Y" secondAttribute="trailing" constant="10" id="y9G-zP-MDW"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.29621150217899661" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="lnj-gg-ObB" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="bED-CP-E7p"/>
|
||||
<constraint firstItem="lnj-gg-ObB" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="uag-Qi-ySt"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="bgImgV" destination="FZg-Jc-dd5" id="8KJ-r5-lai"/>
|
||||
<outlet property="closeBtn" destination="LEu-YG-W0Y" id="WD4-Rf-ZAq"/>
|
||||
<outlet property="confirmBtn" destination="NnT-YC-0Il" id="VtO-Aw-3ag"/>
|
||||
<outlet property="contentLab" destination="AL4-9e-78N" id="CtZ-J7-faO"/>
|
||||
<outlet property="noTipsBtn" destination="euv-Q7-deJ" id="1g4-Ch-7c1"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="132" y="69"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="box_tips_bg" width="340" height="265"/>
|
||||
<image name="box_tips_close" width="20.5" height="25"/>
|
||||
<image name="box_tips_nor" width="11" height="11"/>
|
||||
<image name="box_tips_sel" width="11" height="11"/>
|
||||
</resources>
|
||||
</document>
|
||||
20
SweetParty/主类/RCMic/Room/Box/中奖记录/BJBoxRecordAlert.h
Executable file
20
SweetParty/主类/RCMic/Room/Box/中奖记录/BJBoxRecordAlert.h
Executable file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// BJBoxRecordAlert.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
//需要分页加载
|
||||
@interface BJBoxRecordAlert : UIView
|
||||
|
||||
- (void)showOnView:(UIView *)parent WithType:(NSInteger)type;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
349
SweetParty/主类/RCMic/Room/Box/中奖记录/BJBoxRecordAlert.m
Executable file
349
SweetParty/主类/RCMic/Room/Box/中奖记录/BJBoxRecordAlert.m
Executable file
@@ -0,0 +1,349 @@
|
||||
//
|
||||
// BJBoxRecordAlert.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJBoxRecordAlert.h"
|
||||
#import "RoomBoxRecordCell.h"
|
||||
#import "XiamuFooter.h"
|
||||
#import "XiamuTipView.h"
|
||||
|
||||
@interface BJBoxRecordAlert () <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>
|
||||
|
||||
@property (nonatomic, strong) UIView *mainView;
|
||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *models; //礼物数组
|
||||
|
||||
//关于网络请求
|
||||
@property (nonatomic, assign) BOOL isLoadFirst;
|
||||
@property (nonatomic, assign) BOOL isOnRequesting, isNoMoreData, isNetError;
|
||||
@property (nonatomic, strong) XiamuFooter *footerView;
|
||||
@property (nonatomic, strong) XiamuTipView *tipsView;
|
||||
@property (nonatomic, assign) NSInteger pageIndex;
|
||||
|
||||
@property (nonatomic, assign) NSInteger poolType;
|
||||
|
||||
@property (nonatomic, assign) CGFloat mainW;
|
||||
@property (nonatomic, assign) CGFloat mainH;
|
||||
|
||||
@property (nonatomic, assign) CGFloat contentX;
|
||||
@property (nonatomic, assign) CGFloat contentTop;
|
||||
@property (nonatomic, assign) CGFloat contentBottom;
|
||||
|
||||
@property (nonatomic, copy) NSString *bgImgName;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BJBoxRecordAlert
|
||||
|
||||
#pragma mark - set
|
||||
- (NSMutableArray *)models {
|
||||
if (!_models) {
|
||||
_models = NSMutableArray.array;
|
||||
}
|
||||
return _models;
|
||||
}
|
||||
|
||||
- (XiamuFooter *)footerView {
|
||||
if (!_footerView) {
|
||||
_footerView = [[XiamuFooter alloc] initWithFrame:CGRectMake(0, 0, _collectionView.width, 40)];
|
||||
}
|
||||
return _footerView;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:UIScreen.mainScreen.bounds]) {
|
||||
|
||||
self.backgroundColor = [kBlackColor colorWithAlphaComponent:0.3];
|
||||
[ControlCreator createButton:self rect:self.bounds text:@"" font:nil color:nil backguoundColor:UIColor.clearColor imageName:nil target:self action:@selector(backAction:)];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initMainView {
|
||||
if (_mainView) {
|
||||
return;
|
||||
}
|
||||
UIColor *color;
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
color = HEXCOLOR(0xFFFFFF);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}else if (self.poolType == 21){
|
||||
color = kWhiteColor;
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}else {
|
||||
color = HEXCOLOR(0xBD7423);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}
|
||||
_mainView.backgroundColor = UIColor.clearColor;
|
||||
[self addSubview:_mainView];
|
||||
|
||||
[ControlCreator createImageView:_mainView rect:_mainView.bounds imageName:self.bgImgName backguoundColor:nil];
|
||||
}
|
||||
|
||||
- (void)initCollecionView {
|
||||
if (_collectionView) {
|
||||
return;
|
||||
}
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake((_mainView.width-_contentX*2)/3.0, 140);
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
layout.minimumLineSpacing = 0;
|
||||
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(_contentX, _contentTop, _mainView.width-_contentX*2, _mainView.height-_contentTop-_contentBottom) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.backgroundColor = UIColor.clearColor;
|
||||
_collectionView.showsVerticalScrollIndicator = NO;
|
||||
NSString *cellId = NSStringFromClass(RoomBoxRecordCell.class);
|
||||
[_collectionView registerNib:[UINib nibWithNibName:cellId bundle:nil] forCellWithReuseIdentifier:cellId];
|
||||
[_collectionView registerClass:UICollectionReusableView.class forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"foot"];
|
||||
[_mainView addSubview:_collectionView];
|
||||
}
|
||||
|
||||
- (void)initMJrefresh {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
[weakSelf loadFirst];
|
||||
}];
|
||||
_collectionView.mj_header = header;
|
||||
}
|
||||
|
||||
- (void)initTipView {
|
||||
if (_tipsView) {
|
||||
return;
|
||||
}
|
||||
_tipsView = [[XiamuTipView alloc]initWithFrame:CGRectMake(0, 0, _collectionView.width, 250)];
|
||||
|
||||
[self.collectionView addSubview:_tipsView];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
_tipsView.block = ^{
|
||||
if (weakSelf.isNetError) {
|
||||
[weakSelf loadFirst];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (void)showOnView:(UIView *)parent WithType:(NSInteger)type {
|
||||
self.poolType = type;
|
||||
|
||||
if (type == 4 || type == 5 || type == 6) {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/375*500;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 20;
|
||||
self.contentTop = 90;
|
||||
self.contentBottom = 40;
|
||||
|
||||
self.bgImgName = @"zhuan_bg_record";
|
||||
}else {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth - x*2;
|
||||
CGFloat h = w/375*480;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 15;
|
||||
self.contentTop = 80;
|
||||
self.contentBottom = 50;
|
||||
|
||||
self.bgImgName = @"bg_explore_record";
|
||||
}
|
||||
|
||||
[self initMainView];
|
||||
[self initCollecionView];
|
||||
[self initMJrefresh];
|
||||
// [self initTipView];
|
||||
|
||||
[parent addSubview:self];
|
||||
|
||||
[parent addSubview:self];
|
||||
|
||||
[_collectionView.mj_header beginRefreshing];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (IBAction)backAction:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - data
|
||||
|
||||
- (void)setIsOnRequesting:(BOOL)isOnRequesting {
|
||||
_isOnRequesting = isOnRequesting;
|
||||
if (isOnRequesting) {
|
||||
_isNetError = NO;
|
||||
[self.footerView stateLoading];
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
[self.footerView stateNoMore];
|
||||
if (self.models.count==0) {
|
||||
[self.tipsView stateNoResult];
|
||||
[self.footerView stateHide];
|
||||
}
|
||||
}
|
||||
if (_isNetError) {
|
||||
[self.footerView stateNetError];
|
||||
if (_isLoadFirst) {
|
||||
[self.tipsView stateNoNet];
|
||||
[self.footerView stateHide];
|
||||
[self.models removeAllObjects];
|
||||
[_collectionView reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadFirst {
|
||||
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
_pageIndex = 1;
|
||||
_isLoadFirst = YES;
|
||||
self.isNoMoreData = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadMore {
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
return;
|
||||
}
|
||||
|
||||
_isLoadFirst = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadListData {
|
||||
[self.tipsView stateHide];
|
||||
self.isNetError = NO;
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
self.isOnRequesting = YES;
|
||||
|
||||
|
||||
NSDictionary *dict = @{@"page":@(self.pageIndex).stringValue,
|
||||
@"page_limit":@"30",
|
||||
};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/box/get_user_box_gift_list" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSArray.class]) {
|
||||
[self checkRequestResult:result.content];
|
||||
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
|
||||
weakSelf.isOnRequesting = NO;
|
||||
[weakSelf.collectionView.mj_header endRefreshing];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)checkRequestResult:(NSArray *)listArr {
|
||||
if ([listArr isKindOfClass:NSArray.class]) {
|
||||
|
||||
if (_isLoadFirst) {
|
||||
[self.models removeAllObjects];
|
||||
}
|
||||
if (listArr.count == 0 ) {
|
||||
self.isNoMoreData = YES;
|
||||
}
|
||||
NSArray *models = [RoomBoxRecordModel mj_objectArrayWithKeyValuesArray:listArr];
|
||||
[self.models addObjectsFromArray:models];
|
||||
[_collectionView reloadData];
|
||||
|
||||
_pageIndex ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark ====================== 代理方法 ======================
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section {
|
||||
return CGSizeMake(APPW, 40);
|
||||
}
|
||||
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
|
||||
if ([kind isEqualToString:UICollectionElementKindSectionFooter]) {
|
||||
|
||||
UICollectionReusableView *foot = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"foot" forIndexPath:indexPath];
|
||||
NSInteger footTag = 1001;
|
||||
UIView *subview = [foot viewWithTag:footTag];
|
||||
if (subview) {
|
||||
[subview removeFromSuperview];
|
||||
}
|
||||
|
||||
self.footerView.tag = footTag;
|
||||
[foot addSubview:self.footerView];
|
||||
|
||||
return foot;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.models.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NSString *cellId = NSStringFromClass(RoomBoxRecordCell.class);
|
||||
RoomBoxRecordCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellId forIndexPath:indexPath];
|
||||
|
||||
RoomBoxRecordModel *model = self.models[indexPath.item];
|
||||
cell.model = model;
|
||||
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
cell.bjImg.image = ImageNamed(@"zhuan_gift_bg");
|
||||
cell.labelTop.textColor = HEXCOLOR(0xFFFFFF);
|
||||
cell.labelBot.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}else {
|
||||
cell.bjImg.image = ImageNamed(@"box_gift_bg");
|
||||
cell.labelTop.textColor = HEXCOLOR(0xFFFFFF);
|
||||
cell.labelBot.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.item+6>self.models.count && !self.isNoMoreData) {
|
||||
[self loadMore];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
32
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordCell.h
Executable file
32
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordCell.h
Executable file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// RoomBoxRecordCell.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RoomBoxRecordModel.h"
|
||||
#import "BJBoxPoolModel.h"
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
/// 中奖记录cell 和 奖池cell
|
||||
@interface RoomBoxRecordCell : UICollectionViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *iconImgView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *labelTop;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *labelBot;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bjImg;
|
||||
|
||||
|
||||
@property (nonatomic, strong) RoomBoxRecordModel *model;
|
||||
|
||||
@property (nonatomic, strong) BJBoxPoolModel *poolModel;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
50
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordCell.m
Executable file
50
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordCell.m
Executable file
@@ -0,0 +1,50 @@
|
||||
//
|
||||
// RoomBoxRecordCell.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "RoomBoxRecordCell.h"
|
||||
|
||||
@implementation RoomBoxRecordCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
}
|
||||
|
||||
- (void)setModel:(RoomBoxRecordModel *)model {
|
||||
_model = model;
|
||||
|
||||
[_iconImgView sd_setImageWithURL:URL(C_string(model.base_image))];
|
||||
|
||||
_labelTop.text = C_string(model.gift_name);
|
||||
|
||||
NSString *dateString = [self dateYMDStrignWith:model.add_time];
|
||||
_labelBot.text = dateString;
|
||||
|
||||
}
|
||||
|
||||
- (NSString *)dateYMDStrignWith:(NSString *)dateString {
|
||||
NSDate *date = [NSDate dateWithTimeIntervalSince1970:dateString.doubleValue];
|
||||
NSDateFormatter *format = [[NSDateFormatter alloc] init];
|
||||
[format setDateFormat:@"yyyy-MM-dd"];
|
||||
NSString *result = [format stringFromDate:date];
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - 复用
|
||||
|
||||
- (void)setPoolModel:(BJBoxPoolModel *)poolModel {
|
||||
_poolModel = poolModel;
|
||||
|
||||
[_iconImgView sd_setImageWithURL:URL(C_string(poolModel.base_image))];
|
||||
|
||||
_labelTop.text = C_string(poolModel.gift_name);
|
||||
|
||||
_labelBot.text = C_string(poolModel.gift_price);
|
||||
}
|
||||
|
||||
@end
|
||||
73
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordCell.xib
Executable file
73
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordCell.xib
Executable file
@@ -0,0 +1,73 @@
|
||||
<?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" useSafeAreas="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="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="RoomBoxRecordCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="155" height="140"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="155" height="140"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="box_gift_bg" translatesAutoresizingMaskIntoConstraints="NO" id="kpX-JH-Kkm" userLabel="bg">
|
||||
<rect key="frame" x="33.5" y="0.0" width="88" height="88"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="88" id="UKN-Uv-bSX"/>
|
||||
<constraint firstAttribute="width" secondItem="kpX-JH-Kkm" secondAttribute="height" multiplier="1:1" id="q8u-PJ-HRg"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="未加载图片" translatesAutoresizingMaskIntoConstraints="NO" id="cXs-Vm-sHW">
|
||||
<rect key="frame" x="50" y="16.5" width="55" height="55"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="cXs-Vm-sHW" secondAttribute="height" multiplier="1:1" id="goe-yl-oGN"/>
|
||||
<constraint firstAttribute="width" constant="55" id="uvP-ok-qKk"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="label2" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M9l-od-N5b">
|
||||
<rect key="frame" x="62.5" y="117.5" width="30.5" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="label1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1Vr-uF-ofe">
|
||||
<rect key="frame" x="60" y="98" width="35.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
|
||||
<constraints>
|
||||
<constraint firstItem="1Vr-uF-ofe" firstAttribute="top" secondItem="kpX-JH-Kkm" secondAttribute="bottom" constant="10" id="0Hp-Uz-Lpt"/>
|
||||
<constraint firstItem="kpX-JH-Kkm" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="1dx-b8-nw4"/>
|
||||
<constraint firstItem="M9l-od-N5b" firstAttribute="top" secondItem="1Vr-uF-ofe" secondAttribute="bottom" constant="5" id="7zl-tz-qww"/>
|
||||
<constraint firstItem="kpX-JH-Kkm" firstAttribute="centerY" secondItem="cXs-Vm-sHW" secondAttribute="centerY" id="HIS-Fs-6r3"/>
|
||||
<constraint firstItem="kpX-JH-Kkm" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="KzK-aB-tFj"/>
|
||||
<constraint firstItem="kpX-JH-Kkm" firstAttribute="centerX" secondItem="cXs-Vm-sHW" secondAttribute="centerX" id="Ly7-go-zzK"/>
|
||||
<constraint firstItem="1Vr-uF-ofe" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="b8F-OW-o2F"/>
|
||||
<constraint firstItem="M9l-od-N5b" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="w6k-DV-yIY"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="155" height="140"/>
|
||||
<connections>
|
||||
<outlet property="bjImg" destination="kpX-JH-Kkm" id="4Rh-B5-A1C"/>
|
||||
<outlet property="iconImgView" destination="cXs-Vm-sHW" id="sc3-Ap-VB2"/>
|
||||
<outlet property="labelBot" destination="M9l-od-N5b" id="m4U-y7-36F"/>
|
||||
<outlet property="labelTop" destination="1Vr-uF-ofe" id="AbO-0V-Ek9"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="61.594202898550726" y="129.91071428571428"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="box_gift_bg" width="118" height="117.5"/>
|
||||
<image name="未加载图片" width="500" height="500"/>
|
||||
</resources>
|
||||
</document>
|
||||
23
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordModel.h
Executable file
23
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordModel.h
Executable file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// RoomBoxRecordModel.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface RoomBoxRecordModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *num; //": 1,
|
||||
@property (nonatomic, copy) NSString *gid; //": 21,
|
||||
@property (nonatomic, copy) NSString *gift_name; //": "为你爆灯",
|
||||
@property (nonatomic, copy) NSString *base_image; //": "h
|
||||
@property (nonatomic, copy) NSString *add_time; //": 1620281311
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
13
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordModel.m
Executable file
13
SweetParty/主类/RCMic/Room/Box/中奖记录/RoomBoxRecordModel.m
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// RoomBoxRecordModel.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "RoomBoxRecordModel.h"
|
||||
|
||||
@implementation RoomBoxRecordModel
|
||||
|
||||
@end
|
||||
20
SweetParty/主类/RCMic/Room/Box/九宫格转盘/BJZhuanpanZhuanzView.h
Executable file
20
SweetParty/主类/RCMic/Room/Box/九宫格转盘/BJZhuanpanZhuanzView.h
Executable file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// BJZhuanpanItemView.h
|
||||
// romantic
|
||||
//
|
||||
// Created by DLAN on 2023/2/10.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RCMicRoomViewModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJZhuanpanZhuanzView : UIView
|
||||
+ (BJZhuanpanZhuanzView *)initExploreWith:(RCMicRoomViewModel *)model;
|
||||
|
||||
/// show 出来
|
||||
- (void)showOnView:(nullable UIView *)parent;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
611
SweetParty/主类/RCMic/Room/Box/九宫格转盘/BJZhuanpanZhuanzView.m
Executable file
611
SweetParty/主类/RCMic/Room/Box/九宫格转盘/BJZhuanpanZhuanzView.m
Executable file
@@ -0,0 +1,611 @@
|
||||
//
|
||||
// BJZhuanpanItemView.m
|
||||
// romantic
|
||||
//
|
||||
// Created by DLAN on 2023/2/10.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJZhuanpanZhuanzView.h"
|
||||
#import "ZhuanzhuanLotteryItem.h"
|
||||
#import "BJBoxRankAlert.h"
|
||||
#import "BJBoxRecordAlert.h"
|
||||
#import "BJBoxRuleAlert.h"
|
||||
#import "BJBoxPoolAlert.h"
|
||||
#import "BJBoxResultAlert.h"
|
||||
#import "BJBoxAwardModel.h"
|
||||
#import "ZWTimer.h"
|
||||
#import "BJRoomGiftModel.h"
|
||||
|
||||
#define Lottery_Num 8
|
||||
|
||||
@interface BJZhuanpanZhuanzView() <ZWTimerDelegate>
|
||||
|
||||
@property(nonatomic, strong)NSMutableArray *lotteryItems;
|
||||
|
||||
@property(nonatomic, strong) ZWTimer *timer;
|
||||
@property(nonatomic, assign) float totalTime;
|
||||
|
||||
@property(nonatomic, strong)ZhuanzhuanLotteryItem *lastItem;
|
||||
@property(nonatomic, strong)ZhuanzhuanLotteryItem *currentItem;
|
||||
@property(nonatomic, assign) NSInteger currentIndex;
|
||||
@property(nonatomic, assign) NSInteger resultIndex;
|
||||
@property(nonatomic, copy) void(^onEndBlock)(void);
|
||||
|
||||
@property (nonatomic, strong) RCMicRoomViewModel *viewModel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *moneyLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *guiImg;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *jiluImg;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *rankImg;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *jiangchiImg;
|
||||
@property (weak, nonatomic) IBOutlet UIView *itemView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *oneBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *tenBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *baiBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *leftBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *rightBtn;
|
||||
@property(nonatomic, assign) NSInteger currentTimes; //当前要抽的次数
|
||||
@property(nonatomic, assign) NSInteger boxType;
|
||||
@property(nonatomic, assign) NSInteger coin_value_1;
|
||||
@property(nonatomic, assign) NSInteger coin_value_2;
|
||||
@property(nonatomic, assign) NSInteger coin_value_3;
|
||||
|
||||
@property (nonatomic, strong) BJBoxResultAlert *resultView;
|
||||
@property(nonatomic, strong) NSArray *listModel; /*结果数据源*/
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *priceTipLab;
|
||||
@property (weak, nonatomic) IBOutlet UIView *starView;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *zhuanneiImg;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *starImg;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bgimg;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *ticketNumLab;
|
||||
|
||||
@property (nonatomic, strong) NSArray *giftArray;//奖池礼物数组
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *priceCover;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *baotiaoValueLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *baotiaoBGImage;
|
||||
@property (weak, nonatomic) IBOutlet UIView *baotiaoCenterView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *baotiaoCenterHeight;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *coinBGIMG;
|
||||
@property (weak, nonatomic) IBOutlet UIView *boxCountCover;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *boxCountLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BJZhuanpanZhuanzView
|
||||
|
||||
+ (BJZhuanpanZhuanzView *)initExploreWith:(RCMicRoomViewModel *)model {
|
||||
|
||||
BJZhuanpanZhuanzView *view = LoadNib(@"BJZhuanpanZhuanzView");
|
||||
view.frame = UIScreen.mainScreen.bounds;
|
||||
view.backgroundColor = HEXCOLORA(0x000000, 0.3);
|
||||
view.viewModel = model;
|
||||
|
||||
[view initSubView];
|
||||
|
||||
return view;
|
||||
}
|
||||
#pragma mark - public
|
||||
|
||||
- (void)showOnView:(nullable UIView *)parent {
|
||||
if (parent) {
|
||||
[parent addSubview:self];
|
||||
}else {
|
||||
[MainWindow() addSubview:self];
|
||||
}
|
||||
}
|
||||
- (void)initSubView {
|
||||
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
//几开,1,10,50
|
||||
self.currentTimes = 1;
|
||||
_boxType = 4;
|
||||
|
||||
_coin_value_1 = BJPassData.sharedBJPassData.boxValue_4;
|
||||
_coin_value_2 = BJPassData.sharedBJPassData.boxValue_6;
|
||||
_coin_value_3 = BJPassData.sharedBJPassData.boxValue_5;
|
||||
|
||||
NSString *priceText = [NSString stringWithFormat:@"%ld金币/次", (long)_coin_value_1];
|
||||
_priceTipLab.text = priceText;
|
||||
[self.priceCover styleGradiBlueColor];
|
||||
[self.boxCountCover styleGradiBlueColor];
|
||||
|
||||
//手气榜
|
||||
[self.rankImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:603];
|
||||
}];
|
||||
//规则说明
|
||||
[self.guiImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:600];
|
||||
}];
|
||||
//本期奖池
|
||||
[self.jiangchiImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:601];
|
||||
}];
|
||||
//中奖纪录
|
||||
[self.jiluImg dg_Tapped:^{
|
||||
[weakSelf buttonClickMethod:602];
|
||||
}];
|
||||
self.lotteryItems = [NSMutableArray arrayWithCapacity:0];
|
||||
//获取宝箱信息,余额情况
|
||||
[self loadData];
|
||||
[self addItem];
|
||||
[self loadpool];
|
||||
[self loadBoxCount];
|
||||
|
||||
[self.starImg dg_Tapped:^{
|
||||
[weakSelf openBoxWithTimes:weakSelf.currentTimes];
|
||||
}];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onSocketBaotiao:) name:@"BoxBaotiaoNoti" object:nil];
|
||||
[self onRequestBaotiao];
|
||||
}
|
||||
|
||||
- (void)onRequestBaotiao {
|
||||
NSDictionary *dict = @{@"type":@(self.boxType)};
|
||||
[RCMicHTTP postWithURLString:@"/api/box/get_bt_consume" parameters:dict response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
[self onUpdateBaotiaoUI:result.content];
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)onUpdateBaotiaoUI:(NSDictionary *)dataDict {
|
||||
CGFloat btDisMax = [dataDict safeFloatForKey:@"xxs_dis_box_consume"];
|
||||
CGFloat btCurrent = [dataDict safeFloatForKey:@"xxs_user_consume"];
|
||||
CGFloat btRatio = 0.0;
|
||||
if (btCurrent >= btDisMax) {
|
||||
btRatio = 1.0;
|
||||
}else {
|
||||
btRatio = btCurrent/btDisMax;
|
||||
}
|
||||
self.baotiaoValueLabel.text = [NSString stringWithFormat:@"%.0f/100",btRatio*100];
|
||||
self.baotiaoCenterHeight.constant = 280*btRatio;
|
||||
if (self.boxType == 4){
|
||||
self.baotiaoCenterView.backgroundColor = HEXCOLOR(0xFFA536);
|
||||
self.baotiaoValueLabel.textColor = HEXCOLOR(0x9F1200);
|
||||
}else if (self.boxType == 6){
|
||||
self.baotiaoCenterView.backgroundColor = HEXCOLOR(0xAF00F3);
|
||||
self.baotiaoValueLabel.textColor = HEXCOLOR(0xAF00F3);
|
||||
}else if (self.boxType == 5){
|
||||
self.baotiaoCenterView.backgroundColor = HEXCOLOR(0xFF6A71);
|
||||
self.baotiaoValueLabel.textColor = HEXCOLOR(0xFF072F);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)onSocketBaotiao:(NSNotification *)noti {
|
||||
NSDictionary *dataDict = noti.userInfo;
|
||||
[self onUpdateBaotiaoUI:dataDict];
|
||||
}
|
||||
|
||||
|
||||
-(void)loadpool{
|
||||
NSDictionary *dict = @{@"tid":@(self.boxType)};
|
||||
[BJHttpTool getAwardJiangChiListWithParameters:dict success:^(id response) {
|
||||
if ([response[@"code"] intValue] == 200) {
|
||||
NSArray *arr = [BJRoomGiftModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
|
||||
if (arr.count > Lottery_Num) {
|
||||
self.giftArray = [arr subarrayWithRange:NSMakeRange(0, Lottery_Num)];
|
||||
}else {
|
||||
self.giftArray = arr;
|
||||
}
|
||||
[self onUpdateLotteryUI];
|
||||
}
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
MYLog(@"获取转盘奖池失败");
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)loadBoxCount
|
||||
{
|
||||
[BJHttpTool BJ_User_get_user_box_timesParameters:@{} success:^(id response) {
|
||||
NSDictionary *data = [response safeDictionaryForKey:@"data"];
|
||||
self.boxCountLabel.text = [NSString stringWithFormat:@"抽奖次数:%@",[data safeStringForKey:@"user_box_times"]];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)addItem{
|
||||
for (NSInteger i = 0; i < Lottery_Num; i++) {
|
||||
ZhuanzhuanLotteryItem *item = [[NSBundle mainBundle] loadNibNamed:@"ZhuanzhuanLotteryItem" owner:self options:nil].firstObject;
|
||||
item.tag = 1000+i;
|
||||
[self.itemView addSubview:item];
|
||||
[self.lotteryItems addObject:item];
|
||||
CGFloat viewW = APPW-90;
|
||||
CGFloat itemW = (viewW-(2*8))/3;
|
||||
CGFloat itemH = (viewW/300*266-(2*8))/3;
|
||||
CGSize normalSize = CGSizeMake(itemW,itemH);
|
||||
|
||||
if (i < 3) {
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.itemView).offset(i*(itemW+8));
|
||||
make.top.equalTo(self.itemView).offset(0);
|
||||
make.size.mas_equalTo(normalSize);
|
||||
}];
|
||||
}else if (i == 7){
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.itemView).offset(0*(itemW+8));
|
||||
make.top.equalTo(self.itemView).offset(1*(itemH+8));
|
||||
make.size.mas_equalTo(normalSize);
|
||||
}];
|
||||
}else if (i == 3){
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.itemView).offset(2*(itemW+8));
|
||||
make.top.equalTo(self.itemView).offset(1*(itemH+8));
|
||||
make.size.mas_equalTo(normalSize);
|
||||
}];
|
||||
}else if (i == 6){
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.itemView).offset(0);
|
||||
make.top.equalTo(self.itemView).offset(2*(itemH+8));
|
||||
make.size.mas_equalTo(normalSize);
|
||||
}];
|
||||
}else if (i == 5){
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.itemView).offset(itemW+8);
|
||||
make.top.equalTo(self.itemView).offset(2*(itemH+8));
|
||||
make.size.mas_equalTo(normalSize);
|
||||
}];
|
||||
}else if (i == 4){
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.itemView).offset(2*(itemW+8));
|
||||
make.top.equalTo(self.itemView).offset(2*(itemH+8));
|
||||
make.size.mas_equalTo(normalSize);
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)onleftBtn:(id)sender {
|
||||
self.boxType = 4;
|
||||
self.currentTimes = 1;
|
||||
[self changePrice];
|
||||
[self loadpool];
|
||||
[self changeBoxtype];
|
||||
[self onRequestBaotiao];
|
||||
}
|
||||
- (IBAction)onrightBtn:(id)sender {
|
||||
self.boxType = 5;
|
||||
self.currentTimes = 1;
|
||||
[self changePrice];
|
||||
[self loadpool];
|
||||
[self changeBoxtype];
|
||||
[self onRequestBaotiao];
|
||||
}
|
||||
|
||||
- (IBAction)onCenterButtonClick:(UIButton *)sender {
|
||||
self.boxType = 6;
|
||||
self.currentTimes = 1;
|
||||
[self changePrice];
|
||||
[self loadpool];
|
||||
[self changeBoxtype];
|
||||
[self onRequestBaotiao];
|
||||
}
|
||||
|
||||
-(void)changeBoxtype{
|
||||
if(_boxType == 4){
|
||||
self.bgimg.image = ImageNamed(@"zhuanzhuan_view_bg_1");
|
||||
self.zhuanneiImg.image = ImageNamed(@"zhuanzhuan_center_bg_1");
|
||||
self.starImg.image = ImageNamed(@"zhuanzhuan_center_go_1");
|
||||
self.priceCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xFF6000) endColor:HEXCOLOR(0xFFBE45)];
|
||||
self.boxCountCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xFF6000) endColor:HEXCOLOR(0xFFBE45)];
|
||||
self.guiImg.image = ImageNamed(@"zhuanzhuan_rule_1");
|
||||
self.jiangchiImg.image = ImageNamed(@"zhuanzhuan_pool_1");
|
||||
self.rankImg.image = ImageNamed(@"zhuanzhuan_rank_1");
|
||||
self.jiluImg.image = ImageNamed(@"zhuanzhuan_record_1");
|
||||
self.coinBGIMG.image = ImageNamed(@"zhuanzhuan_coin_bg_1");
|
||||
self.baotiaoCenterView.backgroundColor = HEXCOLOR(0xFFA536);
|
||||
self.baotiaoValueLabel.textColor = HEXCOLOR(0x9F1200);
|
||||
self.baotiaoBGImage.image = ImageNamed(@"zhuanzhuan_box_baotiao_bg_1");
|
||||
}else if(_boxType == 5){
|
||||
self.bgimg.image = ImageNamed(@"zhuanzhuan_view_bg_3");
|
||||
self.zhuanneiImg.image = ImageNamed(@"zhuanzhuan_center_bg_3");
|
||||
self.starImg.image = ImageNamed(@"zhuanzhuan_center_go_3");
|
||||
self.priceCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xFF5773) endColor:HEXCOLOR(0xFF7A7C)];
|
||||
self.boxCountCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xFF5773) endColor:HEXCOLOR(0xFF7A7C)];
|
||||
self.guiImg.image = ImageNamed(@"zhuanzhuan_rule_3");
|
||||
self.jiangchiImg.image = ImageNamed(@"zhuanzhuan_pool_3");
|
||||
self.rankImg.image = ImageNamed(@"zhuanzhuan_rank_3");
|
||||
self.jiluImg.image = ImageNamed(@"zhuanzhuan_record_3");
|
||||
self.coinBGIMG.image = ImageNamed(@"zhuanzhuan_coin_bg_3");
|
||||
self.baotiaoBGImage.image = ImageNamed(@"zhuanzhuan_box_baotiao_bg_3");
|
||||
|
||||
self.baotiaoCenterView.backgroundColor = HEXCOLOR(0xFF455E);
|
||||
self.baotiaoValueLabel.textColor = HEXCOLOR(0xFF072F);
|
||||
}else if(_boxType == 6){
|
||||
self.bgimg.image = ImageNamed(@"zhuanzhuan_view_bg_2");
|
||||
self.zhuanneiImg.image = ImageNamed(@"zhuanzhuan_center_bg_2");
|
||||
self.starImg.image = ImageNamed(@"zhuanzhuan_center_go_2");
|
||||
self.priceCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xB81BFF) endColor:HEXCOLOR(0xD248FF)];
|
||||
self.boxCountCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xB81BFF) endColor:HEXCOLOR(0xD248FF)];
|
||||
self.guiImg.image = ImageNamed(@"zhuanzhuan_rule_2");
|
||||
self.jiangchiImg.image = ImageNamed(@"zhuanzhuan_pool_2");
|
||||
self.rankImg.image = ImageNamed(@"zhuanzhuan_rank_2");
|
||||
self.jiluImg.image = ImageNamed(@"zhuanzhuan_record_2");
|
||||
self.coinBGIMG.image = ImageNamed(@"zhuanzhuan_coin_bg_2");
|
||||
self.baotiaoBGImage.image = ImageNamed(@"zhuanzhuan_box_baotiao_bg_2");
|
||||
|
||||
self.baotiaoCenterView.backgroundColor = HEXCOLOR(0xAF00F3);
|
||||
self.baotiaoValueLabel.textColor = HEXCOLOR(0xAF00F3);
|
||||
}
|
||||
|
||||
[self.oneBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_1"] forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_10_s"] forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_100_s"] forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
- (void)loadData
|
||||
{
|
||||
|
||||
NSDictionary *dict = @{};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/user/get_user_money" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
NSString *moneyText = [result.content safeStringForKey:@"integral"];
|
||||
self.ticketNumLab.text = NSStringFormat(@"%@", moneyText);
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
#pragma mark - 4个按钮
|
||||
- (void)buttonClickMethod:(NSInteger)tag {
|
||||
switch (tag) {
|
||||
case 600:{
|
||||
//说明
|
||||
BJBoxRuleAlert *view = [[BJBoxRuleAlert alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 601:{
|
||||
BJBoxPoolAlert *view = [[BJBoxPoolAlert alloc] initWithFrame:CGRectZero];
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 602:{
|
||||
//中奖记录
|
||||
BJBoxRecordAlert *view = [[BJBoxRecordAlert alloc] initWithFrame:CGRectZero];
|
||||
view.frame = UIScreen.mainScreen.bounds;
|
||||
[view showOnView:UIViewController.currentViewController.view WithType:_boxType];
|
||||
}break;
|
||||
case 603:{
|
||||
BJBoxRankAlert *view = [[BJBoxRankAlert alloc] initWithFrame:CGRectZero];
|
||||
[view showOnView:UIViewController.currentViewController.view roomId:_viewModel.roomInfo.roomId WithType:_boxType];
|
||||
}break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
- (IBAction)closeOclk:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
|
||||
}
|
||||
|
||||
-(void)changePrice {
|
||||
NSInteger singlePrice = 0;
|
||||
if (self.boxType == 4) {
|
||||
singlePrice = _coin_value_1;
|
||||
}else if (self.boxType == 5) {
|
||||
singlePrice = _coin_value_2;
|
||||
}else if (self.boxType == 6) {
|
||||
singlePrice = _coin_value_3;
|
||||
}
|
||||
|
||||
NSString *priceText = [NSString stringWithFormat:@"%ld金币/次", singlePrice*self.currentTimes];
|
||||
self.priceTipLab.text = priceText;
|
||||
if(_boxType == 4){
|
||||
self.priceCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xFF6000) endColor:HEXCOLOR(0xFFBE45)];
|
||||
}else if(_boxType == 5){
|
||||
self.priceCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xFF5773) endColor:HEXCOLOR(0xFF7A7C)];
|
||||
}else if(_boxType == 6){
|
||||
self.priceCover.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(120, 23) direction:(FXGradientChangeDirectionHorizontal) startColor:HEXCOLOR(0xB81BFF) endColor:HEXCOLOR(0xD248FF)];
|
||||
}
|
||||
}
|
||||
- (IBAction)onOneOClk:(id)sender {
|
||||
self.currentTimes = 1;
|
||||
|
||||
[self changePrice];
|
||||
[self.oneBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_1"] forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_10_s"] forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_100_s"] forState:UIControlStateNormal];
|
||||
// [self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
- (IBAction)onTenOclk:(id)sender {
|
||||
self.currentTimes = 10;
|
||||
|
||||
[self changePrice];
|
||||
[self.oneBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_1_s"] forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_10"] forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_100_s"] forState:UIControlStateNormal];
|
||||
|
||||
// [self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
- (IBAction)onBaiOclk:(id)sender {
|
||||
self.currentTimes = 30;
|
||||
|
||||
[self changePrice];
|
||||
[self.oneBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_1_s"] forState:UIControlStateNormal];
|
||||
[self.tenBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_10_s"] forState:UIControlStateNormal];
|
||||
[self.baiBtn setImage:[UIImage imageNamed:@"zhuanzhuan_box_100"] forState:UIControlStateNormal];
|
||||
// [self openBoxWithTimes:self.currentTimes];
|
||||
}
|
||||
|
||||
- (void)onUpdateBtnsEnabled:(BOOL)enabled {
|
||||
self.oneBtn.userInteractionEnabled = self.tenBtn.userInteractionEnabled = self.baiBtn.userInteractionEnabled = self.leftBtn.userInteractionEnabled = self.rightBtn.userInteractionEnabled = enabled;
|
||||
}
|
||||
|
||||
- (void)openBoxWithTimes:(NSInteger )keysNum {
|
||||
[self onUpdateBtnsEnabled:NO];
|
||||
|
||||
// [self onPlaySelectedAudio];
|
||||
self.resultView.hidden = YES;
|
||||
NSDictionary *dict = @{@"open_num":@(keysNum),
|
||||
@"bs":@(0),
|
||||
@"tid":@(_boxType).stringValue,
|
||||
@"rid":C_string(_viewModel.roomInfo.roomId)};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/box/open_box" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
//奖品、价值、余额
|
||||
NSString *leftMoney = [result.content safeStringForKey:@"user_money"];
|
||||
self.ticketNumLab.text = NSStringFormat(@"%@", leftMoney);
|
||||
|
||||
NSArray *giftArr = [BJBoxAwardModel mj_objectArrayWithKeyValuesArray:result.content[@"win_gift_list"]];
|
||||
BJBoxAwardModel *bigestObj = giftArr.firstObject;
|
||||
for (BJBoxAwardModel *obj in giftArr) {
|
||||
if ([obj.gift_price integerValue] > [bigestObj.gift_price integerValue]) {
|
||||
bigestObj = obj;
|
||||
}
|
||||
}
|
||||
WEAK_SELF
|
||||
[self onStartWithGid:bigestObj.gid endBlock:^{
|
||||
weakSelf.resultView.hidden = NO;
|
||||
[weakSelf.resultView showOnView:weakSelf WithResult:result.content withPara:paras withType:weakSelf.boxType];
|
||||
|
||||
[weakSelf onUpdateBtnsEnabled:YES];
|
||||
}];
|
||||
[self loadBoxCount];
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
[self onUpdateBtnsEnabled:YES];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
[self onUpdateBtnsEnabled:YES];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
//奖池赋值方法
|
||||
-(void)onUpdateLotteryUI {
|
||||
for (NSInteger i = 0; i < self.giftArray.count; i++) {
|
||||
BJRoomGiftModel *model = self.giftArray[i];
|
||||
if (i < self.lotteryItems.count) {
|
||||
ZhuanzhuanLotteryItem *item = self.lotteryItems[i];
|
||||
[item.bigbgImg sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
item.giftPriceLab.text = model.gift_name;
|
||||
if (self.boxType == 4){
|
||||
item.bgImgV.image = ImageNamed(@"zhuanzhuan_gift_bg_nor_1");
|
||||
}else if (self.boxType == 6){
|
||||
item.bgImgV.image = ImageNamed(@"zhuanzhuan_gift_bg_nor_2");
|
||||
}else if (self.boxType == 5){
|
||||
item.bgImgV.image = ImageNamed(@"zhuanzhuan_gift_bg_nor_3");
|
||||
}
|
||||
item.giftNameLabel.text = model.gift_price;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - laze
|
||||
|
||||
- (BJBoxResultAlert *)resultView{
|
||||
if (!_resultView) {
|
||||
_resultView = [[BJBoxResultAlert alloc] initWithFrame:CGRectZero];
|
||||
WEAK_SELF
|
||||
_resultView.refreshCoinBlock = ^(NSString * _Nonnull leftMoney) {
|
||||
[weakSelf loadData];
|
||||
};
|
||||
_resultView.tryAgainBlock = ^{
|
||||
[weakSelf openBoxWithTimes:weakSelf.currentTimes];
|
||||
};
|
||||
}
|
||||
return _resultView;
|
||||
}
|
||||
|
||||
#pragma mark ---开奖动画---
|
||||
|
||||
- (void)onStartWithGid:(NSString *)gid endBlock:(void (^)(void))endBlock {
|
||||
self.onEndBlock = endBlock;
|
||||
|
||||
NSInteger resultIndex = 0;
|
||||
for (NSInteger i = 0; i < self.giftArray.count; i++) {
|
||||
BJRoomGiftModel *model = self.giftArray[i];
|
||||
if ([gid isEqualToString:model.gid]) {
|
||||
resultIndex = i;
|
||||
}
|
||||
}
|
||||
self.resultIndex = resultIndex;
|
||||
|
||||
self.totalTime = 0;
|
||||
[self.timer startTimer:0.1 delegate:self repeats:YES];
|
||||
}
|
||||
|
||||
-(void)onTimerFired:(ZWTimer *)timer {
|
||||
self.totalTime += 0.1;
|
||||
self.currentIndex += 1;
|
||||
if (self.currentIndex >= self.lotteryItems.count) {
|
||||
self.currentIndex = 0;
|
||||
}
|
||||
[self onChangeItemUI];
|
||||
|
||||
if (self.resultIndex == self.currentIndex && self.totalTime >= 1.5) {
|
||||
[self.timer stopTimer];
|
||||
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
if (self.onEndBlock) {
|
||||
self.onEndBlock();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
-(void)onChangeItemUI {
|
||||
if (self.currentIndex < self.lotteryItems.count) {
|
||||
self.lastItem = self.currentItem;
|
||||
self.currentItem = self.lotteryItems[self.currentIndex];
|
||||
}
|
||||
if (self.lastItem) {
|
||||
UIImage *image = [UIImage imageNamed:@"zhuanzhuan_gift_bg_nor"];
|
||||
if (self.boxType == 4){
|
||||
image = ImageNamed(@"zhuanzhuan_gift_bg_nor_1");
|
||||
}else if (self.boxType == 6){
|
||||
image = ImageNamed(@"zhuanzhuan_gift_bg_nor_2");
|
||||
}else if (self.boxType == 5){
|
||||
image = ImageNamed(@"zhuanzhuan_gift_bg_nor_3");
|
||||
}
|
||||
self.lastItem.bgImgV.image = image;
|
||||
}
|
||||
if (self.currentItem) {
|
||||
if (self.boxType == 4){
|
||||
self.currentItem.bgImgV.image = ImageNamed(@"zhuanzhuan_gift_bg_sel_1");
|
||||
}else if (self.boxType == 6){
|
||||
self.currentItem.bgImgV.image = ImageNamed(@"zhuanzhuan_gift_bg_sel_2");
|
||||
}else if (self.boxType == 5){
|
||||
self.currentItem.bgImgV.image = ImageNamed(@"zhuanzhuan_gift_bg_sel_3");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (ZWTimer *)timer {
|
||||
if (_timer == nil) {
|
||||
_timer = [[ZWTimer alloc] init];
|
||||
}
|
||||
return _timer;
|
||||
}
|
||||
|
||||
@end
|
||||
380
SweetParty/主类/RCMic/Room/Box/九宫格转盘/BJZhuanpanZhuanzView.xib
Executable file
380
SweetParty/主类/RCMic/Room/Box/九宫格转盘/BJZhuanpanZhuanzView.xib
Executable file
@@ -0,0 +1,380 @@
|
||||
<?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" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_0" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="BJZhuanpanZhuanzView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="390" height="844"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Bz-N0-6K8">
|
||||
<rect key="frame" x="0.0" y="0.0" width="390" height="844"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="closeOclk:" destination="iN0-l3-epB" eventType="touchUpInside" id="U3f-2T-MJB"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cNJ-s3-Q3J">
|
||||
<rect key="frame" x="0.0" y="303.33333333333331" width="390" height="540.66666666666674"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_view_bg_1" translatesAutoresizingMaskIntoConstraints="NO" id="t2j-Ij-v81">
|
||||
<rect key="frame" x="0.0" y="0.0" width="390" height="540.66666666666663"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="apg-E5-tpO">
|
||||
<rect key="frame" x="0.0" y="54.000000000000028" width="390" height="486.66666666666674"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_center_bg_1" translatesAutoresizingMaskIntoConstraints="NO" id="3cs-d5-U27">
|
||||
<rect key="frame" x="0.0" y="0.0" width="390" height="486.66666666666669"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hMG-7k-suB">
|
||||
<rect key="frame" x="45" y="95" width="300" height="266.66666666666669"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3G6-Tm-icx">
|
||||
<rect key="frame" x="100" y="83.333333333333314" width="100" height="100"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="zhuanzhuan_center_go_1" translatesAutoresizingMaskIntoConstraints="NO" id="Cmc-Xl-XLT">
|
||||
<rect key="frame" x="1.6666666666666572" y="0.0" width="97" height="100"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="FCe-q5-d7V"/>
|
||||
<constraint firstAttribute="height" constant="100" id="RSl-wF-FLf"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="3G6-Tm-icx" firstAttribute="centerX" secondItem="hMG-7k-suB" secondAttribute="centerX" id="0RQ-a4-p1T"/>
|
||||
<constraint firstItem="3G6-Tm-icx" firstAttribute="centerY" secondItem="hMG-7k-suB" secondAttribute="centerY" id="iD3-RC-NtH"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kJz-9c-sPz">
|
||||
<rect key="frame" x="210" y="371.00000000000006" width="110" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="抽奖次数:333次" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rqF-TH-eDY">
|
||||
<rect key="frame" x="10" y="5.3333333333332584" width="90" height="13.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="11"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemRedColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="110" id="Dn4-lI-iGD"/>
|
||||
<constraint firstItem="rqF-TH-eDY" firstAttribute="leading" secondItem="kJz-9c-sPz" secondAttribute="leading" constant="10" id="Vuv-Ut-R5Q"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rqF-TH-eDY" secondAttribute="trailing" constant="10" id="fDt-EP-Cwu"/>
|
||||
<constraint firstItem="rqF-TH-eDY" firstAttribute="centerY" secondItem="kJz-9c-sPz" secondAttribute="centerY" id="iff-YO-iFc"/>
|
||||
<constraint firstAttribute="height" constant="24" id="oJx-uE-A3j"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="3cs-d5-U27" secondAttribute="bottom" id="5Vo-n1-YeG"/>
|
||||
<constraint firstItem="hMG-7k-suB" firstAttribute="leading" secondItem="apg-E5-tpO" secondAttribute="leading" constant="45" id="BsD-lZ-7I3"/>
|
||||
<constraint firstAttribute="width" secondItem="apg-E5-tpO" secondAttribute="height" multiplier="375:468" id="E8n-8U-FYh"/>
|
||||
<constraint firstItem="kJz-9c-sPz" firstAttribute="centerX" secondItem="apg-E5-tpO" secondAttribute="centerX" constant="70" id="HVJ-zi-GDC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="hMG-7k-suB" secondAttribute="bottom" constant="125" id="T8G-vK-E0F"/>
|
||||
<constraint firstItem="3cs-d5-U27" firstAttribute="top" secondItem="apg-E5-tpO" secondAttribute="top" id="beG-oy-Laz"/>
|
||||
<constraint firstItem="3cs-d5-U27" firstAttribute="leading" secondItem="apg-E5-tpO" secondAttribute="leading" id="lq3-9z-4Wh"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3cs-d5-U27" secondAttribute="trailing" id="smd-ZD-nUN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hMG-7k-suB" secondAttribute="trailing" constant="45" id="w2j-nS-T0x"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fKJ-B7-9G4">
|
||||
<rect key="frame" x="27.666666666666664" y="459.00000000000006" width="103.66666666666669" height="46.666666666666686"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="zhuanzhuan_box_1"/>
|
||||
<connections>
|
||||
<action selector="onOneOClk:" destination="iN0-l3-epB" eventType="touchUpInside" id="06P-RY-WRo"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hB6-Vi-4em">
|
||||
<rect key="frame" x="143.33333333333334" y="459.00000000000006" width="103.66666666666666" height="46.666666666666686"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="zhuanzhuan_box_10_s"/>
|
||||
<connections>
|
||||
<action selector="onTenOclk:" destination="iN0-l3-epB" eventType="touchUpInside" id="8dV-yR-dqV"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fSB-om-2oQ">
|
||||
<rect key="frame" x="259" y="459.00000000000006" width="103.66666666666669" height="46.666666666666686"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="zhuanzhuan_box_100_s"/>
|
||||
<connections>
|
||||
<action selector="onBaiOclk:" destination="iN0-l3-epB" eventType="touchUpInside" id="Mhz-MK-Yg1"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0/100" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b4D-nv-uvh">
|
||||
<rect key="frame" x="7.3333333333333339" y="155" width="29.666666666666664" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fh8-dy-zoL">
|
||||
<rect key="frame" x="12" y="172" width="20" height="280"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_box_baotiao_bg_1" translatesAutoresizingMaskIntoConstraints="NO" id="W6l-Cr-mQh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="20" height="280"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F4u-xa-fDg">
|
||||
<rect key="frame" x="2" y="150.00000000000006" width="16" height="128"/>
|
||||
<color key="backgroundColor" systemColor="systemRedColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="128" id="74w-TD-5b1"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="0Ru-BM-5iy"/>
|
||||
<constraint firstAttribute="height" constant="280" id="8LL-QH-Jk4"/>
|
||||
<constraint firstAttribute="bottom" secondItem="F4u-xa-fDg" secondAttribute="bottom" constant="2" id="MBp-v8-0Ky"/>
|
||||
<constraint firstItem="W6l-Cr-mQh" firstAttribute="leading" secondItem="fh8-dy-zoL" secondAttribute="leading" id="VbS-cn-MxC"/>
|
||||
<constraint firstItem="F4u-xa-fDg" firstAttribute="leading" secondItem="fh8-dy-zoL" secondAttribute="leading" constant="2" id="XHy-Rp-hjq"/>
|
||||
<constraint firstItem="W6l-Cr-mQh" firstAttribute="top" secondItem="fh8-dy-zoL" secondAttribute="top" id="Y8j-C1-fYI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="W6l-Cr-mQh" secondAttribute="bottom" id="eb2-NY-jXD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="F4u-xa-fDg" secondAttribute="trailing" constant="2" id="fsi-CZ-FM5"/>
|
||||
<constraint firstAttribute="trailing" secondItem="W6l-Cr-mQh" secondAttribute="trailing" id="zT6-Nm-BTE"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8MH-zM-i72">
|
||||
<rect key="frame" x="70" y="425.00000000000006" width="110" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="5000金币/次" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="e1d-pC-XnO">
|
||||
<rect key="frame" x="10" y="5.3333333333332584" width="90" height="13.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="11"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemRedColor"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="e1d-pC-XnO" secondAttribute="trailing" constant="10" id="1Ki-3P-fLz"/>
|
||||
<constraint firstAttribute="height" constant="24" id="EJ9-iE-ARq"/>
|
||||
<constraint firstItem="e1d-pC-XnO" firstAttribute="centerY" secondItem="8MH-zM-i72" secondAttribute="centerY" id="Fh5-cY-FM4"/>
|
||||
<constraint firstAttribute="width" constant="110" id="izH-kH-B2a"/>
|
||||
<constraint firstItem="e1d-pC-XnO" firstAttribute="leading" secondItem="8MH-zM-i72" secondAttribute="leading" constant="10" id="yQB-eu-H2V"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="12"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_rule_1" translatesAutoresizingMaskIntoConstraints="NO" id="aLB-Pw-afz">
|
||||
<rect key="frame" x="0.0" y="48" width="50" height="27"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_record_1" translatesAutoresizingMaskIntoConstraints="NO" id="yqc-9w-3te">
|
||||
<rect key="frame" x="0.0" y="95" width="50" height="27"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_rank_1" translatesAutoresizingMaskIntoConstraints="NO" id="aXG-FF-FxN">
|
||||
<rect key="frame" x="340" y="95" width="50" height="27"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_pool_1" translatesAutoresizingMaskIntoConstraints="NO" id="pmB-rx-m6n">
|
||||
<rect key="frame" x="340" y="48" width="50" height="27"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Uj-5Y-Fdr">
|
||||
<rect key="frame" x="164.33333333333334" y="67" width="61.333333333333343" height="26"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_coin_bg_1" translatesAutoresizingMaskIntoConstraints="NO" id="PYO-NN-d7G">
|
||||
<rect key="frame" x="0.0" y="0.0" width="61.333333333333336" height="26"/>
|
||||
</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="opZ-92-KOL">
|
||||
<rect key="frame" x="22" y="5.6666666666666865" width="31.333333333333329" height="14.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="opZ-92-KOL" firstAttribute="leading" secondItem="3Uj-5Y-Fdr" secondAttribute="leading" constant="22" id="4Lz-3N-HbN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="opZ-92-KOL" secondAttribute="trailing" constant="8" id="7uK-AT-h8x"/>
|
||||
<constraint firstItem="PYO-NN-d7G" firstAttribute="top" secondItem="3Uj-5Y-Fdr" secondAttribute="top" id="L6H-L4-8r6"/>
|
||||
<constraint firstItem="opZ-92-KOL" firstAttribute="centerY" secondItem="3Uj-5Y-Fdr" secondAttribute="centerY" id="MIU-ng-kou"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PYO-NN-d7G" secondAttribute="trailing" id="aPv-hr-Z3d"/>
|
||||
<constraint firstAttribute="bottom" secondItem="PYO-NN-d7G" secondAttribute="bottom" id="dmh-hL-VHl"/>
|
||||
<constraint firstAttribute="height" constant="26" id="etF-Q2-xZf"/>
|
||||
<constraint firstItem="PYO-NN-d7G" firstAttribute="leading" secondItem="3Uj-5Y-Fdr" secondAttribute="leading" id="uZi-Nm-d0u"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="U3K-2z-0Mc">
|
||||
<rect key="frame" x="50" y="99" width="100" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="Jrj-rV-QZa"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="onleftBtn:" destination="iN0-l3-epB" eventType="touchUpInside" id="C2H-Ph-SJO"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhaun_coin" translatesAutoresizingMaskIntoConstraints="NO" id="HjC-3r-am1">
|
||||
<rect key="frame" x="164.33333333333334" y="71" width="17" height="18"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iz0-Yg-UED">
|
||||
<rect key="frame" x="240" y="99" width="100" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="onrightBtn:" destination="iN0-l3-epB" eventType="touchUpInside" id="Vfy-xQ-saC"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jHy-hp-EJ4">
|
||||
<rect key="frame" x="150" y="99" width="90" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="EZO-xP-4um"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<connections>
|
||||
<action selector="onCenterButtonClick:" destination="iN0-l3-epB" eventType="touchUpInside" id="UPC-wg-evD"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="t2j-Ij-v81" firstAttribute="leading" secondItem="cNJ-s3-Q3J" secondAttribute="leading" id="35m-9R-EfE"/>
|
||||
<constraint firstItem="hB6-Vi-4em" firstAttribute="leading" secondItem="fKJ-B7-9G4" secondAttribute="trailing" constant="12" id="5ZF-2l-gmq"/>
|
||||
<constraint firstItem="HjC-3r-am1" firstAttribute="leading" secondItem="3Uj-5Y-Fdr" secondAttribute="leading" id="7z8-3x-2d0"/>
|
||||
<constraint firstAttribute="trailing" secondItem="aXG-FF-FxN" secondAttribute="trailing" id="9Mq-jG-oC9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="t2j-Ij-v81" secondAttribute="bottom" id="ABe-uv-GOs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fKJ-B7-9G4" secondAttribute="bottom" constant="35" id="AXa-NR-Nha"/>
|
||||
<constraint firstAttribute="bottom" secondItem="hB6-Vi-4em" secondAttribute="bottom" constant="35" id="BVN-tZ-2lW"/>
|
||||
<constraint firstAttribute="trailing" secondItem="t2j-Ij-v81" secondAttribute="trailing" id="Bsc-re-tPU"/>
|
||||
<constraint firstItem="aLB-Pw-afz" firstAttribute="leading" secondItem="cNJ-s3-Q3J" secondAttribute="leading" id="BxU-ME-vI9"/>
|
||||
<constraint firstItem="hMG-7k-suB" firstAttribute="top" secondItem="U3K-2z-0Mc" secondAttribute="bottom" constant="10" id="DAK-JK-9z5"/>
|
||||
<constraint firstItem="iz0-Yg-UED" firstAttribute="leading" secondItem="jHy-hp-EJ4" secondAttribute="trailing" id="FwP-kK-1NU"/>
|
||||
<constraint firstItem="fh8-dy-zoL" firstAttribute="top" secondItem="b4D-nv-uvh" secondAttribute="bottom" constant="5" id="GK4-s7-fOO"/>
|
||||
<constraint firstItem="fh8-dy-zoL" firstAttribute="top" secondItem="yqc-9w-3te" secondAttribute="bottom" constant="50" id="GbO-2h-vo1"/>
|
||||
<constraint firstItem="hB6-Vi-4em" firstAttribute="centerX" secondItem="cNJ-s3-Q3J" secondAttribute="centerX" id="JwF-Xu-aF9"/>
|
||||
<constraint firstAttribute="width" secondItem="cNJ-s3-Q3J" secondAttribute="height" multiplier="375:520" id="KBK-6e-DXR"/>
|
||||
<constraint firstItem="apg-E5-tpO" firstAttribute="leading" secondItem="cNJ-s3-Q3J" secondAttribute="leading" id="LX2-qY-Frg"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fSB-om-2oQ" secondAttribute="bottom" constant="35" id="N8e-zj-20i"/>
|
||||
<constraint firstAttribute="trailing" secondItem="apg-E5-tpO" secondAttribute="trailing" id="P5h-G3-02V"/>
|
||||
<constraint firstItem="jHy-hp-EJ4" firstAttribute="centerY" secondItem="U3K-2z-0Mc" secondAttribute="centerY" id="PLS-i0-UV1"/>
|
||||
<constraint firstItem="aXG-FF-FxN" firstAttribute="leading" secondItem="iz0-Yg-UED" secondAttribute="trailing" id="Tdj-Kq-c8M"/>
|
||||
<constraint firstItem="3Uj-5Y-Fdr" firstAttribute="top" secondItem="cNJ-s3-Q3J" secondAttribute="top" constant="67" id="V69-Wv-Zzr"/>
|
||||
<constraint firstItem="aLB-Pw-afz" firstAttribute="top" secondItem="cNJ-s3-Q3J" secondAttribute="top" constant="48" id="XOT-Rx-ZCx"/>
|
||||
<constraint firstItem="U3K-2z-0Mc" firstAttribute="width" secondItem="3cs-d5-U27" secondAttribute="width" multiplier="0.25641" id="Z0b-jk-ZDR"/>
|
||||
<constraint firstItem="pmB-rx-m6n" firstAttribute="top" secondItem="cNJ-s3-Q3J" secondAttribute="top" constant="48" id="ZOE-IY-g0I"/>
|
||||
<constraint firstAttribute="trailing" secondItem="pmB-rx-m6n" secondAttribute="trailing" id="a4G-a0-DRZ"/>
|
||||
<constraint firstItem="jHy-hp-EJ4" firstAttribute="leading" secondItem="U3K-2z-0Mc" secondAttribute="trailing" id="aS6-fQ-Z5G"/>
|
||||
<constraint firstItem="HjC-3r-am1" firstAttribute="centerY" secondItem="3Uj-5Y-Fdr" secondAttribute="centerY" id="cXC-Be-eL0"/>
|
||||
<constraint firstItem="b4D-nv-uvh" firstAttribute="centerX" secondItem="fh8-dy-zoL" secondAttribute="centerX" id="dnv-9c-oXJ"/>
|
||||
<constraint firstItem="iz0-Yg-UED" firstAttribute="centerY" secondItem="U3K-2z-0Mc" secondAttribute="centerY" id="e2j-W6-kp9"/>
|
||||
<constraint firstItem="t2j-Ij-v81" firstAttribute="top" secondItem="cNJ-s3-Q3J" secondAttribute="top" id="g62-Pr-mTu"/>
|
||||
<constraint firstItem="fh8-dy-zoL" firstAttribute="leading" secondItem="cNJ-s3-Q3J" secondAttribute="leading" constant="12" id="gHv-BX-NOs"/>
|
||||
<constraint firstItem="8MH-zM-i72" firstAttribute="centerX" secondItem="cNJ-s3-Q3J" secondAttribute="centerX" constant="-70" id="h1o-TC-Zey"/>
|
||||
<constraint firstItem="U3K-2z-0Mc" firstAttribute="leading" secondItem="yqc-9w-3te" secondAttribute="trailing" id="ibR-Qc-OvB"/>
|
||||
<constraint firstItem="fSB-om-2oQ" firstAttribute="leading" secondItem="hB6-Vi-4em" secondAttribute="trailing" constant="12" id="khU-kf-TgW"/>
|
||||
<constraint firstItem="iz0-Yg-UED" firstAttribute="height" secondItem="U3K-2z-0Mc" secondAttribute="height" id="nbg-D0-8nK"/>
|
||||
<constraint firstItem="U3K-2z-0Mc" firstAttribute="centerY" secondItem="cNJ-s3-Q3J" secondAttribute="centerY" multiplier="0.44" id="pHv-Y1-KwZ"/>
|
||||
<constraint firstItem="aXG-FF-FxN" firstAttribute="top" secondItem="pmB-rx-m6n" secondAttribute="bottom" constant="20" id="r3F-d1-SBC"/>
|
||||
<constraint firstItem="iz0-Yg-UED" firstAttribute="width" secondItem="U3K-2z-0Mc" secondAttribute="width" id="rTq-tM-snu"/>
|
||||
<constraint firstAttribute="bottom" secondItem="apg-E5-tpO" secondAttribute="bottom" id="sLS-4T-O5W"/>
|
||||
<constraint firstItem="yqc-9w-3te" firstAttribute="top" secondItem="aLB-Pw-afz" secondAttribute="bottom" constant="20" id="svk-wZ-iPq"/>
|
||||
<constraint firstItem="kJz-9c-sPz" firstAttribute="centerY" secondItem="8MH-zM-i72" secondAttribute="centerY" id="uB2-yx-CLb"/>
|
||||
<constraint firstItem="fKJ-B7-9G4" firstAttribute="top" secondItem="8MH-zM-i72" secondAttribute="bottom" constant="10" id="uok-2k-hnT"/>
|
||||
<constraint firstItem="yqc-9w-3te" firstAttribute="leading" secondItem="cNJ-s3-Q3J" secondAttribute="leading" id="xgh-SH-4ZJ"/>
|
||||
<constraint firstItem="3Uj-5Y-Fdr" firstAttribute="centerX" secondItem="cNJ-s3-Q3J" secondAttribute="centerX" id="zZg-cE-MHK"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.50501218523297986" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="1Bz-N0-6K8" secondAttribute="trailing" id="8fL-5K-MrB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="cNJ-s3-Q3J" secondAttribute="trailing" id="SRM-ry-gFt"/>
|
||||
<constraint firstItem="cNJ-s3-Q3J" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Yjd-kw-Ake"/>
|
||||
<constraint firstAttribute="bottom" secondItem="1Bz-N0-6K8" secondAttribute="bottom" id="ZXJ-VV-dhz"/>
|
||||
<constraint firstItem="1Bz-N0-6K8" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="crv-pa-f0g"/>
|
||||
<constraint firstAttribute="bottom" secondItem="cNJ-s3-Q3J" secondAttribute="bottom" id="uqp-sG-ZhY"/>
|
||||
<constraint firstItem="1Bz-N0-6K8" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="zcf-g9-ghg"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="baiBtn" destination="fSB-om-2oQ" id="boU-8v-rMp"/>
|
||||
<outlet property="baotiaoBGImage" destination="W6l-Cr-mQh" id="fmx-vX-fFq"/>
|
||||
<outlet property="baotiaoCenterHeight" destination="74w-TD-5b1" id="cLi-be-8Wl"/>
|
||||
<outlet property="baotiaoCenterView" destination="F4u-xa-fDg" id="Fs3-7u-aZb"/>
|
||||
<outlet property="baotiaoValueLabel" destination="b4D-nv-uvh" id="5OI-bz-DsL"/>
|
||||
<outlet property="bgimg" destination="t2j-Ij-v81" id="M2E-Jv-oRh"/>
|
||||
<outlet property="boxCountCover" destination="kJz-9c-sPz" id="Z7A-ss-qsS"/>
|
||||
<outlet property="boxCountLabel" destination="rqF-TH-eDY" id="RR8-OD-ESA"/>
|
||||
<outlet property="coinBGIMG" destination="PYO-NN-d7G" id="Jaf-He-0N3"/>
|
||||
<outlet property="guiImg" destination="aLB-Pw-afz" id="ZNq-Fi-B32"/>
|
||||
<outlet property="itemView" destination="hMG-7k-suB" id="h8O-yy-dSE"/>
|
||||
<outlet property="jiangchiImg" destination="pmB-rx-m6n" id="HL7-MW-jVp"/>
|
||||
<outlet property="jiluImg" destination="yqc-9w-3te" id="S2H-Cr-3DA"/>
|
||||
<outlet property="leftBtn" destination="U3K-2z-0Mc" id="WPN-F6-iMg"/>
|
||||
<outlet property="oneBtn" destination="fKJ-B7-9G4" id="UaI-n4-EOd"/>
|
||||
<outlet property="priceCover" destination="8MH-zM-i72" id="PYQ-dd-aje"/>
|
||||
<outlet property="priceTipLab" destination="e1d-pC-XnO" id="PkS-7t-Met"/>
|
||||
<outlet property="rankImg" destination="aXG-FF-FxN" id="Lku-ia-tKR"/>
|
||||
<outlet property="rightBtn" destination="iz0-Yg-UED" id="G0l-iu-SBu"/>
|
||||
<outlet property="starImg" destination="Cmc-Xl-XLT" id="4Qx-ZJ-qCG"/>
|
||||
<outlet property="starView" destination="hMG-7k-suB" id="4qw-8t-2H4"/>
|
||||
<outlet property="tenBtn" destination="hB6-Vi-4em" id="ngd-I0-3tX"/>
|
||||
<outlet property="ticketNumLab" destination="opZ-92-KOL" id="f6I-xN-Vk7"/>
|
||||
<outlet property="zhuanneiImg" destination="3cs-d5-U27" id="SF8-m8-Q0g"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-1468" y="-4"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="zhuanzhaun_coin" width="17" height="18"/>
|
||||
<image name="zhuanzhuan_box_1" width="103.5" height="46.5"/>
|
||||
<image name="zhuanzhuan_box_100_s" width="103.5" height="46.5"/>
|
||||
<image name="zhuanzhuan_box_10_s" width="103.5" height="46.5"/>
|
||||
<image name="zhuanzhuan_box_baotiao_bg_1" width="20" height="275"/>
|
||||
<image name="zhuanzhuan_center_bg_1" width="375" height="513.5"/>
|
||||
<image name="zhuanzhuan_center_go_1" width="97" height="100"/>
|
||||
<image name="zhuanzhuan_coin_bg_1" width="61.5" height="16"/>
|
||||
<image name="zhuanzhuan_pool_1" width="50" height="27"/>
|
||||
<image name="zhuanzhuan_rank_1" width="50" height="27"/>
|
||||
<image name="zhuanzhuan_record_1" width="50" height="27"/>
|
||||
<image name="zhuanzhuan_rule_1" width="50" height="27"/>
|
||||
<image name="zhuanzhuan_view_bg_1" width="375" height="520"/>
|
||||
<systemColor name="systemRedColor">
|
||||
<color red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
26
SweetParty/主类/RCMic/Room/Box/九宫格转盘/ZhuanzhuanLotteryItem.h
Normal file
26
SweetParty/主类/RCMic/Room/Box/九宫格转盘/ZhuanzhuanLotteryItem.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// ZhuanzhuanLotteryItem.h
|
||||
// romantic
|
||||
//
|
||||
// Created by Xmac on 2024/7/11.
|
||||
// Copyright © 2024 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ZhuanzhuanLotteryItem : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bigbgImg;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bgImgV;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftPriceLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftNameLabel;
|
||||
|
||||
-(void)onUpdateBigUI;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
19
SweetParty/主类/RCMic/Room/Box/九宫格转盘/ZhuanzhuanLotteryItem.m
Normal file
19
SweetParty/主类/RCMic/Room/Box/九宫格转盘/ZhuanzhuanLotteryItem.m
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// ZhuanzhuanLotteryItem.m
|
||||
// romantic
|
||||
//
|
||||
// Created by Xmac on 2024/7/11.
|
||||
// Copyright © 2024 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ZhuanzhuanLotteryItem.h"
|
||||
|
||||
@implementation ZhuanzhuanLotteryItem
|
||||
|
||||
-(void)onUpdateBigUI {
|
||||
self.bgImgV.image = ImageNamed(@"zhuanzhuan_gift_bg_nor");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
78
SweetParty/主类/RCMic/Room/Box/九宫格转盘/ZhuanzhuanLotteryItem.xib
Normal file
78
SweetParty/主类/RCMic/Room/Box/九宫格转盘/ZhuanzhuanLotteryItem.xib
Normal file
@@ -0,0 +1,78 @@
|
||||
<?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" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ZhuanzhuanLotteryItem">
|
||||
<rect key="frame" x="0.0" y="0.0" width="114" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuanzhuan_gift_bg_nor_1" translatesAutoresizingMaskIntoConstraints="NO" id="6bp-OI-qQq">
|
||||
<rect key="frame" x="0.0" y="0.0" width="114" height="90"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CHc-la-afd">
|
||||
<rect key="frame" x="38" y="5" width="38" height="38"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="38" id="8Vs-n8-GZp"/>
|
||||
<constraint firstAttribute="width" secondItem="CHc-la-afd" secondAttribute="height" multiplier="1:1" id="8YX-Y3-Mwn"/>
|
||||
<constraint firstAttribute="height" constant="38" id="UBE-rj-np0"/>
|
||||
</constraints>
|
||||
</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="NtE-Yb-9k7">
|
||||
<rect key="frame" x="41.333333333333336" y="45" width="31.666666666666664" height="14.666666666666664"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.62352941176470589" green="0.19215686274509802" blue="0.15686274509803921" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XYI-xP-QlX">
|
||||
<rect key="frame" x="48.666666666666657" y="61.666666666666657" width="33" height="15"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.62352941176470589" green="0.19215686274509802" blue="0.15686274509803921" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="dress_coin" translatesAutoresizingMaskIntoConstraints="NO" id="V8G-dk-eCz">
|
||||
<rect key="frame" x="33.666666666666664" y="63.333333333333343" width="12" height="12"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="12" id="lm3-5s-J4A"/>
|
||||
<constraint firstAttribute="width" constant="12" id="za7-dV-uuw"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="6bp-OI-qQq" secondAttribute="trailing" id="8Ni-Pp-HsN"/>
|
||||
<constraint firstItem="NtE-Yb-9k7" firstAttribute="top" secondItem="CHc-la-afd" secondAttribute="bottom" constant="2" id="9AC-L9-0Gr"/>
|
||||
<constraint firstItem="CHc-la-afd" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="HWj-wn-Nqw"/>
|
||||
<constraint firstItem="6bp-OI-qQq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Mji-Ks-Xm8"/>
|
||||
<constraint firstItem="6bp-OI-qQq" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="ORu-Zb-twi"/>
|
||||
<constraint firstItem="CHc-la-afd" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="5" id="QaX-0d-Ddo"/>
|
||||
<constraint firstItem="NtE-Yb-9k7" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="URY-SO-k1Z"/>
|
||||
<constraint firstItem="XYI-xP-QlX" firstAttribute="top" secondItem="NtE-Yb-9k7" secondAttribute="bottom" constant="2" id="ajA-Wd-cgq"/>
|
||||
<constraint firstItem="XYI-xP-QlX" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" constant="8" id="eXl-VV-hj0"/>
|
||||
<constraint firstItem="V8G-dk-eCz" firstAttribute="centerY" secondItem="XYI-xP-QlX" secondAttribute="centerY" id="wsW-ug-3sJ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="6bp-OI-qQq" secondAttribute="bottom" id="x6X-Kx-FkR"/>
|
||||
<constraint firstItem="XYI-xP-QlX" firstAttribute="leading" secondItem="V8G-dk-eCz" secondAttribute="trailing" constant="3" id="xXp-ff-iGb"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="bgImgV" destination="6bp-OI-qQq" id="xUI-oD-02P"/>
|
||||
<outlet property="bigbgImg" destination="CHc-la-afd" id="xpw-d3-6Vg"/>
|
||||
<outlet property="giftNameLabel" destination="XYI-xP-QlX" id="H8f-sk-6W4"/>
|
||||
<outlet property="giftPriceLab" destination="NtE-Yb-9k7" id="X6a-bJ-QG8"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-85.496183206106863" y="66.197183098591552"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="dress_coin" width="18" height="18"/>
|
||||
<image name="zhuanzhuan_gift_bg_nor_1" width="87" height="87"/>
|
||||
</resources>
|
||||
</document>
|
||||
30
SweetParty/主类/RCMic/Room/Box/开奖结果/BJBoxAwardModel.h
Executable file
30
SweetParty/主类/RCMic/Room/Box/开奖结果/BJBoxAwardModel.h
Executable file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// AwardModel.h
|
||||
//
|
||||
//
|
||||
// Created by aa on 2019/9/5.
|
||||
// Copyright © 2019 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJBoxAwardModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *gid; //": 2,
|
||||
@property (nonatomic, copy) NSString *gift_name; //": "玫瑰",
|
||||
@property (nonatomic, copy) NSString *gift_price; //": "10",
|
||||
@property (nonatomic, copy) NSString *base_image; //": "http://cdn.gu
|
||||
@property (nonatomic, copy) NSString *play_image; //": "http://cdn.gu
|
||||
@property (nonatomic, copy) NSString *gift_type; //": 1,
|
||||
@property (nonatomic, copy) NSString *open_num; //": 1,
|
||||
@property (nonatomic, copy) NSString *is_public_screen; //": 1,
|
||||
@property (nonatomic, copy) NSString *is_public_server; //": 2,
|
||||
@property (nonatomic, copy) NSString *type_name; //": "普通宝箱",
|
||||
@property (nonatomic, copy) NSString *box_type; //": "1"
|
||||
|
||||
@property(nonatomic, copy) NSString *surprise;//1,高级宝箱,2,普通宝箱
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
17
SweetParty/主类/RCMic/Room/Box/开奖结果/BJBoxAwardModel.m
Executable file
17
SweetParty/主类/RCMic/Room/Box/开奖结果/BJBoxAwardModel.m
Executable file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// AwardModel.m
|
||||
//
|
||||
//
|
||||
// Created by aa on 2019/9/5.
|
||||
// Copyright © 2019 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJBoxAwardModel.h"
|
||||
|
||||
@implementation BJBoxAwardModel
|
||||
+ (NSDictionary *)mj_replacedKeyFromPropertyName{
|
||||
return @{
|
||||
// @"giftID" : @"id",
|
||||
};
|
||||
}
|
||||
@end
|
||||
23
SweetParty/主类/RCMic/Room/Box/开奖结果/BJBoxResultAlert.h
Executable file
23
SweetParty/主类/RCMic/Room/Box/开奖结果/BJBoxResultAlert.h
Executable file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// QY_ResultView.h
|
||||
//
|
||||
//
|
||||
// Created by apple on 2020/10/19.
|
||||
// Copyright © 2020 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJBoxResultAlert : UIView
|
||||
|
||||
- (void)showOnView:(UIView *)parent WithResult:(NSDictionary *)result withPara:(NSDictionary *)paras withType:(NSInteger)type;
|
||||
|
||||
@property (nonatomic, copy) void(^tryAgainBlock)(void);
|
||||
|
||||
@property (nonatomic, copy) void(^refreshCoinBlock)(NSString *leftMoney);
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
396
SweetParty/主类/RCMic/Room/Box/开奖结果/BJBoxResultAlert.m
Executable file
396
SweetParty/主类/RCMic/Room/Box/开奖结果/BJBoxResultAlert.m
Executable file
@@ -0,0 +1,396 @@
|
||||
//
|
||||
// QY_ResultView.m
|
||||
//
|
||||
//
|
||||
// Created by apple on 2020/10/19.
|
||||
// Copyright © 2020 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJBoxResultAlert.h"
|
||||
#import "ResultCollectionViewCell.h"
|
||||
#import "BJBoxAwardModel.h"
|
||||
#import "BigGiftAlertView.h"
|
||||
#import "QQResultItem.h"
|
||||
|
||||
//
|
||||
@interface BJBoxResultAlert ()<UICollectionViewDelegate,UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>
|
||||
|
||||
@property (nonatomic, strong) UIImageView *bgImg;
|
||||
@property (nonatomic, strong) UIView *mainView;
|
||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||
@property (nonatomic, strong) UILabel *allValueLabel;
|
||||
|
||||
@property (nonatomic, strong) NSDictionary *result;
|
||||
@property (nonatomic, strong) NSArray *models; //礼物数组
|
||||
|
||||
@property (nonatomic, strong) NSDictionary *requestParas;
|
||||
|
||||
@property (nonatomic, assign) NSInteger poolType;
|
||||
|
||||
@property (nonatomic, assign) CGFloat mainW;
|
||||
@property (nonatomic, assign) CGFloat mainH;
|
||||
|
||||
@property (nonatomic, assign) CGFloat contentX;
|
||||
@property (nonatomic, assign) CGFloat contentTop;
|
||||
@property (nonatomic, assign) CGFloat contentBottom;
|
||||
|
||||
@property (nonatomic, copy) NSString *bgImgName;
|
||||
@property (nonatomic, copy) NSString *againImgName;
|
||||
|
||||
@property (nonatomic, strong) BigGiftAlertView *bigAlertV;
|
||||
|
||||
@property (nonatomic, strong) UIScrollView *giftBgScrollView;
|
||||
@property (nonatomic, strong) NSMutableArray *resultItems;
|
||||
@property (nonatomic, assign) NSInteger resultIndex;
|
||||
@property (nonatomic, strong) NSArray *resultArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BJBoxResultAlert
|
||||
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:UIScreen.mainScreen.bounds]) {
|
||||
|
||||
self.backgroundColor = [kBlackColor colorWithAlphaComponent:0.3];
|
||||
[ControlCreator createButton:self rect:self.bounds text:@"" font:nil color:nil backguoundColor:UIColor.clearColor imageName:nil target:self action:@selector(backAction)];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initMainView {
|
||||
if (_mainView) {
|
||||
return;
|
||||
}
|
||||
|
||||
UIColor *color;
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
color = HEXCOLOR(0xFFEAC7);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}else if (self.poolType == 21){
|
||||
color = kWhiteColor;
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}else {
|
||||
color = HEXCOLOR(0x996816);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}
|
||||
_mainView.backgroundColor = UIColor.clearColor;
|
||||
[self addSubview:_mainView];
|
||||
|
||||
[ControlCreator createImageView:_mainView rect:_mainView.bounds imageName:self.bgImgName backguoundColor:nil];
|
||||
NSInteger btnw;
|
||||
NSInteger btnH;
|
||||
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
btnw = 132;
|
||||
btnH = 44;
|
||||
}else if (self.poolType == 21){
|
||||
btnw = 140;
|
||||
btnH = 62;
|
||||
}else {
|
||||
btnw = 116;
|
||||
btnH = 37;
|
||||
}
|
||||
|
||||
UIButton *tryBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
tryBtn.frame = CGRectMake((_mainView.width-btnw)/2, _mainView.height-btnH-_contentBottom, btnw, btnH);
|
||||
[tryBtn setImage:ImageNamed(_againImgName) forState:UIControlStateNormal];
|
||||
[tryBtn addTarget:self action:@selector(IKnowButtonClick) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_mainView addSubview:tryBtn];
|
||||
|
||||
//label
|
||||
_allValueLabel = [ControlCreator createLabel:_mainView rect:CGRectMake(APPW/2-170/2, tryBtn.top-10-30, 170, 22) text:@"" font:YBBoldFont(12) color:color backguoundColor:nil align:NSTextAlignmentCenter lines:1];
|
||||
}
|
||||
|
||||
- (void)initCollecionView {
|
||||
if (_collectionView) {
|
||||
return;
|
||||
}
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake((_mainView.width-_contentX*2)/3.0, 160);
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
layout.minimumLineSpacing = 0;
|
||||
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(_contentX, _contentTop, _mainView.width-_contentX*2, _allValueLabel.top-10-_contentTop) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.backgroundColor = UIColor.clearColor;
|
||||
_collectionView.showsVerticalScrollIndicator = NO;
|
||||
[_collectionView registerNib:[UINib nibWithNibName:@"ResultCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"ResultCollectionViewCell"];
|
||||
[_mainView addSubview:_collectionView];
|
||||
|
||||
// 新加的动画结果页
|
||||
[self onCreateResultView];
|
||||
}
|
||||
|
||||
- (void)showOnView:(UIView *)parent WithResult:(NSDictionary *)result withPara:(NSDictionary *)paras withType:(NSInteger)type {
|
||||
_requestParas = paras;
|
||||
_poolType = type;
|
||||
|
||||
if (type == 4 || type == 5 || type == 6) {
|
||||
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/375*500;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 20;
|
||||
self.contentTop = 90;
|
||||
self.contentBottom = 40;
|
||||
|
||||
self.bgImgName = @"zhuan_bg_win";
|
||||
self.againImgName = @"zhuan_try_again";
|
||||
}else {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth - x*2;
|
||||
CGFloat h = w/375*480;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 15;
|
||||
self.contentTop = 80;
|
||||
self.contentBottom = 50;
|
||||
|
||||
self.bgImgName = @"bg_explore_win";
|
||||
self.againImgName = @"explore_try_more";
|
||||
}
|
||||
|
||||
[self initMainView];
|
||||
[self initCollecionView];
|
||||
|
||||
_result = result;
|
||||
|
||||
[parent addSubview:self];
|
||||
|
||||
NSArray *winGiftArr = [result safeArrayForKey:@"win_gift_list"];
|
||||
NSArray *giftArr = [BJBoxAwardModel mj_objectArrayWithKeyValuesArray:winGiftArr];
|
||||
self.models = giftArr;
|
||||
[_collectionView reloadData];
|
||||
|
||||
//展示动画结果
|
||||
[self showWithResultArray:giftArr];
|
||||
|
||||
NSString *allValue = [result safeStringForKey:@"user_win_gift_total_value"];
|
||||
NSLog(@"总价值%@", allValue);
|
||||
_allValueLabel.text = [NSString stringWithFormat:@"礼物总价值:%@", allValue];
|
||||
|
||||
BJBoxAwardModel *bigestObj = giftArr.firstObject;
|
||||
for (BJBoxAwardModel *obj in giftArr) {
|
||||
if ([obj.gift_price integerValue] > [bigestObj.gift_price integerValue]) {
|
||||
bigestObj = obj;
|
||||
}
|
||||
}
|
||||
if ([bigestObj.gift_price integerValue] >= 5000) {
|
||||
AudioServicesPlaySystemSoundWithCompletion(kSystemSoundID_Vibrate, nil);
|
||||
[self.bigAlertV.giftImgV sd_setImageWithURL:[NSURL URLWithString:bigestObj.base_image]];
|
||||
self.bigAlertV.giftNameLab.text = bigestObj.gift_name;
|
||||
[self addSubview:self.bigAlertV];
|
||||
}
|
||||
|
||||
//动画前
|
||||
[parent addSubview:self];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (void)backAction {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (void)IKnowButtonClick {
|
||||
//再试一次
|
||||
if (self.tryAgainBlock) {
|
||||
self.tryAgainBlock();
|
||||
}
|
||||
}
|
||||
|
||||
- (void)reOpenBox {
|
||||
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/box/open_box" parameters:self.requestParas response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
//奖品、价值、余额
|
||||
NSArray *winGiftArr = [result.content safeArrayForKey:@"win_gift_list"];
|
||||
NSArray *giftArr = [BJBoxAwardModel mj_objectArrayWithKeyValuesArray:winGiftArr];
|
||||
self.models = giftArr;
|
||||
[self.collectionView reloadData];
|
||||
|
||||
NSString *allValue = [result.content safeStringForKey:@"user_win_gift_total_value"];
|
||||
NSLog(@"总价值%@", allValue);
|
||||
self.allValueLabel.text = [NSString stringWithFormat:@"礼物总价值:%@", allValue];
|
||||
|
||||
BJBoxAwardModel *bigestObj = giftArr.firstObject;
|
||||
for (BJBoxAwardModel *obj in giftArr) {
|
||||
if ([obj.gift_price integerValue] > [bigestObj.gift_price integerValue]) {
|
||||
bigestObj = obj;
|
||||
}
|
||||
}
|
||||
if ([bigestObj.gift_price integerValue] >= 5000) {
|
||||
AudioServicesPlaySystemSoundWithCompletion(kSystemSoundID_Vibrate, nil);
|
||||
[self.bigAlertV.giftImgV sd_setImageWithURL:[NSURL URLWithString:bigestObj.base_image]];
|
||||
[self addSubview:self.bigAlertV];
|
||||
}
|
||||
|
||||
if (self.refreshCoinBlock) {
|
||||
NSString *leftMoney = [result.content safeStringForKey:@"user_money"];
|
||||
self.refreshCoinBlock(leftMoney);
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark ====================== 代理方法 ======================
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.models.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
ResultCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ResultCollectionViewCell" forIndexPath:indexPath];
|
||||
BJBoxAwardModel *model = [self.models objectAtIndex:indexPath.item];
|
||||
[cell.gift_image sd_setImageWithURL:[NSURL URLWithString:model.base_image] placeholderImage:nil];
|
||||
cell.priceLabel.text = [NSString stringWithFormat:@"%@金币",model.gift_price];
|
||||
cell.nameLabel.text = [NSString stringWithFormat:@"%@x%@",model.gift_name,model.open_num];
|
||||
cell.backgroundColor = UIColor.clearColor;
|
||||
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
|
||||
cell.bgImg.image = model.surprise.integerValue==1?ImageNamed(@"zhuan_gift_bg_600") : ImageNamed(@"zhuan_gift_bg");
|
||||
cell.nameLabel.textColor = HEXCOLOR(0xFFFFFF);
|
||||
cell.priceLabel.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}else {
|
||||
cell.bgImg.image = model.surprise.integerValue==1?ImageNamed(@"box_gift_bg_600") : ImageNamed(@"box_gift_bg");
|
||||
cell.nameLabel.textColor = HEXCOLOR(0xFFFFFF);
|
||||
cell.priceLabel.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (BigGiftAlertView *)bigAlertV {
|
||||
if (!_bigAlertV) {
|
||||
_bigAlertV = [[NSBundle mainBundle] loadNibNamed:@"BigGiftAlertView" owner:self options:nil].firstObject;
|
||||
_bigAlertV.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
|
||||
}
|
||||
return _bigAlertV;
|
||||
}
|
||||
|
||||
-(void)onCreateResultView {
|
||||
_collectionView.hidden = YES;
|
||||
_giftBgScrollView = [[UIScrollView alloc] initWithFrame:_collectionView.frame];
|
||||
_giftBgScrollView.showsVerticalScrollIndicator = NO;
|
||||
[_mainView addSubview:_giftBgScrollView];
|
||||
|
||||
//抽奖结果
|
||||
for (NSInteger i = 0; i < 16; i++) {
|
||||
QQResultItem *item = [[NSBundle mainBundle] loadNibNamed:@"QQResultItem" owner:self options:nil].firstObject;
|
||||
item.tag = 1000+i;
|
||||
item.hidden = YES;
|
||||
[_giftBgScrollView addSubview:item];
|
||||
[self.resultItems addObject:item];
|
||||
|
||||
CGFloat itemW = (_mainView.width-_contentX*2)/3.0;
|
||||
CGFloat itemH = 140;
|
||||
[item mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(_giftBgScrollView).offset(itemW*(i%3));
|
||||
make.top.equalTo(_giftBgScrollView).offset(itemH*(i/3));
|
||||
make.width.mas_equalTo(itemW);
|
||||
make.height.mas_equalTo(itemH);
|
||||
}];
|
||||
|
||||
UIColor *color;
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
color = kWhiteColor;
|
||||
}else {
|
||||
color = kWhiteColor;
|
||||
}
|
||||
item.nameLab.textColor = item.priceLab.textColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)showWithResultArray:(NSArray *)resultArray {
|
||||
self.resultArray = resultArray;
|
||||
self.resultIndex = 0;
|
||||
[self onUpdateResultUI];
|
||||
[self showResultItems];
|
||||
}
|
||||
|
||||
-(void)onUpdateResultUI {
|
||||
[self.giftBgScrollView setContentOffset:CGPointMake(0, 0)];
|
||||
NSInteger lines = self.resultArray.count%3==0 ? self.resultArray.count/3 : self.resultArray.count/3+1;
|
||||
self.giftBgScrollView.contentSize = CGSizeMake(_collectionView.width, lines*160);
|
||||
|
||||
for (NSInteger i = 0; i < self.resultItems.count; i++) {
|
||||
QQResultItem *item = self.resultItems[i];
|
||||
item.hidden = YES;
|
||||
if (i < self.resultArray.count) {
|
||||
BJBoxAwardModel *model = self.resultArray[i];
|
||||
[item.giftImgV sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
item.nameLab.text = [NSString stringWithFormat:@"%@x%@", model.gift_name, model.open_num];
|
||||
item.priceLab.text = [NSString stringWithFormat:@"%@金币", model.gift_price];
|
||||
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
item.bgImgV.image = model.surprise.integerValue==1?ImageNamed(@"zhuan_gift_bg_600") : ImageNamed(@"zhuan_gift_bg");
|
||||
}else {
|
||||
item.bgImgV.image = model.surprise.integerValue==1?ImageNamed(@"box_gift_bg_600") : ImageNamed(@"box_gift_bg");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void)showResultItems {
|
||||
if (self.resultIndex >= self.resultItems.count) {
|
||||
return;
|
||||
}
|
||||
QQResultItem *item = self.resultItems[self.resultIndex];
|
||||
item.hidden = NO;
|
||||
|
||||
item.transform = CGAffineTransformIdentity;
|
||||
[UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
[item.layer setValue:@(1.4) forKeyPath:@"transform.scale"];
|
||||
|
||||
} completion:^(BOOL finished) {
|
||||
[UIView animateWithDuration:0.05 delay:0.02 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
[item.layer setValue:@(.8) forKeyPath:@"transform.scale"];
|
||||
|
||||
} completion:^(BOOL finished) {
|
||||
[UIView animateWithDuration:0.05 delay:0.02 options:UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
[item.layer setValue:@(1.0) forKeyPath:@"transform.scale"];
|
||||
|
||||
} completion:^(BOOL finished) {
|
||||
|
||||
}];
|
||||
}];
|
||||
}];
|
||||
|
||||
self.resultIndex += 1;
|
||||
|
||||
if (self.resultIndex < self.resultArray.count) {
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.33 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self showResultItems];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
- (NSMutableArray *)resultItems {
|
||||
if (!_resultItems) {
|
||||
_resultItems = [NSMutableArray arrayWithCapacity:0];
|
||||
}
|
||||
return _resultItems;
|
||||
}
|
||||
|
||||
@end
|
||||
20
SweetParty/主类/RCMic/Room/Box/开奖结果/BigGiftAlertView.h
Executable file
20
SweetParty/主类/RCMic/Room/Box/开奖结果/BigGiftAlertView.h
Executable file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// BigGiftAlertView.h
|
||||
// romantic
|
||||
//
|
||||
// Created by 八角_马方圆 on 2021/12/18.
|
||||
// Copyright © 2021 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BigGiftAlertView : UIView
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *displayMaskView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftNameLab;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
25
SweetParty/主类/RCMic/Room/Box/开奖结果/BigGiftAlertView.m
Executable file
25
SweetParty/主类/RCMic/Room/Box/开奖结果/BigGiftAlertView.m
Executable file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// BigGiftAlertView.m
|
||||
// romantic
|
||||
//
|
||||
// Created by 八角_马方圆 on 2021/12/18.
|
||||
// Copyright © 2021 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BigGiftAlertView.h"
|
||||
|
||||
@implementation BigGiftAlertView
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// WEAK_SELF
|
||||
// [self.displayMaskView dg_Tapped:^{
|
||||
// [weakSelf removeFromSuperview];
|
||||
// }];
|
||||
}
|
||||
|
||||
- (IBAction)onReceive:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
80
SweetParty/主类/RCMic/Room/Box/开奖结果/BigGiftAlertView.xib
Executable file
80
SweetParty/主类/RCMic/Room/Box/开奖结果/BigGiftAlertView.xib
Executable file
@@ -0,0 +1,80 @@
|
||||
<?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" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
|
||||
<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="BigGiftAlertView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="pAY-Z4-22e">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="big_gift_bg" translatesAutoresizingMaskIntoConstraints="NO" id="kGs-4n-keR">
|
||||
<rect key="frame" x="19.5" y="215.5" width="375" height="375"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="375" id="ArJ-w0-UjB"/>
|
||||
<constraint firstAttribute="width" constant="375" id="RDS-1K-ztX"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="big_gift_top" translatesAutoresizingMaskIntoConstraints="NO" id="flN-15-SCy">
|
||||
<rect key="frame" x="94.5" y="207.5" width="225" height="78"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="onF-6i-0Lk">
|
||||
<rect key="frame" x="124.5" y="540.5" width="165" height="44"/>
|
||||
<state key="normal" image="big_gift_receive"/>
|
||||
<connections>
|
||||
<action selector="onReceive:" destination="iN0-l3-epB" eventType="touchUpInside" id="9O2-dH-cQw"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jGW-91-Tfi">
|
||||
<rect key="frame" x="132" y="328" width="150" height="150"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="150" id="C4f-mU-hnq"/>
|
||||
<constraint firstAttribute="height" constant="150" id="q6r-bo-bg7"/>
|
||||
</constraints>
|
||||
</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="BcA-If-inm">
|
||||
<rect key="frame" x="176.5" y="493" width="61.5" height="29"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
|
||||
<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.69994622034742338" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="pAY-Z4-22e" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="1Dn-ks-LaW"/>
|
||||
<constraint firstItem="jGW-91-Tfi" firstAttribute="centerX" secondItem="kGs-4n-keR" secondAttribute="centerX" id="1zg-ZN-f9a"/>
|
||||
<constraint firstItem="BcA-If-inm" firstAttribute="top" secondItem="jGW-91-Tfi" secondAttribute="bottom" constant="15" id="23T-Ky-VM1"/>
|
||||
<constraint firstItem="onF-6i-0Lk" firstAttribute="top" secondItem="kGs-4n-keR" secondAttribute="bottom" constant="-50" id="2dN-pb-55N"/>
|
||||
<constraint firstItem="kGs-4n-keR" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="4j8-16-LJp"/>
|
||||
<constraint firstItem="pAY-Z4-22e" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="6bT-r1-kvY"/>
|
||||
<constraint firstItem="BcA-If-inm" firstAttribute="centerX" secondItem="jGW-91-Tfi" secondAttribute="centerX" id="8ho-BH-moF"/>
|
||||
<constraint firstItem="jGW-91-Tfi" firstAttribute="centerY" secondItem="kGs-4n-keR" secondAttribute="centerY" id="Cxa-to-THG"/>
|
||||
<constraint firstItem="flN-15-SCy" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Fcn-n5-8Ig"/>
|
||||
<constraint firstItem="onF-6i-0Lk" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="RNx-WB-yj9"/>
|
||||
<constraint firstItem="kGs-4n-keR" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" multiplier="0.9" id="TsJ-sc-25a"/>
|
||||
<constraint firstAttribute="trailing" secondItem="pAY-Z4-22e" secondAttribute="trailing" id="XeW-69-hIx"/>
|
||||
<constraint firstItem="kGs-4n-keR" firstAttribute="top" secondItem="flN-15-SCy" secondAttribute="bottom" constant="-70" id="YBT-0H-mxh"/>
|
||||
<constraint firstAttribute="bottom" secondItem="pAY-Z4-22e" secondAttribute="bottom" id="nB5-sY-JjU"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="displayMaskView" destination="pAY-Z4-22e" id="imG-Fc-J7n"/>
|
||||
<outlet property="giftImgV" destination="jGW-91-Tfi" id="beE-uf-z5M"/>
|
||||
<outlet property="giftNameLab" destination="BcA-If-inm" id="QPB-1C-h7t"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="132" y="108"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="big_gift_bg" width="560" height="560"/>
|
||||
<image name="big_gift_receive" width="165" height="44"/>
|
||||
<image name="big_gift_top" width="225" height="78"/>
|
||||
</resources>
|
||||
</document>
|
||||
22
SweetParty/主类/RCMic/Room/Box/开奖结果/QQResultItem.h
Executable file
22
SweetParty/主类/RCMic/Room/Box/开奖结果/QQResultItem.h
Executable file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// QQResultItem.h
|
||||
// qingqiyuyin
|
||||
//
|
||||
// Created by bj_szd on 2022/1/19.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface QQResultItem : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIView *svgaBgView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bgImgV;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nameLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *priceLab;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
52
SweetParty/主类/RCMic/Room/Box/开奖结果/QQResultItem.m
Executable file
52
SweetParty/主类/RCMic/Room/Box/开奖结果/QQResultItem.m
Executable file
@@ -0,0 +1,52 @@
|
||||
//
|
||||
// QQResultItem.m
|
||||
// qingqiyuyin
|
||||
//
|
||||
// Created by bj_szd on 2022/1/19.
|
||||
//
|
||||
|
||||
#import "QQResultItem.h"
|
||||
|
||||
@interface QQResultItem ()
|
||||
|
||||
@property(nonatomic, strong) SVGAPlayer *bgPlayer;
|
||||
@property(nonatomic, strong) SVGAParser *bgParser;
|
||||
|
||||
@end
|
||||
|
||||
@implementation QQResultItem
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
// [self.svgaBgView insertSubview:self.bgPlayer atIndex:0];
|
||||
// WEAK_SELF
|
||||
// [self.bgParser parseWithNamed:@"box_result" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
// if (videoItem != nil) {
|
||||
// weakSelf.bgPlayer.videoItem = videoItem;
|
||||
// [weakSelf.bgPlayer startAnimation];
|
||||
// }
|
||||
// } failureBlock:^(NSError * _Nonnull error) {
|
||||
//
|
||||
// }];
|
||||
}
|
||||
|
||||
- (SVGAPlayer *)bgPlayer {
|
||||
if (!_bgPlayer) {
|
||||
_bgPlayer = [[SVGAPlayer alloc] initWithFrame:self.svgaBgView.bounds];
|
||||
_bgPlayer.loops = 0;
|
||||
_bgPlayer.clearsAfterStop = NO;
|
||||
_bgPlayer.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_bgPlayer.userInteractionEnabled = NO;
|
||||
}
|
||||
return _bgPlayer;
|
||||
}
|
||||
|
||||
- (SVGAParser *)bgParser {
|
||||
if (!_bgParser) {
|
||||
_bgParser = [[SVGAParser alloc] init];
|
||||
}
|
||||
return _bgParser;
|
||||
}
|
||||
|
||||
@end
|
||||
75
SweetParty/主类/RCMic/Room/Box/开奖结果/QQResultItem.xib
Executable file
75
SweetParty/主类/RCMic/Room/Box/开奖结果/QQResultItem.xib
Executable file
@@ -0,0 +1,75 @@
|
||||
<?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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="QQResultItem">
|
||||
<rect key="frame" x="0.0" y="0.0" width="200" height="278"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WE3-31-TeK">
|
||||
<rect key="frame" x="60" y="0.0" width="80" height="80"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="8Gf-9j-VXC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="80" height="80"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="guh-mY-VK9">
|
||||
<rect key="frame" x="12.5" y="12.5" width="55" height="55"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="guh-mY-VK9" secondAttribute="height" multiplier="1:1" id="HV7-zA-4Rd"/>
|
||||
<constraint firstAttribute="width" constant="55" id="HjT-MZ-G0Q"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="8Gf-9j-VXC" firstAttribute="top" secondItem="WE3-31-TeK" secondAttribute="top" id="CGE-rE-Qfn"/>
|
||||
<constraint firstAttribute="width" constant="80" id="KeC-K2-iWQ"/>
|
||||
<constraint firstItem="guh-mY-VK9" firstAttribute="centerX" secondItem="WE3-31-TeK" secondAttribute="centerX" id="ZuN-iC-jx1"/>
|
||||
<constraint firstItem="8Gf-9j-VXC" firstAttribute="leading" secondItem="WE3-31-TeK" secondAttribute="leading" id="Zwb-GR-Nwo"/>
|
||||
<constraint firstAttribute="height" constant="80" id="bfk-mn-UGp"/>
|
||||
<constraint firstAttribute="bottom" secondItem="8Gf-9j-VXC" secondAttribute="bottom" id="gFS-m5-2jI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8Gf-9j-VXC" secondAttribute="trailing" id="lCy-E2-Qqu"/>
|
||||
<constraint firstItem="guh-mY-VK9" firstAttribute="centerY" secondItem="WE3-31-TeK" secondAttribute="centerY" id="v01-ab-7Ed"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="S1F-mO-5RM">
|
||||
<rect key="frame" x="83.5" y="85" width="33" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" white="1" 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="yjX-4u-4lE">
|
||||
<rect key="frame" x="96" y="101.5" width="8" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="S1F-mO-5RM" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="B8r-ad-VHP"/>
|
||||
<constraint firstItem="WE3-31-TeK" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="BtX-FP-Q4C"/>
|
||||
<constraint firstItem="yjX-4u-4lE" firstAttribute="centerX" secondItem="S1F-mO-5RM" secondAttribute="centerX" id="FBQ-oC-Wzw"/>
|
||||
<constraint firstItem="yjX-4u-4lE" firstAttribute="top" secondItem="S1F-mO-5RM" secondAttribute="bottom" constant="2" id="VIN-9f-SWO"/>
|
||||
<constraint firstItem="S1F-mO-5RM" firstAttribute="top" secondItem="WE3-31-TeK" secondAttribute="bottom" constant="5" id="X5L-fX-NYv"/>
|
||||
<constraint firstItem="WE3-31-TeK" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="ahR-LB-t1X"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="bgImgV" destination="8Gf-9j-VXC" id="rML-EN-djN"/>
|
||||
<outlet property="giftImgV" destination="guh-mY-VK9" id="WgR-91-Hv9"/>
|
||||
<outlet property="nameLab" destination="S1F-mO-5RM" id="adS-uB-MSJ"/>
|
||||
<outlet property="priceLab" destination="yjX-4u-4lE" id="XgC-Ef-WR2"/>
|
||||
<outlet property="svgaBgView" destination="WE3-31-TeK" id="ass-97-2xN"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="181.15942028985509" y="178.125"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
24
SweetParty/主类/RCMic/Room/Box/开奖结果/ResultCollectionViewCell.h
Executable file
24
SweetParty/主类/RCMic/Room/Box/开奖结果/ResultCollectionViewCell.h
Executable file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// ResultCollectionViewCell.h
|
||||
//
|
||||
//
|
||||
// Created by apple on 2020/10/19.
|
||||
// Copyright © 2020 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ResultCollectionViewCell : UICollectionViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *gift_image;
|
||||
//@property (weak, nonatomic) IBOutlet UILabel *num;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *bgImg;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *numLab;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
17
SweetParty/主类/RCMic/Room/Box/开奖结果/ResultCollectionViewCell.m
Executable file
17
SweetParty/主类/RCMic/Room/Box/开奖结果/ResultCollectionViewCell.m
Executable file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// ResultCollectionViewCell.m
|
||||
//
|
||||
//
|
||||
// Created by apple on 2020/10/19.
|
||||
// Copyright © 2020 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "ResultCollectionViewCell.h"
|
||||
|
||||
@implementation ResultCollectionViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
}
|
||||
|
||||
@end
|
||||
71
SweetParty/主类/RCMic/Room/Box/开奖结果/ResultCollectionViewCell.xib
Executable file
71
SweetParty/主类/RCMic/Room/Box/开奖结果/ResultCollectionViewCell.xib
Executable file
@@ -0,0 +1,71 @@
|
||||
<?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" useSafeAreas="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"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="ResultCollectionViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="118" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="118" height="130"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="box_gift_bg" translatesAutoresizingMaskIntoConstraints="NO" id="QRH-pn-MKe" userLabel="bg">
|
||||
<rect key="frame" x="16.5" y="0.0" width="85" height="85"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" secondItem="QRH-pn-MKe" secondAttribute="height" multiplier="1:1" id="OOp-8f-X6h"/>
|
||||
<constraint firstAttribute="width" constant="85" id="Qmq-xH-IfI"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="未加载图片" translatesAutoresizingMaskIntoConstraints="NO" id="guy-lw-cGT">
|
||||
<rect key="frame" x="31.5" y="15" width="55" height="55"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="55" id="jWz-HH-Jti"/>
|
||||
<constraint firstAttribute="width" secondItem="guy-lw-cGT" secondAttribute="height" multiplier="1:1" id="ku7-5s-BgI"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nOa-8J-T5x">
|
||||
<rect key="frame" x="42.5" y="95" width="33" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" white="1" 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="oEF-Xf-2DK">
|
||||
<rect key="frame" x="55.5" y="114.5" width="7" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="oEF-Xf-2DK" firstAttribute="top" secondItem="nOa-8J-T5x" secondAttribute="bottom" constant="5" id="B1T-e8-viw"/>
|
||||
<constraint firstItem="nOa-8J-T5x" firstAttribute="top" secondItem="QRH-pn-MKe" secondAttribute="bottom" constant="10" id="EKq-CD-2kw"/>
|
||||
<constraint firstItem="QRH-pn-MKe" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="MEF-gq-Vby"/>
|
||||
<constraint firstItem="oEF-Xf-2DK" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="WFU-ks-6x7"/>
|
||||
<constraint firstItem="nOa-8J-T5x" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="bGZ-1A-r1l"/>
|
||||
<constraint firstItem="QRH-pn-MKe" firstAttribute="centerX" secondItem="guy-lw-cGT" secondAttribute="centerX" id="y6z-ef-6Sx"/>
|
||||
<constraint firstItem="QRH-pn-MKe" firstAttribute="centerY" secondItem="guy-lw-cGT" secondAttribute="centerY" id="yXr-RO-qhN"/>
|
||||
<constraint firstItem="guy-lw-cGT" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="zhT-ll-ada"/>
|
||||
</constraints>
|
||||
<size key="customSize" width="118" height="130"/>
|
||||
<connections>
|
||||
<outlet property="bgImg" destination="QRH-pn-MKe" id="N1L-4c-Cs8"/>
|
||||
<outlet property="gift_image" destination="guy-lw-cGT" id="iN2-xw-Ym1"/>
|
||||
<outlet property="nameLabel" destination="nOa-8J-T5x" id="PXu-0b-N53"/>
|
||||
<outlet property="priceLabel" destination="oEF-Xf-2DK" id="oOF-sd-7aM"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="181.15942028985509" y="90.401785714285708"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="box_gift_bg" width="118" height="117.5"/>
|
||||
<image name="未加载图片" width="500" height="500"/>
|
||||
</resources>
|
||||
</document>
|
||||
BIN
SweetParty/主类/RCMic/Room/Box/开奖结果/box_result.svga
Executable file
BIN
SweetParty/主类/RCMic/Room/Box/开奖结果/box_result.svga
Executable file
Binary file not shown.
19
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankAlert.h
Executable file
19
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankAlert.h
Executable file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// BJBoxRankAlert.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJBoxRankAlert : UIView
|
||||
|
||||
- (void)showOnView:(UIView *)parent roomId:(NSString *)rid WithType:(NSInteger)type;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
359
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankAlert.m
Executable file
359
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankAlert.m
Executable file
@@ -0,0 +1,359 @@
|
||||
//
|
||||
// BJBoxRecordAlert.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJBoxRankAlert.h"
|
||||
#import "ShouQiBangCell.h"
|
||||
#import "XiamuFooter.h"
|
||||
#import "XiamuTipView.h"
|
||||
#import "WLStakeRankCell.h"
|
||||
|
||||
@interface BJBoxRankAlert () <UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
@property (nonatomic, copy) NSString *roomId;
|
||||
|
||||
@property (nonatomic, strong) UIView *mainView;
|
||||
@property (nonatomic, strong) UIImageView *bgImg;
|
||||
@property (nonatomic, strong) UITableView *tableView;
|
||||
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *models; //礼物数组
|
||||
|
||||
//关于网络请求
|
||||
@property (nonatomic, assign) BOOL isLoadFirst;
|
||||
@property (nonatomic, assign) BOOL isOnRequesting, isNoMoreData, isNetError;
|
||||
@property (nonatomic, strong) XiamuFooter *footerView;
|
||||
@property (nonatomic, strong) XiamuTipView *tipsView;
|
||||
@property (nonatomic, assign) NSInteger pageIndex;
|
||||
|
||||
@property (nonatomic, assign) NSInteger poolType;
|
||||
|
||||
@property (nonatomic, assign) CGFloat mainW;
|
||||
@property (nonatomic, assign) CGFloat mainH;
|
||||
|
||||
@property (nonatomic, assign) CGFloat contentX;
|
||||
@property (nonatomic, assign) CGFloat contentTop;
|
||||
@property (nonatomic, assign) CGFloat contentBottom;
|
||||
|
||||
@property (nonatomic, copy) NSString *bgImgName;
|
||||
|
||||
@end
|
||||
|
||||
@implementation BJBoxRankAlert
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:UIScreen.mainScreen.bounds]) {
|
||||
|
||||
self.backgroundColor = [kBlackColor colorWithAlphaComponent:0.3];
|
||||
[ControlCreator createButton:self rect:self.bounds text:@"" font:nil color:nil backguoundColor:UIColor.clearColor imageName:nil target:self action:@selector(backAction:)];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initMainView {
|
||||
if (_mainView) {
|
||||
return;
|
||||
}
|
||||
UIColor *color;
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
color = HEXCOLOR(0xFFFFFF);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}else if (self.poolType == 21){
|
||||
color = kWhiteColor;
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}else {
|
||||
color = HEXCOLOR(0xBD7423);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}
|
||||
_mainView.backgroundColor = UIColor.clearColor;
|
||||
[self addSubview:_mainView];
|
||||
|
||||
[ControlCreator createImageView:_mainView rect:_mainView.bounds imageName:self.bgImgName backguoundColor:nil];
|
||||
}
|
||||
|
||||
- (void)initTableView {
|
||||
if (_tableView) {
|
||||
return;
|
||||
}
|
||||
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(_contentX, _contentTop, _mainView.width-_contentX*2, _mainView.height-_contentTop-_contentBottom)];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.backgroundColor = UIColor.clearColor;
|
||||
_tableView.showsVerticalScrollIndicator = NO;
|
||||
NSString *cellId = NSStringFromClass(ShouQiBangCell.class);
|
||||
[_tableView registerNib:[UINib nibWithNibName:cellId bundle:nil] forCellReuseIdentifier:cellId];
|
||||
[_tableView registerNib:[UINib nibWithNibName:@"WLStakeRankCell" bundle:nil] forCellReuseIdentifier:@"WLStakeRankCell"];
|
||||
[_mainView addSubview:_tableView];
|
||||
}
|
||||
|
||||
- (void)initMJrefresh {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
[weakSelf loadFirst];
|
||||
}];
|
||||
_tableView.mj_header = header;
|
||||
}
|
||||
|
||||
- (void)initTipView {
|
||||
if (_tipsView) {
|
||||
return;
|
||||
}
|
||||
_tipsView = [[XiamuTipView alloc]initWithFrame:CGRectMake(0, 0, _tableView.width, 250)];
|
||||
|
||||
[self.tableView addSubview:_tipsView];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
_tipsView.block = ^{
|
||||
if (weakSelf.isNetError) {
|
||||
[weakSelf loadFirst];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
- (NSMutableArray *)models {
|
||||
if (!_models) {
|
||||
_models = NSMutableArray.array;
|
||||
}
|
||||
return _models;
|
||||
}
|
||||
|
||||
- (XiamuFooter *)footerView {
|
||||
if (!_footerView) {
|
||||
_footerView = [[XiamuFooter alloc] initWithFrame:CGRectMake(0, 0, _tableView.width, 40)];
|
||||
_footerView.hidden = YES;
|
||||
}
|
||||
return _footerView;
|
||||
}
|
||||
|
||||
- (void)showOnView:(UIView *)parent roomId:(NSString *)rid WithType:(NSInteger)type {
|
||||
self.poolType = type;
|
||||
|
||||
if (type == 4 || type == 5 || type == 6) {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/375*500;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 20;
|
||||
self.contentTop = 90;
|
||||
self.contentBottom = 40;
|
||||
|
||||
self.bgImgName = @"zhuan_bg_rank";
|
||||
}else if (type == 21) {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/375*531;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 15;
|
||||
self.contentTop = 100;
|
||||
self.contentBottom = 24;
|
||||
|
||||
self.bgImgName = @"sec_zhuan_bg_rank";
|
||||
}else if (type == 777) {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth - x*2;
|
||||
CGFloat h = w/375*580;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 30;
|
||||
self.contentTop = 115;
|
||||
self.contentBottom = 50;
|
||||
|
||||
self.bgImgName = @"stake_bg_rank";
|
||||
}else {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth - x*2;
|
||||
CGFloat h = w/375*480;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 15;
|
||||
self.contentTop = 80;
|
||||
self.contentBottom = 50;
|
||||
|
||||
self.bgImgName = @"bg_explore_rank";
|
||||
}
|
||||
|
||||
[self initMainView];
|
||||
[self initTableView];
|
||||
[self initMJrefresh];
|
||||
// [self initTipView];
|
||||
|
||||
_roomId = rid;
|
||||
[parent addSubview:self];
|
||||
|
||||
[_tableView.mj_header beginRefreshing];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (void)backAction:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - data
|
||||
|
||||
- (void)setIsOnRequesting:(BOOL)isOnRequesting {
|
||||
_isOnRequesting = isOnRequesting;
|
||||
if (isOnRequesting) {
|
||||
_isNetError = NO;
|
||||
[self.footerView stateLoading];
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
[self.footerView stateNoMore];
|
||||
if (self.models.count==0) {
|
||||
[self.tipsView stateNoResult];
|
||||
[self.footerView stateHide];
|
||||
}
|
||||
}
|
||||
if (_isNetError) {
|
||||
[self.footerView stateNetError];
|
||||
if (_isLoadFirst) {
|
||||
[self.tipsView stateNoNet];
|
||||
[self.footerView stateHide];
|
||||
[self.models removeAllObjects];
|
||||
[_tableView reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadFirst {
|
||||
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
_pageIndex = 1;
|
||||
_isLoadFirst = YES;
|
||||
self.isNoMoreData = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadMore {
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
return;
|
||||
}
|
||||
|
||||
_isLoadFirst = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadListData {
|
||||
[self.tipsView stateHide];
|
||||
self.isNetError = NO;
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
self.isOnRequesting = YES;
|
||||
|
||||
NSDictionary *dict = @{@"page":@(self.pageIndex).stringValue,
|
||||
@"page_limit":@"30",
|
||||
// @"rid":C_string(_roomId)
|
||||
};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
|
||||
NSString *urlStr = @"/api/box/get_box_user_sqb_rank";
|
||||
if (_poolType == 777) {
|
||||
urlStr = @"api/Monster/get_user_monster_log";
|
||||
} else {
|
||||
urlStr = @"/api/box/get_box_user_sqb_rank";
|
||||
}
|
||||
|
||||
[RCMicHTTP postWithURLString:urlStr parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSArray.class]) {
|
||||
[self checkRequestResult:result.content];
|
||||
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
|
||||
weakSelf.isOnRequesting = NO;
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)checkRequestResult:(NSArray *)listArr {
|
||||
if ([listArr isKindOfClass:NSArray.class]) {
|
||||
|
||||
if (_isLoadFirst) {
|
||||
[self.models removeAllObjects];
|
||||
}
|
||||
if (listArr.count == 0 ) {
|
||||
self.isNoMoreData = YES;
|
||||
}
|
||||
NSArray *models = [BJBoxRankModel mj_objectArrayWithKeyValuesArray:listArr];
|
||||
[self.models addObjectsFromArray:models];
|
||||
[_tableView reloadData];
|
||||
|
||||
_pageIndex ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - table view
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.models.count;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 60;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.poolType == 777) {
|
||||
WLStakeRankCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WLStakeRankCell" forIndexPath:indexPath];
|
||||
BJBoxRankModel *model = self.models[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
return cell;
|
||||
}else {
|
||||
NSString *cellId = NSStringFromClass(ShouQiBangCell.class);
|
||||
ShouQiBangCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId forIndexPath:indexPath];
|
||||
|
||||
BJBoxRankModel *model = self.models[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
[cell onChangeUIColor:HEXCOLOR(0xFFFFFF)];
|
||||
}else {
|
||||
[cell onChangeUIColor:HEXCOLOR(0xFFFFFF)];
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.item+6>self.models.count && !self.isNoMoreData) {
|
||||
[self loadMore];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
41
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankCell.h
Normal file
41
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankCell.h
Normal file
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// BJBoxRankCell.h
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/5/10.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "BJBoxRankModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJBoxRankCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *orderLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftImgV_1;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *numLab_1;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftImgV_2;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *numLab_2;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftImgV_3;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *numLab_3;
|
||||
@property (weak, nonatomic) IBOutlet UIView *bgView_1;
|
||||
@property (weak, nonatomic) IBOutlet UIView *bgView_2;
|
||||
@property (weak, nonatomic) IBOutlet UIView *bgView_3;
|
||||
//昨日榜
|
||||
@property (nonatomic, strong)BJBoxRankModel *model;
|
||||
@property (weak, nonatomic) IBOutlet UIView *zouriRankView;
|
||||
@property (weak, nonatomic) IBOutlet UIView *zuoribaiyinView;
|
||||
@property (weak, nonatomic) IBOutlet UIView *zuoriHuangjinView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *zuoriBaiyinL;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *zuorihuangjinL;
|
||||
//房间榜
|
||||
@property (weak, nonatomic) IBOutlet UIView *roomRankView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *roomRankViewWidthCon;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
56
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankCell.m
Normal file
56
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankCell.m
Normal file
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// BJBoxRankCell.m
|
||||
// YaYin
|
||||
//
|
||||
// Created by bj_szd on 2023/5/10.
|
||||
// Copyright © 2023 YaYin. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJBoxRankCell.h"
|
||||
|
||||
@implementation BJBoxRankCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
|
||||
- (void)setModel:(BJBoxRankModel *)model {
|
||||
_model = model;
|
||||
|
||||
NSString *numStr = @"";
|
||||
NSArray *listArr = @[];
|
||||
if (model.gift_list == nil) {
|
||||
numStr = @"num";
|
||||
listArr = model.user_box_gift_list;
|
||||
} else {
|
||||
numStr = @"gift_num";
|
||||
listArr = model.gift_list;
|
||||
}
|
||||
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nicknameLab.text = model.nick_name;
|
||||
|
||||
self.bgView_1.hidden = self.bgView_2.hidden = self.bgView_3.hidden = YES;
|
||||
|
||||
if (listArr.count > 0) {
|
||||
NSDictionary *dict = listArr[0];
|
||||
[self.giftImgV_1 sd_setImageWithURL:[NSURL URLWithString:[dict safeStringForKey:@"base_image"]]];
|
||||
self.numLab_1.text = [dict safeStringForKey:numStr];
|
||||
self.bgView_1.hidden = NO;
|
||||
}
|
||||
if (listArr.count > 1) {
|
||||
NSDictionary *dict = listArr[1];
|
||||
[self.giftImgV_2 sd_setImageWithURL:[NSURL URLWithString:[dict safeStringForKey:@"base_image"]]];
|
||||
self.numLab_2.text = [dict safeStringForKey:numStr];
|
||||
self.bgView_2.hidden = NO;
|
||||
}
|
||||
if (listArr.count > 2) {
|
||||
NSDictionary *dict = listArr[2];
|
||||
[self.giftImgV_3 sd_setImageWithURL:[NSURL URLWithString:[dict safeStringForKey:@"base_image"]]];
|
||||
self.numLab_3.text = [dict safeStringForKey:numStr];
|
||||
self.bgView_3.hidden = NO;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
297
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankCell.xib
Normal file
297
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankCell.xib
Normal file
@@ -0,0 +1,297 @@
|
||||
<?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="95" id="KGk-i7-Jjw" customClass="BJBoxRankCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="95"/>
|
||||
<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="95"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VkA-lx-PRH">
|
||||
<rect key="frame" x="13" y="38.5" width="7" height="18"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="15"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="nzn-z4-NeB">
|
||||
<rect key="frame" x="30" y="27.5" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="R6o-7I-YEQ"/>
|
||||
<constraint firstAttribute="height" constant="40" id="sHN-CU-oxZ"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="20"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="春风十里" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1zo-hD-pYM">
|
||||
<rect key="frame" x="80" y="39" width="100" height="17"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="100" id="6pa-24-Kmw"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LuJ-ha-HJb">
|
||||
<rect key="frame" x="190" y="17.5" width="175" height="60"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E1S-gx-IRs">
|
||||
<rect key="frame" x="0.0" y="5" width="175" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="白银盘" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s2o-kG-xzn">
|
||||
<rect key="frame" x="0.0" y="0.0" width="175" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.10196078431372549" green="0.10196078431372549" blue="0.10196078431372549" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.39215686274509803" green="0.68627450980392157" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="GXt-bR-kZO"/>
|
||||
<constraint firstItem="s2o-kG-xzn" firstAttribute="top" secondItem="E1S-gx-IRs" secondAttribute="top" id="Sl0-fN-egI"/>
|
||||
<constraint firstItem="s2o-kG-xzn" firstAttribute="leading" secondItem="E1S-gx-IRs" secondAttribute="leading" id="lcI-Zq-OEW"/>
|
||||
<constraint firstAttribute="bottom" secondItem="s2o-kG-xzn" secondAttribute="bottom" id="vjv-vD-YAj"/>
|
||||
<constraint firstAttribute="trailing" secondItem="s2o-kG-xzn" secondAttribute="trailing" id="wtf-bY-hoR"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9rm-QQ-04d">
|
||||
<rect key="frame" x="0.0" y="35" width="175" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="黄金盘" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jcw-P0-LEH">
|
||||
<rect key="frame" x="0.0" y="0.0" width="175" height="20"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<color key="textColor" red="0.1019607843" green="0.1019607843" blue="0.1019607843" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="0.62745098039215685" blue="0.39215686274509803" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="2y7-lD-MVi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="jcw-P0-LEH" secondAttribute="trailing" id="DoX-DD-Scx"/>
|
||||
<constraint firstAttribute="bottom" secondItem="jcw-P0-LEH" secondAttribute="bottom" id="TQ4-jC-alE"/>
|
||||
<constraint firstItem="jcw-P0-LEH" firstAttribute="top" secondItem="9rm-QQ-04d" secondAttribute="top" id="TbX-DX-7eS"/>
|
||||
<constraint firstItem="jcw-P0-LEH" firstAttribute="leading" secondItem="9rm-QQ-04d" secondAttribute="leading" id="ubx-Cp-ypS"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="9rm-QQ-04d" secondAttribute="bottom" constant="5" id="ByH-uy-P6B"/>
|
||||
<constraint firstItem="E1S-gx-IRs" firstAttribute="leading" secondItem="LuJ-ha-HJb" secondAttribute="leading" id="b54-be-KPO"/>
|
||||
<constraint firstAttribute="trailing" secondItem="E1S-gx-IRs" secondAttribute="trailing" id="b9H-dh-D4J"/>
|
||||
<constraint firstItem="9rm-QQ-04d" firstAttribute="leading" secondItem="LuJ-ha-HJb" secondAttribute="leading" id="fIk-PQ-MdL"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9rm-QQ-04d" secondAttribute="trailing" id="fvU-vJ-CFb"/>
|
||||
<constraint firstItem="E1S-gx-IRs" firstAttribute="top" secondItem="LuJ-ha-HJb" secondAttribute="top" constant="5" id="hft-vT-i4U"/>
|
||||
<constraint firstAttribute="height" constant="60" id="xzz-17-SEe"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7O1-vV-MuF">
|
||||
<rect key="frame" x="190" y="40.5" width="120" height="14"/>
|
||||
<color key="backgroundColor" red="1" green="0.62745098039215685" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14" id="8zH-NX-2ki"/>
|
||||
<constraint firstAttribute="width" constant="120" id="Tor-mW-Z8S"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="3"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tOF-I6-anq">
|
||||
<rect key="frame" x="320" y="27.5" width="40" height="40"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Svz-4C-086">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XmB-4D-RUf">
|
||||
<rect key="frame" x="27" y="0.0" width="13" height="12"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JgU-ri-axd">
|
||||
<rect key="frame" x="3" y="0.0" width="7" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.52549019607843139" green="0.29019607843137252" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="JgU-ri-axd" secondAttribute="trailing" constant="3" id="pbp-1S-fhj"/>
|
||||
<constraint firstItem="JgU-ri-axd" firstAttribute="centerY" secondItem="XmB-4D-RUf" secondAttribute="centerY" id="sxd-WY-QNh"/>
|
||||
<constraint firstItem="JgU-ri-axd" firstAttribute="leading" secondItem="XmB-4D-RUf" secondAttribute="leading" constant="3" id="tyP-OC-iMB"/>
|
||||
<constraint firstAttribute="height" constant="12" id="xNL-21-2Ju"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Svz-4C-086" secondAttribute="trailing" id="94s-Od-nbM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="XmB-4D-RUf" secondAttribute="trailing" id="Dkh-lF-mVr"/>
|
||||
<constraint firstAttribute="width" constant="40" id="WiC-pA-ioC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Svz-4C-086" secondAttribute="bottom" id="YNm-iK-dZd"/>
|
||||
<constraint firstAttribute="height" constant="40" id="Zld-av-mMd"/>
|
||||
<constraint firstItem="Svz-4C-086" firstAttribute="top" secondItem="tOF-I6-anq" secondAttribute="top" id="hOS-uL-9md"/>
|
||||
<constraint firstItem="Svz-4C-086" firstAttribute="leading" secondItem="tOF-I6-anq" secondAttribute="leading" id="vJn-yv-IRA"/>
|
||||
<constraint firstItem="XmB-4D-RUf" firstAttribute="top" secondItem="tOF-I6-anq" secondAttribute="top" id="zHr-GH-I4A"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="437-YB-qfe">
|
||||
<rect key="frame" x="275" y="27.5" width="40" height="40"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="uC5-KH-BAv">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="57E-PI-aqn">
|
||||
<rect key="frame" x="27" y="0.0" width="13" height="12"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QFO-1e-AMb">
|
||||
<rect key="frame" x="3" y="0.0" width="7" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.52549019607843139" green="0.29019607843137252" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="12" id="Lg6-06-ZTu"/>
|
||||
<constraint firstItem="QFO-1e-AMb" firstAttribute="centerY" secondItem="57E-PI-aqn" secondAttribute="centerY" id="YBZ-FI-sEl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="QFO-1e-AMb" secondAttribute="trailing" constant="3" id="nkv-jp-If7"/>
|
||||
<constraint firstItem="QFO-1e-AMb" firstAttribute="leading" secondItem="57E-PI-aqn" secondAttribute="leading" constant="3" id="pMH-id-tIc"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="57E-PI-aqn" secondAttribute="trailing" id="Q9T-tn-b4D"/>
|
||||
<constraint firstAttribute="height" constant="40" id="UrC-6O-Dmx"/>
|
||||
<constraint firstItem="57E-PI-aqn" firstAttribute="top" secondItem="437-YB-qfe" secondAttribute="top" id="YbE-UO-BgD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="uC5-KH-BAv" secondAttribute="trailing" id="dbj-rY-t6Y"/>
|
||||
<constraint firstItem="uC5-KH-BAv" firstAttribute="leading" secondItem="437-YB-qfe" secondAttribute="leading" id="fir-e0-EvI"/>
|
||||
<constraint firstAttribute="width" constant="40" id="khe-jI-WOC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="uC5-KH-BAv" secondAttribute="bottom" id="mzw-Iy-xcy"/>
|
||||
<constraint firstItem="uC5-KH-BAv" firstAttribute="top" secondItem="437-YB-qfe" secondAttribute="top" id="sF0-E2-gNs"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lfI-4B-haq">
|
||||
<rect key="frame" x="230" y="27.5" width="40" height="40"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="fvd-bQ-MbP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="40" height="40"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Eq4-Cp-pLm">
|
||||
<rect key="frame" x="27" y="0.0" width="13" height="12"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rm2-Jm-DtL">
|
||||
<rect key="frame" x="3" y="0.0" width="7" height="12"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="10"/>
|
||||
<color key="textColor" red="0.52549019607843139" green="0.29019607843137252" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="rm2-Jm-DtL" firstAttribute="leading" secondItem="Eq4-Cp-pLm" secondAttribute="leading" constant="3" id="4iG-tx-sY3"/>
|
||||
<constraint firstAttribute="height" constant="12" id="TCa-OJ-WRJ"/>
|
||||
<constraint firstItem="rm2-Jm-DtL" firstAttribute="centerY" secondItem="Eq4-Cp-pLm" secondAttribute="centerY" id="UiK-5f-5dI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="rm2-Jm-DtL" secondAttribute="trailing" constant="3" id="dT6-v8-jnU"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="fvd-bQ-MbP" firstAttribute="leading" secondItem="lfI-4B-haq" secondAttribute="leading" id="0T4-x1-dpQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Eq4-Cp-pLm" secondAttribute="trailing" id="1VL-G2-T4V"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fvd-bQ-MbP" secondAttribute="bottom" id="aPN-oG-ntq"/>
|
||||
<constraint firstItem="Eq4-Cp-pLm" firstAttribute="top" secondItem="lfI-4B-haq" secondAttribute="top" id="itl-b7-M1Q"/>
|
||||
<constraint firstAttribute="height" constant="40" id="jKi-nL-IDA"/>
|
||||
<constraint firstItem="fvd-bQ-MbP" firstAttribute="top" secondItem="lfI-4B-haq" secondAttribute="top" id="lkQ-fE-rK4"/>
|
||||
<constraint firstAttribute="width" constant="40" id="rKD-v6-BUU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="fvd-bQ-MbP" secondAttribute="trailing" id="ynr-s5-Dw2"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="7O1-vV-MuF" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="19n-12-Qyc"/>
|
||||
<constraint firstItem="1zo-hD-pYM" firstAttribute="centerY" secondItem="nzn-z4-NeB" secondAttribute="centerY" id="2gg-Gb-g4y"/>
|
||||
<constraint firstItem="437-YB-qfe" firstAttribute="leading" secondItem="lfI-4B-haq" secondAttribute="trailing" constant="5" id="5Aq-NM-dds"/>
|
||||
<constraint firstItem="tOF-I6-anq" firstAttribute="leading" secondItem="437-YB-qfe" secondAttribute="trailing" constant="5" id="6OJ-dK-guN"/>
|
||||
<constraint firstItem="LuJ-ha-HJb" firstAttribute="leading" secondItem="1zo-hD-pYM" secondAttribute="trailing" constant="10" id="I35-3d-f0m"/>
|
||||
<constraint firstItem="nzn-z4-NeB" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="TfG-Gk-Okc"/>
|
||||
<constraint firstItem="tOF-I6-anq" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="WuA-2h-xMh"/>
|
||||
<constraint firstItem="437-YB-qfe" firstAttribute="centerY" secondItem="tOF-I6-anq" secondAttribute="centerY" id="YFz-sP-3lt"/>
|
||||
<constraint firstItem="nzn-z4-NeB" firstAttribute="leading" secondItem="VkA-lx-PRH" secondAttribute="trailing" constant="10" id="fsb-fb-bmz"/>
|
||||
<constraint firstItem="1zo-hD-pYM" firstAttribute="leading" secondItem="nzn-z4-NeB" secondAttribute="trailing" constant="10" id="gOG-Tv-M16"/>
|
||||
<constraint firstItem="lfI-4B-haq" firstAttribute="centerY" secondItem="tOF-I6-anq" secondAttribute="centerY" id="m7G-ar-1qk"/>
|
||||
<constraint firstItem="VkA-lx-PRH" firstAttribute="centerY" secondItem="nzn-z4-NeB" secondAttribute="centerY" id="mhY-sm-1Pt"/>
|
||||
<constraint firstItem="LuJ-ha-HJb" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="oAh-gB-6Cp"/>
|
||||
<constraint firstItem="nzn-z4-NeB" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="30" id="oGS-Xw-NvH"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tOF-I6-anq" secondAttribute="trailing" constant="15" id="qKY-6h-tZx"/>
|
||||
<constraint firstAttribute="trailing" secondItem="LuJ-ha-HJb" secondAttribute="trailing" constant="10" id="qjK-Mr-fte"/>
|
||||
<constraint firstItem="7O1-vV-MuF" firstAttribute="leading" secondItem="1zo-hD-pYM" secondAttribute="trailing" constant="10" id="wCE-gE-UHU"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="avatarImgV" destination="nzn-z4-NeB" id="W4N-4E-xI7"/>
|
||||
<outlet property="bgView_1" destination="lfI-4B-haq" id="asc-NK-0xM"/>
|
||||
<outlet property="bgView_2" destination="437-YB-qfe" id="Ga5-CX-EO0"/>
|
||||
<outlet property="bgView_3" destination="tOF-I6-anq" id="bua-dx-G9b"/>
|
||||
<outlet property="giftImgV_1" destination="fvd-bQ-MbP" id="nnR-0O-P6j"/>
|
||||
<outlet property="giftImgV_2" destination="uC5-KH-BAv" id="gu0-05-PbX"/>
|
||||
<outlet property="giftImgV_3" destination="Svz-4C-086" id="HPY-zk-Q5r"/>
|
||||
<outlet property="nicknameLab" destination="1zo-hD-pYM" id="laO-ak-SmG"/>
|
||||
<outlet property="numLab_1" destination="rm2-Jm-DtL" id="SJa-0C-lw0"/>
|
||||
<outlet property="numLab_2" destination="QFO-1e-AMb" id="627-yX-Hrk"/>
|
||||
<outlet property="numLab_3" destination="JgU-ri-axd" id="EHK-Cp-IBd"/>
|
||||
<outlet property="orderLab" destination="VkA-lx-PRH" id="wY0-js-xgf"/>
|
||||
<outlet property="roomRankView" destination="7O1-vV-MuF" id="tv5-rF-tDP"/>
|
||||
<outlet property="roomRankViewWidthCon" destination="Tor-mW-Z8S" id="bN9-1f-Pcw"/>
|
||||
<outlet property="zouriRankView" destination="LuJ-ha-HJb" id="9eQ-Pv-V3l"/>
|
||||
<outlet property="zuoriBaiyinL" destination="s2o-kG-xzn" id="5wc-Gd-EFT"/>
|
||||
<outlet property="zuoriHuangjinView" destination="9rm-QQ-04d" id="HCR-uw-uwF"/>
|
||||
<outlet property="zuoribaiyinView" destination="E1S-gx-IRs" id="YNT-oG-pKL"/>
|
||||
<outlet property="zuorihuangjinL" destination="jcw-P0-LEH" id="s3Z-o2-EXB"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="165.94202898550725" y="127.56696428571428"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="512" height="512"/>
|
||||
</resources>
|
||||
</document>
|
||||
47
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankModel.h
Executable file
47
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankModel.h
Executable file
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// ShouQiBangModel.h
|
||||
// miliao
|
||||
//
|
||||
// Created by apple on 2020/6/28.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJBoxRankModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *uid; //": 1000778,
|
||||
@property (nonatomic, copy) NSString *gid; //": 21,
|
||||
@property (nonatomic, copy) NSString *rid; //": 15,
|
||||
@property (nonatomic, copy) NSString *tid; //": 1,
|
||||
@property (nonatomic, copy) NSString *num; //": 1,
|
||||
@property (nonatomic, copy) NSString *total_open_num; //": 100,
|
||||
@property (nonatomic, copy) NSString *gift_price; //": "200.00",
|
||||
@property (nonatomic, copy) NSString *total_price; //": "200.00",
|
||||
@property (nonatomic, copy) NSString *add_time; //": 1620281311,
|
||||
@property (nonatomic, copy) NSString *nick_name; //": "132",
|
||||
@property (nonatomic, copy) NSString *head_pic; //":
|
||||
@property (nonatomic, copy) NSString *gift_name; //": "为你爆灯",
|
||||
@property (nonatomic, copy) NSString *base_image; //":
|
||||
@property (nonatomic, copy) NSString *box_type_name; //": "普通宝箱"
|
||||
|
||||
@property (nonatomic, copy) NSString *mid; //001 开奖期数
|
||||
@property (nonatomic, copy) NSString *type_name; //": "倍数游戏宝箱类型"
|
||||
|
||||
@property (nonatomic, strong) NSArray *gift_list; //盲盒巡乐会榜单需要
|
||||
|
||||
@property (nonatomic, strong) NSArray *user_box_gift_list;
|
||||
|
||||
//新增
|
||||
@property (nonatomic, copy) NSString *receive_nick_name; //
|
||||
@property (nonatomic, copy) NSString *receive_head_pic; //
|
||||
@property (nonatomic, copy) NSString *receive_base_image; //
|
||||
@property (nonatomic, copy) NSString *receive_gift_name; //":
|
||||
|
||||
@property (nonatomic, copy) NSString *gift_num;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
17
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankModel.m
Executable file
17
SweetParty/主类/RCMic/Room/Box/手气榜/BJBoxRankModel.m
Executable file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// BJBoxRankModel.m
|
||||
// miliao
|
||||
//
|
||||
// Created by apple on 2020/6/28.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJBoxRankModel.h"
|
||||
|
||||
@implementation BJBoxRankModel
|
||||
+ (NSDictionary *)mj_replacedKeyFromPropertyName{
|
||||
return @{
|
||||
// @"giftID" : @"id",
|
||||
};
|
||||
}
|
||||
@end
|
||||
42
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangCell.h
Executable file
42
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangCell.h
Executable file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// ShouQiBangCell.h
|
||||
// miliao
|
||||
//
|
||||
// Created by 翟三美 on 2020/6/27.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "BJBoxRankModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ShouQiBangCell : UITableViewCell
|
||||
//头像
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *userIcon;
|
||||
//在
|
||||
@property (strong, nonatomic) IBOutlet UILabel *giftPre;
|
||||
//宝箱名字
|
||||
@property (strong, nonatomic) IBOutlet UILabel *typeNum;
|
||||
//礼物名字
|
||||
@property (strong, nonatomic) IBOutlet UILabel *giftName;
|
||||
//礼物数量
|
||||
@property (strong, nonatomic) IBOutlet UILabel *giftNum;
|
||||
//用户名
|
||||
@property (strong, nonatomic) IBOutlet UILabel *userNickname;
|
||||
//贡献等级
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *gxImageView;
|
||||
//魅力等级
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *mlImageView;
|
||||
//礼物图标
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *giftIcon;
|
||||
//时间
|
||||
@property (strong, nonatomic) IBOutlet UILabel *sendTime;
|
||||
|
||||
/*model*/
|
||||
@property(nonatomic, strong) BJBoxRankModel *model;
|
||||
|
||||
-(void)onChangeUIColor:(UIColor *)color;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
79
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangCell.m
Executable file
79
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangCell.m
Executable file
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// ShouQiBangCell.m
|
||||
// miliao
|
||||
//
|
||||
// Created by 翟三美 on 2020/6/27.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShouQiBangCell.h"
|
||||
#import "NSString+category.h"
|
||||
|
||||
@implementation ShouQiBangCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.backgroundColor = UIColor.clearColor;
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
|
||||
- (void)setModel:(BJBoxRankModel *)model{
|
||||
_model = model;
|
||||
|
||||
[self.userIcon sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:yb_place_img];
|
||||
self.giftPre.text = @"在";
|
||||
self.typeNum.text = NSStringFormat(@"%@x%@", C_string(model.box_type_name), C_string(model.total_open_num));
|
||||
self.giftName.text = @"中获得";
|
||||
self.giftNum.text = [NSString stringWithFormat:@"%@*%@",model.gift_name,model.num];
|
||||
self.userNickname.text = model.nick_name;
|
||||
// [self.gxImageView sd_setImageWithURL:[NSURL URLWithString:model.gold_level_img] placeholderImage:ImageNamed(@"jinrui_0")];
|
||||
// [self.mlImageView sd_setImageWithURL:[NSURL URLWithString:model.star_level_img] placeholderImage:ImageNamed(@"xingrui_0")];
|
||||
[self.giftIcon sd_setImageWithURL:[NSURL URLWithString:model.base_image] placeholderImage:ImageNamed(@"未加载图片")];
|
||||
self.sendTime.text = [self compareCurrentTime:model.add_time.formateDateYMD_HM];
|
||||
}
|
||||
|
||||
-(void)onChangeUIColor:(UIColor *)color {
|
||||
self.userNickname.textColor = self.giftPre.textColor = self.typeNum.textColor = self.giftName.textColor = self.sendTime.textColor = self.giftNum.textColor = color;
|
||||
}
|
||||
|
||||
-(NSString *)compareCurrentTime:(NSString *)str
|
||||
{
|
||||
//把字符串转为NSdate
|
||||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
|
||||
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm"];
|
||||
NSDate *timeDate = [dateFormatter dateFromString:str];
|
||||
|
||||
//得到与当前时间差
|
||||
NSTimeInterval timeInterval = [timeDate timeIntervalSinceNow];
|
||||
timeInterval = -timeInterval;
|
||||
//标准时间和北京时间差8个小时
|
||||
// timeInterval = timeInterval - 86060;
|
||||
long temp = 0;
|
||||
NSString *result;
|
||||
if (timeInterval < 60) {
|
||||
result = [NSString stringWithFormat:@"刚刚"];
|
||||
}
|
||||
else if((temp = timeInterval/60) <60){
|
||||
result = [NSString stringWithFormat:@"%ld分钟前",temp];
|
||||
}
|
||||
|
||||
else if((temp = temp/60) <24){
|
||||
result = [NSString stringWithFormat:@"%ld小时前",temp];
|
||||
}
|
||||
|
||||
else if((temp = temp/24) <30){
|
||||
result = [NSString stringWithFormat:@"%ld天前",temp];
|
||||
}
|
||||
|
||||
else if((temp = temp/30) <12){
|
||||
result = [NSString stringWithFormat:@"%ld月前",temp];
|
||||
}
|
||||
else{
|
||||
temp = temp/12;
|
||||
result = [NSString stringWithFormat:@"%ld年前",temp];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
@end
|
||||
158
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangCell.xib
Executable file
158
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangCell.xib
Executable file
@@ -0,0 +1,158 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ShouQiBangCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="433" height="84"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E6c-WB-ASp">
|
||||
<rect key="frame" x="10" y="0.0" width="413" height="74"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="default_userIcon" translatesAutoresizingMaskIntoConstraints="NO" id="LoG-06-p3o">
|
||||
<rect key="frame" x="15" y="24" width="36" height="36"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="36" id="CEd-DJ-YK9"/>
|
||||
<constraint firstAttribute="width" constant="36" id="TLh-5f-l1z"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="18"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="在" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GaG-D8-60k">
|
||||
<rect key="frame" x="59" y="45" width="9.5" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="HPI-YT-PAY"/>
|
||||
<constraint firstAttribute="width" relation="lessThanOrEqual" constant="100" id="qp0-QJ-24q"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="9"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="青铜" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fbx-H0-4J1">
|
||||
<rect key="frame" x="73.5" y="49.5" width="18.5" height="11"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="9"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="中获得 " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="te5-iF-FQ8">
|
||||
<rect key="frame" x="97" y="49.5" width="30.5" height="11"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="9"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="公主城堡*1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="z40-WC-tRD">
|
||||
<rect key="frame" x="132.5" y="49.5" width="46.5" height="11"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="9"/>
|
||||
<color key="textColor" systemColor="systemYellowColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="你好" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5xl-Yr-8CN">
|
||||
<rect key="frame" x="59" y="24" width="25" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="IEo-QL-8Qv">
|
||||
<rect key="frame" x="89" y="21.5" width="32" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="4Ay-cB-KWv"/>
|
||||
<constraint firstAttribute="width" constant="32" id="Xa7-2A-pfU"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0Eu-u4-irU">
|
||||
<rect key="frame" x="126" y="21.5" width="32" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="32" id="3sN-aM-8y9"/>
|
||||
<constraint firstAttribute="height" constant="20" id="QS2-Gb-6tV"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="未加载图片" translatesAutoresizingMaskIntoConstraints="NO" id="Uy4-pu-W7M">
|
||||
<rect key="frame" x="383" y="22" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="30" id="S3F-iA-Htl"/>
|
||||
<constraint firstAttribute="height" constant="30" id="pG7-nY-JS8"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="15"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="30分钟前" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AEb-HM-Vdq">
|
||||
<rect key="frame" x="378.5" y="60" width="39.5" height="11"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="9"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemGray2Color"/>
|
||||
<constraints>
|
||||
<constraint firstItem="5xl-Yr-8CN" firstAttribute="top" secondItem="LoG-06-p3o" secondAttribute="top" id="1SW-Ow-uql"/>
|
||||
<constraint firstAttribute="bottom" secondItem="E6c-WB-ASp" secondAttribute="bottom" constant="10" id="4DX-V4-ybr"/>
|
||||
<constraint firstItem="Uy4-pu-W7M" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" constant="-5" id="7Fb-MD-p5V"/>
|
||||
<constraint firstItem="AEb-HM-Vdq" firstAttribute="top" secondItem="Uy4-pu-W7M" secondAttribute="bottom" constant="8" id="BtK-rH-TXL"/>
|
||||
<constraint firstItem="LoG-06-p3o" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="Czy-F2-LS5"/>
|
||||
<constraint firstItem="z40-WC-tRD" firstAttribute="centerY" secondItem="GaG-D8-60k" secondAttribute="centerY" id="FgH-rd-kIJ"/>
|
||||
<constraint firstItem="GaG-D8-60k" firstAttribute="leading" secondItem="LoG-06-p3o" secondAttribute="trailing" constant="8" id="JDv-8j-i46"/>
|
||||
<constraint firstItem="IEo-QL-8Qv" firstAttribute="leading" secondItem="5xl-Yr-8CN" secondAttribute="trailing" constant="5" id="KML-Xr-cDi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="E6c-WB-ASp" secondAttribute="trailing" constant="10" id="MN2-WB-6n0"/>
|
||||
<constraint firstItem="0Eu-u4-irU" firstAttribute="centerY" secondItem="5xl-Yr-8CN" secondAttribute="centerY" id="QFB-xE-4U3"/>
|
||||
<constraint firstItem="fbx-H0-4J1" firstAttribute="centerY" secondItem="GaG-D8-60k" secondAttribute="centerY" id="S3y-fa-by0"/>
|
||||
<constraint firstItem="fbx-H0-4J1" firstAttribute="leading" secondItem="GaG-D8-60k" secondAttribute="trailing" constant="5" id="S7W-RA-vRA"/>
|
||||
<constraint firstItem="GaG-D8-60k" firstAttribute="bottom" secondItem="LoG-06-p3o" secondAttribute="bottom" constant="5" id="WlX-Vf-bOh"/>
|
||||
<constraint firstItem="E6c-WB-ASp" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="dA6-wB-8Tt"/>
|
||||
<constraint firstItem="te5-iF-FQ8" firstAttribute="leading" secondItem="fbx-H0-4J1" secondAttribute="trailing" constant="5" id="eJb-GX-4dn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Uy4-pu-W7M" secondAttribute="trailing" constant="20" id="fvm-Vc-bPG"/>
|
||||
<constraint firstItem="LoG-06-p3o" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="15" id="hIc-Uu-RNU"/>
|
||||
<constraint firstItem="0Eu-u4-irU" firstAttribute="leading" secondItem="IEo-QL-8Qv" secondAttribute="trailing" constant="5" id="juO-s8-Chy"/>
|
||||
<constraint firstItem="z40-WC-tRD" firstAttribute="leading" secondItem="te5-iF-FQ8" secondAttribute="trailing" constant="5" id="jvM-T7-j3Z"/>
|
||||
<constraint firstItem="AEb-HM-Vdq" firstAttribute="centerX" secondItem="Uy4-pu-W7M" secondAttribute="centerX" id="lAu-zu-L7O"/>
|
||||
<constraint firstItem="E6c-WB-ASp" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="uPt-XE-LFF"/>
|
||||
<constraint firstItem="5xl-Yr-8CN" firstAttribute="leading" secondItem="GaG-D8-60k" secondAttribute="leading" id="v40-eK-4xE"/>
|
||||
<constraint firstItem="IEo-QL-8Qv" firstAttribute="centerY" secondItem="5xl-Yr-8CN" secondAttribute="centerY" id="vnJ-Gx-4AL"/>
|
||||
<constraint firstItem="te5-iF-FQ8" firstAttribute="centerY" secondItem="fbx-H0-4J1" secondAttribute="centerY" id="z9e-F5-Ni0"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="giftIcon" destination="Uy4-pu-W7M" id="Y2J-9X-9u3"/>
|
||||
<outlet property="giftName" destination="te5-iF-FQ8" id="WbD-yI-trM"/>
|
||||
<outlet property="giftNum" destination="z40-WC-tRD" id="vCo-Ko-xL8"/>
|
||||
<outlet property="giftPre" destination="GaG-D8-60k" id="ZD4-AT-qI1"/>
|
||||
<outlet property="gxImageView" destination="IEo-QL-8Qv" id="14k-U4-uhd"/>
|
||||
<outlet property="mlImageView" destination="0Eu-u4-irU" id="bUp-US-euh"/>
|
||||
<outlet property="sendTime" destination="AEb-HM-Vdq" id="etw-Gt-pZX"/>
|
||||
<outlet property="typeNum" destination="fbx-H0-4J1" id="aXo-Yb-Z5F"/>
|
||||
<outlet property="userIcon" destination="LoG-06-p3o" id="KXw-yH-6yn"/>
|
||||
<outlet property="userNickname" destination="5xl-Yr-8CN" id="069-Yd-vr4"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="151.44927536231884" y="210.9375"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="default_userIcon" width="180" height="180"/>
|
||||
<image name="未加载图片" width="500" height="500"/>
|
||||
<systemColor name="systemGray2Color">
|
||||
<color red="0.68235294117647061" green="0.68235294117647061" blue="0.69803921568627447" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemYellowColor">
|
||||
<color red="1" green="0.80000000000000004" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
18
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangVC.h
Executable file
18
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangVC.h
Executable file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// ShouQiBangVC.h
|
||||
// miliao
|
||||
//
|
||||
// Created by 翟三美 on 2020/6/27.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface ShouQiBangVC : UIViewController
|
||||
/*是否来自首页*/
|
||||
@property(nonatomic, assign) BOOL isFromHome;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
158
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangVC.m
Executable file
158
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangVC.m
Executable file
@@ -0,0 +1,158 @@
|
||||
//
|
||||
// ShouQiBangVC.m
|
||||
// miliao
|
||||
//
|
||||
// Created by 翟三美 on 2020/6/27.
|
||||
// Copyright © 2020 miliao. All rights reserved.
|
||||
//
|
||||
|
||||
#import "ShouQiBangVC.h"
|
||||
#import <HWPopController/HWPop.h>
|
||||
#import "ShouQiBangCell.h"
|
||||
#import "BJBoxRankModel.h"
|
||||
@interface ShouQiBangVC ()<UITableViewDelegate,UITableViewDataSource>
|
||||
@property(nonatomic, strong) UITableView *tableView;
|
||||
@property(nonatomic, strong) NSMutableArray *dataArray;
|
||||
/*页码*/
|
||||
@property(nonatomic, assign) NSInteger page;
|
||||
|
||||
/*返回*/
|
||||
@property(nonatomic, strong) UIButton *backBtn;
|
||||
@end
|
||||
|
||||
@implementation ShouQiBangVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.page = 1;
|
||||
//设置区域
|
||||
self.contentSizeInPop = CGSizeMake(ScreenWidth, ScreenHeight);
|
||||
//表视图
|
||||
[self.view addSubview:self.tableView];
|
||||
self.view.backgroundColor =COLOR16(0xf8f8f8);
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.equalTo(self.view);
|
||||
make.top.mas_equalTo(162);
|
||||
}];
|
||||
//返回按钮
|
||||
[self.view addSubview:self.backBtn];
|
||||
[self.backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.view).offset(15);
|
||||
make.top.equalTo(self.view).offset(ZJStatusBarH+10);
|
||||
make.width.mas_equalTo(10);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
__weak __typeof(self)weakSelf = self;
|
||||
[self.backBtn buttonAddTaget:^(UIButton *btn) {
|
||||
[weakSelf.navigationController popViewControllerAnimated:YES];
|
||||
[weakSelf dismissViewControllerAnimated:YES completion:nil];
|
||||
} forControlEvents:UIControlEventTouchUpInside];
|
||||
[self getRecord];
|
||||
|
||||
}
|
||||
//获取推荐动态
|
||||
- (void)getRecord
|
||||
{
|
||||
[self loadDataIsRefresh:YES];
|
||||
[ZJUIUtil refreshWithHeader:self.tableView refresh:^{
|
||||
WEAK_SELF
|
||||
weakSelf.page = 1;
|
||||
[weakSelf loadDataIsRefresh:YES];
|
||||
}];
|
||||
[ZJUIUtil refreshWithFooter:self.tableView refresh:^{
|
||||
WEAK_SELF
|
||||
weakSelf.page ++;
|
||||
[weakSelf loadDataIsRefresh:NO];
|
||||
}];
|
||||
//解决加载更多数据时界面跳动问题
|
||||
self.tableView.estimatedRowHeight = 0;
|
||||
self.tableView.estimatedSectionHeaderHeight = 0;
|
||||
self.tableView.estimatedSectionFooterHeight = 0;
|
||||
}
|
||||
-(void)loadDataIsRefresh:(BOOL)isRefresh
|
||||
{
|
||||
|
||||
if (isRefresh) {
|
||||
[self.dataArray removeAllObjects];
|
||||
}
|
||||
NSString *page = [NSString stringWithFormat:@"%zd",self.page];
|
||||
|
||||
NSDictionary *dict = @{@"page":page};
|
||||
[BJHttpTool getShouQiBangListWithParameters:dict success:^(id response) {
|
||||
NSArray *allArray = [BJBoxRankModel mj_objectArrayWithKeyValuesArray:response[@"data"]];
|
||||
if (allArray.count > 0) {
|
||||
[self.dataArray addObjectsFromArray:allArray];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.page --;
|
||||
}
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
[self.tableView reloadData];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
[self.tableView.mj_header endRefreshing];
|
||||
[self.tableView.mj_footer endRefreshing];
|
||||
}];
|
||||
}
|
||||
#pragma mark -------------------tableview代理-------------------------
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 83;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
static NSString *identifier = @"ShouQiBangCell";
|
||||
ShouQiBangCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
|
||||
if (!cell) {
|
||||
cell = [[ShouQiBangCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
|
||||
}
|
||||
cell.model = self.dataArray[indexPath.row];
|
||||
cell.contentView.backgroundColor = kClearColor;
|
||||
cell.backgroundColor = kClearColor;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
return cell;
|
||||
}
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -------------------懒加载-------------------------
|
||||
- (UITableView *)tableView{
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
// _tableView.contentInset = UIEdgeInsetsMake(0, 10, 0, 10);
|
||||
_tableView.backgroundColor = kWhiteColor;
|
||||
_tableView.showsVerticalScrollIndicator = NO;
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
|
||||
_tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
|
||||
[_tableView registerNib:[UINib nibWithNibName:@"ShouQiBangCell" bundle:nil] forCellReuseIdentifier:@"ShouQiBangCell"];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (NSMutableArray *)dataArray{
|
||||
if (!_dataArray) {
|
||||
_dataArray = [NSMutableArray array];
|
||||
}
|
||||
return _dataArray;
|
||||
}
|
||||
- (UIButton *)backBtn{
|
||||
if (!_backBtn) {
|
||||
_backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_backBtn setImage:ImageNamed(@"l_back") forState:UIControlStateNormal];
|
||||
}
|
||||
return _backBtn;
|
||||
}
|
||||
@end
|
||||
49
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangVC.xib
Executable file
49
SweetParty/主类/RCMic/Room/Box/手气榜/ShouQiBangVC.xib
Executable file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
|
||||
<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" customClass="ShouQiBangVC">
|
||||
<connections>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="shouqi_bg" translatesAutoresizingMaskIntoConstraints="NO" id="4rD-cj-d5t">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="162"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="162" id="LEt-wZ-4qK"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="162" id="OCd-Dn-nUj"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="4rD-cj-d5t" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="KOX-2s-BJO"/>
|
||||
<constraint firstItem="4rD-cj-d5t" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="Ks9-sJ-98c"/>
|
||||
<constraint firstItem="4rD-cj-d5t" firstAttribute="trailing" secondItem="Q5M-cg-NOt" secondAttribute="trailing" id="XdI-Hy-jhG"/>
|
||||
<constraint firstItem="4rD-cj-d5t" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="j3t-KG-5fa"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<point key="canvasLocation" x="137.68115942028987" y="102.45535714285714"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="shouqi_bg" width="375" height="164.5"/>
|
||||
</resources>
|
||||
</document>
|
||||
22
SweetParty/主类/RCMic/Room/Box/手气榜/WLStakeRankCell.h
Normal file
22
SweetParty/主类/RCMic/Room/Box/手气榜/WLStakeRankCell.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// WLStakeRankCell.h
|
||||
// YaYin
|
||||
//
|
||||
// Created by yons on 2024/11/2.
|
||||
// Copyright © 2024 woniu. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "BJBoxRankModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface WLStakeRankCell : UITableViewCell
|
||||
@property (nonatomic, strong)BJBoxRankModel *model;
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *titleL;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeL;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *typeL;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
46
SweetParty/主类/RCMic/Room/Box/手气榜/WLStakeRankCell.m
Normal file
46
SweetParty/主类/RCMic/Room/Box/手气榜/WLStakeRankCell.m
Normal file
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// WLStakeRankCell.m
|
||||
// YaYin
|
||||
//
|
||||
// Created by yons on 2024/11/2.
|
||||
// Copyright © 2024 woniu. All rights reserved.
|
||||
//
|
||||
|
||||
#import "WLStakeRankCell.h"
|
||||
|
||||
@implementation WLStakeRankCell
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
|
||||
- (void)setModel:(BJBoxRankModel *)model {
|
||||
_model = model;
|
||||
|
||||
self.titleL.text = [NSString stringWithFormat:@"第%@期 %@中了%@(%@)*%@", model.mid, model.nick_name, model.gift_name, model.gift_price, model.num];
|
||||
self.timeL.text = [NSString stringWithFormat:@"%@",[self time_timestampToString:[model.add_time intValue]]];
|
||||
self.typeL.text = [NSString stringWithFormat:@"炼仙传说:%@", model.type_name];
|
||||
}
|
||||
|
||||
- (NSString *)time_timestampToString:(NSInteger)timestamp{
|
||||
|
||||
NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:timestamp];
|
||||
|
||||
NSDateFormatter *dateFormat=[[NSDateFormatter alloc]init];
|
||||
|
||||
[dateFormat setDateFormat:@"yyyy-MM-dd HH:mm"];
|
||||
|
||||
NSString* string=[dateFormat stringFromDate:confromTimesp];
|
||||
|
||||
return string;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
58
SweetParty/主类/RCMic/Room/Box/手气榜/WLStakeRankCell.xib
Normal file
58
SweetParty/主类/RCMic/Room/Box/手气榜/WLStakeRankCell.xib
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" 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="22684"/>
|
||||
<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"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="99" id="KGk-i7-Jjw" customClass="WLStakeRankCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="459" height="99"/>
|
||||
<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="459" height="99"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zd0-v1-TwH">
|
||||
<rect key="frame" x="5" y="39.333333333333336" width="31" height="14.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OCJ-yz-0IG">
|
||||
<rect key="frame" x="423" y="39.333333333333336" width="31" height="14.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0RM-WE-PBR">
|
||||
<rect key="frame" x="5" y="10" width="31" height="14.333333333333336"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="0RM-WE-PBR" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="5" id="EED-W4-gj2"/>
|
||||
<constraint firstItem="0RM-WE-PBR" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="So0-nx-mbz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OCJ-yz-0IG" secondAttribute="trailing" constant="5" id="T5E-qK-fhJ"/>
|
||||
<constraint firstItem="Zd0-v1-TwH" firstAttribute="leading" secondItem="0RM-WE-PBR" secondAttribute="leading" id="g9W-gM-Bp0"/>
|
||||
<constraint firstItem="OCJ-yz-0IG" firstAttribute="centerY" secondItem="Zd0-v1-TwH" secondAttribute="centerY" id="k61-Dr-4fR"/>
|
||||
<constraint firstItem="Zd0-v1-TwH" firstAttribute="top" secondItem="0RM-WE-PBR" secondAttribute="bottom" constant="15" id="reF-xt-Xbx"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="timeL" destination="Zd0-v1-TwH" id="2ck-Qw-fOg"/>
|
||||
<outlet property="titleL" destination="0RM-WE-PBR" id="fMV-HF-5jM"/>
|
||||
<outlet property="typeL" destination="OCJ-yz-0IG" id="k8g-DO-Rw4"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="168.70229007633588" y="8.0985915492957758"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
19
SweetParty/主类/RCMic/Room/Box/本期奖池/BJBoxPoolAlert.h
Executable file
19
SweetParty/主类/RCMic/Room/Box/本期奖池/BJBoxPoolAlert.h
Executable file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// RoomGiftPoolAlert.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJBoxPoolAlert : UIView
|
||||
|
||||
- (void)showOnView:(UIView *)parent WithType:(NSInteger)type;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
388
SweetParty/主类/RCMic/Room/Box/本期奖池/BJBoxPoolAlert.m
Executable file
388
SweetParty/主类/RCMic/Room/Box/本期奖池/BJBoxPoolAlert.m
Executable file
@@ -0,0 +1,388 @@
|
||||
//
|
||||
// RoomGiftPoolAlert.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJBoxPoolAlert.h"
|
||||
#import "RoomBoxRecordCell.h"
|
||||
#import "XiamuFooter.h"
|
||||
#import "XiamuTipView.h"
|
||||
|
||||
@interface BJBoxPoolAlert () <UICollectionViewDelegateFlowLayout, UICollectionViewDataSource>
|
||||
|
||||
@property (nonatomic, strong) UIView *mainView;
|
||||
@property (nonatomic, strong) UIImageView *bgImg;
|
||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *models; //礼物数组
|
||||
|
||||
//关于网络请求
|
||||
@property (nonatomic, assign) BOOL isLoadFirst;
|
||||
@property (nonatomic, assign) BOOL isOnRequesting, isNoMoreData, isNetError;
|
||||
@property (nonatomic, strong) XiamuFooter *footerView;
|
||||
@property (nonatomic, strong) XiamuTipView *tipsView;
|
||||
@property (nonatomic, assign) NSInteger pageIndex;
|
||||
|
||||
@property (nonatomic, assign) NSInteger poolType;
|
||||
|
||||
@property (nonatomic, assign) CGFloat mainW;
|
||||
@property (nonatomic, assign) CGFloat mainH;
|
||||
|
||||
@property (nonatomic, assign) CGFloat contentX;
|
||||
@property (nonatomic, assign) CGFloat contentTop;
|
||||
@property (nonatomic, assign) CGFloat contentBottom;
|
||||
|
||||
@property (nonatomic, copy) NSString *bgImgName;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation BJBoxPoolAlert
|
||||
|
||||
- (NSMutableArray *)models {
|
||||
if (!_models) {
|
||||
_models = NSMutableArray.array;
|
||||
}
|
||||
return _models;
|
||||
}
|
||||
|
||||
- (XiamuFooter *)footerView {
|
||||
if (!_footerView) {
|
||||
_footerView = [[XiamuFooter alloc] initWithFrame:CGRectMake(0, 0, _collectionView.width, 40)];
|
||||
_footerView.hidden = YES;
|
||||
}
|
||||
return _footerView;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:UIScreen.mainScreen.bounds]) {
|
||||
|
||||
self.backgroundColor = [kBlackColor colorWithAlphaComponent:0.3];
|
||||
[ControlCreator createButton:self rect:self.bounds text:@"" font:nil color:nil backguoundColor:UIColor.clearColor imageName:nil target:self action:@selector(backAction)];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initMainView {
|
||||
if (_mainView) {
|
||||
return;
|
||||
}
|
||||
UIColor *color;
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
color = HEXCOLOR(0xFFFFFF);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}else if (self.poolType == 21){
|
||||
color = kWhiteColor;
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}else {
|
||||
color = HEXCOLOR(0xFFFFFF);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake((APPW-_mainW)/2, APPH-_mainH, _mainW, _mainH)];
|
||||
}
|
||||
_mainView.backgroundColor = UIColor.clearColor;
|
||||
[self addSubview:_mainView];
|
||||
|
||||
[ControlCreator createImageView:_mainView rect:_mainView.bounds imageName:self.bgImgName backguoundColor:nil];
|
||||
}
|
||||
|
||||
- (void)initCollecionView {
|
||||
if (_collectionView) {
|
||||
return;
|
||||
}
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake((_mainView.width-_contentX*2)/3.0, 140);
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
layout.minimumLineSpacing = 0;
|
||||
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(_contentX, _contentTop, _mainView.width-_contentX*2, _mainView.height-_contentTop-_contentBottom) collectionViewLayout:layout];
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.backgroundColor = UIColor.clearColor;
|
||||
_collectionView.showsVerticalScrollIndicator = NO;
|
||||
NSString *cellId = NSStringFromClass(RoomBoxRecordCell.class);
|
||||
[_collectionView registerNib:[UINib nibWithNibName:cellId bundle:nil] forCellWithReuseIdentifier:cellId];
|
||||
[_collectionView registerClass:UICollectionReusableView.class forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"foot"];
|
||||
[_mainView addSubview:_collectionView];
|
||||
}
|
||||
|
||||
- (void)initMJrefresh {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
[weakSelf loadFirst];
|
||||
}];
|
||||
_collectionView.mj_header = header;
|
||||
}
|
||||
|
||||
- (void)initTipView {
|
||||
if (_tipsView) {
|
||||
return;
|
||||
}
|
||||
_tipsView = [[XiamuTipView alloc]initWithFrame:CGRectMake(0, 0, APPW-30-80, 250)];
|
||||
|
||||
[self.collectionView addSubview:_tipsView];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
_tipsView.block = ^{
|
||||
if (weakSelf.isNetError) {
|
||||
[weakSelf loadFirst];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
- (void)showOnView:(UIView *)parent WithType:(NSInteger)type {
|
||||
self.poolType = type;
|
||||
|
||||
if (type == 4 || type == 5 || type == 6) {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/375*500;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 20;
|
||||
self.contentTop = 90;
|
||||
self.contentBottom = 40;
|
||||
|
||||
self.bgImgName = @"zhuan_bg_pool";
|
||||
}else if (type == 21) {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/375*531;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 15;
|
||||
self.contentTop = 100;
|
||||
self.contentBottom = 24;
|
||||
|
||||
self.bgImgName = @"sec_zhuan_bg_pool";
|
||||
}else if (type == 100) {
|
||||
CGFloat x = 12;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/350*427;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 17;
|
||||
self.contentTop = 105;
|
||||
self.contentBottom = 25;
|
||||
|
||||
self.bgImgName = @"zxy_pool_bg";
|
||||
}else if(type == 777){
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth - x*2;
|
||||
CGFloat h = w/375*580;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 30;
|
||||
self.contentTop = 115;
|
||||
self.contentBottom = 50;
|
||||
|
||||
self.bgImgName = @"stake_bg_pool";
|
||||
}else {
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth - x*2;
|
||||
CGFloat h = w/375*480;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 15;
|
||||
self.contentTop = 80;
|
||||
self.contentBottom = 50;
|
||||
|
||||
self.bgImgName = @"bg_explore_pool";
|
||||
}
|
||||
|
||||
[self initMainView];
|
||||
[self initCollecionView];
|
||||
[self initMJrefresh];
|
||||
//[self initTipView];
|
||||
|
||||
[parent addSubview:self];
|
||||
|
||||
[_collectionView.mj_header beginRefreshing];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (void)backAction {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - data
|
||||
|
||||
- (void)setIsOnRequesting:(BOOL)isOnRequesting {
|
||||
_isOnRequesting = isOnRequesting;
|
||||
if (isOnRequesting) {
|
||||
_isNetError = NO;
|
||||
[self.footerView stateLoading];
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
[self.footerView stateNoMore];
|
||||
if (self.models.count==0) {
|
||||
[self.tipsView stateNoResult];
|
||||
[self.footerView stateHide];
|
||||
}
|
||||
}
|
||||
if (_isNetError) {
|
||||
[self.footerView stateNetError];
|
||||
if (_isLoadFirst) {
|
||||
[self.tipsView stateNoNet];
|
||||
[self.footerView stateHide];
|
||||
[self.models removeAllObjects];
|
||||
[_collectionView reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadFirst {
|
||||
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
_pageIndex = 1;
|
||||
_isLoadFirst = YES;
|
||||
self.isNoMoreData = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadMore {
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
return;
|
||||
}
|
||||
|
||||
_isLoadFirst = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadListData {
|
||||
[self.tipsView stateHide];
|
||||
self.isNetError = NO;
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
self.isOnRequesting = YES;
|
||||
|
||||
|
||||
NSDictionary *dict = @{@"tid":@(_poolType)};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
NSString *urlStr = @"/api/box/get_box_list";
|
||||
if (self.poolType == 100) {
|
||||
urlStr = @"/api/Sprite/get_monster_box_list";
|
||||
}
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:urlStr parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSArray.class]) {
|
||||
[self checkRequestResult:result.content];
|
||||
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
|
||||
weakSelf.isOnRequesting = NO;
|
||||
[weakSelf.collectionView.mj_header endRefreshing];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)checkRequestResult:(NSArray *)listArr {
|
||||
if ([listArr isKindOfClass:NSArray.class]) {
|
||||
|
||||
if (_isLoadFirst) {
|
||||
[self.models removeAllObjects];
|
||||
}
|
||||
NSArray *models = [BJBoxPoolModel mj_objectArrayWithKeyValuesArray:listArr];
|
||||
[self.models addObjectsFromArray:models];
|
||||
[_collectionView reloadData];
|
||||
|
||||
self.isNoMoreData = YES;
|
||||
_pageIndex ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark ====================== 代理方法 ======================
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section {
|
||||
return CGSizeMake(APPW, 40);
|
||||
}
|
||||
- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
|
||||
if ([kind isEqualToString:UICollectionElementKindSectionFooter]) {
|
||||
|
||||
UICollectionReusableView *foot = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"foot" forIndexPath:indexPath];
|
||||
NSInteger footTag = 1001;
|
||||
UIView *subview = [foot viewWithTag:footTag];
|
||||
if (subview) {
|
||||
[subview removeFromSuperview];
|
||||
}
|
||||
|
||||
self.footerView.tag = footTag;
|
||||
[foot addSubview:self.footerView];
|
||||
|
||||
return foot;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.models.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NSString *cellId = NSStringFromClass(RoomBoxRecordCell.class);
|
||||
RoomBoxRecordCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellId forIndexPath:indexPath];
|
||||
|
||||
BJBoxPoolModel *model = self.models[indexPath.item];
|
||||
cell.poolModel = model;
|
||||
|
||||
if (self.poolType == 4 || self.poolType == 5 || self.poolType == 6) {
|
||||
cell.bjImg.image = ImageNamed(@"zhuan_gift_bg");
|
||||
cell.labelTop.textColor = HEXCOLOR(0xFFFFFF);
|
||||
cell.labelBot.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}else if (self.poolType == 100) {
|
||||
cell.bjImg.image = ImageNamed(@"zxy_gift_bg");
|
||||
cell.labelTop.textColor = HEXCOLOR(0xFFFFFF);
|
||||
cell.labelBot.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}else if (self.poolType == 777) {
|
||||
cell.bjImg.image = ImageNamed(@"stake_gift_bg");
|
||||
cell.labelTop.textColor = HEXCOLOR(0xFFFFFF);
|
||||
cell.labelBot.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}else {
|
||||
cell.bjImg.image = ImageNamed(@"box_gift_bg");
|
||||
cell.labelTop.textColor = HEXCOLOR(0xFFFFFF);
|
||||
cell.labelBot.textColor = HEXCOLOR(0xFFFFFF);
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
23
SweetParty/主类/RCMic/Room/Box/本期奖池/BJBoxPoolModel.h
Executable file
23
SweetParty/主类/RCMic/Room/Box/本期奖池/BJBoxPoolModel.h
Executable file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// RoomGiftPoolModel.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface BJBoxPoolModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *gid; //": 2,
|
||||
@property (nonatomic, copy) NSString *gift_name; //": "玫瑰",
|
||||
@property (nonatomic, copy) NSString *gift_price; //": "10",
|
||||
@property (nonatomic, copy) NSString *base_image; //":
|
||||
@property (nonatomic, copy) NSString *play_image; //": "htt
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
13
SweetParty/主类/RCMic/Room/Box/本期奖池/BJBoxPoolModel.m
Executable file
13
SweetParty/主类/RCMic/Room/Box/本期奖池/BJBoxPoolModel.m
Executable file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// RoomGiftPoolModel.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "BJBoxPoolModel.h"
|
||||
|
||||
@implementation BJBoxPoolModel
|
||||
|
||||
@end
|
||||
89
SweetParty/主类/RCMic/Room/Box/本期奖池/RoomGiftPoolAlert.xib
Executable file
89
SweetParty/主类/RCMic/Room/Box/本期奖池/RoomGiftPoolAlert.xib
Executable file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="RoomGiftPoolAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="A6g-sK-MmA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<action selector="backAction:" destination="iN0-l3-epB" eventType="touchUpInside" id="BoY-Nf-aCa"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P9J-oM-k9W">
|
||||
<rect key="frame" x="0.0" y="468" width="414" height="428"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_box_pool" translatesAutoresizingMaskIntoConstraints="NO" id="xba-Sr-Rsl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="428"/>
|
||||
</imageView>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="bC7-G0-Rji">
|
||||
<rect key="frame" x="30" y="70" width="354" height="318"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="VSM-kr-5Og">
|
||||
<size key="itemSize" width="128" height="128"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="bC7-G0-Rji" firstAttribute="top" secondItem="P9J-oM-k9W" secondAttribute="top" constant="70" id="867-dl-Tyg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bC7-G0-Rji" secondAttribute="trailing" constant="30" id="CbH-V8-lOe"/>
|
||||
<constraint firstItem="bC7-G0-Rji" firstAttribute="leading" secondItem="P9J-oM-k9W" secondAttribute="leading" constant="30" id="OB2-La-cx0"/>
|
||||
<constraint firstItem="xba-Sr-Rsl" firstAttribute="leading" secondItem="P9J-oM-k9W" secondAttribute="leading" id="hSo-GE-HKt"/>
|
||||
<constraint firstAttribute="bottom" secondItem="xba-Sr-Rsl" secondAttribute="bottom" id="lxp-vE-sFp"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bC7-G0-Rji" secondAttribute="bottom" constant="40" id="pp3-v4-zx1"/>
|
||||
<constraint firstItem="xba-Sr-Rsl" firstAttribute="top" secondItem="P9J-oM-k9W" secondAttribute="top" id="qpf-aS-YDC"/>
|
||||
<constraint firstAttribute="height" constant="428" id="sIw-uC-GFC"/>
|
||||
<constraint firstAttribute="trailing" secondItem="xba-Sr-Rsl" secondAttribute="trailing" id="vYd-4k-zz7"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="15"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="P9J-oM-k9W" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="5h5-b5-HVA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="A6g-sK-MmA" secondAttribute="bottom" id="IQq-fd-De9"/>
|
||||
<constraint firstItem="A6g-sK-MmA" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="N8t-TJ-dUq"/>
|
||||
<constraint firstItem="A6g-sK-MmA" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="aY7-bt-Wjz"/>
|
||||
<constraint firstItem="P9J-oM-k9W" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="eNo-RV-sdB"/>
|
||||
<constraint firstAttribute="bottom" secondItem="P9J-oM-k9W" secondAttribute="bottom" id="mhq-qm-a2t"/>
|
||||
<constraint firstItem="A6g-sK-MmA" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="o4p-Nu-Nl9"/>
|
||||
</constraints>
|
||||
<connections>
|
||||
<outlet property="bgImg" destination="xba-Sr-Rsl" id="XiK-F3-zSR"/>
|
||||
<outlet property="collectionView" destination="bC7-G0-Rji" id="shx-vL-ftb"/>
|
||||
<outlet property="layout" destination="VSM-kr-5Og" id="Xva-WT-VBd"/>
|
||||
<outlet property="mainView" destination="P9J-oM-k9W" id="eLd-4b-zP0"/>
|
||||
<outlet property="mainViewBotSpace" destination="mhq-qm-a2t" id="tv0-ty-MCN"/>
|
||||
<outlet property="mainViewH" destination="sIw-uC-GFC" id="Ykq-d9-uJm"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="139" y="135"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="bg_box_pool" width="375" height="381.5"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
19
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveAlert.h
Normal file
19
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveAlert.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// DengAchieveAlert.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengAchieveAlert : UIView
|
||||
|
||||
- (void)showOnView:(UIView *)parent boxType:(NSString *)boxType;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
323
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveAlert.m
Normal file
323
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveAlert.m
Normal file
@@ -0,0 +1,323 @@
|
||||
//
|
||||
// BJBoxRecordAlert.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengAchieveAlert.h"
|
||||
#import "DengAchieveCell.h"
|
||||
#import "XiamuFooter.h"
|
||||
#import "XiamuTipView.h"
|
||||
|
||||
@interface DengAchieveAlert () <UITableViewDelegate, UITableViewDataSource, JXCategoryViewDelegate>
|
||||
|
||||
@property (nonatomic, copy) NSString *boxType;
|
||||
|
||||
@property (nonatomic, strong) UIView *mainView;
|
||||
@property (nonatomic, strong) UIImageView *bgImg;
|
||||
@property (nonatomic, strong) UITableView *tableView;
|
||||
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *dataArray; //礼物数组
|
||||
|
||||
//关于网络请求
|
||||
@property (nonatomic, assign) BOOL isLoadFirst;
|
||||
@property (nonatomic, assign) BOOL isOnRequesting, isNoMoreData, isNetError;
|
||||
@property (nonatomic, strong) XiamuFooter *footerView;
|
||||
@property (nonatomic, strong) XiamuTipView *tipsView;
|
||||
@property (nonatomic, assign) NSInteger pageIndex;
|
||||
|
||||
@property (nonatomic, assign) CGFloat mainW;
|
||||
@property (nonatomic, assign) CGFloat mainH;
|
||||
|
||||
@property (nonatomic, assign) CGFloat contentX;
|
||||
@property (nonatomic, assign) CGFloat contentTop;
|
||||
@property (nonatomic, assign) CGFloat contentBottom;
|
||||
|
||||
@property (nonatomic, copy) NSString *bgImgName;
|
||||
|
||||
@property (nonatomic, strong) JXCategoryImageView *categoryView;
|
||||
@property (nonatomic, assign) NSInteger currentIndex;
|
||||
|
||||
@end
|
||||
|
||||
@implementation DengAchieveAlert
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:UIScreen.mainScreen.bounds]) {
|
||||
|
||||
self.backgroundColor = [kBlackColor colorWithAlphaComponent:0.3];
|
||||
|
||||
[ControlCreator createButton:self rect:self.bounds text:@"" font:nil color:nil backguoundColor:UIColor.clearColor imageName:nil target:self action:@selector(backAction:)];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initMainView {
|
||||
if (_mainView) {
|
||||
return;
|
||||
}
|
||||
UIColor *color;
|
||||
color = HEXCOLOR(0xFFFFFF);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake(APPW-_mainW, APPH-_mainH, _mainW, _mainH)];
|
||||
_mainView.backgroundColor = UIColor.clearColor;
|
||||
[self addSubview:_mainView];
|
||||
|
||||
[ControlCreator createImageView:_mainView rect:_mainView.bounds imageName:self.bgImgName backguoundColor:nil];
|
||||
|
||||
[_mainView addSubview:self.categoryView];
|
||||
self.categoryView.frame = CGRectMake(_contentX, _contentTop, _mainView.width-_contentX*2, 41);
|
||||
}
|
||||
|
||||
- (void)initTableView {
|
||||
if (_tableView) {
|
||||
return;
|
||||
}
|
||||
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(20, self.categoryView.bottom+20, _mainView.width-40, _mainView.height-self.categoryView.bottom-12-_contentBottom)];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.backgroundColor = UIColor.clearColor;
|
||||
_tableView.showsVerticalScrollIndicator = NO;
|
||||
NSString *cellId = NSStringFromClass(DengAchieveCell.class);
|
||||
[_tableView registerNib:[UINib nibWithNibName:cellId bundle:nil] forCellReuseIdentifier:cellId];
|
||||
[_mainView addSubview:_tableView];
|
||||
}
|
||||
|
||||
- (void)initMJrefresh {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
[weakSelf loadFirst];
|
||||
}];
|
||||
_tableView.mj_header = header;
|
||||
}
|
||||
|
||||
- (void)initTipView {
|
||||
if (_tipsView) {
|
||||
return;
|
||||
}
|
||||
_tipsView = [[XiamuTipView alloc]initWithFrame:CGRectMake(0, 0, _tableView.width, 250)];
|
||||
|
||||
[self.tableView addSubview:_tipsView];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
_tipsView.block = ^{
|
||||
if (weakSelf.isNetError) {
|
||||
[weakSelf loadFirst];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
- (NSMutableArray *)dataArray {
|
||||
if (!_dataArray) {
|
||||
_dataArray = NSMutableArray.array;
|
||||
}
|
||||
return _dataArray;
|
||||
}
|
||||
|
||||
- (XiamuFooter *)footerView {
|
||||
if (!_footerView) {
|
||||
_footerView = [[XiamuFooter alloc] initWithFrame:CGRectMake(0, 0, _tableView.width, 40)];
|
||||
_footerView.hidden = YES;
|
||||
}
|
||||
return _footerView;
|
||||
}
|
||||
|
||||
- (void)showOnView:(UIView *)parent boxType:(NSString *)boxType {
|
||||
_boxType = boxType;
|
||||
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/375*600;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 0;
|
||||
self.contentTop = 190;
|
||||
self.contentBottom = 40;
|
||||
|
||||
self.bgImgName = @"deng_my_bg";
|
||||
|
||||
[self initMainView];
|
||||
[self initTableView];
|
||||
[self initMJrefresh];
|
||||
// [self initTipView];
|
||||
|
||||
[parent addSubview:self];
|
||||
|
||||
[_tableView.mj_header beginRefreshing];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (void)backAction:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - data
|
||||
|
||||
- (void)setIsOnRequesting:(BOOL)isOnRequesting {
|
||||
_isOnRequesting = isOnRequesting;
|
||||
if (isOnRequesting) {
|
||||
_isNetError = NO;
|
||||
[self.footerView stateLoading];
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
[self.footerView stateNoMore];
|
||||
if (self.dataArray.count==0) {
|
||||
[self.tipsView stateNoResult];
|
||||
[self.footerView stateHide];
|
||||
}
|
||||
}
|
||||
if (_isNetError) {
|
||||
[self.footerView stateNetError];
|
||||
if (_isLoadFirst) {
|
||||
[self.tipsView stateNoNet];
|
||||
[self.footerView stateHide];
|
||||
[self.dataArray removeAllObjects];
|
||||
[_tableView reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadFirst {
|
||||
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
_pageIndex = 1;
|
||||
_isLoadFirst = YES;
|
||||
self.isNoMoreData = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadMore {
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
return;
|
||||
}
|
||||
|
||||
_isLoadFirst = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadListData {
|
||||
[self.tipsView stateHide];
|
||||
self.isNetError = NO;
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
self.isOnRequesting = YES;
|
||||
|
||||
NSDictionary *dict = @{@"page":@(self.pageIndex).stringValue,
|
||||
@"page_limit":@"20",
|
||||
@"box_type":C_string(_boxType),
|
||||
@"type":@(_currentIndex+1)
|
||||
};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/new_box/get_my_new_box_log" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSArray.class]) {
|
||||
[self checkRequestResult:result.content];
|
||||
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
|
||||
weakSelf.isOnRequesting = NO;
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)checkRequestResult:(NSArray *)listArr {
|
||||
if ([listArr isKindOfClass:NSArray.class]) {
|
||||
|
||||
if (_isLoadFirst) {
|
||||
[self.dataArray removeAllObjects];
|
||||
}
|
||||
if (listArr.count == 0 ) {
|
||||
self.isNoMoreData = YES;
|
||||
}
|
||||
NSArray *arr = [DengAchieveModel mj_objectArrayWithKeyValuesArray:listArr];
|
||||
[self.dataArray addObjectsFromArray:arr];
|
||||
[_tableView reloadData];
|
||||
|
||||
_pageIndex ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - table view
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 120;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NSString *cellId = NSStringFromClass(DengAchieveCell.class);
|
||||
DengAchieveCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId forIndexPath:indexPath];
|
||||
cell.selectionStyle = NO;
|
||||
|
||||
DengAchieveModel *model = self.dataArray[indexPath.row];
|
||||
cell.model = model;
|
||||
if (0 == _currentIndex) {
|
||||
cell.statusImgV.image = ImageNamed(@"deng_status_going");
|
||||
}else if (1 == _currentIndex) {
|
||||
cell.statusImgV.image = ImageNamed(@"deng_status_success");
|
||||
}else if (2 == _currentIndex) {
|
||||
cell.statusImgV.image = ImageNamed(@"deng_status_fail");
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.item+6>self.dataArray.count && !self.isNoMoreData) {
|
||||
[self loadMore];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||||
self.currentIndex = index;
|
||||
[self loadFirst];
|
||||
}
|
||||
|
||||
//分页菜单视图
|
||||
- (JXCategoryImageView *)categoryView {
|
||||
if (!_categoryView) {
|
||||
_categoryView = [[JXCategoryImageView alloc] init];
|
||||
_categoryView.delegate = self;
|
||||
_categoryView.imageSize = CGSizeMake(88, 32);
|
||||
_categoryView.contentEdgeInsetLeft = 40;
|
||||
_categoryView.contentEdgeInsetRight = 40;
|
||||
|
||||
_categoryView.imageNames = @[@"deng_going_nor", @"deng_success_nor", @"deng_fail_nor"];
|
||||
_categoryView.selectedImageNames = @[@"deng_going_sel", @"deng_success_sel", @"deng_fail_sel"];
|
||||
}
|
||||
return _categoryView;
|
||||
}
|
||||
|
||||
@end
|
||||
27
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveCell.h
Normal file
27
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveCell.h
Normal file
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// DengAchieveCell.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DengAchieveModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengAchieveCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *orderLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftNameLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *coinNumLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *touruNumLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *statusImgV;
|
||||
|
||||
@property (nonatomic, strong) DengAchieveModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
28
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveCell.m
Normal file
28
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveCell.m
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// DengAchieveCell.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengAchieveCell.h"
|
||||
|
||||
@implementation DengAchieveCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
}
|
||||
|
||||
- (void)setModel:(DengAchieveModel *)model {
|
||||
_model = model;
|
||||
|
||||
self.orderLab.text = [NSString stringWithFormat:@"第%@批", model.nbl_sn];
|
||||
[self.giftImgV sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
self.giftNameLab.text = model.gift_name;
|
||||
self.coinNumLab.text = model.total_amount;
|
||||
self.touruNumLab.text = model.amount;
|
||||
}
|
||||
|
||||
@end
|
||||
183
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveCell.xib
Normal file
183
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveCell.xib
Normal file
@@ -0,0 +1,183 @@
|
||||
<?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" id="KGk-i7-Jjw" customClass="DengAchieveCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="120"/>
|
||||
<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="120"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Z7m-1z-LP3">
|
||||
<rect key="frame" x="15" y="7.5" width="345" height="105"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tpA-Ig-1Qg">
|
||||
<rect key="frame" x="3" y="3" width="339" height="102"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="deng_box_cellBG" translatesAutoresizingMaskIntoConstraints="NO" id="N8q-P6-siv">
|
||||
<rect key="frame" x="0.0" y="0.0" width="339" height="102"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="deng_box_ImgBg" translatesAutoresizingMaskIntoConstraints="NO" id="zd4-H7-cRl">
|
||||
<rect key="frame" x="10" y="11" width="80" height="80"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="80" id="MJg-sW-dLR"/>
|
||||
<constraint firstAttribute="width" constant="80" id="vtV-Fx-IcY"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="EZy-Z2-G8Y">
|
||||
<rect key="frame" x="17.5" y="18.5" width="65" height="65"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="65" id="frl-KT-TU4"/>
|
||||
<constraint firstAttribute="width" constant="65" id="ihg-0m-hLj"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LmH-s0-Bow">
|
||||
<rect key="frame" x="160" y="17" width="25" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第1期" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="up5-KD-gWY">
|
||||
<rect key="frame" x="100" y="15" width="50" height="18"/>
|
||||
<color key="backgroundColor" red="0.76078431369999999" green="1" blue="0.67450980390000004" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="50" id="7YS-Ii-g4F"/>
|
||||
<constraint firstAttribute="height" constant="18" id="rTX-td-7fY"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" red="0.094117647060000004" green="0.32156862749999998" blue="0.01176470588" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.094117647060000004" green="0.32156862749999998" blue="0.01176470588" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="9"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="龙能总量:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Plx-3d-Rr7">
|
||||
<rect key="frame" x="100" y="43" width="44.5" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<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="myJ-2P-3oA">
|
||||
<rect key="frame" x="146.5" y="42" width="8" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<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="F5P-Mu-fMN">
|
||||
<rect key="frame" x="146.5" y="64" width="8" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="12"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Uan-vn-j8P">
|
||||
<rect key="frame" x="278" y="0.0" width="59" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="2N7-ij-Ai5"/>
|
||||
<constraint firstAttribute="width" constant="59" id="QU1-C2-rTp"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当前龙能:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hqc-JG-uWp">
|
||||
<rect key="frame" x="100" y="65" width="44.5" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="N8q-P6-siv" secondAttribute="bottom" id="0Ex-Lh-9D3"/>
|
||||
<constraint firstItem="N8q-P6-siv" firstAttribute="top" secondItem="tpA-Ig-1Qg" secondAttribute="top" id="3We-JK-EqJ"/>
|
||||
<constraint firstItem="LmH-s0-Bow" firstAttribute="centerY" secondItem="up5-KD-gWY" secondAttribute="centerY" id="6JI-XL-2Tn"/>
|
||||
<constraint firstItem="Plx-3d-Rr7" firstAttribute="leading" secondItem="up5-KD-gWY" secondAttribute="leading" id="Boc-0s-cPc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="N8q-P6-siv" secondAttribute="trailing" id="CKA-db-1lq"/>
|
||||
<constraint firstItem="N8q-P6-siv" firstAttribute="leading" secondItem="tpA-Ig-1Qg" secondAttribute="leading" id="Hqg-zz-oq5"/>
|
||||
<constraint firstItem="zd4-H7-cRl" firstAttribute="centerY" secondItem="tpA-Ig-1Qg" secondAttribute="centerY" id="PHz-X8-f4g"/>
|
||||
<constraint firstItem="myJ-2P-3oA" firstAttribute="centerY" secondItem="Plx-3d-Rr7" secondAttribute="centerY" id="QOr-QV-KiJ"/>
|
||||
<constraint firstItem="up5-KD-gWY" firstAttribute="leading" secondItem="zd4-H7-cRl" secondAttribute="trailing" constant="10" id="RGl-Ju-VMz"/>
|
||||
<constraint firstItem="zd4-H7-cRl" firstAttribute="leading" secondItem="tpA-Ig-1Qg" secondAttribute="leading" constant="10" id="Rbj-KH-Hwh"/>
|
||||
<constraint firstItem="F5P-Mu-fMN" firstAttribute="leading" secondItem="hqc-JG-uWp" secondAttribute="trailing" constant="2" id="Rgq-J8-1fi"/>
|
||||
<constraint firstItem="hqc-JG-uWp" firstAttribute="top" secondItem="Plx-3d-Rr7" secondAttribute="bottom" constant="10" id="SYN-OJ-649"/>
|
||||
<constraint firstItem="F5P-Mu-fMN" firstAttribute="centerY" secondItem="hqc-JG-uWp" secondAttribute="centerY" id="VOZ-Ck-h0l"/>
|
||||
<constraint firstItem="myJ-2P-3oA" firstAttribute="leading" secondItem="Plx-3d-Rr7" secondAttribute="trailing" constant="2" id="WLu-PN-JrD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Uan-vn-j8P" secondAttribute="trailing" constant="2" id="XvY-4V-82J"/>
|
||||
<constraint firstItem="Uan-vn-j8P" firstAttribute="top" secondItem="tpA-Ig-1Qg" secondAttribute="top" id="Zfl-Cf-UTj"/>
|
||||
<constraint firstItem="up5-KD-gWY" firstAttribute="top" secondItem="tpA-Ig-1Qg" secondAttribute="top" constant="15" id="Zxw-JG-uVu"/>
|
||||
<constraint firstItem="hqc-JG-uWp" firstAttribute="leading" secondItem="up5-KD-gWY" secondAttribute="leading" id="aiY-RK-IPR"/>
|
||||
<constraint firstItem="EZy-Z2-G8Y" firstAttribute="centerX" secondItem="zd4-H7-cRl" secondAttribute="centerX" id="erG-NC-NRl"/>
|
||||
<constraint firstItem="EZy-Z2-G8Y" firstAttribute="centerY" secondItem="zd4-H7-cRl" secondAttribute="centerY" id="i9m-tB-oul"/>
|
||||
<constraint firstItem="LmH-s0-Bow" firstAttribute="leading" secondItem="up5-KD-gWY" secondAttribute="trailing" constant="10" id="lL8-Bq-hlG"/>
|
||||
<constraint firstItem="Plx-3d-Rr7" firstAttribute="top" secondItem="up5-KD-gWY" secondAttribute="bottom" constant="10" id="sxw-8z-sGF"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.0" green="0.40784313729999999" blue="0.91372549020000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="tpA-Ig-1Qg" secondAttribute="trailing" constant="3" id="5ac-pY-6ci"/>
|
||||
<constraint firstAttribute="bottom" secondItem="tpA-Ig-1Qg" secondAttribute="bottom" id="Pb0-Iw-AtJ"/>
|
||||
<constraint firstItem="tpA-Ig-1Qg" firstAttribute="top" secondItem="Z7m-1z-LP3" secondAttribute="top" constant="3" id="Sbw-EP-xf5"/>
|
||||
<constraint firstItem="tpA-Ig-1Qg" firstAttribute="leading" secondItem="Z7m-1z-LP3" secondAttribute="leading" constant="3" id="hau-tw-jNP"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="Z7m-1z-LP3" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="7.5" id="7Es-eh-Tqz"/>
|
||||
<constraint firstItem="Z7m-1z-LP3" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="Iv9-Df-PDE"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Z7m-1z-LP3" secondAttribute="trailing" constant="15" id="jrN-Nf-zEX"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Z7m-1z-LP3" secondAttribute="bottom" constant="7.5" id="rzl-9E-pMK"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="coinNumLab" destination="myJ-2P-3oA" id="1VQ-Xq-xqh"/>
|
||||
<outlet property="giftImgV" destination="EZy-Z2-G8Y" id="GBQ-Hz-mgf"/>
|
||||
<outlet property="giftNameLab" destination="LmH-s0-Bow" id="CRy-gz-oLK"/>
|
||||
<outlet property="orderLab" destination="up5-KD-gWY" id="1Pj-GZ-lWJ"/>
|
||||
<outlet property="statusImgV" destination="Uan-vn-j8P" id="9wj-ba-lhd"/>
|
||||
<outlet property="touruNumLab" destination="F5P-Mu-fMN" id="XNH-rz-jxB"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-620" y="275"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="deng_box_ImgBg" width="64" height="64"/>
|
||||
<image name="deng_box_cellBG" width="339" height="104"/>
|
||||
</resources>
|
||||
</document>
|
||||
24
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveModel.h
Normal file
24
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// DengAchieveModel.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengAchieveModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *gift_name;
|
||||
@property (nonatomic, copy) NSString *total_amount;
|
||||
@property (nonatomic, copy) NSString *amount;
|
||||
@property (nonatomic, copy) NSString *base_image;
|
||||
//@property (nonatomic, copy) NSString *nbl_id;
|
||||
@property (nonatomic, copy) NSString *nbl_sn;//期数编号
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
13
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveModel.m
Normal file
13
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengAchieveModel.m
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// DengAchieveModel.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengAchieveModel.h"
|
||||
|
||||
@implementation DengAchieveModel
|
||||
|
||||
@end
|
||||
23
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxAlert.h
Normal file
23
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxAlert.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// DengBoxAlert.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengBoxAlert : UIView
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (weak, nonatomic) IBOutlet UITableView *tableView;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *moneyLab;
|
||||
|
||||
@property (nonatomic, copy) NSString *rid;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
154
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxAlert.m
Normal file
154
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxAlert.m
Normal file
@@ -0,0 +1,154 @@
|
||||
//
|
||||
// DengBoxAlert.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengBoxAlert.h"
|
||||
#import "DengRecordAlert.h"
|
||||
#import "DengRuleAlert.h"
|
||||
#import "DengTouruAlert.h"
|
||||
#import "DengAchieveAlert.h"
|
||||
#import "DengBoxCell.h"
|
||||
|
||||
@interface DengBoxAlert ()<UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *dataArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation DengBoxAlert
|
||||
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
|
||||
[self.tableView registerNib:[UINib nibWithNibName:@"DengBoxCell" bundle:nil] forCellReuseIdentifier:@"DengBoxCell"];
|
||||
self.tableView.rowHeight = 115;
|
||||
|
||||
self.dataArray = [[NSMutableArray alloc] init];
|
||||
[self fetchData];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onSocketDengfeng:) name:@"BoxDengfengNoti" object:nil];
|
||||
}
|
||||
|
||||
- (void)onSocketDengfeng:(NSNotification *)noti {
|
||||
NSDictionary *dataDict = noti.userInfo;
|
||||
DengBoxModel *model = [DengBoxModel mj_objectWithKeyValues:dataDict];
|
||||
|
||||
NSInteger index = -1;
|
||||
for (NSInteger i = 0; i < self.dataArray.count; i++) {
|
||||
DengBoxModel *obj = self.dataArray[i];
|
||||
if ([obj.nb_id isEqualToString:model.nb_id]) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
if (index >= 0) {
|
||||
self.dataArray[index] = model;
|
||||
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)fetchData {
|
||||
NSDictionary *dict = @{};
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/new_box/get_new_box_list" parameters:dict response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSDictionary.class]) {
|
||||
NSString *leftMoney = [result.content safeStringForKey:@"integral"];
|
||||
self.moneyLab.text = leftMoney;
|
||||
|
||||
NSArray *arr = [DengBoxModel mj_objectArrayWithKeyValuesArray:result.content[@"list"]];
|
||||
[self.dataArray addObjectsFromArray:arr];
|
||||
[self.tableView reloadData];
|
||||
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)onBack:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
- (IBAction)onRule:(id)sender {
|
||||
DengRuleAlert *view = LoadNib(@"DengRuleAlert");
|
||||
view.frame = [UIScreen mainScreen].bounds;
|
||||
[self addSubview:view];
|
||||
}
|
||||
|
||||
- (IBAction)onAchieve:(id)sender {
|
||||
DengAchieveAlert *view = [[DengAchieveAlert alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
[view showOnView:self boxType:@""];
|
||||
}
|
||||
|
||||
- (IBAction)onRecharge:(id)sender {
|
||||
[UIViewController goRechageCtrl];
|
||||
}
|
||||
|
||||
#pragma mark - table view
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 100;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NSString *cellId = NSStringFromClass(DengBoxCell.class);
|
||||
DengBoxCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId forIndexPath:indexPath];
|
||||
cell.selectionStyle = NO;
|
||||
|
||||
DengBoxModel *model = self.dataArray[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
WEAK_SELF
|
||||
[cell.recordBtn buttonAddTaget:^(UIButton *btn) {
|
||||
DengRecordAlert *view = [[DengRecordAlert alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
[view showOnView:weakSelf boxType:@(indexPath.row+1).stringValue];
|
||||
} forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
[cell.touruBtn buttonAddTaget:^(UIButton *btn) {
|
||||
DengTouruAlert *view = LoadNib(@"DengTouruAlert");
|
||||
view.frame = [UIScreen mainScreen].bounds;
|
||||
view.rid = weakSelf.rid;
|
||||
view.nbl_id = C_string(model.nbl_id);
|
||||
view.fullNum = [model.total_amount integerValue]-[model.amount integerValue];
|
||||
// view.fullVaule = [model.amount integerValue]/[model.total_amount integerValue];
|
||||
CGFloat ratio = [model.amount floatValue]/[model.total_amount floatValue];
|
||||
MYLog(@"%f",ratio);
|
||||
view.fullVaule = ratio;
|
||||
|
||||
[self addSubview:view];
|
||||
view.onConfirmBlock = ^(NSString * _Nonnull money) {
|
||||
weakSelf.moneyLab.text = money;
|
||||
};
|
||||
} forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
@end
|
||||
136
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxAlert.xib
Normal file
136
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxAlert.xib
Normal file
@@ -0,0 +1,136 @@
|
||||
<?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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="DengBoxAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="sS6-J0-qrW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.29620278290000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Art-n9-Wd8">
|
||||
<rect key="frame" x="0.0" y="212" width="375" height="600"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="deng_box_bg" translatesAutoresizingMaskIntoConstraints="NO" id="HWV-tJ-aSW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="600"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VHI-oP-bmq">
|
||||
<rect key="frame" x="0.0" y="120" width="42" height="26"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="deng_box_rule"/>
|
||||
<connections>
|
||||
<action selector="onRule:" destination="iN0-l3-epB" eventType="touchUpInside" id="jt6-qF-jOv"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="msU-gb-sVw">
|
||||
<rect key="frame" x="347" y="128" width="28" height="82"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="deng_box_achieve"/>
|
||||
<connections>
|
||||
<action selector="onAchieve:" destination="iN0-l3-epB" eventType="touchUpInside" id="H0x-oJ-hcq"/>
|
||||
</connections>
|
||||
</button>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="GbI-yl-rs0">
|
||||
<rect key="frame" x="0.0" y="230" width="375" height="340"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</tableView>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Yq-3d-uuL">
|
||||
<rect key="frame" x="-8" y="154" width="60" height="24"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oyV-4C-0S5">
|
||||
<rect key="frame" x="10" y="0.0" width="42" height="24"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.66666666666666663" green="1" blue="0.5490196078431373" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.69999999999999996" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="24" id="ZbL-3k-Beh"/>
|
||||
<constraint firstItem="oyV-4C-0S5" firstAttribute="top" secondItem="1Yq-3d-uuL" secondAttribute="top" id="aG8-Q2-1I6"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="60" id="au3-Ut-86b"/>
|
||||
<constraint firstAttribute="bottom" secondItem="oyV-4C-0S5" secondAttribute="bottom" id="cjh-jc-NQ2"/>
|
||||
<constraint firstItem="oyV-4C-0S5" firstAttribute="leading" secondItem="1Yq-3d-uuL" secondAttribute="leading" constant="10" id="mj2-sZ-zdG"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oyV-4C-0S5" secondAttribute="trailing" constant="8" id="she-JO-Au4"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.66666666666666663" green="1" blue="0.5490196078431373" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i6o-3Q-4hN">
|
||||
<rect key="frame" x="0.0" y="188" width="75" height="22.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="deng_box_buy">
|
||||
<color key="titleShadowColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="onRecharge:" destination="iN0-l3-epB" eventType="touchUpInside" id="5j4-mh-lZH"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="GbI-yl-rs0" secondAttribute="trailing" id="16R-Gk-JDH"/>
|
||||
<constraint firstItem="HWV-tJ-aSW" firstAttribute="top" secondItem="Art-n9-Wd8" secondAttribute="top" id="5cO-Y0-c5j"/>
|
||||
<constraint firstItem="GbI-yl-rs0" firstAttribute="leading" secondItem="Art-n9-Wd8" secondAttribute="leading" id="9qI-Tv-xdv"/>
|
||||
<constraint firstAttribute="width" secondItem="Art-n9-Wd8" secondAttribute="height" multiplier="375:600" id="ChQ-Mt-Ld9"/>
|
||||
<constraint firstAttribute="trailing" secondItem="HWV-tJ-aSW" secondAttribute="trailing" id="K8q-U8-2OJ"/>
|
||||
<constraint firstItem="GbI-yl-rs0" firstAttribute="top" secondItem="msU-gb-sVw" secondAttribute="bottom" constant="20" id="Mry-vd-Jpo"/>
|
||||
<constraint firstAttribute="bottom" secondItem="HWV-tJ-aSW" secondAttribute="bottom" id="U1B-2O-hjo"/>
|
||||
<constraint firstItem="i6o-3Q-4hN" firstAttribute="leading" secondItem="Art-n9-Wd8" secondAttribute="leading" id="X5U-FF-ckP"/>
|
||||
<constraint firstItem="VHI-oP-bmq" firstAttribute="top" secondItem="Art-n9-Wd8" secondAttribute="top" constant="120" id="fJj-SP-iUc"/>
|
||||
<constraint firstAttribute="bottom" secondItem="GbI-yl-rs0" secondAttribute="bottom" constant="30" id="hVz-tQ-82r"/>
|
||||
<constraint firstItem="msU-gb-sVw" firstAttribute="top" secondItem="Art-n9-Wd8" secondAttribute="top" constant="128" id="hlp-mP-MB2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="msU-gb-sVw" secondAttribute="trailing" id="k8n-cr-nEj"/>
|
||||
<constraint firstItem="1Yq-3d-uuL" firstAttribute="leading" secondItem="Art-n9-Wd8" secondAttribute="leading" constant="-8" id="oRa-By-bKH"/>
|
||||
<constraint firstItem="1Yq-3d-uuL" firstAttribute="top" secondItem="VHI-oP-bmq" secondAttribute="bottom" constant="8" id="r46-EQ-EMT"/>
|
||||
<constraint firstItem="i6o-3Q-4hN" firstAttribute="top" secondItem="1Yq-3d-uuL" secondAttribute="bottom" constant="10" id="rjk-aM-2Yd"/>
|
||||
<constraint firstItem="HWV-tJ-aSW" firstAttribute="leading" secondItem="Art-n9-Wd8" secondAttribute="leading" id="uCd-ge-nMK"/>
|
||||
<constraint firstItem="VHI-oP-bmq" firstAttribute="leading" secondItem="Art-n9-Wd8" secondAttribute="leading" id="wJ8-BX-n5A"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="sS6-J0-qrW" secondAttribute="bottom" id="91W-2V-rX3"/>
|
||||
<constraint firstAttribute="trailing" secondItem="sS6-J0-qrW" secondAttribute="trailing" id="HVm-O6-LrK"/>
|
||||
<constraint firstItem="sS6-J0-qrW" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="YDm-3H-byl"/>
|
||||
<constraint firstItem="Art-n9-Wd8" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="fmw-cV-PdN"/>
|
||||
<constraint firstItem="sS6-J0-qrW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="gae-d5-zJL"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Art-n9-Wd8" secondAttribute="trailing" id="jIK-Hc-6m7"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Art-n9-Wd8" secondAttribute="bottom" id="p0o-xP-N2V"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="moneyLab" destination="oyV-4C-0S5" id="p6g-Bf-W2d"/>
|
||||
<outlet property="tableView" destination="GbI-yl-rs0" id="nH5-aP-LJL"/>
|
||||
<outlet property="touchImgV" destination="sS6-J0-qrW" id="L6j-QS-58c"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="5" y="26"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="deng_box_achieve" width="28" height="82"/>
|
||||
<image name="deng_box_bg" width="375" height="600"/>
|
||||
<image name="deng_box_buy" width="75" height="22.5"/>
|
||||
<image name="deng_box_rule" width="42" height="26"/>
|
||||
</resources>
|
||||
</document>
|
||||
30
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxCell.h
Normal file
30
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxCell.h
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// DengBoxCell.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DengBoxModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengBoxCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *giftImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *orderLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftNameLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *totalNumLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *currentNumLab;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *progressImgVWidthCon;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *recordBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *touruBtn;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *giftPriceLabel;
|
||||
|
||||
@property (nonatomic, strong) DengBoxModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
31
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxCell.m
Normal file
31
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxCell.m
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// DengBoxCell.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengBoxCell.h"
|
||||
|
||||
@implementation DengBoxCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setModel:(DengBoxModel *)model {
|
||||
_model = model;
|
||||
|
||||
self.orderLab.text = [NSString stringWithFormat:@"第%@期", model.nbl_sn];
|
||||
[self.giftImgV sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
||||
self.giftNameLab.text = model.gift_name;
|
||||
self.giftPriceLabel.text = model.gift_price;
|
||||
self.totalNumLab.text = [NSString stringWithFormat:@"金币总数:%@", model.total_amount];
|
||||
self.currentNumLab.text = model.amount;
|
||||
CGFloat ratio = [model.amount floatValue]/[model.total_amount floatValue];
|
||||
self.progressImgVWidthCon.constant = 134*ratio;
|
||||
}
|
||||
|
||||
@end
|
||||
214
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxCell.xib
Normal file
214
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxCell.xib
Normal file
@@ -0,0 +1,214 @@
|
||||
<?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" id="KGk-i7-Jjw" customClass="DengBoxCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="115"/>
|
||||
<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="115"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0qj-xf-qP1">
|
||||
<rect key="frame" x="15" y="7.5" width="345" height="100"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="deng_box_cellBG" translatesAutoresizingMaskIntoConstraints="NO" id="7FO-cI-Iwb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="345" height="100"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="deng_box_ImgBg" translatesAutoresizingMaskIntoConstraints="NO" id="on9-Jj-GlI">
|
||||
<rect key="frame" x="10" y="10" width="80" height="80"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="80" id="glo-oR-UQl"/>
|
||||
<constraint firstAttribute="width" constant="80" id="tvT-Kg-lAS"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="0.0"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="HxA-Mp-pae">
|
||||
<rect key="frame" x="32" y="15" width="36" height="36"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="36" id="blC-zu-w1h"/>
|
||||
<constraint firstAttribute="width" constant="36" id="dd9-eS-bSV"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="zhuan_coin" translatesAutoresizingMaskIntoConstraints="NO" id="y1q-UM-h0A">
|
||||
<rect key="frame" x="33" y="55.5" width="16" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="SqD-aS-ylL"/>
|
||||
<constraint firstAttribute="width" constant="16" id="y7i-is-KJ2"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第1期" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2dN-k5-TjB">
|
||||
<rect key="frame" x="100" y="15" width="50" height="18"/>
|
||||
<color key="backgroundColor" red="0.76078431372549016" green="1" blue="0.67450980392156867" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="18" id="4VL-Uc-F92"/>
|
||||
<constraint firstAttribute="width" constant="50" id="VdQ-zo-du5"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="10"/>
|
||||
<color key="textColor" red="0.094117647058823528" green="0.32156862745098036" blue="0.011764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.094117647058823528" green="0.32156862745098036" blue="0.011764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="9"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</label>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="龙蛋" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8mC-dr-6bx">
|
||||
<rect key="frame" x="155" y="18" width="20.5" height="12"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="10"/>
|
||||
<color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</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="Cys-Za-jhu">
|
||||
<rect key="frame" x="100" y="43" width="61.5" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rIx-X9-sLC">
|
||||
<rect key="frame" x="100" y="70" width="134" height="18"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jindu_bg" translatesAutoresizingMaskIntoConstraints="NO" id="3t0-aC-fQV">
|
||||
<rect key="frame" x="0.0" y="0.0" width="134" height="18"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="jindu_image" translatesAutoresizingMaskIntoConstraints="NO" id="Brq-hV-WCb">
|
||||
<rect key="frame" x="0.0" y="0.0" width="50" height="18"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="50" id="O5u-JM-uTw"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="6.5"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</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="Som-ci-3OP">
|
||||
<rect key="frame" x="5" y="3.5" width="7" height="11"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="9"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="3t0-aC-fQV" secondAttribute="bottom" id="4ts-I0-hGt"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Brq-hV-WCb" secondAttribute="bottom" id="5EY-r3-Vkg"/>
|
||||
<constraint firstItem="3t0-aC-fQV" firstAttribute="leading" secondItem="rIx-X9-sLC" secondAttribute="leading" id="8XL-US-QBb"/>
|
||||
<constraint firstItem="Som-ci-3OP" firstAttribute="centerY" secondItem="rIx-X9-sLC" secondAttribute="centerY" id="9Xv-DY-UxH"/>
|
||||
<constraint firstItem="Brq-hV-WCb" firstAttribute="leading" secondItem="rIx-X9-sLC" secondAttribute="leading" id="Kor-iy-8S1"/>
|
||||
<constraint firstItem="3t0-aC-fQV" firstAttribute="top" secondItem="rIx-X9-sLC" secondAttribute="top" id="WIo-Cb-Y6v"/>
|
||||
<constraint firstAttribute="height" constant="18" id="ZJn-Qg-cS9"/>
|
||||
<constraint firstItem="Som-ci-3OP" firstAttribute="leading" secondItem="rIx-X9-sLC" secondAttribute="leading" constant="5" id="ctJ-H2-wH9"/>
|
||||
<constraint firstItem="Brq-hV-WCb" firstAttribute="top" secondItem="rIx-X9-sLC" secondAttribute="top" id="rX8-yr-oRg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3t0-aC-fQV" secondAttribute="trailing" id="sGz-Ei-vO5"/>
|
||||
<constraint firstAttribute="width" constant="134" id="xsY-mA-DDO"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PbI-oo-kbA">
|
||||
<rect key="frame" x="233" y="30" width="100" height="40"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="deng_box_touru"/>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ng9-Oo-xv9">
|
||||
<rect key="frame" x="286" y="0.0" width="59" height="22"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="deng_ExpeditionRecord"/>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Pf-Qy-Q7b">
|
||||
<rect key="frame" x="52" y="56" width="8.5" 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" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="PbI-oo-kbA" firstAttribute="centerY" secondItem="0qj-xf-qP1" secondAttribute="centerY" id="3Kx-Vz-c74"/>
|
||||
<constraint firstItem="4Pf-Qy-Q7b" firstAttribute="leading" secondItem="y1q-UM-h0A" secondAttribute="trailing" constant="3" id="5Mn-YH-fdN"/>
|
||||
<constraint firstItem="8mC-dr-6bx" firstAttribute="leading" secondItem="2dN-k5-TjB" secondAttribute="trailing" constant="5" id="6ma-oj-FEM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="7FO-cI-Iwb" secondAttribute="trailing" id="9iB-92-CUC"/>
|
||||
<constraint firstItem="ng9-Oo-xv9" firstAttribute="top" secondItem="0qj-xf-qP1" secondAttribute="top" id="Dcw-PF-gjF"/>
|
||||
<constraint firstItem="HxA-Mp-pae" firstAttribute="top" secondItem="on9-Jj-GlI" secondAttribute="top" constant="5" id="F9L-td-eQ1"/>
|
||||
<constraint firstItem="Cys-Za-jhu" firstAttribute="leading" secondItem="2dN-k5-TjB" secondAttribute="leading" id="K3M-hu-eEh"/>
|
||||
<constraint firstItem="rIx-X9-sLC" firstAttribute="leading" secondItem="Cys-Za-jhu" secondAttribute="leading" id="Nat-TA-tiU"/>
|
||||
<constraint firstItem="rIx-X9-sLC" firstAttribute="bottom" secondItem="on9-Jj-GlI" secondAttribute="bottom" constant="-2" id="Obr-m4-Kb3"/>
|
||||
<constraint firstItem="Cys-Za-jhu" firstAttribute="centerY" secondItem="0qj-xf-qP1" secondAttribute="centerY" id="P0N-H9-KfT"/>
|
||||
<constraint firstItem="7FO-cI-Iwb" firstAttribute="leading" secondItem="0qj-xf-qP1" secondAttribute="leading" id="R56-0U-5OP"/>
|
||||
<constraint firstItem="4Pf-Qy-Q7b" firstAttribute="centerX" secondItem="HxA-Mp-pae" secondAttribute="centerX" constant="6" id="TNK-um-2DY"/>
|
||||
<constraint firstItem="4Pf-Qy-Q7b" firstAttribute="top" secondItem="HxA-Mp-pae" secondAttribute="bottom" constant="5" id="UgI-b5-chF"/>
|
||||
<constraint firstItem="HxA-Mp-pae" firstAttribute="centerX" secondItem="on9-Jj-GlI" secondAttribute="centerX" id="Up4-uz-mIO"/>
|
||||
<constraint firstItem="4Pf-Qy-Q7b" firstAttribute="centerY" secondItem="y1q-UM-h0A" secondAttribute="centerY" id="Wby-Re-VaU"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ng9-Oo-xv9" secondAttribute="trailing" id="XBK-Db-f16"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PbI-oo-kbA" secondAttribute="trailing" constant="12" id="bIf-io-L25"/>
|
||||
<constraint firstItem="2dN-k5-TjB" firstAttribute="leading" secondItem="on9-Jj-GlI" secondAttribute="trailing" constant="10" id="e0G-ud-6cF"/>
|
||||
<constraint firstItem="on9-Jj-GlI" firstAttribute="centerY" secondItem="0qj-xf-qP1" secondAttribute="centerY" id="e2j-pc-i9Y"/>
|
||||
<constraint firstItem="8mC-dr-6bx" firstAttribute="centerY" secondItem="2dN-k5-TjB" secondAttribute="centerY" id="eYH-qu-e8v"/>
|
||||
<constraint firstItem="on9-Jj-GlI" firstAttribute="leading" secondItem="0qj-xf-qP1" secondAttribute="leading" constant="10" id="fWu-vN-9a9"/>
|
||||
<constraint firstItem="7FO-cI-Iwb" firstAttribute="top" secondItem="0qj-xf-qP1" secondAttribute="top" id="qdu-5S-8J9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="7FO-cI-Iwb" secondAttribute="bottom" id="sIe-RI-T1W"/>
|
||||
<constraint firstItem="2dN-k5-TjB" firstAttribute="top" secondItem="0qj-xf-qP1" secondAttribute="top" constant="15" id="yEZ-ms-1p0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="0qj-xf-qP1" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="HWE-Gg-mPE"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0qj-xf-qP1" secondAttribute="trailing" constant="15" id="KuG-l6-DG7"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0qj-xf-qP1" secondAttribute="bottom" constant="7.5" id="oPa-qj-BIv"/>
|
||||
<constraint firstItem="0qj-xf-qP1" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="7.5" id="s6H-h4-rew"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="currentNumLab" destination="Som-ci-3OP" id="5a9-4u-rnm"/>
|
||||
<outlet property="giftImgV" destination="HxA-Mp-pae" id="NqS-eN-6aU"/>
|
||||
<outlet property="giftNameLab" destination="8mC-dr-6bx" id="PcH-ja-ySY"/>
|
||||
<outlet property="giftPriceLabel" destination="4Pf-Qy-Q7b" id="Rf9-jx-0Jd"/>
|
||||
<outlet property="orderLab" destination="2dN-k5-TjB" id="Ma4-zF-9nL"/>
|
||||
<outlet property="progressImgVWidthCon" destination="O5u-JM-uTw" id="7U5-hw-fsR"/>
|
||||
<outlet property="recordBtn" destination="ng9-Oo-xv9" id="sRo-f3-dot"/>
|
||||
<outlet property="totalNumLab" destination="Cys-Za-jhu" id="aMc-qE-S4b"/>
|
||||
<outlet property="touruBtn" destination="PbI-oo-kbA" id="3jh-NL-yDh"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-1491" y="134"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="deng_ExpeditionRecord" width="59" height="20"/>
|
||||
<image name="deng_box_ImgBg" width="64" height="64"/>
|
||||
<image name="deng_box_cellBG" width="339" height="104"/>
|
||||
<image name="deng_box_touru" width="100" height="40"/>
|
||||
<image name="jindu_bg" width="16.5" height="18"/>
|
||||
<image name="jindu_image" width="95" height="12"/>
|
||||
<image name="zhuan_coin" width="24" height="24"/>
|
||||
</resources>
|
||||
</document>
|
||||
26
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxModel.h
Normal file
26
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxModel.h
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// DengBoxModel.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengBoxModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *gift_name;
|
||||
@property (nonatomic, copy) NSString *gift_price;
|
||||
@property (nonatomic, copy) NSString *total_amount;
|
||||
@property (nonatomic, copy) NSString *amount;
|
||||
@property (nonatomic, copy) NSString *base_image;
|
||||
@property (nonatomic, copy) NSString *nb_id;//活动id
|
||||
@property (nonatomic, copy) NSString *nbl_id;//期数id
|
||||
@property (nonatomic, copy) NSString *nbl_sn;//期数编号
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
13
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxModel.m
Normal file
13
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengBoxModel.m
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// DengBoxModel.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengBoxModel.h"
|
||||
|
||||
@implementation DengBoxModel
|
||||
|
||||
@end
|
||||
19
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordAlert.h
Normal file
19
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordAlert.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// DengRecordAlert.h
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengRecordAlert : UIView
|
||||
|
||||
- (void)showOnView:(UIView *)parent boxType:(NSString *)boxType;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
307
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordAlert.m
Normal file
307
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordAlert.m
Normal file
@@ -0,0 +1,307 @@
|
||||
//
|
||||
// BJBoxRecordAlert.m
|
||||
//
|
||||
//
|
||||
// Created by ybb on 2021/5/6.
|
||||
// Copyright © 2021 . All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengRecordAlert.h"
|
||||
#import "DengRecordCell.h"
|
||||
#import "XiamuFooter.h"
|
||||
#import "XiamuTipView.h"
|
||||
|
||||
@interface DengRecordAlert () <UITableViewDelegate, UITableViewDataSource>
|
||||
|
||||
@property (nonatomic, copy) NSString *boxType;
|
||||
|
||||
@property (nonatomic, strong) UIView *mainView;
|
||||
@property (nonatomic, strong) UIImageView *bgImg;
|
||||
@property (nonatomic, strong) UITableView *tableView;
|
||||
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *dataArray; //礼物数组
|
||||
|
||||
//关于网络请求
|
||||
@property (nonatomic, assign) BOOL isLoadFirst;
|
||||
@property (nonatomic, assign) BOOL isOnRequesting, isNoMoreData, isNetError;
|
||||
@property (nonatomic, strong) XiamuFooter *footerView;
|
||||
@property (nonatomic, strong) XiamuTipView *tipsView;
|
||||
@property (nonatomic, assign) NSInteger pageIndex;
|
||||
|
||||
@property (nonatomic, assign) CGFloat mainW;
|
||||
@property (nonatomic, assign) CGFloat mainH;
|
||||
|
||||
@property (nonatomic, assign) CGFloat contentX;
|
||||
@property (nonatomic, assign) CGFloat contentTop;
|
||||
@property (nonatomic, assign) CGFloat contentBottom;
|
||||
|
||||
@property (nonatomic, copy) NSString *bgImgName;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *centerBg;
|
||||
|
||||
@end
|
||||
|
||||
@implementation DengRecordAlert
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:UIScreen.mainScreen.bounds]) {
|
||||
|
||||
self.backgroundColor = [kBlackColor colorWithAlphaComponent:0.3];
|
||||
|
||||
[ControlCreator createButton:self rect:self.bounds text:@"" font:nil color:nil backguoundColor:UIColor.clearColor imageName:nil target:self action:@selector(backAction:)];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initMainView {
|
||||
if (_mainView) {
|
||||
return;
|
||||
}
|
||||
UIColor *color;
|
||||
color = HEXCOLOR(0xFFFFFF);
|
||||
_mainView = [[UIView alloc] initWithFrame:CGRectMake(APPW-_mainW, APPH-_mainH, _mainW, _mainH)];
|
||||
_mainView.backgroundColor = UIColor.clearColor;
|
||||
[self addSubview:_mainView];
|
||||
|
||||
[ControlCreator createImageView:_mainView rect:_mainView.bounds imageName:self.bgImgName backguoundColor:nil];
|
||||
|
||||
[self.mainView addSubview:self.centerBg];
|
||||
|
||||
[self.centerBg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(33);
|
||||
make.right.mas_equalTo(-33);
|
||||
make.top.mas_equalTo(190);
|
||||
make.bottom.mas_equalTo(-36);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initTableView {
|
||||
if (_tableView) {
|
||||
return;
|
||||
}
|
||||
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectMake(_contentX, _contentTop, _mainView.width-_contentX*2, _mainView.height-_contentTop-_contentBottom)];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.backgroundColor = UIColor.clearColor;
|
||||
_tableView.showsVerticalScrollIndicator = NO;
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
NSString *cellId = NSStringFromClass(DengRecordCell.class);
|
||||
[_tableView registerNib:[UINib nibWithNibName:cellId bundle:nil] forCellReuseIdentifier:cellId];
|
||||
[_mainView addSubview:_tableView];
|
||||
}
|
||||
|
||||
- (void)initMJrefresh {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
|
||||
[weakSelf loadFirst];
|
||||
}];
|
||||
_tableView.mj_header = header;
|
||||
}
|
||||
|
||||
- (void)initTipView {
|
||||
if (_tipsView) {
|
||||
return;
|
||||
}
|
||||
_tipsView = [[XiamuTipView alloc]initWithFrame:CGRectMake(0, 0, _tableView.width, 250)];
|
||||
|
||||
[self.tableView addSubview:_tipsView];
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
_tipsView.block = ^{
|
||||
if (weakSelf.isNetError) {
|
||||
[weakSelf loadFirst];
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
- (NSMutableArray *)dataArray {
|
||||
if (!_dataArray) {
|
||||
_dataArray = NSMutableArray.array;
|
||||
}
|
||||
return _dataArray;
|
||||
}
|
||||
|
||||
- (XiamuFooter *)footerView {
|
||||
if (!_footerView) {
|
||||
_footerView = [[XiamuFooter alloc] initWithFrame:CGRectMake(0, 0, _tableView.width, 40)];
|
||||
_footerView.hidden = YES;
|
||||
}
|
||||
return _footerView;
|
||||
}
|
||||
|
||||
- (void)showOnView:(UIView *)parent boxType:(NSString *)boxType {
|
||||
_boxType = boxType;
|
||||
|
||||
CGFloat x = 0;
|
||||
CGFloat w = ScreenWidth-x*2;
|
||||
CGFloat h = w/375*600;
|
||||
self.mainW = w;
|
||||
self.mainH = h;
|
||||
|
||||
self.contentX = 40;
|
||||
self.contentTop = 220;
|
||||
self.contentBottom = 50;
|
||||
|
||||
self.bgImgName = @"deng_record_bg";
|
||||
|
||||
[self initMainView];
|
||||
[self initTableView];
|
||||
[self initMJrefresh];
|
||||
// [self initTipView];
|
||||
|
||||
[parent addSubview:self];
|
||||
|
||||
[_tableView.mj_header beginRefreshing];
|
||||
}
|
||||
|
||||
#pragma mark - action
|
||||
|
||||
- (void)backAction:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
#pragma mark - data
|
||||
|
||||
- (void)setIsOnRequesting:(BOOL)isOnRequesting {
|
||||
_isOnRequesting = isOnRequesting;
|
||||
if (isOnRequesting) {
|
||||
_isNetError = NO;
|
||||
[self.footerView stateLoading];
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
[self.footerView stateNoMore];
|
||||
if (self.dataArray.count==0) {
|
||||
[self.tipsView stateNoResult];
|
||||
[self.footerView stateHide];
|
||||
}
|
||||
}
|
||||
if (_isNetError) {
|
||||
[self.footerView stateNetError];
|
||||
if (_isLoadFirst) {
|
||||
[self.tipsView stateNoNet];
|
||||
[self.footerView stateHide];
|
||||
[self.dataArray removeAllObjects];
|
||||
[_tableView reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)loadFirst {
|
||||
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
_pageIndex = 1;
|
||||
_isLoadFirst = YES;
|
||||
self.isNoMoreData = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadMore {
|
||||
if (_isOnRequesting) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isNoMoreData) {
|
||||
return;
|
||||
}
|
||||
|
||||
_isLoadFirst = NO;
|
||||
[self loadListData];
|
||||
}
|
||||
|
||||
- (void)loadListData {
|
||||
[self.tipsView stateHide];
|
||||
self.isNetError = NO;
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
self.isOnRequesting = YES;
|
||||
|
||||
NSDictionary *dict = @{@"page":@(self.pageIndex).stringValue,
|
||||
@"page_limit":@"20",
|
||||
@"box_type":C_string(_boxType)
|
||||
};
|
||||
NSMutableDictionary *paras = [NSMutableDictionary dictionary];
|
||||
[paras addEntriesFromDictionary:dict];
|
||||
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/new_box/get_new_box_win_user" parameters:paras response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200 && [result.content isKindOfClass:NSArray.class]) {
|
||||
[self checkRequestResult:result.content];
|
||||
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
self.isNetError = YES;
|
||||
}
|
||||
|
||||
weakSelf.isOnRequesting = NO;
|
||||
[weakSelf.tableView.mj_header endRefreshing];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)checkRequestResult:(NSArray *)listArr {
|
||||
if ([listArr isKindOfClass:NSArray.class]) {
|
||||
|
||||
if (_isLoadFirst) {
|
||||
[self.dataArray removeAllObjects];
|
||||
}
|
||||
if (listArr.count == 0 ) {
|
||||
self.isNoMoreData = YES;
|
||||
}
|
||||
NSArray *arr = [DengRecordModel mj_objectArrayWithKeyValuesArray:listArr];
|
||||
[self.dataArray addObjectsFromArray:arr];
|
||||
[_tableView reloadData];
|
||||
|
||||
_pageIndex ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - table view
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.dataArray.count;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 60;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NSString *cellId = NSStringFromClass(DengRecordCell.class);
|
||||
DengRecordCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId forIndexPath:indexPath];
|
||||
cell.selectionStyle = NO;
|
||||
|
||||
DengRecordModel *model = self.dataArray[indexPath.row];
|
||||
cell.model = model;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.item+6>self.dataArray.count && !self.isNoMoreData) {
|
||||
[self loadMore];
|
||||
}
|
||||
}
|
||||
|
||||
- (UIImageView *)centerBg {
|
||||
if (!_centerBg) {
|
||||
_centerBg = [[UIImageView alloc] init];
|
||||
_centerBg.image = ImageNamed(@"deng_center_bg");
|
||||
}
|
||||
return _centerBg;
|
||||
}
|
||||
|
||||
@end
|
||||
25
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordCell.h
Normal file
25
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordCell.h
Normal file
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// DengRecordCell.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "DengRecordModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengRecordCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UILabel *orderLab;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *avatarImgV;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *nicknameLab;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
|
||||
|
||||
@property (nonatomic, strong) DengRecordModel *model;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
28
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordCell.m
Normal file
28
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordCell.m
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// DengRecordCell.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengRecordCell.h"
|
||||
#import "NSString+category.h"
|
||||
|
||||
@implementation DengRecordCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
}
|
||||
|
||||
- (void)setModel:(DengRecordModel *)model {
|
||||
_model = model;
|
||||
|
||||
self.orderLab.text = [NSString stringWithFormat:@"第%@批", model.nbl_sn];
|
||||
[self.avatarImgV sd_setImageWithURL:[NSURL URLWithString:model.head_pic] placeholderImage:kDefaultUserIcon];
|
||||
self.nicknameLab.text = model.nick_name;
|
||||
self.timeLabel.text = model.over_time.formateDateYMD;
|
||||
}
|
||||
|
||||
@end
|
||||
119
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordCell.xib
Normal file
119
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordCell.xib
Normal file
@@ -0,0 +1,119 @@
|
||||
<?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" id="KGk-i7-Jjw" customClass="DengRecordCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
|
||||
<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="60"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="F9J-OH-sQh">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ih3-S3-hls">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="60"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="第1批" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SpQ-0h-iHV">
|
||||
<rect key="frame" x="15" y="21.5" width="36" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9ZQ-9s-adq">
|
||||
<rect key="frame" x="61" y="10" width="40" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="40" id="AgI-vN-Ot6"/>
|
||||
<constraint firstAttribute="height" constant="40" id="BfY-MD-byu"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="20"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="borderWidth">
|
||||
<real key="value" value="1"/>
|
||||
</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="昵称" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Onp-dz-BPz">
|
||||
<rect key="frame" x="111" y="12" width="29" height="17"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="14"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="探险成功" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w2V-4D-87r">
|
||||
<rect key="frame" x="294.5" y="20.5" width="65.5" height="19.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
|
||||
<color key="textColor" red="0.094117647058823528" green="0.32156862745098036" blue="0.011764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="时间" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZKd-Nd-IvH">
|
||||
<rect key="frame" x="111" y="34" width="25" height="14.5"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<color key="textColor" red="0.29019607843137252" green="0.29019607843137252" blue="0.29019607843137252" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="SpQ-0h-iHV" firstAttribute="leading" secondItem="ih3-S3-hls" secondAttribute="leading" constant="15" id="6K7-GR-L6O"/>
|
||||
<constraint firstAttribute="trailing" secondItem="w2V-4D-87r" secondAttribute="trailing" constant="15" id="6xv-9l-fMy"/>
|
||||
<constraint firstItem="9ZQ-9s-adq" firstAttribute="leading" secondItem="SpQ-0h-iHV" secondAttribute="trailing" constant="10" id="Ds4-Gw-hjN"/>
|
||||
<constraint firstItem="ZKd-Nd-IvH" firstAttribute="top" secondItem="Onp-dz-BPz" secondAttribute="bottom" constant="5" id="Oat-y9-6oB"/>
|
||||
<constraint firstItem="Onp-dz-BPz" firstAttribute="leading" secondItem="9ZQ-9s-adq" secondAttribute="trailing" constant="10" id="chB-fM-ZvC"/>
|
||||
<constraint firstItem="w2V-4D-87r" firstAttribute="centerY" secondItem="SpQ-0h-iHV" secondAttribute="centerY" id="dQY-gn-SYM"/>
|
||||
<constraint firstItem="9ZQ-9s-adq" firstAttribute="centerY" secondItem="SpQ-0h-iHV" secondAttribute="centerY" id="mSi-Fu-1lq"/>
|
||||
<constraint firstItem="ZKd-Nd-IvH" firstAttribute="leading" secondItem="Onp-dz-BPz" secondAttribute="leading" id="o1F-9R-Obp"/>
|
||||
<constraint firstItem="SpQ-0h-iHV" firstAttribute="centerY" secondItem="ih3-S3-hls" secondAttribute="centerY" id="om8-kh-olJ"/>
|
||||
<constraint firstItem="Onp-dz-BPz" firstAttribute="top" secondItem="9ZQ-9s-adq" secondAttribute="top" constant="2" id="vCV-AF-Xo1"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" red="0.0" green="0.40784313725490196" blue="0.9137254901960784" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="ih3-S3-hls" firstAttribute="top" secondItem="F9J-OH-sQh" secondAttribute="top" id="1CR-wC-dA4"/>
|
||||
<constraint firstItem="ih3-S3-hls" firstAttribute="leading" secondItem="F9J-OH-sQh" secondAttribute="leading" id="CWj-zh-AWY"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ih3-S3-hls" secondAttribute="bottom" id="eW7-sg-NXR"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ih3-S3-hls" secondAttribute="trailing" id="j9u-us-8Kz"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<real key="value" value="4"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="F9J-OH-sQh" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="7RS-JJ-ChO"/>
|
||||
<constraint firstItem="F9J-OH-sQh" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="CA1-qy-F4X"/>
|
||||
<constraint firstAttribute="trailing" secondItem="F9J-OH-sQh" secondAttribute="trailing" id="F4f-Av-1p9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="F9J-OH-sQh" secondAttribute="bottom" id="ej3-uo-jOE"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<connections>
|
||||
<outlet property="avatarImgV" destination="9ZQ-9s-adq" id="KvQ-pL-tV2"/>
|
||||
<outlet property="nicknameLab" destination="Onp-dz-BPz" id="uqk-5I-gHu"/>
|
||||
<outlet property="orderLab" destination="SpQ-0h-iHV" id="pNl-nR-gHv"/>
|
||||
<outlet property="timeLabel" destination="ZKd-Nd-IvH" id="QS5-Y1-rx6"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="132" y="96"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
24
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordModel.h
Normal file
24
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordModel.h
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// DengRecordModel.h
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengRecordModel : NSObject
|
||||
|
||||
@property (nonatomic, copy) NSString *id;
|
||||
@property (nonatomic, copy) NSString *uid;
|
||||
@property (nonatomic, copy) NSString *head_pic;
|
||||
@property (nonatomic, copy) NSString *nick_name;
|
||||
@property (nonatomic, copy) NSString *nbl_sn;//期数编号
|
||||
@property (nonatomic, copy) NSString *over_time;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
13
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordModel.m
Normal file
13
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRecordModel.m
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// DengRecordModel.m
|
||||
// romantic
|
||||
//
|
||||
// Created by bj_szd on 2023/7/19.
|
||||
// Copyright © 2023 romantic. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DengRecordModel.h"
|
||||
|
||||
@implementation DengRecordModel
|
||||
|
||||
@end
|
||||
19
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRuleAlert.h
Normal file
19
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRuleAlert.h
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// DengRuleAlert.h
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/7/10.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface DengRuleAlert : UIView
|
||||
|
||||
@property (strong, nonatomic) IBOutlet UIImageView *touchImgV;
|
||||
@property (strong, nonatomic) IBOutlet UITextView *textView;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
44
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRuleAlert.m
Normal file
44
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRuleAlert.m
Normal file
@@ -0,0 +1,44 @@
|
||||
//
|
||||
// DengRuleAlert.m
|
||||
// SweetParty
|
||||
//
|
||||
// Created by bj_szd on 2023/7/10.
|
||||
//
|
||||
|
||||
#import "DengRuleAlert.h"
|
||||
|
||||
@implementation DengRuleAlert
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
|
||||
WEAK_SELF
|
||||
[self.touchImgV dg_Tapped:^{
|
||||
[weakSelf removeFromSuperview];
|
||||
}];
|
||||
|
||||
[self fetchData];
|
||||
}
|
||||
|
||||
- (void)fetchData {
|
||||
NSDictionary *dict = @{};
|
||||
// [SVProgressHUD showWithStatus:nil];
|
||||
[RCMicHTTP postWithURLString:@"/api/new_box/get_box_note" parameters:dict response:^(RCMicHTTPResult *result) {
|
||||
[SVProgressHUD dismiss];
|
||||
if (result.success) {
|
||||
if (result.errorCode == 200) {
|
||||
self.textView.text = [NSString stringWithFormat:@"%@", result.content[@"note"]];
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:result.message];
|
||||
}
|
||||
}else {
|
||||
[SVProgressHUD showInfoWithStatus:@"网络错误"];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (IBAction)onBack:(id)sender {
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
92
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRuleAlert.xib
Normal file
92
SweetParty/主类/RCMic/Room/Box/猫咪探险/DengRuleAlert.xib
Normal file
@@ -0,0 +1,92 @@
|
||||
<?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"/>
|
||||
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="DengRuleAlert">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="TPG-Zm-5lv">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.30091110540896043" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="FI5-wf-Ngz">
|
||||
<rect key="frame" x="0.0" y="212" width="375" height="600"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="deng_rule_bg" translatesAutoresizingMaskIntoConstraints="NO" id="W6L-Aj-hzN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="600"/>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="deng_center_bg" translatesAutoresizingMaskIntoConstraints="NO" id="iBI-zs-08j">
|
||||
<rect key="frame" x="15" y="190" width="345" height="374"/>
|
||||
</imageView>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="2Cn-hz-j0N">
|
||||
<rect key="frame" x="33" y="220" width="309" height="320"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="textColor" red="0.094117647058823528" green="0.32156862745098036" blue="0.011764705882352941" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="W6L-Aj-hzN" secondAttribute="trailing" id="0Go-vf-uOG"/>
|
||||
<constraint firstItem="iBI-zs-08j" firstAttribute="leading" secondItem="FI5-wf-Ngz" secondAttribute="leading" constant="15" id="3Mi-bc-QPW"/>
|
||||
<constraint firstAttribute="width" secondItem="FI5-wf-Ngz" secondAttribute="height" multiplier="375:600" id="9m2-7t-5ss"/>
|
||||
<constraint firstItem="W6L-Aj-hzN" firstAttribute="top" secondItem="FI5-wf-Ngz" secondAttribute="top" id="GG1-jS-6vb"/>
|
||||
<constraint firstAttribute="bottom" secondItem="W6L-Aj-hzN" secondAttribute="bottom" id="J9g-ak-71l"/>
|
||||
<constraint firstItem="W6L-Aj-hzN" firstAttribute="leading" secondItem="FI5-wf-Ngz" secondAttribute="leading" id="JJc-fz-ZxE"/>
|
||||
<constraint firstItem="iBI-zs-08j" firstAttribute="top" secondItem="FI5-wf-Ngz" secondAttribute="top" constant="190" id="RjB-ve-FTA"/>
|
||||
<constraint firstItem="2Cn-hz-j0N" firstAttribute="leading" secondItem="FI5-wf-Ngz" secondAttribute="leading" constant="33" id="aBi-Ej-kfd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="iBI-zs-08j" secondAttribute="trailing" constant="15" id="eza-XK-6TK"/>
|
||||
<constraint firstAttribute="bottom" secondItem="2Cn-hz-j0N" secondAttribute="bottom" constant="60" id="jbo-gT-6IV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2Cn-hz-j0N" secondAttribute="trailing" constant="33" id="mSO-Do-jRz"/>
|
||||
<constraint firstAttribute="bottom" secondItem="iBI-zs-08j" secondAttribute="bottom" constant="36" id="p1H-hD-hQx"/>
|
||||
<constraint firstItem="2Cn-hz-j0N" firstAttribute="top" secondItem="FI5-wf-Ngz" secondAttribute="top" constant="220" id="wud-sV-8Fv"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FtP-EO-ebf">
|
||||
<rect key="frame" x="323" y="197" width="30" height="30"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="OXb-5I-HQk"/>
|
||||
<constraint firstAttribute="width" constant="30" id="thM-R0-3GH"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" image="deng_box_close"/>
|
||||
<connections>
|
||||
<action selector="onBack:" destination="iN0-l3-epB" eventType="touchUpInside" id="Wjr-EI-l1g"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="TPG-Zm-5lv" secondAttribute="bottom" id="4PG-46-38Z"/>
|
||||
<constraint firstAttribute="trailing" secondItem="TPG-Zm-5lv" secondAttribute="trailing" id="7qR-2a-c0R"/>
|
||||
<constraint firstItem="TPG-Zm-5lv" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="CyU-o6-yxV"/>
|
||||
<constraint firstItem="FI5-wf-Ngz" firstAttribute="top" secondItem="FtP-EO-ebf" secondAttribute="bottom" constant="-15" id="IC5-hc-fuD"/>
|
||||
<constraint firstAttribute="trailing" secondItem="FI5-wf-Ngz" secondAttribute="trailing" id="KFb-BH-qb1"/>
|
||||
<constraint firstItem="TPG-Zm-5lv" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="LQM-Pc-mfX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="FtP-EO-ebf" secondAttribute="trailing" constant="22" id="ORd-bK-F8Z"/>
|
||||
<constraint firstAttribute="bottom" secondItem="FI5-wf-Ngz" secondAttribute="bottom" id="WPE-Nn-NoR"/>
|
||||
<constraint firstItem="FI5-wf-Ngz" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="vNZ-dq-Ex4"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<connections>
|
||||
<outlet property="textView" destination="2Cn-hz-j0N" id="H1c-vO-hXh"/>
|
||||
<outlet property="touchImgV" destination="TPG-Zm-5lv" id="xFX-yY-NMJ"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="21" y="-35"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="deng_box_close" width="24" height="24"/>
|
||||
<image name="deng_center_bg" width="339" height="374"/>
|
||||
<image name="deng_rule_bg" width="375" height="600"/>
|
||||
</resources>
|
||||
</document>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user