Compare commits

...

78 Commits

Author SHA1 Message Date
liyuhua
1498c4b91c 更换图片logo 2024-03-25 23:51:31 +08:00
liyuhua
c1da0893de 小游戏优化 2024-03-25 23:51:31 +08:00
liyuhua
f9eb216bd3 修复bug 2024-03-25 23:51:31 +08:00
liyuhua
84af03be39 更改logo 2024-03-25 23:51:31 +08:00
liyuhua
8d27e307e9 商店包版本修改 此commit置顶 2.6.5 2024-03-25 23:51:02 +08:00
liyuhua
c90c726b53 商店包版本修改 此commit置顶 2.6.5 2024-03-25 23:18:36 +08:00
liyuhua
6d450443d0 通用飘屏更换协议 2024-03-25 14:54:27 +08:00
liyuhua
17346ffedf 超级礼物 2024-03-25 14:39:36 +08:00
liyuhua
6f75c535c1 商店包版本修改 此commit置顶 2.6.4 2024-03-20 20:42:53 +08:00
liyuhua
9688b04a25 邀请码及通用飘屏 2024-03-20 19:55:26 +08:00
liyuhua
d9d9976046 邀请码bug修复 2024-03-19 14:48:45 +08:00
liyuhua
de67e0b3f9 邀请保存图片 2024-03-14 17:00:45 +08:00
liyuhua
5554197b7c 邀请保存图片 2024-03-14 16:52:41 +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
liyuhua
edcac4f7fe 2.2.0版本发版 此commit置顶 2023-11-01 20:42:36 +08:00
liyuhua
994cdffa71 2.2.0版本发版 此commit置顶 2023-11-01 20:41:20 +08:00
liyuhua
44ff9e9813 2.2.0版本发版 此commit置顶 2023-11-01 20:38:26 +08:00
570 changed files with 13483 additions and 4640 deletions

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

@@ -10,6 +10,8 @@
#import <NIMSDK/NIMSDK.h>
#import <ShareSDK/ShareSDK.h>
#import <UserNotifications/UNUserNotificationCenter.h>
#import <UserNotifications/UserNotifications.h>
#import <MOBFoundation/MobSDK+Privacy.h>
///Tool
#import "YUMIConstant.h"
#import "CustomAttachmentDecoder.h"
@@ -23,13 +25,19 @@
#import "XCCurrentVCStackManager.h"
#import "ClientConfig.h"
#import <Adjust/Adjust.h>
#import <UserNotifications/UserNotifications.h>
#import <Bugly/Bugly.h>
#import "YuMi-swift.h"
UIKIT_EXTERN NSString * kYouMiNumberCountKey;
UIKIT_EXTERN NSString * adImageName;
@implementation AppDelegate (ThirdConfig)
@@ -40,6 +48,24 @@ UIKIT_EXTERN NSString * adImageName;
[self initEmojiData];
[self configAdjust];
[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
@@ -69,7 +95,15 @@ UIKIT_EXTERN NSString * adImageName;
// NIMSDK
NSString *appKey = KeyWithType(KeyType_NetEase);
NIMSDKOption *option = [NIMSDKOption optionWithAppKey:appKey];
#ifdef DEBUG
option.apnsCername = @"pikoDevelopPush";
#else
option.apnsCername = @"newPiko";
#endif
[[NIMSDK sharedSDK] registerWithOption:option];
// NIM SDK
@@ -104,13 +138,21 @@ UIKIT_EXTERN NSString * adImageName;
}
- (void)configShareSDK {
[PILineLoginManager registerLine];
[ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) {
///faceBook
// [platformsRegister setupFacebookWithAppkey:@"1266232494209868" appSecret:@"c9b170b383f8be9cdf118823b8632821" displayName:YMLocalizedString(@"AppDelegate_ThirdConfig0")];
[platformsRegister setupLineAuthType:SSDKAuthorizeTypeBoth];
}];
NSString *isUpload = [[NSUserDefaults standardUserDefaults]valueForKey:@"kMobLinkUploadPrivacy"];
if (isUpload == nil){
[MobSDK uploadPrivacyPermissionStatus:YES onResult:^(BOOL success) {
}];
[[NSUserDefaults standardUserDefaults] setValue:@"YES" forKey:@"kMobLinkUploadPrivacy"];
[[NSUserDefaults standardUserDefaults] synchronize];
}
}
#pragma mark -

