修复bug
This commit is contained in:
22
YuMi/Assets.xcassets/jm/Guild/mine_give_diamond_search.imageset/Contents.json
vendored
Normal file
22
YuMi/Assets.xcassets/jm/Guild/mine_give_diamond_search.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_give_diamond_search@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_give_diamond_search@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
YuMi/Assets.xcassets/jm/Guild/mine_give_diamond_search.imageset/mine_give_diamond_search@2x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/jm/Guild/mine_give_diamond_search.imageset/mine_give_diamond_search@2x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.5 KiB |
BIN
YuMi/Assets.xcassets/jm/Guild/mine_give_diamond_search.imageset/mine_give_diamond_search@3x.png
vendored
Normal file
BIN
YuMi/Assets.xcassets/jm/Guild/mine_give_diamond_search.imageset/mine_give_diamond_search@3x.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
@@ -14,7 +14,7 @@
|
||||
#import "XPMineGuildViewController.h"
|
||||
#import "XPMineGiveDiamondSearchView.h"
|
||||
#import "SessionViewController.h"
|
||||
@interface XPMineGuildListVC ()<XPMineGuildListCellDelegate,XPMineGiveDiamondProtocol,XPMineGuildProtocol,UITableViewDelegate, UITableViewDataSource>
|
||||
@interface XPMineGuildListVC ()<XPMineGuildListCellDelegate,XPMineGiveDiamondProtocol,XPMineGuildProtocol,UITableViewDelegate, UITableViewDataSource,XPMineGuildViewControllerDelegate>
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray *dataList;
|
||||
@@ -37,15 +37,15 @@
|
||||
[super viewDidLoad];
|
||||
[self showLoading];
|
||||
if(self.type == 0){
|
||||
|
||||
|
||||
[self.presenter getGuildListData];
|
||||
}else{
|
||||
[self.presenter getRoomListData];
|
||||
}
|
||||
|
||||
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
|
||||
|
||||
}
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
@@ -62,7 +62,7 @@
|
||||
if (self.scrollCallback){
|
||||
self.scrollCallback(scrollView);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
@@ -78,7 +78,7 @@
|
||||
if (@available(iOS 15.0, *)) {//移除iOS15列表头默认增加的22高度
|
||||
self.tableView.sectionHeaderTopPadding = 0;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
- (void)initSubViewConstraints {
|
||||
if(self.type == 1){
|
||||
@@ -90,14 +90,14 @@
|
||||
make.top.mas_equalTo(kGetScaleWidth(10));
|
||||
}];
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.equalTo(self.view);
|
||||
make.top.equalTo(self.searchView.mas_bottom).mas_offset(kGetScaleWidth(16));
|
||||
make.left.right.bottom.equalTo(self.view);
|
||||
make.top.equalTo(self.searchView.mas_bottom).mas_offset(kGetScaleWidth(16));
|
||||
}];
|
||||
|
||||
return;
|
||||
}
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.view);
|
||||
make.edges.equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -177,9 +177,17 @@
|
||||
return;
|
||||
}
|
||||
if(guildModel.hallBtnStatus == 1){
|
||||
self.applyModel = guildModel;
|
||||
[self.presenter applyHallWithHallId:@(guildModel.hallId).stringValue];
|
||||
[self showLoading];
|
||||
TTAlertConfig *config = [[TTAlertConfig alloc]init];
|
||||
config.title = YMLocalizedString(@"XPMineGuildListVC5");
|
||||
config.message = [NSString stringWithFormat:YMLocalizedString(@"XPMineGuildListVC6"),guildModel.hallName];
|
||||
[TTPopup alertWithConfig:config confirmHandler:^{
|
||||
self.applyModel = guildModel;
|
||||
[self.presenter applyHallWithHallId:@(guildModel.hallId).stringValue];
|
||||
[self showLoading];
|
||||
} cancelHandler:^{
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -219,7 +227,7 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if(self.dataList.count == 0)return;
|
||||
XPMineGuildListModel *guildModel = self.dataList[indexPath.row];
|
||||
|
||||
|
||||
if(self.type == 0){
|
||||
XPMineClanViewController * clanVC = [[XPMineClanViewController alloc] init];
|
||||
clanVC.uid = @(guildModel.clanElderUid).stringValue;
|
||||
@@ -229,8 +237,19 @@
|
||||
XPMineGuildViewController * hallVC = [[XPMineGuildViewController alloc] init];
|
||||
hallVC.ownerUid = @(guildModel.ownerUid).stringValue;
|
||||
hallVC.guildId = @(guildModel.hallId).stringValue;
|
||||
hallVC.delegate = self;
|
||||
[self.navigationController pushViewController:hallVC animated:YES];
|
||||
}
|
||||
#pragma mark- XPMineGuildViewControllerDelegate
|
||||
- (void)applyHallSuccessHandleWithHallId:(NSString *)hallId{
|
||||
for (XPMineGuildListModel *guildModel in self.dataList) {
|
||||
if([hallId isEqualToString:@(guildModel.hallId).stringValue]){
|
||||
guildModel.hallBtnStatus = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
|
@@ -6,11 +6,18 @@
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
@protocol XPMineGuildViewControllerDelegate <NSObject>
|
||||
|
||||
-(void)applyHallSuccessHandleWithHallId:(NSString *_Nullable)hallId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@interface XPMineGuildViewController : MvpViewController
|
||||
@property (nonatomic,strong) NSString *ownerUid;
|
||||
@property (nonatomic,strong) NSString *guildId;
|
||||
|
||||
@property(nonatomic,weak) id<XPMineGuildViewControllerDelegate>delegate;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -437,6 +437,9 @@ UIKIT_EXTERN NSString *kInviteMemeberSuccess;
|
||||
self.stateModel.hallBtnStatus = 2;
|
||||
[self setApplyBut:self.stateModel.hallBtnStatus];
|
||||
[self showSuccessToast:YMLocalizedString(@"XPMineGuildListVC4")];
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(applyHallSuccessHandleWithHallId:)]){
|
||||
[self.delegate applyHallSuccessHandleWithHallId:self.guildId];
|
||||
}
|
||||
}
|
||||
-(void)applyHallFail{
|
||||
|
||||
|
@@ -39,7 +39,8 @@
|
||||
|
||||
UIButton *realBtn = [UIButton new];
|
||||
|
||||
[realBtn setTitle:@"调试" forState:UIControlStateNormal];
|
||||
[realBtn setTitle:@"调试捉包工具" forState:UIControlStateNormal];
|
||||
realBtn.titleLabel.font = kFontMedium(16);
|
||||
[realBtn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
|
||||
|
||||
[realBtn addTarget:self action:@selector(showRealTimeView) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
@@ -201,7 +201,7 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
|
||||
- (void)pushViewControllerWithType:(NSInteger)type functionItem:(XPMineFuntionItemModel *)item {
|
||||
|
||||
if([item.centerName isEqualToString:@"切换分区"]){
|
||||
if([item.centerName isEqualToString:@"切换环境"]){
|
||||
PISwitchingEnvironmentVC *vc = [PISwitchingEnvironmentVC new];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
return;
|
||||
@@ -531,7 +531,7 @@ UIKIT_EXTERN NSString *kRequestRicket;
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventusercenter_function_show eventAttributes:@{@"functionName" : trackName}];
|
||||
#ifdef DEBUG
|
||||
XPMineFuntionItemModel *item = [XPMineFuntionItemModel new];
|
||||
item.centerName = @"切换分区";
|
||||
item.centerName = @"切换环境";
|
||||
item.centerPic = @"mineview_set";
|
||||
[self.functionArray addObject:item];
|
||||
#else
|
||||
|
@@ -121,6 +121,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
+ (void)homeChatPick:(HttpRequestHelperCompletion)completion;
|
||||
///发现新朋友
|
||||
+(void)requsetFriendListComplection:(HttpRequestHelperCompletion)complection;
|
||||
///ip检测
|
||||
+(void)checkIpRegionComplection:(HttpRequestHelperCompletion)complection;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -155,4 +155,8 @@
|
||||
+(void)requsetFriendListComplection:(HttpRequestHelperCompletion)complection{
|
||||
[self makeRequest:@"home/newFriend" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, nil];
|
||||
}
|
||||
///ip检测
|
||||
+(void)checkIpRegionComplection:(HttpRequestHelperCompletion)complection{
|
||||
[self makeRequest:@"ipRegion/check" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, nil];
|
||||
}
|
||||
@end
|
||||
|
@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
///首页改版资源位
|
||||
-(void)getCurrentResourceList;
|
||||
- (void)homeChatPick;
|
||||
///ip检测
|
||||
-(void)checkIpRegionAction;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -24,6 +24,15 @@
|
||||
|
||||
} errorToast:NO] uid:uid type:@"1"];
|
||||
}
|
||||
///ip检测
|
||||
-(void)checkIpRegionAction{
|
||||
[Api checkIpRegionComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSLog(@"%@",data.data);
|
||||
NSLog(@"%@",data.data);
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
NSLog(@"%@",msg);
|
||||
}errorToast:NO]];
|
||||
}
|
||||
/// 获取所有的房间的tag
|
||||
- (void)getHomeTagList {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
|
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
typedef void(^CompleteHandle)(BOOL isSuccess,NSArray *playGameList, NSArray *friendList);
|
||||
typedef void(^CompleteHandle)(BOOL isSuccess,NSArray * _Nullable playGameList, NSArray * _Nullable friendList);
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNewHomeRecommendPresenter : BaseMvpPresenter
|
||||
@@ -27,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)getLittleGameList;
|
||||
///获取首页数据
|
||||
-(void)getHomeListDataWith:(int)pageNum completeHandle:(CompleteHandle)completeHandle;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -21,6 +21,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)homeChatPickSuccess:(NSString *)uid;
|
||||
///一键匹配失败
|
||||
- (void)homeChatPickFail:(NSString *)msg;
|
||||
///
|
||||
-(void)checkIpRegionFail;
|
||||
-(void)checkIpRegionSuccess:(NSInteger)seconds;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -29,6 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
-(void)getFriendListFail;
|
||||
///获取小游戏列表
|
||||
- (void)onGetLittleGameListSuccess:(NSArray<LittleGameInfoModel *> *)items;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#import "XPWeakTimer.h"
|
||||
///Model
|
||||
#import "HomeTagModel.h"
|
||||
|
||||
#import "AccountModel.h"
|
||||
#import "XPLittleGameRoomOpenView.h"
|
||||
|
||||
#import "PIHomeItemModel.h"
|
||||
@@ -47,7 +47,10 @@
|
||||
#import "XPHomeContainerProtocol.h"
|
||||
#import "ClientConfig.h"
|
||||
#import "SessionViewController.h"
|
||||
|
||||
#import "Api+Main.h"
|
||||
#import "XPLoginViewController.h"
|
||||
#import "BaseNavigationController.h"
|
||||
#import "XPAdImageTool.h"
|
||||
|
||||
UIKIT_EXTERN NSString * kHomeMoreScrollPageKey;
|
||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
@@ -123,6 +126,23 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
[timer setFireDate:[NSDate distantFuture]]; //很远的将来
|
||||
}
|
||||
}
|
||||
|
||||
-(void)checkIpRegionSuccess:(NSInteger)seconds{
|
||||
|
||||
}
|
||||
- (void)tokenInvalid {
|
||||
|
||||
[[AccountInfoStorage instance] saveAccountInfo:nil];
|
||||
[[AccountInfoStorage instance] saveTicket:nil];
|
||||
if ([NIMSDK sharedSDK].loginManager.isLogined) {
|
||||
[[NIMSDK sharedSDK].loginManager logout:nil];
|
||||
}
|
||||
XPLoginViewController *lvc = [[XPLoginViewController alloc] init];
|
||||
BaseNavigationController * nav = [[BaseNavigationController alloc] initWithRootViewController:lvc];
|
||||
nav.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
kWindow.rootViewController = nav;
|
||||
XPAdImageTool.shareImageTool.isImLogin = NO;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)addTimer {
|
||||
timer = [XPWeakTimer scheduledTimerWithTimeInterval:15 block:^(id userInfo) {
|
||||
@@ -238,7 +258,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
- (void)initHttp {
|
||||
[self.presenter getHomeTopBannerList];
|
||||
[self.presenter getCurrentResourceList];
|
||||
|
||||
[self.presenter checkIpRegionAction];
|
||||
}
|
||||
|
||||
|
||||
@@ -257,6 +277,12 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
-(void)opRoom:(NSString *)roomUid{
|
||||
|
||||
[Api getRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if(code == 401){
|
||||
|
||||
[self tokenInvalid];
|
||||
[self showErrorToast:msg];
|
||||
return;
|
||||
}
|
||||
if (code == 200) {
|
||||
RoomInfoModel * roomInfo = [RoomInfoModel modelWithJSON:data.data];
|
||||
if (roomInfo.isReselect) {
|
||||
@@ -268,6 +294,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||
[XPRoomViewController openRoom:roomUid viewController:self];
|
||||
}
|
||||
} else {
|
||||
|
||||
[self showErrorToast:msg];
|
||||
}
|
||||
} uid:roomUid intoUid:roomUid];
|
||||
|
@@ -30,8 +30,10 @@ typedef NS_ENUM(NSInteger, ActivityType) {
|
||||
@interface ActivityInfoModel : PIBaseModel
|
||||
///名称
|
||||
@property (nonatomic,copy) NSString *bannerName;
|
||||
///活动的图片
|
||||
///外面的活动的图片
|
||||
@property (nonatomic, copy)NSString *bannerPic;
|
||||
///里面的活动的图片
|
||||
@property(nonatomic,copy) NSString *bannerUrl;
|
||||
///跳转类型
|
||||
@property (nonatomic, assign)ActivitySkipType skipType;
|
||||
///如果是跳转房间的话 那就是房主的uid 如果是h5的话 那就是链接
|
||||
|
@@ -34,14 +34,14 @@
|
||||
}
|
||||
-(void)setInfoModel:(ActivityInfoModel *)infoModel{
|
||||
_infoModel = infoModel;
|
||||
_bgImageView.imageUrl = _infoModel.bannerPic;
|
||||
_bgImageView.imageUrl = _infoModel.bannerUrl;
|
||||
}
|
||||
#pragma mark - 懒加载
|
||||
- (NetImageView *)bgImageView{
|
||||
if(!_bgImageView){
|
||||
NetImageConfig *config = [[NetImageConfig alloc]init]; config.placeHolder = [UIImageConstant defalutBannerPlaceholder];
|
||||
_bgImageView = [[NetImageView alloc]initWithConfig:config];
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_bgImageView.layer.cornerRadius = kGetScaleWidth(4);
|
||||
_bgImageView.layer.masksToBounds = YES;
|
||||
_bgImageView.layer.borderWidth = 0;
|
||||
|
@@ -98,6 +98,14 @@
|
||||
}
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
[self.collectionView.superview layoutIfNeeded];
|
||||
if(_infoList.count > self.path){
|
||||
UICollectionViewLayoutAttributes *layoutAttributes = [self.collectionView.collectionViewLayout layoutAttributesForItemAtIndexPath:[NSIndexPath indexPathForRow:self.path inSection:0]];
|
||||
// 滑动
|
||||
CGPoint poiot = CGPointMake(layoutAttributes.frame.origin.x - kGetScaleWidth(10), layoutAttributes.frame.origin.y);
|
||||
[self.collectionView setContentOffset:poiot animated:YES];
|
||||
}
|
||||
|
||||
}
|
||||
#pragma mark - 懒加载
|
||||
- (UICollectionView *)collectionView{
|
||||
@@ -111,6 +119,8 @@
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.showsVerticalScrollIndicator = NO;
|
||||
_collectionView.showsHorizontalScrollIndicator = NO;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
[_collectionView registerClass:[PIRoomActivityWebCell class] forCellWithReuseIdentifier:NSStringFromClass([PIRoomActivityWebCell class])];
|
||||
|
||||
|
@@ -197,7 +197,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
|
||||
}
|
||||
///夺宝精灵
|
||||
-(void)configFairy{
|
||||
if (self.fairyModel.open == YES && self.fairyModel.levelLimit <= self.hostDelegate.getUserInfo.userLevelVo.experLevelSeq) {
|
||||
if (self.fairyModel.open == YES) {
|
||||
if(![self.activityList containsObject:self.fairyActivityModel]){
|
||||
[self.activityList insertObject:self.fairyActivityModel atIndex:0];
|
||||
}
|
||||
|
@@ -195,6 +195,8 @@
|
||||
[self addSubview:self.lowLevelView];
|
||||
[self addSubview:self.middleLevelView];
|
||||
[self addSubview:self.highLevleView];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
@@ -1133,40 +1135,47 @@
|
||||
XPRoomNobleLevelUpView *nobleLevelUpView = [[XPRoomNobleLevelUpView alloc] initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth, 90)];
|
||||
nobleLevelUpView.nobleInfo = model.data;
|
||||
[self.highLevleView addSubview:nobleLevelUpView];
|
||||
POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
springAnimation.springSpeed = 12;
|
||||
springAnimation.springBounciness = 10.f;
|
||||
springAnimation.fromValue = [NSValue valueWithCGPoint:nobleLevelUpView.center];
|
||||
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(nobleLevelUpView.frame.size.width / 2, nobleLevelUpView.center.y)];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, nobleLevelUpView.center.y)];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, nobleLevelUpView.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime() + 3;
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
@kWeakify(self);
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
self.isPlayOfB = NO;
|
||||
[nobleLevelUpView removeFromSuperview];
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
@kWeakify(self);
|
||||
@kWeakify(nobleLevelUpView);
|
||||
nobleLevelUpView.completionBlock = ^{
|
||||
@kStrongify(self);
|
||||
@kStrongify(nobleLevelUpView);
|
||||
POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
springAnimation.springSpeed = 12;
|
||||
springAnimation.springBounciness = 10.f;
|
||||
springAnimation.fromValue = [NSValue valueWithCGPoint:nobleLevelUpView.center];
|
||||
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(nobleLevelUpView.frame.size.width / 2, nobleLevelUpView.center.y)];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, nobleLevelUpView.center.y)];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, nobleLevelUpView.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime() + 3;
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
@kWeakify(self);
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
self.isPlayOfB = NO;
|
||||
[nobleLevelUpView removeFromSuperview];
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
}
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
//
|
||||
// [self playAnimationWithModel];
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// return;
|
||||
// }
|
||||
[self playAnimationWithModel];
|
||||
}
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
//
|
||||
// [self playAnimationWithModel];
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// return;
|
||||
// }
|
||||
[self playAnimationWithModel];
|
||||
}
|
||||
}];
|
||||
[nobleLevelUpView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
});
|
||||
[nobleLevelUpView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"];
|
||||
}];
|
||||
[nobleLevelUpView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
});
|
||||
[nobleLevelUpView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - 魔法小屋礼物合成
|
||||
|
@@ -9,11 +9,13 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef void(^CompletionBlock)(void);
|
||||
|
||||
@interface XPRoomNobleLevelUpView : UIView
|
||||
|
||||
///贵族升级的信息
|
||||
@property (nonatomic,copy) NSDictionary * nobleInfo;
|
||||
|
||||
@property(nonatomic,copy) CompletionBlock completionBlock;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -12,6 +12,7 @@
|
||||
#import "YUMIMacroUitls.h"
|
||||
#import "ThemeColor+Room.h"
|
||||
#import "NetImageView.h"
|
||||
#import <pop/POP.h>
|
||||
|
||||
|
||||
@interface XPRoomNobleLevelUpView ()
|
||||
@@ -31,7 +32,10 @@
|
||||
|
||||
|
||||
@implementation XPRoomNobleLevelUpView
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
|
||||
}
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
@@ -98,10 +102,20 @@
|
||||
[self.nobleView startAnimation];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
self.pi_contentView.attributedText = attribute;
|
||||
|
||||
});
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(4 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[self.nobleView pauseAnimation];
|
||||
|
||||
});
|
||||
if(self.completionBlock){
|
||||
self.completionBlock();
|
||||
}
|
||||
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -343,9 +343,8 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||
///执行插入动画并滚动
|
||||
- (void)scrollToBottom:(BOOL)animated {
|
||||
if(self.datasource.count > 0){
|
||||
[self.messageTableView.superview layoutIfNeeded];
|
||||
NSIndexPath *ip = [NSIndexPath indexPathForRow:self.datasource.count-1 inSection:0]; //取最后一行数据
|
||||
[self.messageTableView scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionBottom animated:animated]; //滚动到最后一行
|
||||
CGPoint point = CGPointMake(0, self.messageTableView.contentSize.height - self.messageTableView.frame.size.height);
|
||||
[self.messageTableView setContentOffset:point];
|
||||
self.atCount = 0;
|
||||
self.atTipBtn.hidden = YES;
|
||||
[self.locationArray removeAllObjects];
|
||||
|
@@ -148,7 +148,10 @@
|
||||
- (void)setGiftInfo:(GiftInfoModel *)giftInfo {
|
||||
_giftInfo = giftInfo;
|
||||
if (_giftInfo) {
|
||||
self.giftImageView.imageUrl = giftInfo.giftUrl;
|
||||
self.giftImageView.image = nil;
|
||||
[self.giftImageView loadImageWithUrl:_giftInfo.giftUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
self.giftImageView.image = image;
|
||||
}];
|
||||
self.giftNameLabel.text = _giftInfo.giftName.length > 0 ? _giftInfo.giftName : @"";
|
||||
self.coverView.hidden = !giftInfo.isSelected;
|
||||
NSString *strr = [NSString stringWithFormat:@"%ld",(long)_giftInfo.goldPrice];
|
||||
|
@@ -113,6 +113,16 @@
|
||||
}
|
||||
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{
|
||||
|
||||
if (self.usingplaceType == SendGiftType_User) {
|
||||
self.titleView.titleColor = [DJDKMIMOMColor secondTextColor];
|
||||
self.titleView.titleSelectedColor = [DJDKMIMOMColor mainTextColor];
|
||||
[self.packGiftButton setTitleColor:[DJDKMIMOMColor secondTextColor] forState:UIControlStateNormal];
|
||||
}else {
|
||||
[self.packGiftButton setTitleColor:[DJDKMIMOMColor giftSegmentNormalTitleColor] forState:UIControlStateNormal];
|
||||
self.titleView.titleColor = [DJDKMIMOMColor giftSegmentNormalTitleColor];
|
||||
self.titleView.titleSelectedColor = [DJDKMIMOMColor giftSegmentSelectTitleColor];
|
||||
}
|
||||
[self.titleView reloadData];
|
||||
self.pi_containerView.hidden = NO;
|
||||
self.packGiftView.hidden = YES;
|
||||
self.totalValueLabel.hidden = YES;
|
||||
@@ -121,7 +131,11 @@
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(pIGiftInfoSegmentedView:didClickSegment:)]){
|
||||
[self.delegate pIGiftInfoSegmentedView:self didClickSegment:self.segmentType];
|
||||
}
|
||||
|
||||
if(self.segmentType == GiftSegmentType_WeekStar){
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(pIGiftInfoSegmentedView:didClickItem:type:)]){
|
||||
[self.delegate pIGiftInfoSegmentedView:self didClickItem:vc.lastSelectGift type:self.segmentType];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
-(XPGiftInfoView *)getListVC:(NSInteger)index{
|
||||
@@ -152,6 +166,17 @@
|
||||
return index.integerValue;
|
||||
}
|
||||
-(void)didClickGiftSegmentAction:(UIButton *)sender{
|
||||
if (self.usingplaceType == SendGiftType_User) {
|
||||
[self.packGiftButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateNormal];
|
||||
self.titleView.titleColor = [DJDKMIMOMColor secondTextColor];
|
||||
self.titleView.titleSelectedColor = [DJDKMIMOMColor secondTextColor];
|
||||
|
||||
}else {
|
||||
[self.packGiftButton setTitleColor:[DJDKMIMOMColor giftSegmentSelectTitleColor] forState:UIControlStateNormal];
|
||||
self.titleView.titleColor = [DJDKMIMOMColor giftSegmentNormalTitleColor];
|
||||
self.titleView.titleSelectedColor = [DJDKMIMOMColor giftSegmentNormalTitleColor];
|
||||
}
|
||||
[self.titleView reloadData];
|
||||
self.packGiftView.hidden = NO;
|
||||
self.pi_containerView.hidden = YES;
|
||||
self.totalValueLabel.hidden = NO;
|
||||
@@ -218,7 +243,6 @@
|
||||
if (self.usingplaceType == SendGiftType_User) {
|
||||
_giftList = [[NSMutableArray alloc]initWithArray:@[normaleArray,weekStarArray,nobleArray]];
|
||||
}else{
|
||||
|
||||
_giftList = [[NSMutableArray alloc]initWithArray:@[normaleArray,luckyArray,weekStarArray,nobleArray,anchorArray]];
|
||||
}
|
||||
|
||||
@@ -256,7 +280,7 @@
|
||||
self.pi_titles = @[YMLocalizedString(@"XPGiftInfoView2"),YMLocalizedString(@"XPGiftInfoView4"),YMLocalizedString(@"XPGiftInfoView9")];
|
||||
self.titleView.titles = self.pi_titles;
|
||||
[self.titleView reloadData];
|
||||
self.titleView.titleColor = [DJDKMIMOMColor mainTextColor];
|
||||
self.titleView.titleColor = [DJDKMIMOMColor secondTextColor];
|
||||
self.titleView.titleSelectedColor = [DJDKMIMOMColor mainTextColor];
|
||||
self.segmentBgView.hidden = NO;
|
||||
[self.packGiftButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateSelected];
|
||||
@@ -270,7 +294,7 @@
|
||||
#pragma mark- XPGiftInfoViewDelegate
|
||||
///点击了某个item
|
||||
- (void)xPGiftInfoView:(XPGiftInfoView *)view didClickItem:(GiftInfoModel *)info type:(GiftSegmentType)type{
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(xPGiftInfoView:didClickItem:type:)]){
|
||||
if(self.delegate && [self.delegate respondsToSelector:@selector(pIGiftInfoSegmentedView:didClickItem:type:)]){
|
||||
[self.delegate pIGiftInfoSegmentedView:self didClickItem:info type:type];
|
||||
}
|
||||
}
|
||||
@@ -333,11 +357,9 @@
|
||||
if (!_packGiftButton) {
|
||||
_packGiftButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_packGiftButton setTitle:YMLocalizedString(@"XPGiftInfoView5") forState:UIControlStateNormal];
|
||||
[_packGiftButton setTitleColor:[DJDKMIMOMColor giftSegmentSelectTitleColor] forState:UIControlStateSelected];
|
||||
[_packGiftButton setTitleColor:[DJDKMIMOMColor giftSegmentNormalTitleColor] forState:UIControlStateNormal];
|
||||
_packGiftButton.titleLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightSemibold];
|
||||
_packGiftButton.tag = GiftSegmentType_Pack;
|
||||
_packGiftButton.selected = NO;
|
||||
[_packGiftButton addTarget:self action:@selector(didClickGiftSegmentAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _packGiftButton;
|
||||
|
@@ -258,7 +258,6 @@
|
||||
if(_packOriginArray.count > 0 && self.lastSelectGift == nil){
|
||||
[self dealSelectGift:_packOriginArray.firstObject];
|
||||
}
|
||||
// [self createPackTotalValueAttribute];
|
||||
if(self.isDelFreeGift == YES){
|
||||
NSMutableArray *originArray = [NSMutableArray array];
|
||||
for (GiftInfoModel *giftModel in self.packOriginArray) {
|
||||
@@ -289,25 +288,7 @@
|
||||
_curUserNobleLevel = curUserNobleLevel;
|
||||
[self.giftcollectionView reloadData];
|
||||
}
|
||||
- (void)setUsingplaceType:(SendGiftType)usingplaceType {
|
||||
_usingplaceType = usingplaceType;
|
||||
// if (_usingplaceType == SendGiftType_User) {
|
||||
// self.luckyGiftButton.hidden = YES;
|
||||
// self.graffitiButton.hidden = YES;
|
||||
// self.anchorButton.hidden = YES;
|
||||
// self.punishButton.hidden = YES;
|
||||
// self.segmentBgView.hidden = NO;
|
||||
//
|
||||
// [self.normalGiftButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateSelected];
|
||||
// [self.normalGiftButton setTitleColor:[DJDKMIMOMColor secondTextColor] forState:UIControlStateNormal];
|
||||
//
|
||||
// [self.weekStarButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateSelected];
|
||||
// [self.weekStarButton setTitleColor:[DJDKMIMOMColor secondTextColor] forState:UIControlStateNormal];
|
||||
//
|
||||
// [self.packGiftButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateSelected];
|
||||
// [self.packGiftButton setTitleColor:[DJDKMIMOMColor secondTextColor] forState:UIControlStateNormal];
|
||||
// }
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self;
|
||||
|
@@ -540,8 +540,6 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
}
|
||||
} else if(type == GiftSegmentType_WeekStar) {
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
// if ([ClientConfig shareConfig].configInfo.twelveStarSwitch) {
|
||||
self.constellationBanner.hidden = NO;
|
||||
if (!self.constellationBanner.superview) {
|
||||
[self.view addSubview:self.constellationBanner];
|
||||
[self.constellationBanner mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -550,10 +548,6 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
|
||||
make.height.mas_equalTo(kGetScaleWidth(56));
|
||||
}];
|
||||
}
|
||||
|
||||
// } else {
|
||||
// self.constellationBanner.hidden = YES;
|
||||
// }
|
||||
} else {
|
||||
[self.luckyBroadcastView removeFromSuperview];
|
||||
[self.constellationBanner removeFromSuperview];
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#define kScpaces 13
|
||||
|
||||
@interface MicroView ()<CAAnimationDelegate>
|
||||
|
||||
///头像
|
||||
@property (nonatomic,strong) NetImageView *avatarImageView;
|
||||
///坑位是否闭麦的
|
||||
|
@@ -560,42 +560,48 @@
|
||||
XPRoomNobleLevelUpView *nobleLevelUpView = [[XPRoomNobleLevelUpView alloc] initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth, 90)];
|
||||
nobleLevelUpView.nobleInfo = model.data;
|
||||
[kWindow addSubview:nobleLevelUpView];
|
||||
|
||||
POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
springAnimation.springSpeed = 12;
|
||||
springAnimation.springBounciness = 10.f;
|
||||
springAnimation.fromValue = [NSValue valueWithCGPoint:nobleLevelUpView.center];
|
||||
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(nobleLevelUpView.frame.size.width / 2, nobleLevelUpView.center.y)];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, nobleLevelUpView.center.y)];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, nobleLevelUpView.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime() + 3;
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
@kWeakify(self);
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
self.isPlayOfB = NO;
|
||||
[nobleLevelUpView removeFromSuperview];
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
@kWeakify(self);
|
||||
@kWeakify(nobleLevelUpView);
|
||||
nobleLevelUpView.completionBlock = ^{
|
||||
@kStrongify(self);
|
||||
@kStrongify(nobleLevelUpView);
|
||||
POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
springAnimation.springSpeed = 12;
|
||||
springAnimation.springBounciness = 10.f;
|
||||
springAnimation.fromValue = [NSValue valueWithCGPoint:nobleLevelUpView.center];
|
||||
springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(nobleLevelUpView.frame.size.width / 2, nobleLevelUpView.center.y)];
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(6.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter];
|
||||
moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(0, nobleLevelUpView.center.y)];
|
||||
moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, nobleLevelUpView.center.y)];
|
||||
moveAnimation.beginTime = CACurrentMediaTime() + 3;
|
||||
moveAnimation.duration = 0.5;
|
||||
moveAnimation.repeatCount = 1;
|
||||
moveAnimation.removedOnCompletion = YES;
|
||||
@kWeakify(self);
|
||||
[moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) {
|
||||
@kStrongify(self);
|
||||
if (finished) {
|
||||
self.isPlayOfB = NO;
|
||||
[nobleLevelUpView removeFromSuperview];
|
||||
if (self.animationListB.count > 0) {
|
||||
[self.animationListB removeObjectAtIndex:0];
|
||||
}
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
//
|
||||
// [self playAnimationWithModel];
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// return;
|
||||
// }
|
||||
[self playAnimationWithModel];
|
||||
}
|
||||
// if(self.isAnimationListAFinish == YES){
|
||||
//
|
||||
// [self playAnimationWithModel];
|
||||
// self.isAnimationListAFinish = NO;
|
||||
// return;
|
||||
// }
|
||||
[self playAnimationWithModel];
|
||||
}
|
||||
}];
|
||||
[nobleLevelUpView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
});
|
||||
|
||||
[nobleLevelUpView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"];
|
||||
}];
|
||||
[nobleLevelUpView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"];
|
||||
});
|
||||
|
||||
[nobleLevelUpView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"];
|
||||
};
|
||||
|
||||
}
|
||||
#pragma mark - 收到星级厨房飘屏
|
||||
-(void)receiveRoomGraffitiStarKitchen:(AttachmentModel *)attacment{
|
||||
|
@@ -121,6 +121,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
@property (nonatomic,assign) BOOL isReload;
|
||||
///是否刷新了
|
||||
@property (nonatomic,assign) BOOL isInitReload;
|
||||
@property(nonatomic,assign) BOOL isReloadTicket;
|
||||
///房间外的飘屏
|
||||
@property(nonatomic,strong) PIFullScreenBannerAnimation *roomAnimation;
|
||||
|
||||
@@ -138,7 +139,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
|
||||
|
||||
[self.presenter autoLogin];
|
||||
[self configTheme];
|
||||
[self initTabs:NO];
|
||||
@@ -160,8 +161,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
}];
|
||||
|
||||
|
||||
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserverForName:@"reloadnewtab" object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {
|
||||
@kStrongify(self);
|
||||
if (self.isInitReload == NO) {
|
||||
@@ -182,7 +181,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
|
||||
self.isReloadTicket = YES;
|
||||
if ([XPRoomMiniManager shareManager].getRoomInfo == nil) {
|
||||
[self.roomMineView hiddenRoomMiniView];
|
||||
}
|
||||
@@ -203,6 +202,8 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
return _presenter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 登录成功(通过token且换取ticket后)。
|
||||
|
||||
1. 登录云信。
|
||||
|
@@ -245,13 +245,23 @@
|
||||
@"model" : [YYUtility modelName],
|
||||
@"deviceId" : [YYUtility deviceUniqueIdentification],
|
||||
@"appVersion" : [YYUtility appVersion],
|
||||
@"app" : [YYUtility appName]
|
||||
@"app" : [YYUtility appName],
|
||||
@"lang" : [YYUtility getLanguage]
|
||||
|
||||
};
|
||||
|
||||
if (!parmars||![parmars isKindOfClass:[NSDictionary class]]){
|
||||
NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithDictionary:defaultBasciParame];
|
||||
if(![[YYUtility getMobileCountryCode] isEqualToString:@"65535"]){
|
||||
[dic setValue:[YYUtility getMobileCountryCode] forKey:@"mcc"];
|
||||
}
|
||||
return dic;
|
||||
}
|
||||
|
||||
NSMutableDictionary * dic = [NSMutableDictionary dictionaryWithDictionary:parmars];
|
||||
if(![[YYUtility getMobileCountryCode] isEqualToString:@"65535"]){
|
||||
[dic setValue:[YYUtility getMobileCountryCode] forKey:@"mcc"];
|
||||
}
|
||||
for (NSString *parameKey in defaultBasciParame.allKeys) {
|
||||
[dic setObject:defaultBasciParame[parameKey] forKey:parameKey];
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property(nonatomic,assign) long timestamp;
|
||||
@property (nonatomic , strong) id data;
|
||||
@property (nonatomic , assign) NSInteger code;
|
||||
@property (nonatomic , copy) NSString *message;
|
||||
@property (nonatomic , copy) NSString * message;
|
||||
///注销的时间戳 因为后端返回的内容和code在同一层级 安卓已经发出去了 兼容就写在这里吧 请不要模仿
|
||||
@property (nonatomic,assign) long long cancelDate;
|
||||
///账号封禁返回的code
|
||||
|
@@ -27,7 +27,20 @@
|
||||
}
|
||||
return appVersion;
|
||||
}
|
||||
|
||||
+(NSString *)getLanguage{
|
||||
NSString *language = [NSLocale preferredLanguages].firstObject;
|
||||
if ([language hasPrefix:@"zh"]) {
|
||||
if ([language rangeOfString:@"Hans"].location != NSNotFound) {
|
||||
language = @"zh-Hans"; // 简体中文
|
||||
} else {
|
||||
language = @"zh-Hant"; // 繁體中文
|
||||
}
|
||||
} else {
|
||||
language = @"zh-Hant"; // 繁體中文
|
||||
}
|
||||
return language;
|
||||
|
||||
}
|
||||
+ (NSString *)appName {
|
||||
#ifdef DEBUG
|
||||
NSString *isProduction = [[NSUserDefaults standardUserDefaults]valueForKey:@"kIsProductionEnvironment"];
|
||||
@@ -180,4 +193,5 @@ static NSString *_from = nil;
|
||||
}
|
||||
return YYUtilityTelephonType_Link_Unknown;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -48,7 +48,11 @@ static NSSet * kMobileNetworkCodes_ChinaTelecom; // 电信
|
||||
{
|
||||
return [[CTTelephonyNetworkInfo alloc] init].subscriberCellularProvider;
|
||||
}
|
||||
|
||||
+(NSString *)getMobileCountryCode{
|
||||
CTCarrier *carrier = [[CTTelephonyNetworkInfo alloc] init].subscriberCellularProvider;
|
||||
NSString *code = carrier.mobileCountryCode;
|
||||
return code;
|
||||
}
|
||||
+ (NSInteger)identifierOfCarrier:(CTCarrier *)carrier
|
||||
{
|
||||
CarrierIdentifier identifier = CarrierIdentifier_Unknown;
|
||||
@@ -84,5 +88,4 @@ static NSSet * kMobileNetworkCodes_ChinaTelecom; // 电信
|
||||
|
||||
return identifier;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
typedef enum : NSUInteger {
|
||||
YYUtilityTelephonType_Move,///移动
|
||||
YYUtilityTelephonType_Move = 0,///移动
|
||||
YYUtilityTelephonType_Link_Together,///联通
|
||||
YYUtilityTelephonType_Link_Telegraphy,///电信
|
||||
YYUtilityTelephonType_Link_Tietong,///铁通
|
||||
@@ -38,7 +38,7 @@ typedef enum : NSUInteger {
|
||||
* 获取App版本号, 从plist从读取CFBundleShortVersion
|
||||
*/
|
||||
+ (NSString *)appVersion;
|
||||
|
||||
+(NSString *)getLanguage;
|
||||
/**
|
||||
* 获取AppBuild号, 从plist中读取CFBundleVersion
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ typedef enum : NSUInteger {
|
||||
/* Carrier Utilities */
|
||||
/*==============================*/
|
||||
@interface YYUtility (Carrier)
|
||||
|
||||
+(NSString *)getMobileCountryCode;
|
||||
|
||||
/**
|
||||
获取设备唯一标识
|
||||
|
@@ -2535,7 +2535,8 @@
|
||||
"XPMineGuildListVC2"="发送成功,请耐心等待";
|
||||
"XPMineGuildListVC3" = "没有搜到相关房间";
|
||||
"XPMineGuildListVC4" = "申请成功,审核通过后即可加入房间";
|
||||
|
||||
"XPMineGuildListVC5"="提示";
|
||||
"XPMineGuildListVC6"="确认加入公会\n%@";
|
||||
///XPMineTheGuildCell.m
|
||||
"XPMineTheGuildCell0" = "公会·房间";
|
||||
"XPMineTheGuildCell1" = "加入公会";
|
||||
|
@@ -2533,7 +2533,8 @@
|
||||
"XPMineGuildListVC2"="發送成功,請耐心等待";
|
||||
"XPMineGuildListVC3" = "沒有搜到相關房間";
|
||||
"XPMineGuildListVC4" = "申請成功,審核通過後即可加入房間";
|
||||
|
||||
"XPMineGuildListVC5"="提示";
|
||||
"XPMineGuildListVC6"="確認加入公會\n%@";
|
||||
///XPMineTheGuildCell.m
|
||||
"XPMineTheGuildCell0" = "公會·房間";
|
||||
"XPMineTheGuildCell1" = "加入公會";
|
||||
|
Reference in New Issue
Block a user