贵族改版

This commit is contained in:
liyuhua
2024-04-03 17:18:44 +08:00
parent 3edb300cfe
commit 4851a8c997
33 changed files with 295 additions and 184 deletions

21
Podfile
View File

@@ -4,7 +4,7 @@ source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
target 'YuMi' do
use_frameworks!
#pag动画
pod 'libpag'
pod 'libpag', '~> 4.3.21'
pod 'Bugly'
pod 'Adjust', '~> 4.31.0'
pod 'Firebase/Analytics'
@@ -54,18 +54,17 @@ target 'YuMi' do
pod 'pop', '~> 1.0.12'
#云信
pod 'NIMSDK_LITE', '~> 9.2.8'
pod 'GKCycleScrollView', '~> 1.2.0'
pod 'SVGAPlayer'
pod 'GoogleSignIn'
pod 'mob_linksdk_pro'
pod 'mob_sharesdk'
pod 'mob_sharesdk/ShareSDKPlatforms/Apple'
#pod 'mob_sharesdk/ShareSDKPlatforms/Line'
pod 'mob_sharesdk/ShareSDKExtension'
pod 'GKCycleScrollView', '~> 1.2.0'
pod 'SVGAPlayer'
pod 'GoogleSignIn'
pod 'mob_linksdk_pro'
pod 'mob_sharesdk'
pod 'mob_sharesdk/ShareSDKPlatforms/Apple'
#pod 'mob_sharesdk/ShareSDKPlatforms/Line'
pod 'mob_sharesdk/ShareSDKExtension'
pod 'UMCommon'
pod 'UMDevice'
pod 'UMDevice'
pod 'lottie-ios'
pod 'WeexSDK'
pod 'ZLCollectionViewFlowLayout'

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pi_gift_diamond_add@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pi_gift_diamond_add@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pi_gift_gold@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pi_gift_gold@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "pi_new_gift_first_recharge_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "pi_new_gift_first_recharge_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -38,23 +38,22 @@
NSString *ticket = [tickets[0] valueForKey:@"ticket"];
homeUserModel.ticket = ticket;
[[AccountInfoStorage instance] saveTicket:ticket];
[Api getUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
userInfo = [UserInfoModel modelWithDictionary:data.data];
[AccountInfoStorage instance].name = userInfo.nick;
homeUserModel.nick = userInfo.nick;
homeUserModel.avatar = userInfo.avatar;
homeUserModel.isBindPhone = userInfo.isBindPhone;
}
dispatch_group_leave(group);
} uid:accountModel.uid];
return;
}
dispatch_group_leave(group);
} access_token:accountModel.access_token issue_type:@"multi"];
});
dispatch_group_enter(group);
dispatch_async(queue, ^{
[Api getUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
userInfo = [UserInfoModel modelWithDictionary:data.data];
[AccountInfoStorage instance].name = userInfo.nick;
homeUserModel.nick = userInfo.nick;
homeUserModel.avatar = userInfo.avatar;
homeUserModel.isBindPhone = userInfo.isBindPhone;
}
dispatch_group_leave(group);
} uid:accountModel.uid];
});

View File

@@ -33,6 +33,7 @@
#import "XPDressUpShopViewController.h"
#import "XPMineLoginPasswordViewController.h"
#import "XPMonentTopicContainerViewController.h"
#import "XPNobleCenterViewController.h"
///P
#import "RoomHostDelegate.h"
@interface MessageContentTextClickable()
@@ -245,6 +246,12 @@
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:topicVC animated:YES];
}
break;
case SecretaryRouterType_Nobel_Center:
{
XPNobleCenterViewController *nobleCenter = [XPNobleCenterViewController new];
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:nobleCenter animated:YES];
break;
}
default:
break;
}

View File