View File

@@ -5,6 +5,8 @@
// Created by admin on 2023/3/9.
//
#import <MobLinkPro/MobLink.h>
#import <MobLinkPro/MLSDKScene.h>
#import "AppDelegate.h"
#import "TabbarViewController.h"
#import "BaseNavigationController.h"
@@ -19,10 +21,13 @@
#import <GoogleSignIn/GoogleSignIn.h>
#import "XPLoginViewController.h"
#import "AccountModel.h"
#import "YuMi-swift.h"
#import "SessionViewController.h"
#import "LoginFullInfoViewController.h"
@import Firebase;
UIKIT_EXTERN NSString * const kOpenRoomNotification;
@interface AppDelegate ()
@interface AppDelegate ()<IMLSDKRestoreDelegate>
@end
@@ -57,12 +62,23 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
}
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
[FIRApp configure];
[MobLink setDelegate:self];
return YES;
}
- (void) IMLSDKWillRestoreScene:(MLSDKScene *)scene Restore:(void (^)(BOOL, RestoreStyle))restoreHandler
{
NSString *inviteCode = scene.params[@"inviteCode"];
if (inviteCode != nil && [[AccountInfoStorage instance]getUid].length == 0){
ClientConfig *config = [ClientConfig shareConfig];
config.inviteCode = inviteCode;
}
restoreHandler(YES, MLDefault);
}
@@ -104,10 +120,42 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
[[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
-(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];
if(text.length){
@@ -133,6 +181,12 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
[[NSNotificationCenter defaultCenter]postNotificationName:kOpenRoomNotification object:nil userInfo:@{@"type":@"kOpenChat",@"uid":uid}];
ClientConfig *config = [ClientConfig shareConfig];
config.chatId = uid;
}else if (type == 8){
NSString *inviteCode = paramsDict[@"inviteCode"];
if (inviteCode != nil && [[AccountInfoStorage instance]getUid].length == 0){
ClientConfig *config = [ClientConfig shareConfig];
config.inviteCode = inviteCode;
}
}
return YES;
}

View File

@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "room_gift_banner_high_bg@2x.png",
"filename" : "mine_give_diamond_search@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_gift_banner_high_bg@3x.png",
"filename" : "mine_give_diamond_search@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "room_gift_banner_middle_bg@2x.png",
"filename" : "room_gift_super_gift_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_gift_banner_middle_bg@3x.png",
"filename" : "room_gift_super_gift_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "room_gift_banner_low_bg@2x.png",
"filename" : "pi_webView_code_bottom@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_gift_banner_low_bg@3x.png",
"filename" : "pi_webView_code_bottom@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "room_menu_send_bg@2x.png",
"filename" : "share_save_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_menu_send_bg@3x.png",
"filename" : "share_save_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "room_across_pk_assist.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.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: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 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"
NS_ASSUME_NONNULL_BEGIN
@interface ClientConfig : NSObject
@interface ClientConfig : PIBaseModel
+ (instancetype)shareConfig;
///初始化
- (void)clientInit;
@@ -29,6 +29,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *__nullable roomId;
///用户id用于外部h5跳转到聊天页面
@property (nonatomic, copy) NSString *__nullable chatId;
///用户id推送跳转到聊天页面
@property (nonatomic, copy) NSString *__nullable pushChatId;
///邀请码,从外面进来会进入注册页面,并自动填写这个邀请码
@property(nonatomic,copy) NSString *inviteCode;
///表情---
@property (nonatomic, copy) NSString *version;
@property (nonatomic, copy) NSString *zipMd5;

View File

@@ -37,12 +37,35 @@
}
- (void)clientInit {
#ifdef DEBUG
self.canOpen = YES;
#else
if(isEnterprise == YES){
self.canOpen = NO;
}else{
self.canOpen = YES;
}
#endif
[Api clientInitConfig:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if (code == 200) {
self.retryCount = 0;
NSDictionary * initData = data.data;
#ifdef DEBUG
self.canOpen = ![initData[@"aModel"] boolValue];
#else
if(isEnterprise == YES){
self.canOpen = ![initData[@"aModel"] boolValue];
}else{
self.canOpen = YES;
}
#endif
self.iosPhoneBind = [initData[@"iosPhoneBind"] boolValue];
//
self.openCandyTree = [initData[@"openBoxSwitch"] boolValue];

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -76,10 +76,10 @@
self.numberLabel.hidden = !imageInfo.isSelect;
self.chooseButton.selected = imageInfo.isSelect;
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.imageInfo.originImage = photo;
UIImage * image = [photo compressWithMaxLength:1024 * 10];
UIImage * image = [photo compressWithMaxLength:1024 * 30];
self.imageInfo.compressImage = image;
} progressHandler:nil networkAccessAllowed:NO];
} else {

View File

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

View File

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

View File

@@ -26,9 +26,13 @@ typedef enum : NSUInteger {
XPShareItemTagCopyLink,
///应用好友
XPShareItemTagAppFriends,
///保存到相册
XPShareItemTagAppSaveAlbum,
} XPShareItemTag;
@interface XPShareItem : NSObject
@property(nonatomic,assign) BOOL isShareInvite;
@property (nonatomic, copy) NSString *inviteTitle;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *imageName;
@property (nonatomic, copy) NSString *disableImageName;

View File

@@ -12,6 +12,8 @@
@class XPShareView;
@protocol XCShareViewDelegate <NSObject>
///点击保存图片到相册
- (void)shareView:(XPShareView *)shareView savePhoto:(XPShareInfoModel *)shareInfo;
///点了取消分享
- (void)shareViewDidClickCancel:(XPShareView *)shareView;
///分享成功

View File

@@ -143,10 +143,11 @@
[TTPopup dismiss];
return;
};
if([self isInstallClient:[self getSharePlatformType:item.type]] == NO){
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView9")];
if (item.type == XPShareItemTagAppSaveAlbum){
[TTPopup dismiss];
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:savePhoto:)]){
[self.delegate shareView:self savePhoto:self.shareInfo];
}
return;
}
if (item.type == XPShareItemTagAppFriends) {
@@ -161,10 +162,15 @@
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
[pasteboard setString:urlString];
[XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"XPShareView0")];
[TTPopup dismiss];
return;
}
if([self isInstallClient:[self getSharePlatformType:item.type]] == NO){
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView9")];
[TTPopup dismiss];
return;
}
self.shareInfo.shareType = item.type;
@@ -177,21 +183,25 @@
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView2")];
return;
}
FBtype = PlatformOfLine;
[shareParams SSDKSetupLineParamsByText:encodedUrl image:nil type:SSDKContentTypeAuto];
} else {
title = YMLocalizedString(@"XPShareView3");
platformType = SSDKPlatformTypeFacebook;
FBtype = PlatformOfFB;
content = YMLocalizedString(@"XPShareView4");
[shareParams SSDKSetupFacebookParamsByText:title image:@"https://pic.lecheng163.com/ananLogo256.png" url:[NSURL URLWithString:urlString] urlTitle:@"title" urlName:@"name" attachementUrl:nil hashtag:@"#Piko" quote:@"Piko" shareType:SSDKFacebookShareTypeNative type:SSDKContentTypeWebPage];
NSString*contentKey= [encodedUrl stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet characterSetWithCharactersInString:@"`#%^{}\"[]|\\<> "].invertedSet];
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];
}
return;
}
if(item.type == XPShareItemTagFaceBook){
FBSDKShareLinkContent*linkContent = [[FBSDKShareLinkContent alloc]init];
urlString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
linkContent.contentURL= [NSURL URLWithString:urlString];
linkContent.quote = content;
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc]initWithViewController:[XCCurrentVCStackManager shareManager].getCurrentVC content:linkContent delegate:self];
// web
shareDialog.mode = FBSDKShareDialogModeNative;

