Compare commits

...

64 Commits

Author SHA1 Message Date
liyuhua
fa99fda4cd 更换图片logo 2024-03-12 21:30:21 +08:00
liyuhua
c6b13cc7db 更改logo 2024-03-12 21:30:21 +08:00
liyuhua
09ba817622 商店包版本修改 此commit置顶 2.6.3 2024-03-12 20:59:37 +08:00
liyuhua
4dd0447c6f 修复bug 2024-03-12 20:58:33 +08:00
liyuhua
905e3ed441 疯狂动物园 2024-03-12 18:17:33 +08:00
liyuhua
d00366238e 商店包版本修改 此commit置顶 2.6.2 2024-03-06 20:18:36 +08:00
liyuhua
d0f4ad4e12 修复推送bug 2024-02-27 10:40:48 +08:00
liyuhua
49fcca821b 商店包版本修改 此commit置顶 2.6.1 2024-02-26 18:10:58 +08:00
liyuhua
7ae5cc9a4c 商店包版本修改 此commit置顶 2.7.0 2024-02-26 17:18:57 +08:00
liyuhua
12a1dd9284 商店包版本修改 此commit置顶 2.7.0 2024-02-26 17:18:21 +08:00
liyuhua
2f2456fa18 商店包版本修改 此commit置顶 2.6.0 2024-02-23 18:35:35 +08:00
liyuhua
a189cdfaa8 修复bug 2024-02-23 14:40:10 +08:00
liyuhua
5f0d52451c 首页tag优化 2024-02-22 15:58:48 +08:00
liyuhua
06b39c2671 主播收入 2024-02-21 17:22:50 +08:00
liyuhua
32c6c8c7d2 资源位bug修复 2024-02-21 10:51:08 +08:00
liyuhua
6cbf6c55ca 推送及房间资源位优化 2024-02-21 10:18:59 +08:00
liyuhua
8e1ca7fa99 版本修改 此commit置顶 2.5.2 2024-01-11 17:58:31 +08:00
liyuhua
fe423a27a5 版本修改 此commit置顶 2.5.2 2024-01-11 17:57:47 +08:00
liyuhua
29c188788d 版本修改 此commit置顶 2.5.2 2024-01-11 17:57:06 +08:00
liyuhua
9f12705a8b 版本修改 此commit置顶 2.5.1 2024-01-10 18:04:12 +08:00
liyuhua
1455e352b7 商店包版本修改 此commit置顶 2.5.0 2024-01-06 10:23:02 +08:00
liyuhua
628b4f0c9f 商店包版本修改 此commit置顶 2.5.0 2024-01-06 10:22:25 +08:00
liyuhua
a75f291364 修复bug 2024-01-05 17:28:14 +08:00
liyuhua
470ecd99e7 修复bug 2024-01-05 17:05:27 +08:00
liyuhua
c670d7be6d 优化 2024-01-03 18:18:42 +08:00
liyuhua
10a1e6e09e 修复bug 2024-01-03 16:58:16 +08:00
liyuhua
5c057821a7 声网跨房语音,在线用户接口更改,私聊限制 2024-01-02 16:34:32 +08:00
liyuhua
6007611a3b 修复line无法登录问题 2023-12-29 16:43:37 +08:00
liyuhua
3a576925a2 2.4.6版本发版 此commit置顶 2023-12-15 19:03:44 +08:00
liyuhua
1bd2382d6a 2.4.2版本发版 此commit置顶 2023-12-15 17:08:10 +08:00
liyuhua
509c47cc2a 2.4.1版本发版 此commit置顶 2023-12-12 11:59:46 +08:00
liyuhua
0f47ed8ed7 2.4.0版本发版 此commit置顶 2023-12-12 11:55:07 +08:00
liyuhua
972f6d61ea 2.4.0版本发版 此commit置顶 2023-12-11 16:14:02 +08:00
liyuhua
5e2c5080c5 修复bug 2023-12-11 16:11:56 +08:00
liyuhua
ce308df1b6 修复bug 2023-12-08 10:34:47 +08:00
liyuhua
6a3201135b 选择区号修改 2023-12-07 19:44:52 +08:00
liyuhua
6e8ead27dd 修复bug 2023-12-07 15:44:03 +08:00
liyuhua
a8bef5946e 修复bug 2023-12-06 17:40:56 +08:00
liyuhua
3afa60587a 优化地区 2023-12-04 18:42:38 +08:00
liyuhua
52e7d4ff7e 修复bug 2023-11-30 16:41:28 +08:00
liyuhua
566d8a3672 房间踢人逻辑优化 2023-11-28 16:50:45 +08:00
liyuhua
8dffff8492 修复贵族页无法充值钻石bug 2023-11-28 11:48:00 +08:00
liyuhua
398b4e5e81 寻爱优化 2023-11-27 14:53:52 +08:00
liyuhua
a19adac48e 优化 2023-11-24 14:50:14 +08:00
liyuhua
f9321a6586 2.3.0版本发版 此commit置顶 2023-11-23 16:52:54 +08:00
liyuhua
411528467c 修复公屏乱跳问题 2023-11-23 16:04:15 +08:00
liyuhua
24d55bc807 修复bug 2023-11-23 10:56:01 +08:00
liyuhua
39b64f59b3 修复bug 2023-11-20 19:29:01 +08:00
liyuhua
cbd7b5cdbc 修复bug 2023-11-20 14:25:47 +08:00
liyuhua
d7f04e400a 优化打印信息 2023-11-15 17:25:09 +08:00
liyuhua
90eab408d0 活动改造 2023-11-15 16:49:59 +08:00
liyuhua
56103bb220 贵族飘屏动画更改 2023-11-15 14:16:01 +08:00
liyuhua
cee26a4c25 改造礼物面板bug修复 2023-11-14 17:00:16 +08:00
liyuhua
0f3dedd701 改造礼物面板 2023-11-14 15:07:28 +08:00
liyuhua
6e69623fe1 礼物面板更改 2023-11-13 16:42:34 +08:00
liyuhua
0161a860af 首页请求优化 2023-11-09 16:20:40 +08:00
liyuhua
92844a9619 新增调试工具 2023-11-09 15:26:14 +08:00
liyuhua
4285c2b6c7 修复bug 2023-11-08 16:08:13 +08:00
liyuhua
95a8cfc86d 升级trtc 2023-11-03 11:19:14 +08:00
liyuhua
47eab96f43 优化bug 2023-11-03 10:17:12 +08:00
liyuhua
723e946141 我的,网络下载优化 2023-11-02 11:14:35 +08:00
liyuhua
79015ca5ce 2.2.1版本发版 此commit置顶 2023-11-02 10:29:55 +08:00
liyuhua
960a708916 2.2.0版本发版 此commit置顶 2023-11-02 10:05:13 +08:00
liyuhua
138f7ed2d9 2.2.0版本发版 此commit置顶 2023-11-02 09:57:45 +08:00
517 changed files with 12063 additions and 3993 deletions

View File

@@ -11,6 +11,7 @@ target 'YuMi' do
pod 'FBSDKLoginKit' pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit' pod 'FBSDKCoreKit'
pod 'FBSDKShareKit' pod 'FBSDKShareKit'
pod 'LineSDKSwift'
# 滑动标签栏 # 滑动标签栏
pod 'JXCategoryView' pod 'JXCategoryView'
pod 'JXPagingView/Pager' pod 'JXPagingView/Pager'
@@ -39,7 +40,7 @@ target 'YuMi' do
pod 'IQKeyboardManager' pod 'IQKeyboardManager'
pod 'TZImagePickerController' pod 'TZImagePickerController'
#TRTC #TRTC
pod 'TXLiteAVSDK_TRTC', '~> 11.4.14445' pod 'TXLiteAVSDK_TRTC', '~> 11.4.14530'
#vap礼物动画 #vap礼物动画
pod 'QGVAPlayer' pod 'QGVAPlayer'
#上传音乐 #上传音乐
@@ -61,10 +62,10 @@ target 'YuMi' do
pod 'SVGAPlayer' pod 'SVGAPlayer'
pod 'GoogleSignIn' pod 'GoogleSignIn'
pod 'mob_linksdk_pro' #pod 'mob_linksdk_pro'
pod 'mob_sharesdk' pod 'mob_sharesdk'
pod 'mob_sharesdk/ShareSDKPlatforms/Apple' pod 'mob_sharesdk/ShareSDKPlatforms/Apple'
pod 'mob_sharesdk/ShareSDKPlatforms/Line' #pod 'mob_sharesdk/ShareSDKPlatforms/Line'
pod 'mob_sharesdk/ShareSDKExtension' pod 'mob_sharesdk/ShareSDKExtension'
pod 'UMCommon' pod 'UMCommon'

File diff suppressed because it is too large Load Diff

View File

@@ -31,7 +31,7 @@
</Testables> </Testables>
</TestAction> </TestAction>
<LaunchAction <LaunchAction
buildConfiguration = "Release" buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0" launchStyle = "0"

View File