@@ -16,7 +16,8 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, copy)NSString *goldNum;
//钻石数量
@property(nonatomic, copy)NSString *diamonds;
//金币数量
@property(nonatomic, assign) double golds;
@property(nonatomic, copy)NSString *chargeGoldNum;
@property(nonatomic, assign)NSInteger amount;
@@ -26,6 +27,8 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic, copy)NSString *depositNum;
/// 是否有钻石转增功能
@property (nonatomic, assign) BOOL sendGold;
//是否可以在送礼时合并使用金币
@property(nonatomic,assign) BOOL canGoldSendGift;
@end
NS_ASSUME_NONNULL_END

View File

@@ -83,7 +83,7 @@
_model = model;
if (_path.row == 0)return;
if (_path.section == 1){
_textVeiw.text = [NSString stringWithFormat:YMLocalizedString(@"PINobleCenterListCell6"),_model.profitDate];
_textVeiw.text = _model.profitDate.integerValue == 0 ? YMLocalizedString(@"PINobleCenterListCell8") : [NSString stringWithFormat:YMLocalizedString(@"PINobleCenterListCell6"),_model.profitDate];
}else if (_path.section == 2){
_textVeiw.text = _model.profitAmount;
}else{

View File

@@ -62,6 +62,7 @@
}
self.headerView.hidden = _returnProfits.count == 0;
self.fooderView.hidden = _returnProfits.count == 0;
_headerView.headerText = [NSString stringWithFormat:YMLocalizedString(@"PINobleCenterListView0"),_vipInfo.vipName];
self.pi_collectionView.layer.borderWidth = _returnProfits.count == 0 ? 0 : 1;
[self.pi_collectionView reloadData];
@@ -151,7 +152,7 @@
- (PINobleCenterListReusableView *)headerView{
if(!_headerView){
_headerView = [[PINobleCenterListReusableView alloc]initWithFrame:CGRectZero];
_headerView.headerText = YMLocalizedString(@"PINobleCenterListView0");
_headerView.headerText = [NSString stringWithFormat:YMLocalizedString(@"PINobleCenterListView0"),@""];;
}
return _headerView;
}

View File

@@ -29,6 +29,7 @@
}
- (void)setInfo:(NobleInfo *)info{
_info = info;
_bgImageView.hidden = !self.info.isReturnProfit;
}
-(void)installConstraints{

View File

@@ -12,14 +12,11 @@
- (Class)preferredCellClass{
return PINobleCenterTitleCell.class;
}
- (void)setVipInfos:(NSArray<NobleInfo *> *)vipInfos{
_vipInfos = vipInfos;
for (int i = 0; i < _vipInfos.count; i++) {
PINobleCenterTitleCell *cell = [self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
NobleInfo *info = [self.vipInfos safeObjectAtIndex1:i];
cell.info = info;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
PINobleCenterTitleCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([self preferredCellClass]) forIndexPath:indexPath];
NobleInfo *info = [self.vipInfos safeObjectAtIndex1:indexPath.row];
cell.info = info;
return cell;
}
@end

View File

@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
@property(nonatomic,strong) NobleInfo *vipInfo;
@property(nonatomic,strong) RechargeListModel *rechargeModel;
@property(nonatomic,weak) id<XPNobleCenterMyNobleViewDelegate>delegate;
@property(nonatomic,assign) BOOL isHiddenPayBtn;
@end

View File

@@ -277,6 +277,10 @@
self.openNobleView.hidden = YES;
}
}
- (void)setIsHiddenPayBtn:(BOOL)isHiddenPayBtn{
_isHiddenPayBtn = isHiddenPayBtn;
self.openNobleView.hidden = _isHiddenPayBtn;
}
-(void)onOpenNobleButtonClick{
if (self.delegate && [self.delegate respondsToSelector:@selector(payNobleCenterWithModel:vipInfo:)]){
[self.delegate payNobleCenterWithModel:self.rechargeModel vipInfo:self.vipInfo];

View File

@@ -23,6 +23,7 @@
-(void)installUI{
self.backgroundColor = [UIColor whiteColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.contentView.backgroundColor = [UIColor whiteColor];
[self.contentView addSubview:self.iconView];
[self.contentView addSubview:self.titleView];

View File

@@ -93,6 +93,10 @@
make.centerX.equalTo(self.bgView);
}];
}
- (void)setMoney:(NSNumber *)money{
_money = money;
self.diamondNumView.text = [NSString stringWithFormat:@"%.0f",_money.floatValue * 1000];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.listData.count;
}
@@ -113,7 +117,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
self.path = indexPath;
self.type = indexPath.row == 0 ? NobleCenterPayType_diamond : NobleCenterPayType_Apple;
self.diamondNumView.text = indexPath.row == 0 ? [NSString stringWithFormat:@"%f",_money.floatValue * 1000] : _money.stringValue;
self.diamondNumView.text = indexPath.row == 0 ? [NSString stringWithFormat:@"%.0f",_money.floatValue * 1000] : [NSString stringWithFormat:@"%.2f",_money.floatValue];
self.diamondNumTitle.text = indexPath.row == 0 ? YMLocalizedString(@"XPNobleCenterPayView1"):@"";
[self.tableView reloadData];
}