View File

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

View File

@@ -423,5 +423,32 @@
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;
}
+(UIImage *)getImageFromView:(UIView *)view {
// 1. viewbounds
UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, 0.0);
// 2.
CGContextRef context = UIGraphicsGetCurrentContext();
// 3. view
[view.layer renderInContext:context];
// 4.
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
// 5.
UIGraphicsEndImageContext();
// 6.
return image;
}
@end

View File

@@ -11,7 +11,8 @@
NS_ASSUME_NONNULL_BEGIN
typedef void(^LoadCompletion)(UIImage *image, NSURL * url);
typedef void(^LoadCompletion)(UIImage *_Nullable image, NSURL * url);
typedef void(^LoadFail)(NSError *error);
typedef NS_ENUM(NSInteger, NetImageState){
NetImageStateUnload = 1,
@@ -30,7 +31,7 @@ typedef NS_ENUM(NSInteger, NetImageState){
- (void)loadImage:(LoadCompletion _Nullable)completion;
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion _Nullable)completion;
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion fail:(LoadFail)fail;
@end
NS_ASSUME_NONNULL_END

View File

@@ -72,12 +72,30 @@
}
}];
}
- (void)loadImage:(LoadCompletion)completion fail:(LoadFail)fail{
self.state = NetImageStateLoading;
[self sd_setImageWithURL:[NSURL URLWithString:_innerConfigedUrl] placeholderImage:self.config.placeHolder options:SDWebImageRetryFailed completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
if (error) {
self.state = NetImageStateUnload;
if (fail){
fail(error);
}
} else {
self.state = NetImageStateLoaded;
if (completion) {
completion(image, imageURL);
};
}
}];
}
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion {
[self initImageUrl:imageUrl];
[self loadImage:completion];
}
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion fail:(LoadFail)fail{
[self initImageUrl:imageUrl];
[self loadImage:completion fail:fail];
}
- (NetImageConfig *)config {
if (!_config) {
_config = [[NetImageConfig alloc] init];

View File

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

View File

@@ -273,6 +273,37 @@
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

View File

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

View File

@@ -48,16 +48,15 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
#define PI_App_Version @"2.2.0"
#ifdef DEBUG
#define API_HOST_URL [NSString stringWithFormat:@"%@%@",@"http://beta.api",@".pekolive.com"]
#else
///内置版本号
#define PI_App_Version @"2.6.5"
///渠道
#define PI_App_Source @"appstore"
//#define PI_App_Source @"pi_tf"
///正式环境
#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"

View File

@@ -49,12 +49,12 @@
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>pikoApp</string>
<string>pikoapp</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>9</string>
<string>2</string>
<key>FacebookAppID</key>
<string>1266232494209868</string>
<key>FacebookClientToken</key>
@@ -96,10 +96,10 @@
</dict>
<key>NSCameraUsageDescription</key>
<string>“Piko”需要您的同意,才可以访问进行拍照并上传您的图片,然后展示在您的个人主页上,便于他人查看</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>“Piko”需要您的同意,才可以进行定位服务,推荐附近好友</string>
<key>NSLocalNetworkUsageDescription</key>
<string>此App将可发现和连接到您所用网络上的设备。</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>“Piko”需要您的同意,才可以进行定位服务,推荐附近好友</string>
<key>NSMicrophoneUsageDescription</key>
<string>“Piko”需要您的同意,才可以进行语音聊天</string>
<key>NSPhotoLibraryAddUsageDescription</key>

View File

@@ -47,6 +47,7 @@
[Api getUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
userInfo = [UserInfoModel modelWithDictionary:data.data];
[AccountInfoStorage instance].name = userInfo.nick;
homeUserModel.nick = userInfo.nick;
homeUserModel.avatar = userInfo.avatar;
homeUserModel.isBindPhone = userInfo.isBindPhone;
@@ -55,37 +56,19 @@
} 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(), ^{
[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")];
return;
}
[[AccountInfoStorage instance]saveHomeUserInfo:homeUserModel];
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];
[VC.navigationController pushViewController:FullVC animated:YES];
}
return;
}
[XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"PKIDLoginViewController0")];