@@ -10,6 +10,8 @@
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
#import <ShareSDK/ShareSDK.h> #import <ShareSDK/ShareSDK.h>
#import <UserNotifications/UNUserNotificationCenter.h> #import <UserNotifications/UNUserNotificationCenter.h>
#import <UserNotifications/UserNotifications.h>
///Tool ///Tool
#import "YUMIConstant.h" #import "YUMIConstant.h"
#import "CustomAttachmentDecoder.h" #import "CustomAttachmentDecoder.h"
@@ -23,13 +25,19 @@
#import "XCCurrentVCStackManager.h" #import "XCCurrentVCStackManager.h"
#import "ClientConfig.h" #import "ClientConfig.h"
#import <Adjust/Adjust.h> #import <Adjust/Adjust.h>
#import <UserNotifications/UserNotifications.h>
#import <Bugly/Bugly.h> #import <Bugly/Bugly.h>
#import "YuMi-swift.h"
UIKIT_EXTERN NSString * kYouMiNumberCountKey; UIKIT_EXTERN NSString * kYouMiNumberCountKey;
UIKIT_EXTERN NSString * adImageName; UIKIT_EXTERN NSString * adImageName;
@implementation AppDelegate (ThirdConfig) @implementation AppDelegate (ThirdConfig)
@@ -40,6 +48,24 @@ UIKIT_EXTERN NSString * adImageName;
[self initEmojiData]; [self initEmojiData];
[self configAdjust]; [self configAdjust];
[self configBugly]; [self configBugly];
[self registerNot];
}
-(void)registerNot{
if (@available(iOS 10.0, *)) {
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
[center requestAuthorizationWithOptions:(UNAuthorizationOptionAlert | UNAuthorizationOptionBadge | UNAuthorizationOptionSound) completionHandler:^(BOOL granted, NSError * _Nullable error) {
if (granted) {
[center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
if (settings.authorizationStatus == UNAuthorizationStatusAuthorized){
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] registerForRemoteNotifications];
});
}
}];
}
}];
}
} }
/** /**
Bugly Bugly
@@ -69,7 +95,15 @@ UIKIT_EXTERN NSString * adImageName;
// NIMSDK // NIMSDK
NSString *appKey = KeyWithType(KeyType_NetEase); NSString *appKey = KeyWithType(KeyType_NetEase);
NIMSDKOption *option = [NIMSDKOption optionWithAppKey:appKey]; NIMSDKOption *option = [NIMSDKOption optionWithAppKey:appKey];
#ifdef DEBUG
option.apnsCername = @"pikoDevelopPush";
#else
option.apnsCername = @"newPiko"; option.apnsCername = @"newPiko";
#endif
[[NIMSDK sharedSDK] registerWithOption:option]; [[NIMSDK sharedSDK] registerWithOption:option];
// NIM SDK // NIM SDK
@@ -103,9 +137,9 @@ UIKIT_EXTERN NSString * adImageName;
[Adjust appDidLaunch:adjustConfig]; [Adjust appDidLaunch:adjustConfig];
} }
- (void)configShareSDK { - (void)configShareSDK {
[PILineLoginManager registerLine];
[ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) { [ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) {
///faceBook ///faceBook
// [platformsRegister setupFacebookWithAppkey:@"1266232494209868" appSecret:@"c9b170b383f8be9cdf118823b8632821" displayName:YMLocalizedString(@"AppDelegate_ThirdConfig0")]; // [platformsRegister setupFacebookWithAppkey:@"1266232494209868" appSecret:@"c9b170b383f8be9cdf118823b8632821" displayName:YMLocalizedString(@"AppDelegate_ThirdConfig0")];

View File

@@ -19,6 +19,8 @@
#import <GoogleSignIn/GoogleSignIn.h> #import <GoogleSignIn/GoogleSignIn.h>
#import "XPLoginViewController.h" #import "XPLoginViewController.h"
#import "AccountModel.h" #import "AccountModel.h"
#import "YuMi-swift.h"
#import "SessionViewController.h"
@import Firebase; @import Firebase;
UIKIT_EXTERN NSString * const kOpenRoomNotification; UIKIT_EXTERN NSString * const kOpenRoomNotification;
@@ -101,13 +103,45 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { - (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
// devicetoken // devicetoken
[[NIMSDK sharedSDK] updateApnsToken:deviceToken]; [[NIMSDK sharedSDK] updateApnsToken:deviceToken ];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
NSString *data = userInfo[@"data"];
if(data){
NSDictionary *dataDic = [data mj_JSONObject];
NSString *userId = dataDic[@"uid"];
if(userId){
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter]postNotificationName:kOpenRoomNotification object:nil userInfo:@{@"type":@"kOpenChat",@"uid":userId,@"isNoAttention":@(YES)}];
ClientConfig *config = [ClientConfig shareConfig];
config.pushChatId = userId;
});
return;
}
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
NSString *userId = userInfo[@"uid"];
if(userId){
[[NSNotificationCenter defaultCenter]postNotificationName:kOpenRoomNotification object:nil userInfo:@{@"type":@"kOpenChat",@"uid":userId,@"isNoAttention":@(YES)}];
ClientConfig *config = [ClientConfig shareConfig];
config.pushChatId = userId;
}
});
} }
///URL Scheme ///URL Scheme
-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options{ -(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options{
NSString *bundleID = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIdentifier"];
if ([url.scheme isEqualToString:[NSString stringWithFormat:@"line3rdp.%@",bundleID]]) {
return [PILineLoginManager applicationOpenurl:app open:url];
}
NSString *text = [url query]; NSString *text = [url query];
if(text.length){ if(text.length){

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,16 +1,15 @@
{ {
"images" : [ "images" : [
{ {
"filename" : "room_across_pk_assist.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "room_menu_send_bg@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "room_menu_send_bg@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -9,7 +9,7 @@
#import "ClientDataModel.h" #import "ClientDataModel.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ClientConfig : NSObject @interface ClientConfig : PIBaseModel
+ (instancetype)shareConfig; + (instancetype)shareConfig;
///初始化 ///初始化
- (void)clientInit; - (void)clientInit;
@@ -29,6 +29,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *__nullable roomId; @property (nonatomic, copy) NSString *__nullable roomId;
///用户id用于外部h5跳转到聊天页面 ///用户id用于外部h5跳转到聊天页面
@property (nonatomic, copy) NSString *__nullable chatId; @property (nonatomic, copy) NSString *__nullable chatId;
///用户id推送跳转到聊天页面
@property (nonatomic, copy) NSString *__nullable pushChatId;
///表情--- ///表情---
@property (nonatomic, copy) NSString *version; @property (nonatomic, copy) NSString *version;
@property (nonatomic, copy) NSString *zipMd5; @property (nonatomic, copy) NSString *zipMd5;

View File

@@ -39,7 +39,7 @@
- (void)clientInit { - (void)clientInit {
#ifdef DEBUG #ifdef DEBUG
self.canOpen = YES; self.canOpen = YES;
#else #else
if(isEnterprise == YES){ if(isEnterprise == YES){
self.canOpen = NO; self.canOpen = NO;

View File

@@ -16,7 +16,7 @@ typedef NS_ENUM(NSInteger, FaceLivenessStrategy) {
FaceLivenessStrategy_Guide = 2, FaceLivenessStrategy_Guide = 2,
}; };
@interface ClientDataModel : NSObject @interface ClientDataModel : PIBaseModel
///首页tag 配置 ///首页tag 配置
@property (nonatomic,strong) NSArray<NSString *> *homeTabList; @property (nonatomic,strong) NSArray<NSString *> *homeTabList;
///房间表情的数据 ///房间表情的数据

View File

@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
//@class //@class
@interface ClientRedPacketModel : NSObject @interface ClientRedPacketModel : PIBaseModel
///红包开关 ///红包开关
@property (nonatomic, assign) BOOL open; @property (nonatomic, assign) BOOL open;

View File

@@ -15,7 +15,7 @@ typedef NS_ENUM(NSInteger, SplashInfoSkipType) {
SplashInfoSkipTypeWeb = 3, SplashInfoSkipTypeWeb = 3,
}; };
@interface AdvertiseModel : NSObject<NSCopying> @interface AdvertiseModel : PIBaseModel<NSCopying>
@property (nonatomic, strong) NSString *link; @property (nonatomic, strong) NSString *link;
@property (nonatomic, assign) SplashInfoSkipType type;// 1跳app页面2跳聊天室3跳h5页面 @property (nonatomic, assign) SplashInfoSkipType type;// 1跳app页面2跳聊天室3跳h5页面
@property (nonatomic, copy) NSString *pict; @property (nonatomic, copy) NSString *pict;

View File

@@ -9,7 +9,7 @@
#import "AdvertiseModel.h" #import "AdvertiseModel.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface XPAdImageTool : NSObject @interface XPAdImageTool : PIBaseModel
+ (instancetype)shareImageTool; + (instancetype)shareImageTool;
///是否登录成功im ///是否登录成功im

View File

@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
@interface QExtendBoardItemModel : NSObject @interface QExtendBoardItemModel : PIBaseModel
/** /**
* Cell图片 * Cell图片

View File

@@ -76,10 +76,10 @@
self.numberLabel.hidden = !imageInfo.isSelect; self.numberLabel.hidden = !imageInfo.isSelect;
self.chooseButton.selected = imageInfo.isSelect; self.chooseButton.selected = imageInfo.isSelect;
if (!imageInfo.originImage) { if (!imageInfo.originImage) {
[[TZImageManager manager] getPhotoWithAsset:imageInfo.assetInfo.asset photoWidth:200 completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) { [[TZImageManager manager] getPhotoWithAsset:imageInfo.assetInfo.asset completion:^(UIImage *photo, NSDictionary *info, BOOL isDegraded) {
self.logoImageView.image = photo; self.logoImageView.image = photo;
self.imageInfo.originImage = photo; self.imageInfo.originImage = photo;
UIImage * image = [photo compressWithMaxLength:1024 * 10]; UIImage * image = [photo compressWithMaxLength:1024 * 30];
self.imageInfo.compressImage = image; self.imageInfo.compressImage = image;
} progressHandler:nil networkAccessAllowed:NO]; } progressHandler:nil networkAccessAllowed:NO];
} else { } else {

View File

@@ -9,7 +9,7 @@
#import <TZImagePickerController/TZImagePickerController.h> #import <TZImagePickerController/TZImagePickerController.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface QPhotoImageModel : NSObject @interface QPhotoImageModel : PIBaseModel
///是否选中 ///是否选中
@property (nonatomic,assign) BOOL isSelect; @property (nonatomic,assign) BOOL isSelect;
///是否是原图 ///是否是原图

View File

@@ -17,7 +17,7 @@ typedef NS_ENUM(NSUInteger, ShareType) {
ShareType_User_Draw = 888, ShareType_User_Draw = 888,
}; };
@interface XPShareInfoModel : NSObject @interface XPShareInfoModel : PIBaseModel
///分享的标题 ///分享的标题
@property (nonatomic,copy) NSString *shareTitle; @property (nonatomic,copy) NSString *shareTitle;
///分享的内容 ///分享的内容

View File

@@ -143,12 +143,6 @@
[TTPopup dismiss]; [TTPopup dismiss];
return; return;
}; };
if([self isInstallClient:[self getSharePlatformType:item.type]] == NO){
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView9")];
[TTPopup dismiss];
return;
}
if (item.type == XPShareItemTagAppFriends) { if (item.type == XPShareItemTagAppFriends) {
[TTPopup dismiss]; [TTPopup dismiss];
XPMineShareViewController * shareVC = [[XPMineShareViewController alloc] init]; XPMineShareViewController * shareVC = [[XPMineShareViewController alloc] init];
@@ -161,10 +155,15 @@
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
[pasteboard setString:urlString]; [pasteboard setString:urlString];
[XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"XPShareView0")]; [XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"XPShareView0")];
[TTPopup dismiss];
return;
}
if([self isInstallClient:[self getSharePlatformType:item.type]] == NO){
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView9")];
[TTPopup dismiss]; [TTPopup dismiss];
return; return;
} }
self.shareInfo.shareType = item.type; self.shareInfo.shareType = item.type;
@@ -177,8 +176,20 @@
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView2")]; [XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView2")];
return; return;
} }
FBtype = PlatformOfLine; NSString*contentKey= [encodedUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
[shareParams SSDKSetupLineParamsByText:encodedUrl image:nil type:SSDKContentTypeAuto]; NSString*contentType =@"text";
NSString*urlString = [NSString stringWithFormat:@"line://msg/%@/%@",contentType, contentKey];
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
}];
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSuccess:)]) {
[self.delegate shareView:self didSuccess:self.shareInfo];
}
// FBtype = PlatformOfLine;
// [shareParams SSDKSetupLineParamsByText:encodedUrl image:nil type:SSDKContentTypeAuto];
} else { } else {
title = YMLocalizedString(@"XPShareView3"); title = YMLocalizedString(@"XPShareView3");
platformType = SSDKPlatformTypeFacebook; platformType = SSDKPlatformTypeFacebook;

View File

@@ -51,4 +51,6 @@ typedef NS_ENUM(NSUInteger, GradientType) {
-(UIImage *)compressWithMaxLength:(NSUInteger)maxLength; -(UIImage *)compressWithMaxLength:(NSUInteger)maxLength;
- (UIImage *)roundedImageWithCornerRadius:(CGFloat)cornerRadius size:(CGSize)size;
@end @end

View File

@@ -423,5 +423,13 @@
return self; return self;
} }
} }
- (UIImage *)roundedImageWithCornerRadius:(CGFloat)cornerRadius size:(CGSize)size{
UIGraphicsBeginImageContextWithOptions(size, NO, 1);
UIBezierPath *clippingPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, size.width, size.height) cornerRadius:cornerRadius];
[clippingPath addClip];
[self drawInRect:CGRectMake(0, 0, size.width, size.height)];
UIImage *roundedImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return roundedImage;
}
@end @end

View File

@@ -103,5 +103,6 @@
- (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor; - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor;
- (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage; - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage;
///为图片增加毛玻璃,value模糊程度
+(UIImage *)setBlurImage:(UIImage *)image value:(CGFloat)value;
@end @end

View File

@@ -273,6 +273,37 @@
return outputImage; return outputImage;
} }
+(UIImage *)setBlurImage:(UIImage *)image value:(CGFloat)value{
CIContext *context = [CIContext contextWithOptions:nil];
CIImage * sourceImage = [CIImage imageWithCGImage:image.CGImage];//CIImage
///仿
CIFilter * clamp = [CIFilter filterWithName:@"CIAffineClamp"];//
[clamp setValue:sourceImage forKey:kCIInputImageKey];//
CIImage *clampResult = [clamp valueForKey:kCIOutputImageKey];
///
CIFilter* gaussianBlur = [CIFilter filterWithName:@"CIGaussianBlur"];
[gaussianBlur setValue:clampResult forKey:kCIInputImageKey];
[gaussianBlur setValue:[NSNumber numberWithFloat:value] forKey:@"inputRadius"];//
CIImage * gaussianBlurResult = [gaussianBlur valueForKey:kCIOutputImageKey];
///
CGImageRef cgImage = [context createCGImage:gaussianBlurResult fromRect:[sourceImage extent]];
UIImage * resultImage = [UIImage imageWithCGImage:cgImage];
return resultImage;
}
@end @end

View File

@@ -50,7 +50,12 @@ NSString * const kFreeGiftCountdownNotification = @"kFreeGiftCountdownNotificati
NSString * const KeyWithType(Pi_KeyType type) { NSString * const KeyWithType(Pi_KeyType type) {
BOOL isRelase = NO; BOOL isRelase = NO;
#ifdef DEBUG #ifdef DEBUG
isRelase = NO; NSString *isProduction = [[NSUserDefaults standardUserDefaults]valueForKey:@"kIsProductionEnvironment"];
if([isProduction isEqualToString:@"YES"]){
isRelase = YES;
}else{
isRelase = NO;
}
#else #else
isRelase = YES; isRelase = YES;
#endif #endif
@@ -60,7 +65,7 @@ NSString * const KeyWithType(Pi_KeyType type) {
NSDictionary * dic = @{ NSDictionary * dic = @{
@(KeyType_PasswordEncode) : @"1ea53d260ecf11e7b56e00163e046a26", @(KeyType_PasswordEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
@(KeyType_NTESQuickLoginBusinessId) : @"09c1214706c34f4798d3f05d86148608", @(KeyType_NTESQuickLoginBusinessId) : @"09c1214706c34f4798d3f05d86148608",
@(KeyType_Agora) : @"7ae1a8dabe7a44a9a67c829faa409e70", @(KeyType_Agora) : @"f8713b6ec98c4c01adaf34cb4fa091b1",
@(KeyType_TRTC) : @"1400741885", @(KeyType_TRTC) : @"1400741885",
@(KeyType_NetEase) : @"1c3b8c6bf8467d8e4c33a004dbec5c94", @(KeyType_NetEase) : @"1c3b8c6bf8467d8e4c33a004dbec5c94",
@(keyType_YiDunBussinessId) : @"yinyouApnsDebug", @(keyType_YiDunBussinessId) : @"yinyouApnsDebug",
@@ -92,7 +97,7 @@ NSString * const KeyWithType(Pi_KeyType type) {
@(KeyType_NTESQuickLoginBusinessId) : @"sCsa0RnuPYtEeE+efSDuHRYEfCObccfLfAK/Sn1LC8X/YifkZfyHNlCts1syZE3R",///60cdaa83aa654e5ea184de7160b4073d @(KeyType_NTESQuickLoginBusinessId) : @"sCsa0RnuPYtEeE+efSDuHRYEfCObccfLfAK/Sn1LC8X/YifkZfyHNlCts1syZE3R",///60cdaa83aa654e5ea184de7160b4073d
@(KeyType_TRTC) : @"Phn3JPi/ZvZ7zVM099Q3dg==",///1400600174 @(KeyType_TRTC) : @"Phn3JPi/ZvZ7zVM099Q3dg==",///1400600174
///h+GaKZVuHTQz0wEHbg8HLaUTL9mCjNDRcRo1OJTESWhiE/lzcnvMEv00/dxu8cOq ///h+GaKZVuHTQz0wEHbg8HLaUTL9mCjNDRcRo1OJTESWhiE/lzcnvMEv00/dxu8cOq
@(KeyType_NetEase) : @"d55LVCUFT72SVZskbk1L3ZCVjG+tRnUnOqAGuG04kb9uz+qIvbyudhJLDmbOFDtE",///14ef7a0d0a84cb49bae1c22d78cf1ddf @(KeyType_NetEase) : @"d55LVCUFT72SVZskbk1L3ZCVjG+tRnUnOqAGuG04kb9uz+qIvbyudhJLDmbOFDtE",///d4d74e9ba6ac3364ccc7526ea4791215
@(keyType_YiDunBussinessId) : @"tl2ZVgj6Mrf9lhoJ9ikxgu8tHJoloM5pxk+hsHIB4pulU6r531Qc7Ol5X8QR5Jy0", @(keyType_YiDunBussinessId) : @"tl2ZVgj6Mrf9lhoJ9ikxgu8tHJoloM5pxk+hsHIB4pulU6r531Qc7Ol5X8QR5Jy0",
@(KeyType_FacePwdEncode) : @"mjaN83evhuwnbE4yEiLQpvH7sALhxCuJ6aPjPlq5amVpHsQtSdbgri3JoHqf/I9+",///1ea53d260ecf11e7b56e00163e046a26 @(KeyType_FacePwdEncode) : @"mjaN83evhuwnbE4yEiLQpvH7sALhxCuJ6aPjPlq5amVpHsQtSdbgri3JoHqf/I9+",///1ea53d260ecf11e7b56e00163e046a26
@(KeyType_GuildUidKey) : @"umyLNHTFzWIPw2FWQcYIeQ==", @(KeyType_GuildUidKey) : @"umyLNHTFzWIPw2FWQcYIeQ==",

View File

@@ -48,16 +48,15 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
///内置版本号
#define PI_App_Version @"2.2.0" #define PI_App_Version @"2.6.3"
#ifdef DEBUG ///渠道
#define API_HOST_URL [NSString stringWithFormat:@"%@%@",@"http://beta.api",@".pekolive.com"] #define PI_App_Source @"appstore"
//#define PI_App_Source @"pi_tf"
#else ///正式环境
#define API_HOST_URL @"https://api.hfighting.com" #define API_HOST_URL @"https://api.hfighting.com"
///测试环境
#endif #define API_HOST_TEST_URL [NSString stringWithFormat:@"%@%@",@"http://beta.api",@".pekolive.com"]
#define API_Image_URL @"https://image.hfighting.com" #define API_Image_URL @"https://image.hfighting.com"

View File

@@ -54,7 +54,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>9</string> <string>2</string>
<key>FacebookAppID</key> <key>FacebookAppID</key>
<string>1266232494209868</string> <string>1266232494209868</string>
<key>FacebookClientToken</key> <key>FacebookClientToken</key>

View File

@@ -47,6 +47,7 @@
[Api getUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { [Api getUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){ if(code == 200){
userInfo = [UserInfoModel modelWithDictionary:data.data]; userInfo = [UserInfoModel modelWithDictionary:data.data];
[AccountInfoStorage instance].name = userInfo.nick;
homeUserModel.nick = userInfo.nick; homeUserModel.nick = userInfo.nick;
homeUserModel.avatar = userInfo.avatar; homeUserModel.avatar = userInfo.avatar;
homeUserModel.isBindPhone = userInfo.isBindPhone; homeUserModel.isBindPhone = userInfo.isBindPhone;
@@ -55,37 +56,19 @@
} uid:accountModel.uid]; } uid:accountModel.uid];
}); });
__block NSString *isFlag = @"";
if(isLoginPhone == YES){
dispatch_group_enter(group);
dispatch_async(queue, ^{
[Api requestAuthorizationCodeInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
isFlag = [data.data boolValue] == YES ? @"1" : @"0" ;
}else{
isFlag = @"2";
}
dispatch_group_leave(group);
}];
});
}
dispatch_group_notify(group, dispatch_get_main_queue(), ^{ dispatch_group_notify(group, dispatch_get_main_queue(), ^{
[XNDJTDDLoadingTool hideOnlyView:VC.view]; [XNDJTDDLoadingTool hideOnlyView:VC.view];
if ([[AccountInfoStorage instance] getTicket].length <= 0 || userInfo == nil || [isFlag isEqualToString:@"2"]) { if ([[AccountInfoStorage instance] getTicket].length <= 0 || userInfo == nil) {
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"LoginPresenter1")]; [XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"LoginPresenter1")];
return; return;
} }
[[AccountInfoStorage instance]saveHomeUserInfo:homeUserModel]; [[AccountInfoStorage instance]saveHomeUserInfo:homeUserModel];
if (userInfo.nick == nil || userInfo.avatar == nil) { if (userInfo.nick == nil || userInfo.avatar == nil) {
if([isFlag isEqualToString:@"0"]){
XPLoginAuthCodeVC *vc = [[XPLoginAuthCodeVC alloc]init];
vc.pi_isPush = YES;
[VC.navigationController pushViewController:vc animated:YES];
}else{
LoginFullInfoViewController * FullVC = [[LoginFullInfoViewController alloc] init]; LoginFullInfoViewController * FullVC = [[LoginFullInfoViewController alloc] init];
[VC.navigationController pushViewController:FullVC animated:YES]; [VC.navigationController pushViewController:FullVC animated:YES];
}
return; return;
} }
[XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"PKIDLoginViewController0")]; [XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"PKIDLoginViewController0")];

View File

@@ -9,17 +9,17 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface LoginAreaModel : NSObject @interface LoginAreaModel : PIBaseModel
@property (nonatomic,copy) NSString *codeId; @property (nonatomic,copy) NSString *codeId;
@property (nonatomic,copy) NSString *name; @property (nonatomic,copy) NSString *name;
@property (nonatomic,copy) NSString *abbr; @property (nonatomic,copy) NSString *abbr;
@property (nonatomic,copy) NSString *phone_area_code; @property (nonatomic,copy) NSString *code;
@property (nonatomic,copy) NSString *pi_phoneAreaCode;
@property (nonatomic,copy) NSString *seq; @property (nonatomic,copy) NSString *seq;
@property (nonatomic,copy) NSString *status; @property (nonatomic,copy) NSString *status;
@property (nonatomic,copy) NSString *region; @property (nonatomic,copy) NSString *region;
@property (nonatomic,copy) NSString *create_time; @property (nonatomic,copy) NSString *create_time;
@property (nonatomic,copy) NSString *update_time; @property (nonatomic,copy) NSString *update_time;
@property (nonatomic,copy) NSString * mcc;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -8,7 +8,5 @@
#import "LoginAreaModel.h" #import "LoginAreaModel.h"
@implementation LoginAreaModel @implementation LoginAreaModel
+ (NSDictionary *)replacedKeyFromPropertyName {
return @{@"pi_phoneAreaCode":@"phoneAreaCode"};
}
@end @end

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ThirdUserInfo : NSObject @interface ThirdUserInfo : PIBaseModel
///用户名 ///用户名
@property (nonatomic,copy) NSString *userName; @property (nonatomic,copy) NSString *userName;
///头像的地址 ///头像的地址

View File

@@ -25,6 +25,8 @@ NS_ASSUME_NONNULL_BEGIN
-(void)thirdLoginByGoogleWithPresentingViewController:(UIViewController *)presentingViewController configuration:(GIDConfiguration *)configuration; -(void)thirdLoginByGoogleWithPresentingViewController:(UIViewController *)presentingViewController configuration:(GIDConfiguration *)configuration;
///第三方登录fb登录 ///第三方登录fb登录
-(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController; -(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController;
///第三方登录line登录
-(void)thirdLoginByLine:(UIViewController *)presentingViewController;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -23,7 +23,7 @@
#import <FBSDKCoreKit/FBSDKCoreKit.h> #import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h> #import <FBSDKLoginKit/FBSDKLoginKit.h>
#import "YuMi-swift.h"
@implementation LoginPresenter @implementation LoginPresenter
- (void)dealloc{ - (void)dealloc{
@@ -159,6 +159,30 @@
} showLoading:YES] openid:openid unionid:unionid access_token:access_token type:[NSString stringWithFormat:@"%lu", (unsigned long)type]]; } showLoading:YES] openid:openid unionid:unionid access_token:access_token type:[NSString stringWithFormat:@"%lu", (unsigned long)type]];
}
-(void)thirdLoginByLine:(UIViewController *)presentingViewController {
PILineLoginManager *line = [PILineLoginManager getSharedInstance];
[XNDJTDDLoadingTool showOnlyView:kWindow];
[line loginLineFromController:presentingViewController completeWithError:^(LineLoginResultStatus loginStatus, NSString * _Nullable token, NSString * _Nullable userId, NSString * _Nullable emali, NSError * _Nullable error) {
if (loginStatus == LineLoginResultStatusSuccess) {
ThirdUserInfo * userInfo = [[ThirdUserInfo alloc] init];
NSString * openid = userId.length > 0 ? userId : @"";
NSString * access_token = token.length > 0 ? token : @"";
NSString * unionid = userId.length > 0 ? userId : @"";
userInfo.openid = openid;
userInfo.access_token = access_token;
userInfo.unionid = unionid;
[AccountInfoStorage instance].thirdUserInfo = userInfo;
[self loginWithThirdPartWithType:ThirdLoginType_Line];
} else if (loginStatus == LineLoginResultStatusCancelled) {
[XNDJTDDLoadingTool hideOnlyView:kWindow];
[[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter0")];
} else if (loginStatus == LineLoginResultStatusError) {
[XNDJTDDLoadingTool hideOnlyView:kWindow];
[[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter1")];
}
}];
} }
-(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController { -(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController {
[FBSDKProfile enableUpdatesOnAccessTokenChange:YES]; [FBSDKProfile enableUpdatesOnAccessTokenChange:YES];

View File

@@ -144,7 +144,8 @@
if (!_codeView){ if (!_codeView){
_codeView = [UILabel new]; _codeView = [UILabel new];
_codeView.userInteractionEnabled = YES; _codeView.userInteractionEnabled = YES;
_codeView.attributedText = [self getChooseCodeText:@"+852"]; NSString *code = [NSString getCountryCode];
_codeView.attributedText = [self getChooseCodeText: code];
} }
return _codeView; return _codeView;

View File

@@ -177,7 +177,8 @@
if (!_countryLabel) { if (!_countryLabel) {
_countryLabel = [[UILabel alloc] init]; _countryLabel = [[UILabel alloc] init];
_countryLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:15]; _countryLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:15];
_countryLabel.text = @"+852"; NSString *code = [NSString getCountryCode];
_countryLabel.text = code;
_countryLabel.textColor = [DJDKMIMOMColor mainTextColor]; _countryLabel.textColor = [DJDKMIMOMColor mainTextColor];
_countryLabel.backgroundColor = [UIColor clearColor]; _countryLabel.backgroundColor = [UIColor clearColor];
_countryLabel.textAlignment = NSTextAlignmentCenter; _countryLabel.textAlignment = NSTextAlignmentCenter;

View File

@@ -47,7 +47,8 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.pi_phoneAreaCode = @"852"; NSString *code = [NSString getCountryCode];
self.pi_phoneAreaCode = [code stringByReplacingOccurrencesOfString:@"+" withString:@""];
[self initSubViews]; [self initSubViews];
[self initSubViewConstraints]; [self initSubViewConstraints];
[self initEvents]; [self initEvents];

View File

@@ -44,7 +44,8 @@
} }
- (void)viewDidLoad { - (void)viewDidLoad {
self.pi_phoneAreaCode = @"852"; NSString *code = [NSString getCountryCode];
self.pi_phoneAreaCode = [code stringByReplacingOccurrencesOfString:@"+" withString:@""];
[super viewDidLoad]; [super viewDidLoad];
[self createUI]; [self createUI];

View File

@@ -14,7 +14,7 @@
#import "Api+Login.h" #import "Api+Login.h"
///Third ///Third
#import <Masonry/Masonry.h> #import <Masonry/Masonry.h>
@interface XPLoginAraeViewController ()<UITableViewDelegate,UITableViewDataSource> @interface XPLoginAraeViewController ()<UITableViewDelegate,UITableViewDataSource,XPLoginAreaTableViewCellDelegate>
@property (nonatomic,strong) UITableView *tableView; @property (nonatomic,strong) UITableView *tableView;
@property (nonatomic,strong) NSMutableArray *listData; @property (nonatomic,strong) NSMutableArray *listData;
@property (nonatomic,strong) NSMutableArray *titleList; @property (nonatomic,strong) NSMutableArray *titleList;
@@ -26,39 +26,49 @@
[super viewDidLoad]; [super viewDidLoad];
[self initSubViews]; [self initSubViews];
[self initSubViewConstraints]; [self initSubViewConstraints];
[Api getPhoneAreaCodeList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { [self getPhoneAreaCodeList];
if (code == 200) {
NSArray *list = [LoginAreaModel modelsWithArray:data.data];
[self.titleList removeAllObjects];
[self.listData removeAllObjects];
[self getLocalPlistWithList:list];
}
}];
} }
#pragma mark - LoginVerifCodeProtocol #pragma mark - LoginVerifCodeProtocol
-(void)getPhoneAreaCodeListSuccess:(NSArray *)list{ -(void)getPhoneAreaCodeList{
[self hideHUD]; //
[self.titleList removeAllObjects]; NSString *path = [[NSBundle mainBundle] pathForResource:@"pi_area_info" ofType:@"json"];
[self.listData removeAllObjects]; //
[self getLocalPlistWithList:list]; NSData *data = [[NSData alloc] initWithContentsOfFile:path];
} // JSON
-(void)getPhoneAreaCodeListFail{ NSDictionary *codeData = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
[self hideHUD]; NSArray *codeList = [LoginAreaModel modelsWithArray:codeData[@"RECORDS"]];
NSBundle *bundle = [NSBundle mainBundle]; [self getLocalPlistWithList:codeList];
NSString *file = [bundle pathForResource:@"district" ofType:@"plist"];
NSArray *dictArray = [NSArray arrayWithContentsOfFile:file];
NSArray *list = [LoginAreaModel modelsWithArray:dictArray];
[self getLocalPlistWithList:list];
} }
-(void)getLocalPlistWithList:(NSArray *)list{ -(void)getLocalPlistWithList:(NSArray *)list{
NSArray * letterList = @[@"A",@"B",@"C",@"D",@"E",@"F",@"G",@"H",@"I",@"J",@"K",@"L",@"M",@"N",@"O",@"P",@"Q",@"R",@"S",@"T",@"U",@"V",@"W",@"X",@"Y",@"Z"]; NSArray * letterList = @[@"",@"A",@"B",@"C",@"D",@"E",@"F",@"G",@"H",@"I",@"J",@"K",@"L",@"M",@"N",@"O",@"P",@"Q",@"R",@"S",@"T",@"U",@"V",@"W",@"X",@"Y",@"Z"];
NSMutableArray *otherList = [NSMutableArray array]; NSMutableArray *otherList = [NSMutableArray array];
NSMutableArray *defaultList = [NSMutableArray array];
LoginAreaModel *TwModel;
LoginAreaModel *HKModel ;
LoginAreaModel *SPModel ;
LoginAreaModel *MYModel ;
LoginAreaModel *ChinsModel ;
[self.titleList addObject:@""];
for (NSString *letter in letterList) { for (NSString *letter in letterList) {
NSMutableArray *modelList = [NSMutableArray array]; NSMutableArray *modelList = [NSMutableArray array];
for (LoginAreaModel *model in list) { for (LoginAreaModel *model in list) {
if([model.code isEqualToString:@"886"]){
TwModel = model;
}
if([model.code isEqualToString:@"852"]){
HKModel = model;
}
if([model.code isEqualToString:@"65"]){
SPModel = model;
}
if([model.code isEqualToString:@"60"]){
MYModel = model;
}
if([model.code isEqualToString:@"86"]){
ChinsModel = model;
}
NSString *fristLetter = [model.name substringWithRange:NSMakeRange(0, 1)]; NSString *fristLetter = [model.name substringWithRange:NSMakeRange(0, 1)];
if([letter isEqualToString:fristLetter]){ if([letter isEqualToString:fristLetter]){
[modelList addObject:model]; [modelList addObject:model];
@@ -74,8 +84,26 @@
[self.listData addObject:modelList]; [self.listData addObject:modelList];
} }
} }
[self.listData addObject:otherList]; if(TwModel != nil){
[self.titleList addObject:@"#"]; [defaultList addObject:TwModel];
}
if(HKModel != nil){
[defaultList addObject:HKModel];
}
if(SPModel != nil){
[defaultList addObject:SPModel];
}
if(MYModel != nil){
[defaultList addObject:MYModel];
}
if(ChinsModel != nil){
[defaultList addObject:ChinsModel];
}
[self.listData insertObject:defaultList atIndex:0];
if(otherList.count > 0){
[self.listData addObject:otherList];
[self.titleList addObject:@"#"];
}
[self.tableView reloadData]; [self.tableView reloadData];
} }
#pragma mark - UITableViewDelegate #pragma mark - UITableViewDelegate
@@ -96,6 +124,9 @@
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
XPLoginAreaTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPLoginAreaTableViewCell class]) forIndexPath:indexPath]; XPLoginAreaTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPLoginAreaTableViewCell class]) forIndexPath:indexPath];
if(cell.delegate == nil){
cell.delegate = self;
}
if(indexPath.section < self.listData.count){ if(indexPath.section < self.listData.count){
NSArray *listModel = self.listData[indexPath.section]; NSArray *listModel = self.listData[indexPath.section];
if(indexPath.row < listModel.count){ if(indexPath.row < listModel.count){
@@ -104,13 +135,15 @@
} }
return cell; return cell;
} }
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
LoginAreaModel *codeModel = self.listData[indexPath.section][indexPath.row];
if(self.delegate && [self.delegate respondsToSelector:@selector(chooseAreaCodeSuccess:)]){
[self.delegate chooseAreaCodeSuccess:codeModel.pi_phoneAreaCode ?: codeModel.phone_area_code]; #pragma mark - XPLoginAreaTableViewCellDelegate
} - (void)didSelectModel:(LoginAreaModel *)model{
[self.navigationController popViewControllerAnimated:YES]; LoginAreaModel *codeModel = model;
if(self.delegate && [self.delegate respondsToSelector:@selector(chooseAreaCodeSuccess:)]){
[self.delegate chooseAreaCodeSuccess:codeModel.code];
}
[self.navigationController popViewControllerAnimated:YES];
} }
#pragma mark - Private Method #pragma mark - Private Method
- (void)initSubViews { - (void)initSubViews {

View File

@@ -6,13 +6,19 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class LoginAreaModel; @class LoginAreaModel;
@interface XPLoginAreaTableViewCell : UITableViewCell @protocol XPLoginAreaTableViewCellDelegate <NSObject>
@property (nonatomic,strong) LoginAreaModel *areaModel; -(void)didSelectModel:(LoginAreaModel *_Nullable)model;
@end @end
NS_ASSUME_NONNULL_BEGIN
@interface XPLoginAreaTableViewCell : UITableViewCell
@property (nonatomic,strong) LoginAreaModel *areaModel;
@property(nonatomic,weak) id<XPLoginAreaTableViewCellDelegate>delegate;
@end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -14,6 +14,7 @@
@interface XPLoginAreaTableViewCell() @interface XPLoginAreaTableViewCell()
@property (nonatomic,strong) UILabel *areaVeiw; @property (nonatomic,strong) UILabel *areaVeiw;
@property (nonatomic,strong) UILabel *codeView; @property (nonatomic,strong) UILabel *codeView;
@property(nonatomic,strong) UIButton *clickBtn;
@end @end
@implementation XPLoginAreaTableViewCell @implementation XPLoginAreaTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
@@ -30,6 +31,7 @@
self.selectionStyle = UITableViewCellSelectionStyleNone; self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.areaVeiw]; [self.contentView addSubview:self.areaVeiw];
[self.contentView addSubview:self.codeView]; [self.contentView addSubview:self.codeView];
[self.contentView addSubview:self.clickBtn];
} }
- (void)initSubViewConstraints { - (void)initSubViewConstraints {
[self.areaVeiw mas_makeConstraints:^(MASConstraintMaker *make) { [self.areaVeiw mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -40,15 +42,21 @@
make.right.mas_equalTo(-kGetScaleWidth(15)); make.right.mas_equalTo(-kGetScaleWidth(15));
make.centerY.equalTo(self.contentView); make.centerY.equalTo(self.contentView);
}]; }];
[self.clickBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.bottom.equalTo(self.contentView);
make.right.mas_equalTo(-kGetScaleWidth(20));
}];
}
-(void)didClickBtnAction{
if(self.delegate && [self.delegate respondsToSelector:@selector(didSelectModel:)]){
[self.delegate didSelectModel:self.areaModel];
}
} }
- (void)setAreaModel:(LoginAreaModel *)areaModel{ - (void)setAreaModel:(LoginAreaModel *)areaModel{
_areaModel = areaModel; _areaModel = areaModel;
_areaVeiw.text = _areaModel.name; _areaVeiw.text = _areaModel.name;
if(_areaModel.pi_phoneAreaCode == nil){ _codeView.text = _areaModel.code;
_codeView.text = _areaModel.phone_area_code;
return;
}
_codeView.text = _areaModel.pi_phoneAreaCode;
} }
#pragma mark - #pragma mark -
@@ -70,5 +78,11 @@
} }
return _codeView; return _codeView;
} }
- (UIButton *)clickBtn{
if(!_clickBtn){
_clickBtn = [UIButton new];
[_clickBtn addTarget:self action:@selector(didClickBtnAction) forControlEvents:UIControlEventTouchUpInside];
}
return _clickBtn;
}
@end @end

View File

@@ -9,6 +9,7 @@
#import "DJDKMIMOMColor.h" #import "DJDKMIMOMColor.h"
#import <Masonry.h> #import <Masonry.h>
#import <ReactiveObjC.h> #import <ReactiveObjC.h>
#import "LoginAreaModel.h"
@interface XPLoginInputView() @interface XPLoginInputView()
@@ -46,12 +47,16 @@
areaImageView.userInteractionEnabled = NO; areaImageView.userInteractionEnabled = NO;
/// ///
NSString *code = [NSString getCountryCode];
UIButton *areaCodeBtn = [UIButton buttonWithType:UIButtonTypeCustom]; UIButton *areaCodeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[areaCodeBtn setTitle:@"+852" forState:UIControlStateNormal]; [areaCodeBtn setTitle:code forState:UIControlStateNormal];
[areaCodeBtn setTitleColor:UIColorFromRGB(0x1F1B4F) forState:UIControlStateNormal]; [areaCodeBtn setTitleColor:UIColorFromRGB(0x1F1B4F) forState:UIControlStateNormal];
areaCodeBtn.titleLabel.font = kFontMedium(16); areaCodeBtn.titleLabel.font = kFontMedium(16);
_areaCodeBtn = areaCodeBtn; _areaCodeBtn = areaCodeBtn;
areaCodeBtn.userInteractionEnabled = NO; areaCodeBtn.userInteractionEnabled = NO;
UIStackView *areaStackView = [[UIStackView alloc] init]; UIStackView *areaStackView = [[UIStackView alloc] init];
areaStackView.axis = UILayoutConstraintAxisHorizontal; areaStackView.axis = UILayoutConstraintAxisHorizontal;

View File

@@ -67,7 +67,8 @@
- (void)viewDidLoad { - (void)viewDidLoad {
self.selectType = 0; self.selectType = 0;
self.pi_phoneAreaCode = @"852"; NSString *code = [NSString getCountryCode];
self.pi_phoneAreaCode = [code stringByReplacingOccurrencesOfString:@"+" withString:@""];
[super viewDidLoad]; [super viewDidLoad];
[self createUI]; [self createUI];
[self racBind]; [self racBind];

View File

@@ -80,7 +80,7 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
[super viewDidLoad]; [super viewDidLoad];
[self createUI]; [self createUI];
[[NSNotificationCenter defaultCenter]postNotificationName:@"kInLoginVC" object:nil];
} }
- (void)viewWillAppear:(BOOL)animated { - (void)viewWillAppear:(BOOL)animated {
@@ -260,6 +260,9 @@ NSString * const HadAgreePrivacy = @"HadAgreePrivacy";
}else if(type == ThirdLoginType_FB){ }else if(type == ThirdLoginType_FB){
[self.presenter thirdLoginByFBWithPresentingViewController:self]; [self.presenter thirdLoginByFBWithPresentingViewController:self];
return; return;
}else if(type == ThirdLoginType_Line){
[self.presenter thirdLoginByLine:self];
return;
} }
[self.presenter thirdLoginWithType:type]; [self.presenter thirdLoginWithType:type];

View File

@@ -54,7 +54,8 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.pi_phoneAreaCode = @"852"; NSString *code = [NSString getCountryCode];
self.pi_phoneAreaCode = [code stringByReplacingOccurrencesOfString:@"+" withString:@""];
[self initSubViews]; [self initSubViews];
[self initSubViewConstraints]; [self initSubViewConstraints];
[self setConfigs]; [self setConfigs];

View File

@@ -12,7 +12,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface Api (Message) @interface Api (Message)
+ (void)getChatLimit:(HttpRequestHelperCompletion)complection receiverUid:(NSString *)receiverUid ; + (void)getChatLimit:(HttpRequestHelperCompletion)complection receiverUid:(NSString *)receiverUid ;
///获取私聊限制接口
+(void)getPrivateChatCheck:(HttpRequestHelperCompletion)complection content:(NSString *)content toUid:(NSString *)toUid;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -13,5 +13,8 @@
NSString * fang = [NSString stringFromBase64String:@"cHJpdmF0ZUNoYXQvbGltaXQ="];///privateChat/limit NSString * fang = [NSString stringFromBase64String:@"cHJpdmF0ZUNoYXQvbGltaXQ="];///privateChat/limit
[self makeRequest:fang method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, receiverUid,nil]; [self makeRequest:fang method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, receiverUid,nil];
} }
///
+(void)getPrivateChatCheck:(HttpRequestHelperCompletion)complection content:(NSString *)content toUid:(NSString *)toUid{
[self makeRequest:@"privateChat/check" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, content,toUid,nil];
}
@end @end

View File

@@ -96,8 +96,7 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
CustomMessageType_Gift_Compound = 93, CustomMessageType_Gift_Compound = 93,
///涂鸦礼物 ///涂鸦礼物
CustomMessageType_Graffiti_Gift = 94, CustomMessageType_Graffiti_Gift = 94,
///星级厨房飘屏
CustomMessageType_Graffiti_Star_Kitchen = 95,
///免费礼物倒计时重置时间 ///免费礼物倒计时重置时间
CustomMessageType_Free_Gift_Star_Reset_Time = 96, CustomMessageType_Free_Gift_Star_Reset_Time = 96,
///精灵密藏 ///精灵密藏
@@ -110,6 +109,12 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) {
CustomMessageType_Common_H5 = 100, CustomMessageType_Common_H5 = 100,
///房间相册 ///房间相册
CustomMessageType_Room_Album = 101, CustomMessageType_Room_Album = 101,
///守护星球
CustomMessageType_Guardian_Planet = 102,
///通用公屏信息
CustomMessageType_General_Public_Screen = 103,
///疯狂动物园飘屏
CustomMessageType_Graffiti_Star_Kitchen = 104,
}; };
@@ -543,12 +548,11 @@ typedef NS_ENUM(NSUInteger, CustomMessageGraffitiGift) {
//first = CustomMessageType_Graffiti_Star_Kitchen //first = CustomMessageType_Graffiti_Star_Kitchen
typedef NS_ENUM(NSUInteger, CustomMessageGraffitiStarKitchen) { typedef NS_ENUM(NSUInteger, CustomMessageGraffitiStarKitchen) {
/// // 星级厨房礼物房间飘屏通知
Custom_Message_Sub_Star_Kitchen_Room = 950,
/// // 星级厨房礼物全服飘屏通知 /// // 星级厨房礼物全服飘屏通知
Custom_Message_Sub_Star_Kitchen_Server = 951, Custom_Message_Sub_Star_Kitchen_Server = 1041,
/// // 星级厨房礼物全服飘屏通知 /// // 星级厨房礼物全服飘屏通知
Custom_Message_Sub_Star_Kitchen_FullScreen = 952, Custom_Message_Sub_Star_Kitchen_FullScreen = 1042,
}; };
///夺宝精灵 CustomMessageType_Treasure_Fairy = 97, ///夺宝精灵 CustomMessageType_Treasure_Fairy = 97,
typedef NS_ENUM(NSInteger, CustomMessageTreasureFairy) { typedef NS_ENUM(NSInteger, CustomMessageTreasureFairy) {
@@ -616,7 +620,21 @@ typedef NS_ENUM(NSUInteger, CustomMessageTypeRoomAlbum) {
///所有房间 ///所有房间
Custom_Message_Sub_Room_Album = 1011, Custom_Message_Sub_Room_Album = 1011,
}; };
@interface AttachmentModel : NSObject<NIMCustomAttachment> //CustomMessageType_Guardian_Planet = 102,
typedef NS_ENUM(NSUInteger, CustomMessageTypeGuardianPlanet) {
///所有房间
Custom_Message_Sub_Guardian_Planet_One_Room = 1021,//单房间
Custom_Message_Sub_Guardian_Planet_All_Room = 1022,///全部房间
};
///通用公屏信息
//CustomMessageType_General_Public_Screen = 10000,
typedef NS_ENUM(NSUInteger, CustomMessageTypeGeneralPublicScreen) {
///所有房间
Custom_Message_Sub_General_Public_Screen_One_Room = 1031,//单房间
Custom_Message_Sub_General_Public_Screen_All_Room = 1032,///全部房间
};
@interface AttachmentModel : PIBaseModel<NIMCustomAttachment>
@property (nonatomic,assign) int first; @property (nonatomic,assign) int first;
@property (nonatomic,assign) int second; @property (nonatomic,assign) int second;
@property (nonatomic, strong) id data; @property (nonatomic, strong) id data;

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ChatLimitModel : NSObject @interface ChatLimitModel : PIBaseModel
@property (nonatomic, assign) BOOL chat; @property (nonatomic, assign) BOOL chat;
@property (nonatomic, copy) NSString * message; @property (nonatomic, copy) NSString * message;

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface XPKickUserModel : NSObject @interface XPKickUserModel : PIBaseModel
///安卓使用的是Uid 所以加了一个这样的属性 ///安卓使用的是Uid 所以加了一个这样的属性
@property (nonatomic, assign) NSInteger uid; @property (nonatomic, assign) NSInteger uid;
///处理de uid ///处理de uid

View File

@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ContentApplicationShareModel : NSObject @interface ContentApplicationShareModel : PIBaseModel
///显示标题 ///显示标题
@property (nonatomic,copy) NSString *title; @property (nonatomic,copy) NSString *title;
///立即进入 ///立即进入

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ContentLevelUpgradeModel : NSObject @interface ContentLevelUpgradeModel : PIBaseModel
@property (nonatomic, copy) NSString *levelName; @property (nonatomic, copy) NSString *levelName;
///升到的等级 ///升到的等级
@property (nonatomic,assign) NSInteger levelSeq; @property (nonatomic,assign) NSInteger levelSeq;

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@class ContentOpenLiveUserInfoModel; @class ContentOpenLiveUserInfoModel;
@interface ContentOpenLiveInfoModel : NSObject @interface ContentOpenLiveInfoModel : PIBaseModel
///用户的uid ///用户的uid
@property (nonatomic,copy) NSString *uid; @property (nonatomic,copy) NSString *uid;
@@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN
@end @end
@interface ContentOpenLiveUserInfoModel : NSObject @interface ContentOpenLiveUserInfoModel : PIBaseModel
///显示名字 ///显示名字
@property (nonatomic,copy) NSString *avatar; @property (nonatomic,copy) NSString *avatar;
///显示昵称 ///显示昵称

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ContentRistAlertModel : NSObject @interface ContentRistAlertModel : PIBaseModel
@property (nonatomic,strong) NSString *content; @property (nonatomic,strong) NSString *content;
@end @end

View File

@@ -42,7 +42,7 @@ typedef NS_ENUM(NSInteger, SecretaryRouterType) {
SecretaryRouterType_Square_Topic = 75, SecretaryRouterType_Square_Topic = 75,
}; };
@interface ContentSecretaryModel : NSObject @interface ContentSecretaryModel : PIBaseModel
///最近回话列表需要显示的内容 推送的内容 ///最近回话列表需要显示的内容 推送的内容
@property (nonatomic,copy) NSString *msg; @property (nonatomic,copy) NSString *msg;
///私聊消息需要显示的内容 ///私聊消息需要显示的内容

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ContentShareMonentsModel : NSObject @interface ContentShareMonentsModel : PIBaseModel
///动态分享 ///动态分享
@property (nonatomic,copy) NSString *dynamicId; @property (nonatomic,copy) NSString *dynamicId;
///话题id ///话题id

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ContentTreasureFairyModel : NSObject @interface ContentTreasureFairyModel : PIBaseModel
///用户uid ///用户uid
@property (nonatomic,copy) NSString *uid; @property (nonatomic,copy) NSString *uid;
///目标用户的uid ///目标用户的uid

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface ContentTweetModel : NSObject @interface ContentTweetModel : PIBaseModel
///跳转的地址 ///跳转的地址
@property (nonatomic,copy) NSString *webUrl; @property (nonatomic,copy) NSString *webUrl;
///标题 ///标题

View File

@@ -18,7 +18,7 @@ typedef NS_ENUM(NSInteger, SessionSettingType) {
SessionSettingType_report SessionSettingType_report
}; };
@interface SessionSettingModel : NSObject @interface SessionSettingModel : PIBaseModel
///显示标题 ///显示标题
@property (nonatomic,copy) NSString *title; @property (nonatomic,copy) NSString *title;
///类型 ///类型

View File

@@ -16,7 +16,7 @@ typedef NS_ENUM(NSInteger, MessageMenuType) {
MessageMenuType_Gift MessageMenuType_Gift
}; };
@interface MessageMenuModel : NSObject @interface MessageMenuModel : PIBaseModel
///图片 ///图片
@property (nonatomic,strong) NSString *imageName; @property (nonatomic,strong) NSString *imageName;
///类型 ///类型

View File

@@ -24,6 +24,7 @@ NS_ASSUME_NONNULL_BEGIN
// 获取用户信息 // 获取用户信息
- (void)getUserInfoWithUid:(NSString *)uid; - (void)getUserInfoWithUid:(NSString *)uid;
@end @end
NS_ASSUME_NONNULL_END NS_ASSUME_NONNULL_END

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@class FindNewGreetModel; @class FindNewGreetModel;
@interface FindNewGreetListModel : NSObject @interface FindNewGreetListModel : PIBaseModel
///开始的 ///开始的
@property (nonatomic,copy) NSString * start; @property (nonatomic,copy) NSString * start;
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
@end @end
@interface FindNewGreetModel : NSObject @interface FindNewGreetModel : PIBaseModel
///id ///id
@property (nonatomic,assign) NSInteger fId; @property (nonatomic,assign) NSInteger fId;
///消息 ///消息

View File

@@ -9,7 +9,7 @@
#import "YUMINNNN.h" #import "YUMINNNN.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface FindNewGreetMessageModel : NSObject @interface FindNewGreetMessageModel : PIBaseModel
///头像 ///头像
@property (nonatomic,copy) NSString *avatar; @property (nonatomic,copy) NSString *avatar;
///用户uid ///用户uid

View File

@@ -9,7 +9,7 @@
#import "YUMINNNN.h" #import "YUMINNNN.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface FindNewUserInfoModel : NSObject @interface FindNewUserInfoModel : PIBaseModel
///生日 ///生日
@property(nonatomic,assign) long birth; @property(nonatomic,assign) long birth;
///头像 ///头像

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface SessionSayHelloCountModel : NSObject @interface SessionSayHelloCountModel : PIBaseModel
///有多少人想和你打招呼 ///有多少人想和你打招呼
@property (nonatomic,assign) NSInteger helloCount; @property (nonatomic,assign) NSInteger helloCount;
///是否可见 ///是否可见

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface SessionSayHelloLevelModel : NSObject @interface SessionSayHelloLevelModel : PIBaseModel
///当前主播评级 ///当前主播评级
@property (nonatomic,copy) NSString *currentLevel; @property (nonatomic,copy) NSString *currentLevel;
///当前倍数 ///当前倍数

View File

@@ -9,7 +9,7 @@
#import "YUMINNNN.h" #import "YUMINNNN.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface SessionSayHelloListModel : NSObject @interface SessionSayHelloListModel : PIBaseModel
///生日 ///生日
@property(nonatomic,assign) long birth; @property(nonatomic,assign) long birth;
///uid ///uid

View File

@@ -71,7 +71,7 @@
CGFloat desHeight = [model.desc boundingRectWithSize:CGSizeMake(240, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin CGFloat desHeight = [model.desc boundingRectWithSize:CGSizeMake(240, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading | NSStringDrawingUsesLineFragmentOrigin
attributes:[self messageTextAttibutes:[UIFont systemFontOfSize:13] color:[DJDKMIMOMColor mainTextColor]] context:nil].size.height; attributes:[self messageTextAttibutes:[UIFont systemFontOfSize:13] color:[DJDKMIMOMColor mainTextColor]] context:nil].size.height + 10;
[self.subTitleLabel mas_updateConstraints:^(MASConstraintMaker *make) { [self.subTitleLabel mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(desHeight); make.height.mas_equalTo(desHeight);
}]; }];

View File

@@ -29,7 +29,7 @@ typedef NS_ENUM(NSInteger, SessionMessageType) {
SessionMessageType_UnSupport SessionMessageType_UnSupport
}; };
@interface MessageBaseModel : NSObject @interface MessageBaseModel : PIBaseModel
///当前的消息类型 ///当前的消息类型
@property (nonatomic,strong) NIMMessage *message; @property (nonatomic,strong) NIMMessage *message;
///大小 ///大小

View File

@@ -77,7 +77,7 @@
///P ///P
#import "MessagePresenter.h" #import "MessagePresenter.h"
#import "MessageProtocol.h" #import "MessageProtocol.h"
#import "Api+Message.h"
@interface SessionViewController ()<MessageProtocol, UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMMediaManagerDelegate, MessageCellDelegate, TZImagePickerControllerDelegate, SessionNavViewDelegate, SessionRiskViewDelegate,QInputBarViewDelegate, QInputBarViewDataSource,InputBoardDataSource ,InputBoardDelegate , QEmotionBoardViewDelegate, QinputPhotoViewDelegate, SessionUserInfoTableViewCellDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate> @interface SessionViewController ()<MessageProtocol, UITableViewDelegate, UITableViewDataSource, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMMediaManagerDelegate, MessageCellDelegate, TZImagePickerControllerDelegate, SessionNavViewDelegate, SessionRiskViewDelegate,QInputBarViewDelegate, QInputBarViewDataSource,InputBoardDataSource ,InputBoardDelegate , QEmotionBoardViewDelegate, QinputPhotoViewDelegate, SessionUserInfoTableViewCellDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate>
@@ -203,7 +203,7 @@
- (void)loadAlbumPhotos { - (void)loadAlbumPhotos {
@kWeakify(self); @kWeakify(self);
[YYUtility checkAssetsLibrayAvailable:^{ [YYUtility checkAssetsLibrayAvailable:^{
@kStrongify(self);
} denied:^{ } denied:^{
@@ -746,31 +746,66 @@
} }
- (void)didFailRetry:(NIMMessage *)message { - (void)didFailRetry:(NIMMessage *)message {
if (message.isReceivedMsg) { [Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil]; if(code == 200){
} else { if (message.isReceivedMsg) {
[[NIMSDK sharedSDK].chatManager resendMessage:message error:nil]; [[NIMSDK sharedSDK].chatManager fetchMessageAttachment:message error:nil];
} } else {
[[NIMSDK sharedSDK].chatManager resendMessage:message error:nil];
}
return;
}
[self showErrorToast:msg];
} content:@"" toUid:self.session.sessionId];
} }
- (void)sendTextMessage:(NSString *)text { - (void)sendTextMessage:(NSString *)text {
NIMMessage *message = [NIMMessageMaker msgWithText:text]; [Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil]; if(code == 200){
NIMMessage *message = [NIMMessageMaker msgWithText:text];
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid // ID
};
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
return;
}
[self showErrorToast:msg];
} content:text toUid:self.session.sessionId];
} }
- (void)audioRecordCompletion:(NSString *)recordPath { - (void)audioRecordCompletion:(NSString *)recordPath {
NIMMessage *message = [NIMMessageMaker msgWithAudio:recordPath]; [Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil]; if(code == 200){
NIMMessage *message = [NIMMessageMaker msgWithAudio:recordPath];
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid // ID
};
[[[NIMSDK sharedSDK] chatManager] sendMessage:message toSession:self.session error:nil];
return;
}
[self showErrorToast:msg];
} content:@"" toUid:self.session.sessionId];
} }
#pragma mark - TZImagePickerControllerDelegate #pragma mark - TZImagePickerControllerDelegate
- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos { - (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto infos:(NSArray<NSDictionary *> *)infos {
[photos enumerateObjectsUsingBlock:^(UIImage * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { [photos enumerateObjectsUsingBlock:^(UIImage * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj) { if (obj) {
// [Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
NIMMessage * message = [NIMMessageMaker msgWithImage:obj]; if(code == 200){
// //
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil]; NIMMessage * message = [NIMMessageMaker msgWithImage:obj];
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid // ID
};
//
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
return;
}
[self showErrorToast:msg];
} content:@"" toUid:self.session.sessionId];
} }
}]; }];
} }
@@ -956,7 +991,9 @@
[TTPopup alertWithConfig:config confirmHandler:^{ [TTPopup alertWithConfig:config confirmHandler:^{
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString]; NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if ([[UIApplication sharedApplication] canOpenURL:url]) { if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url]; [[UIApplication sharedApplication] openURL:url options:@{} completionHandler:^(BOOL success) {
}];
} }
} cancelHandler:^{ } cancelHandler:^{
}]; }];
@@ -1024,11 +1061,20 @@
if (image == nil){ if (image == nil){
continue; continue;
} }
//
NIMMessage * message = [NIMMessageMaker msgWithImage:image]; NIMMessage * message = [NIMMessageMaker msgWithImage:image];
// [Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil]; if(code == 200){
[view resetChoosePhotos]; message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid // ID
};
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
[view resetChoosePhotos];
return;
}
[self showErrorToast:msg];
} content:@"" toUid:self.session.sessionId];
} }
} }
@@ -1051,10 +1097,19 @@
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) { if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
UIImageWriteToSavedPhotosAlbum(selectedPhoto, nil, nil, nil); UIImageWriteToSavedPhotosAlbum(selectedPhoto, nil, nil, nil);
} }
// [Api getPrivateChatCheck:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto]; if(code == 200){
// //
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil]; NIMMessage * message = [NIMMessageMaker msgWithImage:selectedPhoto];
message.apnsPayload = @{@"uid": [AccountInfoStorage instance].getUid // ID
};
//
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:self.session error:nil];
return;
}
[self showErrorToast:msg];
} content:@"" toUid:self.session.sessionId];
} }
[picker dismissViewControllerAnimated:YES completion:^{}]; [picker dismissViewControllerAnimated:YES completion:^{}];
} }

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface XPSessionListFansPartyModel : NSObject @interface XPSessionListFansPartyModel : PIBaseModel
@property (nonatomic, copy) NSString *avatar; @property (nonatomic, copy) NSString *avatar;
@property (nonatomic, copy) NSString *uid; @property (nonatomic, copy) NSString *uid;

View File

@@ -16,7 +16,7 @@ typedef NS_ENUM(NSUInteger, XPSessionListHeadItemType) {
XPSessionListHeadItemType_MemgXin,//发现萌新 XPSessionListHeadItemType_MemgXin,//发现萌新
}; };
@interface XPSessionListHeadItem : NSObject @interface XPSessionListHeadItem : PIBaseModel
@property (nonatomic, copy) NSString *title; @property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *imageName; @property (nonatomic, copy) NSString *imageName;

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface XPMineAnchorFansTeamModel : NSObject @interface XPMineAnchorFansTeamModel : PIBaseModel
///头像 ///头像
@property (nonatomic, copy) NSString *anchorAvatar; @property (nonatomic, copy) NSString *anchorAvatar;

View File

@@ -10,7 +10,7 @@
#import "YUMINNNN.h" #import "YUMINNNN.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface XPMineExchangeAuthorityModel : NSObject @interface XPMineExchangeAuthorityModel : PIBaseModel
///用户id ///用户id
@property (nonatomic,copy) NSString *uid; @property (nonatomic,copy) NSString *uid;
///头像 ///头像

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface XPMineFootPrintModel : NSObject @interface XPMineFootPrintModel : PIBaseModel
@property (nonatomic, copy) NSString *roomUid;//房间uid @property (nonatomic, copy) NSString *roomUid;//房间uid
@property (nonatomic, copy) NSString *roomId;//房间id @property (nonatomic, copy) NSString *roomId;//房间id

View File

@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface FansInfoModel : NSObject @interface FansInfoModel : PIBaseModel
///生日 ///生日
@property(nonatomic,assign) long birth; @property(nonatomic,assign) long birth;
///头像 ///头像

View File

@@ -9,7 +9,7 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface RechargeListModel : NSObject @interface RechargeListModel : PIBaseModel
///充值的id ///充值的id
@property(nonatomic, strong) NSString *chargeProdId; @property(nonatomic, strong) NSString *chargeProdId;
@property(nonatomic, strong) NSString *prodName; @property(nonatomic, strong) NSString *prodName;

Some files were not shown because too many files have changed in this diff Show More