贵族送礼、发表情未达到等级时弹框提示
This commit is contained in:
@@ -180,7 +180,6 @@
|
||||
9BC5C8F9277B02EA007C8719 /* Api+NobleCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8F8277B02EA007C8719 /* Api+NobleCenter.m */; };
|
||||
9BC5C91C277C8A7B007C8719 /* XPReleaseRadioViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C91B277C8A7B007C8719 /* XPReleaseRadioViewController.m */; };
|
||||
9BC5C91F277C902B007C8719 /* XPReleaseRadioView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C91E277C902B007C8719 /* XPReleaseRadioView.m */; };
|
||||
9BCD02C42796A64400F396AA /* XPSendNobleGiftTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BCD02C32796A64400F396AA /* XPSendNobleGiftTipView.m */; };
|
||||
9BCD02C72796C02800F396AA /* MicroNobleWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BCD02C62796C02800F396AA /* MicroNobleWaveView.m */; };
|
||||
9BCE6144277D657600CC0358 /* XPReleaseRadioTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BCE6143277D657600CC0358 /* XPReleaseRadioTableViewCell.m */; };
|
||||
9BCE6147277D665600CC0358 /* XPReleaseRadioCellModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BCE6146277D665600CC0358 /* XPReleaseRadioCellModel.m */; };
|
||||
@@ -896,8 +895,6 @@
|
||||
9BC5C91B277C8A7B007C8719 /* XPReleaseRadioViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPReleaseRadioViewController.m; sourceTree = "<group>"; };
|
||||
9BC5C91D277C902B007C8719 /* XPReleaseRadioView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPReleaseRadioView.h; sourceTree = "<group>"; };
|
||||
9BC5C91E277C902B007C8719 /* XPReleaseRadioView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPReleaseRadioView.m; sourceTree = "<group>"; };
|
||||
9BCD02C22796A64400F396AA /* XPSendNobleGiftTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSendNobleGiftTipView.h; sourceTree = "<group>"; };
|
||||
9BCD02C32796A64400F396AA /* XPSendNobleGiftTipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSendNobleGiftTipView.m; sourceTree = "<group>"; };
|
||||
9BCD02C52796C02800F396AA /* MicroNobleWaveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroNobleWaveView.h; sourceTree = "<group>"; };
|
||||
9BCD02C62796C02800F396AA /* MicroNobleWaveView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroNobleWaveView.m; sourceTree = "<group>"; };
|
||||
9BCE6142277D657600CC0358 /* XPReleaseRadioTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPReleaseRadioTableViewCell.h; sourceTree = "<group>"; };
|
||||
@@ -3486,8 +3483,6 @@
|
||||
E8788949273A594C00BF1D57 /* Cell */,
|
||||
E8788932273A53D700BF1D57 /* XPSendGiftView.h */,
|
||||
E8788933273A53D700BF1D57 /* XPSendGiftView.m */,
|
||||
9BCD02C22796A64400F396AA /* XPSendNobleGiftTipView.h */,
|
||||
9BCD02C32796A64400F396AA /* XPSendNobleGiftTipView.m */,
|
||||
E8788940273A55AD00BF1D57 /* XPGiftUsersView.h */,
|
||||
E8788941273A55AD00BF1D57 /* XPGiftUsersView.m */,
|
||||
E8788943273A55C200BF1D57 /* XPGiftInfoView.h */,
|
||||
@@ -4828,7 +4823,6 @@
|
||||
E8412F9927799249006E1101 /* InviteFansModel.m in Sources */,
|
||||
E84BF7CA277AF79D00EF8877 /* XPRoomSettingTagCell.m in Sources */,
|
||||
E8B846CF26FDD96100A777FE /* XPMineRechageHeadView.m in Sources */,
|
||||
9BCD02C42796A64400F396AA /* XPSendNobleGiftTipView.m in Sources */,
|
||||
186A534926FC6ED900D67B2C /* TTAlertMessageAttributedConfig.m in Sources */,
|
||||
E81C27AE26EF39AB0031E639 /* AppDelegate+ThirdConfig.m in Sources */,
|
||||
E877A7F127842B2F00EFACED /* XPRoomDatingWebAlertView.m in Sources */,
|
||||
|
@@ -298,12 +298,14 @@
|
||||
if (indexPath.row < self.nobelFaceList.count) {
|
||||
RoomFaceInfoModel * faceInfo = [self.nobelFaceList objectAtIndex:indexPath.row];
|
||||
if (faceInfo.faceVipInfo.vipLevel > self.userInfo.userVipInfoVO.vipLevel) {
|
||||
NSString * title = [NSString stringWithFormat:@"尚未达到发送%@所需贵族等级,\n 所需贵族等级:%@", faceInfo.name,faceInfo.faceVipInfo.vipName];
|
||||
[TTPopup alertWithMessage:title confirmHandler:^{
|
||||
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc] init];
|
||||
config.message = [NSString stringWithFormat:@"尚未达到发送%@所需贵族等级,\n 所需贵族等级:%@", faceInfo.name,faceInfo.faceVipInfo.vipName];
|
||||
config.actionStyle = TTAlertActionConfirmStyle;
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
} else {
|
||||
[self sendFaceCustomMessage:faceInfo];
|
||||
}
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#import "XPGiftUsersView.h"
|
||||
#import "XPGiftInfoView.h"
|
||||
#import "XPGiftBarView.h"
|
||||
#import "XPSendNobleGiftTipView.h"
|
||||
///P
|
||||
#import "XPGiftProtocol.h"
|
||||
///VC
|
||||
@@ -354,10 +353,14 @@
|
||||
} else if (code == 8535) {//贵族等级未达到礼物等级
|
||||
[TTPopup dismiss];
|
||||
GiftInfoModel * giftInfo = self.giftInfoView.lastSelectGift;
|
||||
XPSendNobleGiftTipView *view = [[XPSendNobleGiftTipView alloc] initWithFrame:CGRectMake(0, 0, 330, 150)];
|
||||
view.giftName = giftInfo.giftName;
|
||||
view.nobleName = giftInfo.giftVipInfo.vipName;
|
||||
[TTPopup popupView:view style:TTPopupStyleAlert];
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc] init];
|
||||
config.actionStyle = TTAlertActionConfirmStyle;
|
||||
config.message = [NSString stringWithFormat:@"尚未达到赠送%@所需要的贵族等级哦\n所需贵族等级:%@", giftInfo.giftName, giftInfo.giftVipInfo.vipName];
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
} else {
|
||||
[XCHUDTool showErrorWithMessage:msg];
|
||||
}
|
||||
|
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// XPSendNobleGiftTipView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/18.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPSendNobleGiftTipView : UIView
|
||||
|
||||
///礼物名称
|
||||
@property (nonatomic, copy) NSString *giftName;
|
||||
///贵族名称
|
||||
@property (nonatomic, copy) NSString *nobleName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,94 +0,0 @@
|
||||
//
|
||||
// XPSendNobleGiftTipView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/18.
|
||||
//
|
||||
|
||||
#import "XPSendNobleGiftTipView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "TTPopup.h"
|
||||
|
||||
@interface XPSendNobleGiftTipView ()
|
||||
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
|
||||
@property (nonatomic,strong) UIButton *doneButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPSendNobleGiftTipView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
self.layer.cornerRadius = 12;
|
||||
self.layer.masksToBounds = YES;
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.doneButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(20);
|
||||
make.left.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self.doneButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(180);
|
||||
make.height.mas_equalTo(44);
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.bottom.mas_equalTo(-20);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setGiftName:(NSString *)giftName {
|
||||
_giftName = giftName;
|
||||
}
|
||||
- (void)setNobleName:(NSString *)nobleName {
|
||||
_nobleName = nobleName;
|
||||
self.titleLabel.text = [NSString stringWithFormat:@"尚未达到赠送%@所需要的贵族等级哦\n所需贵族等级:%@", self.giftName, nobleName];
|
||||
}
|
||||
|
||||
#pragma mark - event
|
||||
- (void)onDoneButtonClick:(UIButton *)sender {
|
||||
[TTPopup dismiss];
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.numberOfLines = 0;
|
||||
_titleLabel.textColor = [ThemeColor alertMessageColor];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)doneButton {
|
||||
if (!_doneButton) {
|
||||
_doneButton = [[UIButton alloc] init];
|
||||
[_doneButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
_doneButton.layer.cornerRadius = 22;
|
||||
_doneButton.layer.masksToBounds = YES;
|
||||
[_doneButton setTitle:@"我知道了" forState:UIControlStateNormal];
|
||||
[_doneButton addTarget:self action:@selector(onDoneButtonClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _doneButton;
|
||||
}
|
||||
|
||||
@end
|
Reference in New Issue
Block a user