View File

@@ -220,7 +220,7 @@
return;
}
[XNDJTDDLoadingTool showOnlyView:kWindow];
[self.presenter requestNobleIAPRechargeOrderWithChargeProdId:self.rechargeModel.chargeProdId roomUid:self.roomUid ? [NSString stringWithFormat:@"%zd", self.roomUid] : nil];
}
@@ -236,7 +236,6 @@
payView.money = self.rechargeModel.money;
payView.diamonds = self.infoModel.diamonds;
payView.vipLevel = @(vipInfo.vipLevel).stringValue;
self.rechargeModel = rechargeModel;
payView.delegate = self;
[self.view addSubview:payView];
};
@@ -273,13 +272,13 @@
if(code == 200){
if(data.data[@"isNative"] != nil){
self.pi_IsNative = [data.data[@"isNative"] boolValue];
}
}
}];
}
}
@@ -301,7 +300,7 @@
NSString *orderId = transcation[@"orderId"];
NSString *transcationId = transcation[@"transcationId"];
///
[self.presenter checkReceiptWithOrderId:orderId transcationId:transcationId errorToast:NO];
[self.presenter checkReceiptWithOrderId:orderId transcationId:transcationId errorToast:NO];
}
}
@@ -321,78 +320,90 @@
self.model = model;
__block NSMutableArray<NSString *> *names = [NSMutableArray array];
NSInteger defaultSelectIndex = 0;
for (int index = 0; index < model.vipInfos.count; index++) {
NobleInfo *tagInfo = [model.vipInfos safeObjectAtIndex1:index];
[names addObject:tagInfo.vipName];
if (tagInfo.vipLevel == model.currLevel) {
defaultSelectIndex = index;
self.vipInfo = tagInfo;
if (model.currLevel > 0){
if (tagInfo.vipLevel == model.currLevel) {
defaultSelectIndex = index;
self.vipInfo = tagInfo;
}
}else{
self.vipInfo = [model.vipInfos safeObjectAtIndex1:0];
}
}
for (RechargeListModel *rechargeModel in self.rechargeList) {
if (rechargeModel.prodDesc.integerValue == model.currLevel){
self.rechargeModel = rechargeModel;
break;
}
}
self.titles = names.copy;
self.titleView.titles = self.titles;
self.openNobleView.hidden = self.userInfo.userVipInfoVO.vipLevel;
self.myNobleView.hidden = !self.userInfo.userVipInfoVO.vipLevel;
if (self.openNobleView.hidden == NO){
self.openNobleButton.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterViewController0"),_rechargeModel.money.floatValue];
if (self.model.vipInfos.count > 0){
self.vipInfo = self.model.vipInfos.firstObject;
}
}else{
if (self.userInfo.userVipInfoVO) {
self.myNobleView.rechargeModel = self.rechargeModel;
self.myNobleView.model = model;
self.myNobleView.vipInfo = self.vipInfo;
}
}
if (self.vipInfo.vipLevel > self.model.currLevel){
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(150+kSafeAreaBottomHeight);
}];
}else{
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(91+kSafeAreaBottomHeight);
}];
}
self.titleView.defaultSelectedIndex = defaultSelectIndex;
[self.titleView reloadData];
[self.lineView reloadData];
self.navView.hideSettingBtn = self.model.currLevel < 9;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
self.titleView.vipInfos = model.vipInfos;
});
self.titleView.vipInfos = model.vipInfos;
[self setPayBtnStatus:self.model.currLevel];
}
-(void)setPayBtnStatus:(NSInteger)currLevel{
self.rechargeModel = nil;
if (currLevel > 0){
for (RechargeListModel *rechargeModel in self.rechargeList) {
if (rechargeModel.prodDesc.integerValue == currLevel){
self.rechargeModel = rechargeModel;
break;
}
}
}else{
self.rechargeModel = [self.rechargeList safeObjectAtIndex1:0];
}
if (self.rechargeModel != nil){
self.openNobleView.hidden = self.userInfo.userVipInfoVO.vipLevel;
self.myNobleView.hidden = !self.userInfo.userVipInfoVO.vipLevel;
if (self.openNobleView.hidden == NO){
self.openNobleButton.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterMyNobleView11"),self.rechargeModel.money.floatValue,self.vipInfo.vipName];
}else{
if (self.userInfo.userVipInfoVO) {
self.myNobleView.rechargeModel = self.rechargeModel;
self.myNobleView.model = self.model;
self.myNobleView.vipInfo = self.vipInfo;
}
}
if (self.vipInfo.vipLevel > self.model.currLevel){
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(150+kSafeAreaBottomHeight);
}];
}else{
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(91+kSafeAreaBottomHeight);
}];
}
}else{
self.myNobleView.hidden = !self.userInfo.userVipInfoVO.vipLevel;
if (self.userInfo.userVipInfoVO == nil){
self.openNobleView.hidden = self.rechargeModel == nil;
self.openNobleButton.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterMyNobleView11"),self.rechargeModel.money.floatValue,self.vipInfo.vipName];
return;
}
self.myNobleView.rechargeModel = self.rechargeModel;
self.myNobleView.model = self.model;
self.myNobleView.vipInfo = self.vipInfo;
self.myNobleView.isHiddenPayBtn = YES;
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(91+kSafeAreaBottomHeight);
}];
}
}
///
- (void)onGetNobleRechargeDataSuccess:(NSArray *)list {
self.rechargeList = list;
if (self.rechargeList.count == 0)return;
RechargeListModel *rechargeModel = [self.rechargeList safeObjectAtIndex1:0];
NSString *title = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterViewController0"), rechargeModel.money];
self.openNobleButton.text = title;
self.rechargeModel = rechargeModel;
}
///id
- (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId uuid:(NSString *)uuid{
if (orderId.length > 0) {
self.orderId = orderId;
if (@available(iOS 15.0, *)) {
@@ -524,10 +535,10 @@
#pragma mark - XPIAPHelperDelegate
///
- (void)rechargeNewProcessStatus:(StoreConditionResult)status {
if (status == StoreConditionResultPay || status == StoreConditionResultStart || status == StoreConditionResultVerifiedServer) {
}else if (status == StoreConditionResultUnowned) {
[XNDJTDDLoadingTool hideOnlyView:kWindow];
[self showErrorToast:YMLocalizedString(@"XPIAPRechargeViewController1")];
@@ -592,23 +603,8 @@
//
self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
NobleInfo *vipInfo = [self.model.vipInfos safeObjectAtIndex1:index];
for (RechargeListModel *rechargeModel in self.rechargeList) {
if (rechargeModel.prodDesc.integerValue == vipInfo.vipLevel){
self.rechargeModel = rechargeModel;
break;
}
}
self.myNobleView.rechargeModel = self.rechargeModel;
self.myNobleView.vipInfo = vipInfo;
if (vipInfo.vipLevel > self.model.currLevel){
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(150+kSafeAreaBottomHeight);
}];
}else{
[self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(91+kSafeAreaBottomHeight);
}];
}
self.vipInfo = vipInfo;
[self setPayBtnStatus:vipInfo.vipLevel];
}
#pragma mark -NIMSystemNotificationManagerDelegate

View File

@@ -72,8 +72,7 @@
@property (nonatomic,strong) UIStackView *tagStackView;
///
@property (nonatomic,strong) NetImageView *charmImageView;
///icon
@property (nonatomic, strong) NetImageView *nobleIconImageView;
///
@property (nonatomic,strong) NetImageView *experImageView;
///
@@ -115,6 +114,8 @@
@property (nonatomic,strong) UILabel *soundPromptView;
///
@property (nonatomic,strong) UIButton *toSoundBtn;
///icon
@property (nonatomic,strong) NetImageView *nobleImageView;
@end
@@ -167,6 +168,7 @@
[self.soundView addSubview:self.soundPromptView];
[self.soundView addSubview:self.toSoundBtn];
[self.nickStackView addArrangedSubview:self.nobleImageView];
[self.nickStackView addArrangedSubview:self.nameLabel];
[self.nickStackView addArrangedSubview:self.sexImageView];
@@ -299,7 +301,9 @@
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(25);
}];
[self.nobleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.width.height.mas_equalTo(20);
}];
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(28, 14));
}];
@@ -655,6 +659,16 @@
}
}
}
self.nobleImageView.hidden = userInfo.userVipInfoVO.vipIcon.length == 0;
[self.nobleImageView loadImageWithUrl:userInfo.userVipInfoVO.vipIcon completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.nobleImageView.image = image;
CGFloat height = image.size.height > 0 ? image.size.height : 1;
CGFloat scale = image.size.width / height ;
[self.nobleImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
}];
}
- (void)setRoomUid:(NSString *)roomUid {
@@ -910,16 +924,7 @@
return _charmImageView;
}
- (NetImageView *)nobleIconImageView {
if (!_nobleIconImageView) {
NetImageConfig * config = [[NetImageConfig alloc] init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
config.imageType = ImageTypeUserCardLevel;
_nobleIconImageView = [[NetImageView alloc] initWithConfig:config];
_nobleIconImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _nobleIconImageView;
}
- (UIView *)namePlateView {
if (!_namePlateView) {
@@ -1114,4 +1119,11 @@
}
return _rechargeImageView;
}
- (NetImageView *)nobleImageView {
if (!_nobleImageView) {
_nobleImageView = [[NetImageView alloc] init];
_nobleImageView.hidden = YES;
}
return _nobleImageView;
}
@end

View File

@@ -27,8 +27,7 @@
@property (nonatomic,strong) NetImageView * avatarImageView;
///name
@property (nonatomic,strong) UIStackView *nameStackView;
///icon
@property (nonatomic,strong) NetImageView *nobleImageView;
///
@property (nonatomic,strong) UILabel *nameLabel;
///id
@@ -72,7 +71,7 @@
- (void)initSubViews {
self.backgroundColor = [UIColor clearColor];
[self addSubview:self.avatarImageView];
[self addSubview:self.nobleImageView];
[self addSubview:self.nameStackView];
[self addSubview:self.idStackView];
[self.nameStackView addArrangedSubview:self.nameLabel];
@@ -99,21 +98,17 @@
make.top.mas_equalTo(self).offset(49 + kStatusBarHeight);
}];
[self.nobleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(12);
make.top.mas_equalTo(self.avatarImageView).mas_offset(4);
make.width.height.mas_equalTo(20);
}];
[self.nameStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.nobleImageView);
make.left.mas_equalTo(self.nobleImageView.mas_right).mas_offset(5);
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(12);
make.top.mas_equalTo(self.avatarImageView).mas_offset(4);
make.height.mas_equalTo(16);
make.right.mas_equalTo(-15);
}];
[self.idStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nobleImageView);
make.left.mas_equalTo(self.nameStackView);
make.top.mas_equalTo(self.nameStackView.mas_bottom).offset(13);
make.height.mas_equalTo(18);
}];
@@ -127,7 +122,7 @@
make.height.mas_equalTo(14);
}];
[self.levelLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nobleImageView);
make.left.mas_equalTo(self.nameStackView);
make.top.mas_equalTo(self.idStackView.mas_bottom).offset(5);
}];
@@ -402,24 +397,7 @@
self.reviewView.hidden = YES;
self.avatarImageView.imageUrl = userInfo.avatar;
}
self.nobleImageView.imageUrl = userInfo.userVipInfoVO.vipIcon;
UIImage *nobleImage = self.nobleImageView.image;
if (nobleImage) {
CGFloat scale = nobleImage.size.width / nobleImage.size.height;
[self.nobleImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20* scale, 20));
}];
[self.nameStackView mas_updateConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nobleImageView.mas_right).mas_offset(5);
}];
} else {
[self.nobleImageView mas_updateConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(0, 20));
}];
[self.nameStackView mas_updateConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nobleImageView.mas_right);
}];
}
NSString *starImage = [NSString
getCalculateConstellationImageWithMonth:_userInfo.birth];
@@ -471,12 +449,7 @@
return _nameStackView;
}
- (NetImageView *)nobleImageView {
if (!_nobleImageView) {
_nobleImageView = [[NetImageView alloc] init];
}
return _nobleImageView;
}
- (UILabel *)nameLabel {
if (!_nameLabel) {

View File

@@ -37,6 +37,8 @@ typedef NS_ENUM(NSInteger, BackMusicPlayState) {
@interface RtcManager : NSObject
///因为跨房pk结束后会闭麦用这个限制不要关麦
@property(nonatomic,assign) BOOL isAnckorPk;
///因为最小化进房闭麦问题,用这个限制不要关麦
@property(nonatomic,assign) BOOL isMiniEnterk;
/**
* 是否静音(静别人)
* YES🔇虽然你们麦位上在说话但是我就是不听。🙉

View File

@@ -15,7 +15,7 @@
#import "UIView+VAP.h"
#import <UIImageView+WebCache.h>
#import <libpag/libpag-umbrella.h>
#import <libpag/libpag.h>
///Tool
#import "XPGiftStorage.h"
#import "YUMIMacroUitls.h"

View File

@@ -61,8 +61,8 @@
roomUid:(NSString *)roomUid
msg:(NSString *)msg
uid:(NSString *)uid {
NSString * fang = [NSString stringFromBase64String:@"Z2lmdC9zZW5kVjQ="];///gift/sendV4
NSString *method = fang;
NSString *method = @"gift/sendV5";
[self makeRequest:method method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, targetUids, giftNum, sendType, giftId, giftSource, giftType, roomUid, msg, uid, nil];
}

View File

@@ -6,7 +6,7 @@
//
#import <Foundation/Foundation.h>
#import "GiftInfoModel.h"
#import "WalletInfoModel.h"
typedef NS_ENUM(NSInteger, BroadCastLevel) {
BroadCastLevel_Normal = 1,
BroadCastLevel_Middle = 2,
@@ -124,6 +124,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) BOOL ceremonyGift;
///是否是房间外飘屏
@property(nonatomic,assign) BOOL isHomeShow;
@property(nonatomic,strong)WalletInfoModel * userPurse;
@end
NS_ASSUME_NONNULL_END

View File

@@ -148,7 +148,7 @@
}];
[self.firstRechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(50, 14));
make.size.mas_equalTo(CGSizeMake(17, 8));
make.left.mas_equalTo(self.rechargeStackView.mas_right).offset(4);
make.centerY.mas_equalTo(self.rechargeStackView);
}];
@@ -338,10 +338,39 @@
normaleColor = [DJDKMIMOMColor textThirdColor];
highlightColor = [DJDKMIMOMColor giftNameSelectColor];
}
NSString * title = [NSString stringWithFormat:YMLocalizedString(@"XPGiftBarView0"), diamonds];
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12], NSForegroundColorAttributeName:normaleColor}];
[attribute addAttribute:NSForegroundColorAttributeName value:highlightColor range:[title rangeOfString:diamonds]];
self.balanceLabel.attributedText = attribute;
NSTextAttachment * diamondAtt = [[NSTextAttachment alloc] init];
UIImage *iconImage = [UIImage imageNamed:@"common_diamond"];;
diamondAtt.bounds = CGRectMake(0, roundf(self.balanceLabel.font.capHeight - 16)/2.f, 16, 16);
diamondAtt.image = iconImage;
NSAttributedString *diamondAttribute = [NSMutableAttributedString attributedStringWithAttachment:(NSTextAttachment *)diamondAtt];
if (_walletInfoModel.canGoldSendGift == NO){
NSString * title = [NSString stringWithFormat:@" %@",diamonds];
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14], NSForegroundColorAttributeName:highlightColor}];
[attribute insertAttributedString:diamondAttribute atIndex:0];
self.balanceLabel.attributedText = attribute;
return;
}
NSTextAttachment * addAtt = [[NSTextAttachment alloc] init];
UIImage *addIconImage = [UIImage imageNamed:@"pi_gift_diamond_add"];;
addAtt.bounds = CGRectMake(0, roundf(self.balanceLabel.font.capHeight - 14)/2.f, 14, 14);
addAtt.image = addIconImage;
NSAttributedString *addAttribute = [NSMutableAttributedString attributedStringWithAttachment:(NSTextAttachment *)addAtt];
NSTextAttachment * goldAtt = [[NSTextAttachment alloc] init];
UIImage *goldIconImage = [UIImage imageNamed:@"pi_gift_gold"];;
goldAtt.bounds = CGRectMake(0, roundf(self.balanceLabel.font.capHeight - 14)/2.f, 14, 14);
goldAtt.image = goldIconImage;
NSAttributedString *goldAttribute = [NSMutableAttributedString attributedStringWithAttachment:(NSTextAttachment *)goldAtt];
int64_t getGolds = (int64_t)_walletInfoModel.golds;
double amount = getGolds + diamonds.doubleValue;
NSString * title = [NSString stringWithFormat:@" %.0f",amount];
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:title attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14], NSForegroundColorAttributeName:highlightColor}];
[attribute insertAttributedString:diamondAttribute atIndex:0];
[attribute insertAttributedString:addAttribute atIndex:1];
[attribute insertAttributedString:goldAttribute atIndex:2];
self.balanceLabel.attributedText = attribute;
}
}
@@ -349,7 +378,7 @@
if (!_balanceLabel) {
_balanceLabel = [[UILabel alloc] init];
_balanceLabel.textColor = [DJDKMIMOMColor mainTextColor];
_balanceLabel.font = [UIFont systemFontOfSize:13];
_balanceLabel.font = [UIFont systemFontOfSize:16];
}
return _balanceLabel;
}
@@ -493,8 +522,8 @@
- (UIButton *)firstRechargeButton {
if (!_firstRechargeButton) {
_firstRechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_firstRechargeButton setImage:[UIImage imageNamed:@"gift_first_recharge_bg"] forState:UIControlStateNormal];
[_firstRechargeButton setImage:[UIImage imageNamed:@"gift_first_recharge_bg"] forState:UIControlStateSelected];
[_firstRechargeButton setImage:[UIImage imageNamed:@"pi_new_gift_first_recharge_bg"] forState:UIControlStateNormal];
[_firstRechargeButton setImage:[UIImage imageNamed:@"pi_new_gift_first_recharge_bg"] forState:UIControlStateSelected];
[_firstRechargeButton addTarget:self action:@selector(firstRechargeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _firstRechargeButton;

View File

@@ -731,7 +731,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
///
[self.giftInfoView updatePackSource:receiveInfo numberUser:uidCount];
} else {
[self.presenter getUserWallInfo];
self.giftBarView.walletInfoModel = receiveInfo.userPurse;
}
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC));
dispatch_after(delayTime, dispatch_get_main_queue(), ^{

View File

@@ -76,11 +76,14 @@
if (self) {
_hostDelegate = delegate;
_isMiniEnter = NO;
[RtcManager instance].isMiniEnterk = self.hostDelegate.getIsMiniEnter;
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
if (roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode ){
if ([RtcManager instance].isAnckorPk == NO && self.hostDelegate.getIsMiniEnter == NO){
[RtcManager instance].localMuted = YES;
if ([RtcManager instance].isAnckorPk == NO){
if ([RtcManager instance].isMiniEnterk == NO){
[RtcManager instance].localMuted = YES;
}
}
}
@@ -508,11 +511,12 @@
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
if (changeType == 2){
if (userInfo.uid == [AccountInfoStorage instance].getUid.integerValue && roomInfo.roomModeType == RoomModeType_Open_Blind){
if (roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode ){
if (roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode){
if ([RtcManager instance].isAnckorPk == NO){
[RtcManager instance].localMuted = YES;
}
[RtcManager instance].isAnckorPk = NO;
}
}
@@ -549,10 +553,17 @@
if (roomInfo.roomModeType != RoomModeType_Open_Blind){
if (userInfo.isNoProhibitMic == NO){
if (roomInfo.roomModeType != RoomModeType_Open_AcrossRoomPK_mode){
[RtcManager instance].localMuted = YES;
if ([RtcManager instance].isMiniEnterk == NO){
[RtcManager instance].localMuted = YES;
}
}
}
}
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[RtcManager instance].isMiniEnterk = NO;
});
//
}
}
if(userInfo.isNoProhibitMic == YES){

View File

@@ -2713,10 +2713,11 @@
"PINobleCenterListCell5"="操作";
"PINobleCenterListCell6"="第%@天";
"PINobleCenterListCell7"="已领取";
"PINobleCenterListCell8"="立即返利";
///PINoblePrivilegeEmptyCell
"PINoblePrivilegeEmptyCell0"="当前等级不享有该特权~";
//PINobleCenterListView
"PINobleCenterListView0"="用户直接购买骑士等级,除了直接享有等级对应的所有特权,还能获得额外返鑽。\n\n具体返利日期以及返利鑽石数量如下";
"PINobleCenterListView0"="用户直接购买%@等级,除了直接享有等级对应的所有特权,还能获得额外返鑽。\n\n具体返利日期以及返利鑽石数量如下";
"PINobleCenterListView1"="注:\n返利鑽石需在贵族开通后30天内领取完毕逾期失效\n领取后的返利鑽石可到【我的-收益记录-鑽石明细-收入记录】中查看。";
///LoginForgetEditView.m
"LoginForgetEditView0" = "获取验证码";

View File

@@ -2707,10 +2707,11 @@
"PINobleCenterListCell5"="操作";
"PINobleCenterListCell6"="第%@天";
"PINobleCenterListCell7"="已領取";
"PINobleCenterListCell8"="立即返利";
///PINoblePrivilegeEmptyCell
"PINoblePrivilegeEmptyCell0"="當前等級不享有該特權~";
//PINobleCenterListView
"PINobleCenterListView0"="用戶直接購買騎士等級,除了直接享有等級對應的所有特權,還能獲得額外返鑽。\n\n具體返利日期以及返利鑽石數量如下";
"PINobleCenterListView0"="用戶直接購買%@等級,除了直接享有等級對應的所有特權,還能獲得額外返鑽。\n\n具體返利日期以及返利鑽石數量如下";
"PINobleCenterListView1"="注:\n返利鑽石需在貴族開通後30天內領取完畢逾期失效\n領取後的返利鑽石可到【我的-收益記錄-鑽石明細-收入記錄】中查看。";
///LoginForgetEditView.m
"LoginForgetEditView0" = "獲取驗證碼";