View File

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

View File

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

View File

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

View File

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

View File

@@ -23,7 +23,7 @@
#import <FBSDKCoreKit/FBSDKCoreKit.h>
#import <FBSDKLoginKit/FBSDKLoginKit.h>
#import "YuMi-swift.h"
@implementation LoginPresenter
- (void)dealloc{
@@ -159,6 +159,30 @@
} 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 {
[FBSDKProfile enableUpdatesOnAccessTokenChange:YES];

View File

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

View File

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

View File

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

View File

@@ -10,7 +10,7 @@
NS_ASSUME_NONNULL_BEGIN
@interface LoginFullInfoViewController : MvpViewController
@property(nonatomic,copy) NSString *inviteCode;
@end
NS_ASSUME_NONNULL_END

View File

@@ -24,7 +24,7 @@
#import "LoginFullInfoPresenter.h"
#import "LoginFullInfoProtocol.h"
#import "PILoginManager.h"
#import "ClientConfig.h"
@interface LoginFullInfoViewController ()<LoginFullInfoProtocol>
@@ -81,6 +81,11 @@
[self initSubViews];
[self initSubViewConstraints];
[self initEvents];
ClientConfig *config = [ClientConfig shareConfig];
if (config.inviteCode.length > 0){
self.inviteCode = config.inviteCode;
config.inviteCode = @"";
}
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
@@ -226,7 +231,10 @@
}];
}
- (void)setInviteCode:(NSString *)inviteCode{
_inviteCode = inviteCode;
self.codeTextField.text = _inviteCode;
}
///
- (void)updateUserInfo {
[XNDJTDDLoadingTool showOnlyView:self.view];

View File

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

View File

@@ -14,7 +14,7 @@
#import "Api+Login.h"
///Third
#import <Masonry/Masonry.h>
@interface XPLoginAraeViewController ()<UITableViewDelegate,UITableViewDataSource>
@interface XPLoginAraeViewController ()<UITableViewDelegate,UITableViewDataSource,XPLoginAreaTableViewCellDelegate>
@property (nonatomic,strong) UITableView *tableView;
@property (nonatomic,strong) NSMutableArray *listData;
@property (nonatomic,strong) NSMutableArray *titleList;
@@ -26,39 +26,49 @@
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
[Api getPhoneAreaCodeList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if (code == 200) {
NSArray *list = [LoginAreaModel modelsWithArray:data.data];
[self.titleList removeAllObjects];
[self.listData removeAllObjects];
[self getLocalPlistWithList:list];
}
}];
[self getPhoneAreaCodeList];
}
#pragma mark - LoginVerifCodeProtocol
-(void)getPhoneAreaCodeListSuccess:(NSArray *)list{
[self hideHUD];
[self.titleList removeAllObjects];
[self.listData removeAllObjects];
[self getLocalPlistWithList:list];
}
-(void)getPhoneAreaCodeListFail{
[self hideHUD];
NSBundle *bundle = [NSBundle mainBundle];
NSString *file = [bundle pathForResource:@"district" ofType:@"plist"];
NSArray *dictArray = [NSArray arrayWithContentsOfFile:file];
NSArray *list = [LoginAreaModel modelsWithArray:dictArray];
[self getLocalPlistWithList:list];
-(void)getPhoneAreaCodeList{
//
NSString *path = [[NSBundle mainBundle] pathForResource:@"pi_area_info" ofType:@"json"];
//
NSData *data = [[NSData alloc] initWithContentsOfFile:path];
// JSON
NSDictionary *codeData = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
NSArray *codeList = [LoginAreaModel modelsWithArray:codeData[@"RECORDS"]];
[self getLocalPlistWithList:codeList];
}
-(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 *defaultList = [NSMutableArray array];
LoginAreaModel *TwModel;
LoginAreaModel *HKModel ;
LoginAreaModel *SPModel ;
LoginAreaModel *MYModel ;
LoginAreaModel *ChinsModel ;
[self.titleList addObject:@""];
for (NSString *letter in letterList) {
NSMutableArray *modelList = [NSMutableArray array];
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)];
if([letter isEqualToString:fristLetter]){
[modelList addObject:model];
@@ -74,8 +84,26 @@
[self.listData addObject:modelList];
}
}
if(TwModel != nil){
[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];
}
#pragma mark - UITableViewDelegate
@@ -96,6 +124,9 @@
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
XPLoginAreaTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPLoginAreaTableViewCell class]) forIndexPath:indexPath];
if(cell.delegate == nil){
cell.delegate = self;
}
if(indexPath.section < self.listData.count){
NSArray *listModel = self.listData[indexPath.section];
if(indexPath.row < listModel.count){
@@ -104,11 +135,13 @@
}
return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
LoginAreaModel *codeModel = self.listData[indexPath.section][indexPath.row];
#pragma mark - XPLoginAreaTableViewCellDelegate
- (void)didSelectModel:(LoginAreaModel *)model{
LoginAreaModel *codeModel = model;
if(self.delegate && [self.delegate respondsToSelector:@selector(chooseAreaCodeSuccess:)]){
[self.delegate chooseAreaCodeSuccess:codeModel.pi_phoneAreaCode ?: codeModel.phone_area_code];
[self.delegate chooseAreaCodeSuccess:codeModel.code];
}
[self.navigationController popViewControllerAnimated:YES];
}

View File

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

View File

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

View File

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

View File

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

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