Compare commits
75 Commits
enterprise
...
appstore_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1498c4b91c | ||
![]() |
c1da0893de | ||
![]() |
f9eb216bd3 | ||
![]() |
84af03be39 | ||
![]() |
8d27e307e9 | ||
![]() |
c90c726b53 | ||
![]() |
6d450443d0 | ||
![]() |
17346ffedf | ||
![]() |
6f75c535c1 | ||
![]() |
9688b04a25 | ||
![]() |
d9d9976046 | ||
![]() |
de67e0b3f9 | ||
![]() |
5554197b7c | ||
![]() |
09ba817622 | ||
![]() |
4dd0447c6f | ||
![]() |
905e3ed441 | ||
![]() |
d00366238e | ||
![]() |
d0f4ad4e12 | ||
![]() |
49fcca821b | ||
![]() |
7ae5cc9a4c | ||
![]() |
12a1dd9284 | ||
![]() |
2f2456fa18 | ||
![]() |
a189cdfaa8 | ||
![]() |
5f0d52451c | ||
![]() |
06b39c2671 | ||
![]() |
32c6c8c7d2 | ||
![]() |
6cbf6c55ca | ||
![]() |
8e1ca7fa99 | ||
![]() |
fe423a27a5 | ||
![]() |
29c188788d | ||
![]() |
9f12705a8b | ||
![]() |
1455e352b7 | ||
![]() |
628b4f0c9f | ||
![]() |
a75f291364 | ||
![]() |
470ecd99e7 | ||
![]() |
c670d7be6d | ||
![]() |
10a1e6e09e | ||
![]() |
5c057821a7 | ||
![]() |
6007611a3b | ||
![]() |
3a576925a2 | ||
![]() |
1bd2382d6a | ||
![]() |
509c47cc2a | ||
![]() |
0f47ed8ed7 | ||
![]() |
972f6d61ea | ||
![]() |
5e2c5080c5 | ||
![]() |
ce308df1b6 | ||
![]() |
6a3201135b | ||
![]() |
6e8ead27dd | ||
![]() |
a8bef5946e | ||
![]() |
3afa60587a | ||
![]() |
52e7d4ff7e | ||
![]() |
566d8a3672 | ||
![]() |
8dffff8492 | ||
![]() |
398b4e5e81 | ||
![]() |
a19adac48e | ||
![]() |
f9321a6586 | ||
![]() |
411528467c | ||
![]() |
24d55bc807 | ||
![]() |
39b64f59b3 | ||
![]() |
cbd7b5cdbc | ||
![]() |
d7f04e400a | ||
![]() |
90eab408d0 | ||
![]() |
56103bb220 | ||
![]() |
cee26a4c25 | ||
![]() |
0f3dedd701 | ||
![]() |
6e69623fe1 | ||
![]() |
0161a860af | ||
![]() |
92844a9619 | ||
![]() |
4285c2b6c7 | ||
![]() |
95a8cfc86d | ||
![]() |
47eab96f43 | ||
![]() |
723e946141 | ||
![]() |
79015ca5ce | ||
![]() |
960a708916 | ||
![]() |
138f7ed2d9 |
5
Podfile
@@ -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'
|
||||||
#上传音乐
|
#上传音乐
|
||||||
@@ -64,7 +65,7 @@ target 'YuMi' do
|
|||||||
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'
|
||||||
|
@@ -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"
|
||||||
|
@@ -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>
|
||||||
|
#import <MOBFoundation/MobSDK+Privacy.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初始化
|
||||||
@@ -104,13 +138,21 @@ UIKIT_EXTERN NSString * adImageName;
|
|||||||
}
|
}
|
||||||
- (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")];
|
||||||
[platformsRegister setupLineAuthType:SSDKAuthorizeTypeBoth];
|
[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 - 表情
|
#pragma mark - 表情
|
||||||
|
@@ -5,6 +5,8 @@
|
|||||||
// Created by admin on 2023/3/9.
|
// Created by admin on 2023/3/9.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#import <MobLinkPro/MobLink.h>
|
||||||
|
#import <MobLinkPro/MLSDKScene.h>
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
#import "TabbarViewController.h"
|
#import "TabbarViewController.h"
|
||||||
#import "BaseNavigationController.h"
|
#import "BaseNavigationController.h"
|
||||||
@@ -19,10 +21,13 @@
|
|||||||
#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 "LoginFullInfoViewController.h"
|
||||||
@import Firebase;
|
@import Firebase;
|
||||||
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
||||||
|
|
||||||
@interface AppDelegate ()
|
@interface AppDelegate ()<IMLSDKRestoreDelegate>
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@@ -57,12 +62,23 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
|||||||
}
|
}
|
||||||
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
|
||||||
[FIRApp configure];
|
[FIRApp configure];
|
||||||
|
[MobLink setDelegate:self];
|
||||||
|
|
||||||
|
|
||||||
return YES;
|
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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -101,13 +117,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){
|
||||||
@@ -133,6 +181,12 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification;
|
|||||||
[[NSNotificationCenter defaultCenter]postNotificationName:kOpenRoomNotification object:nil userInfo:@{@"type":@"kOpenChat",@"uid":uid}];
|
[[NSNotificationCenter defaultCenter]postNotificationName:kOpenRoomNotification object:nil userInfo:@{@"type":@"kOpenChat",@"uid":uid}];
|
||||||
ClientConfig *config = [ClientConfig shareConfig];
|
ClientConfig *config = [ClientConfig shareConfig];
|
||||||
config.chatId = uid;
|
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;
|
return YES;
|
||||||
}
|
}
|
||||||
|
@@ -5,12 +5,12 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_gift_banner_high_bg@2x.png",
|
"filename" : "mine_give_diamond_search@2x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_gift_banner_high_bg@3x.png",
|
"filename" : "mine_give_diamond_search@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
BIN
YuMi/Assets.xcassets/jm/Guild/mine_give_diamond_search.imageset/mine_give_diamond_search@2x.png
vendored
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
YuMi/Assets.xcassets/jm/Guild/mine_give_diamond_search.imageset/mine_give_diamond_search@3x.png
vendored
Normal file
After Width: | Height: | Size: 23 KiB |
@@ -5,12 +5,12 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_gift_banner_middle_bg@2x.png",
|
"filename" : "room_gift_super_gift_icon@2x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_gift_banner_middle_bg@3x.png",
|
"filename" : "room_gift_super_gift_icon@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
BIN
YuMi/Assets.xcassets/middle/room_gift_super_gift_icon.imageset/room_gift_super_gift_icon@2x.png
vendored
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
YuMi/Assets.xcassets/middle/room_gift_super_gift_icon.imageset/room_gift_super_gift_icon@3x.png
vendored
Normal file
After Width: | Height: | Size: 6.8 KiB |
6
YuMi/Assets.xcassets/webView/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
@@ -5,12 +5,12 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_gift_banner_low_bg@2x.png",
|
"filename" : "pi_webView_code_bottom@2x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_gift_banner_low_bg@3x.png",
|
"filename" : "pi_webView_code_bottom@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_bottom.imageset/pi_webView_code_bottom@2x.png
vendored
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_bottom.imageset/pi_webView_code_bottom@3x.png
vendored
Normal file
After Width: | Height: | Size: 27 KiB |
22
YuMi/Assets.xcassets/webView/pi_webView_code_btn_bg.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_btn_bg.imageset/pi_webView_code_btn_bg@2x.png
vendored
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_btn_bg.imageset/pi_webView_code_btn_bg@3x.png
vendored
Normal file
After Width: | Height: | Size: 6.9 KiB |
22
YuMi/Assets.xcassets/webView/pi_webView_code_code_text.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_code_text.imageset/pi_webView_code_code_text@2x.png
vendored
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_code_text.imageset/pi_webView_code_code_text@3x.png
vendored
Normal file
After Width: | Height: | Size: 3.1 KiB |
22
YuMi/Assets.xcassets/webView/pi_webView_code_top.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_top.imageset/pi_webView_code_top@2x.png
vendored
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_top.imageset/pi_webView_code_top@3x.png
vendored
Normal file
After Width: | Height: | Size: 138 KiB |
22
YuMi/Assets.xcassets/webView/pi_webView_code_top_text.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_top_text.imageset/pi_webView_code_top_text@2x.png
vendored
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
YuMi/Assets.xcassets/webView/pi_webView_code_top_text.imageset/pi_webView_code_top_text@3x.png
vendored
Normal file
After Width: | Height: | Size: 5.9 KiB |
@@ -5,12 +5,12 @@
|
|||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_menu_send_bg@2x.png",
|
"filename" : "share_save_icon@2x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"filename" : "room_menu_send_bg@3x.png",
|
"filename" : "share_save_icon@3x.png",
|
||||||
"idiom" : "universal",
|
"idiom" : "universal",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
}
|
}
|
BIN
YuMi/Assets.xcassets/webView/share_save_icon.imageset/share_save_icon@2x.png
vendored
Normal file
After Width: | Height: | Size: 665 B |
BIN
YuMi/Assets.xcassets/webView/share_save_icon.imageset/share_save_icon@3x.png
vendored
Normal file
After Width: | Height: | Size: 1.1 KiB |
21
YuMi/Assets.xcassets/yna/AcrossRoomPK/room_across_pk_assist.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/yna/AcrossRoomPK/room_across_pk_assist.imageset/room_across_pk_assist.png
vendored
Normal file
After Width: | Height: | Size: 3.0 KiB |
21
YuMi/Assets.xcassets/yna/AcrossRoomPK/room_across_pk_onlookers.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/yna/AcrossRoomPK/room_across_pk_onlookers.imageset/room_across_pk_onlookers.png
vendored
Normal file
After Width: | Height: | Size: 2.8 KiB |
22
YuMi/Assets.xcassets/yna/Activity/pi_room_activity_click_arrow.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 297 B |
After Width: | Height: | Size: 394 B |
22
YuMi/Assets.xcassets/yna/Broadcast/pi_room_activity_choose_play_arrow.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 296 B |
After Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.8 KiB |
22
YuMi/Assets.xcassets/yna/CandyTree/room_candy_two_hundredth_tap_bg.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 9.4 KiB |
21
YuMi/Assets.xcassets/yna/Menu/pi_room_menu_bottom_send_bg.imageset/Contents.json
vendored
Normal 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
|
||||||
|
}
|
||||||
|
}
|
BIN
YuMi/Assets.xcassets/yna/Menu/pi_room_menu_bottom_send_bg.imageset/pi_room_menu_bottom_send_bg.png
vendored
Normal file
After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 715 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 29 KiB |
@@ -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,10 @@ 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 *inviteCode;
|
||||||
///表情---
|
///表情---
|
||||||
@property (nonatomic, copy) NSString *version;
|
@property (nonatomic, copy) NSString *version;
|
||||||
@property (nonatomic, copy) NSString *zipMd5;
|
@property (nonatomic, copy) NSString *zipMd5;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
///房间表情的数据
|
///房间表情的数据
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
|
||||||
@interface QExtendBoardItemModel : NSObject
|
@interface QExtendBoardItemModel : PIBaseModel
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cell图片
|
* Cell图片
|
||||||
|
@@ -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 {
|
||||||
|
@@ -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;
|
||||||
///是否是原图
|
///是否是原图
|
||||||
|
@@ -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;
|
||||||
///分享的内容
|
///分享的内容
|
||||||
|
@@ -26,9 +26,13 @@ typedef enum : NSUInteger {
|
|||||||
XPShareItemTagCopyLink,
|
XPShareItemTagCopyLink,
|
||||||
///应用好友
|
///应用好友
|
||||||
XPShareItemTagAppFriends,
|
XPShareItemTagAppFriends,
|
||||||
|
///保存到相册
|
||||||
|
XPShareItemTagAppSaveAlbum,
|
||||||
} XPShareItemTag;
|
} XPShareItemTag;
|
||||||
|
|
||||||
@interface XPShareItem : NSObject
|
@interface XPShareItem : NSObject
|
||||||
|
@property(nonatomic,assign) BOOL isShareInvite;
|
||||||
|
@property (nonatomic, copy) NSString *inviteTitle;
|
||||||
@property (nonatomic, copy) NSString *title;
|
@property (nonatomic, copy) NSString *title;
|
||||||
@property (nonatomic, copy) NSString *imageName;
|
@property (nonatomic, copy) NSString *imageName;
|
||||||
@property (nonatomic, copy) NSString *disableImageName;
|
@property (nonatomic, copy) NSString *disableImageName;
|
||||||
|
@@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
@class XPShareView;
|
@class XPShareView;
|
||||||
@protocol XCShareViewDelegate <NSObject>
|
@protocol XCShareViewDelegate <NSObject>
|
||||||
|
///点击保存图片到相册
|
||||||
|
- (void)shareView:(XPShareView *)shareView savePhoto:(XPShareInfoModel *)shareInfo;
|
||||||
///点了取消分享
|
///点了取消分享
|
||||||
- (void)shareViewDidClickCancel:(XPShareView *)shareView;
|
- (void)shareViewDidClickCancel:(XPShareView *)shareView;
|
||||||
///分享成功
|
///分享成功
|
||||||
|
@@ -143,10 +143,11 @@
|
|||||||
[TTPopup dismiss];
|
[TTPopup dismiss];
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
if (item.type == XPShareItemTagAppSaveAlbum){
|
||||||
if([self isInstallClient:[self getSharePlatformType:item.type]] == NO){
|
|
||||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPShareView9")];
|
|
||||||
[TTPopup dismiss];
|
[TTPopup dismiss];
|
||||||
|
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:savePhoto:)]){
|
||||||
|
[self.delegate shareView:self savePhoto:self.shareInfo];
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (item.type == XPShareItemTagAppFriends) {
|
if (item.type == XPShareItemTagAppFriends) {
|
||||||
@@ -161,10 +162,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,21 +183,25 @@
|
|||||||
[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";
|
||||||
} else {
|
NSString*urlString = [NSString stringWithFormat:@"line://msg/%@/%@",contentType, contentKey];
|
||||||
title = YMLocalizedString(@"XPShareView3");
|
|
||||||
platformType = SSDKPlatformTypeFacebook;
|
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
|
||||||
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];
|
|
||||||
|
if (self.delegate && [self.delegate respondsToSelector:@selector(shareView:didSuccess:)]) {
|
||||||
|
[self.delegate shareView:self didSuccess:self.shareInfo];
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
if(item.type == XPShareItemTagFaceBook){
|
if(item.type == XPShareItemTagFaceBook){
|
||||||
FBSDKShareLinkContent*linkContent = [[FBSDKShareLinkContent alloc]init];
|
FBSDKShareLinkContent*linkContent = [[FBSDKShareLinkContent alloc]init];
|
||||||
urlString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
|
urlString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];
|
||||||
linkContent.contentURL= [NSURL URLWithString:urlString];
|
linkContent.contentURL= [NSURL URLWithString:urlString];
|
||||||
linkContent.quote = content;
|
linkContent.quote = content;
|
||||||
|
|
||||||
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc]initWithViewController:[XCCurrentVCStackManager shareManager].getCurrentVC content:linkContent delegate:self];
|
FBSDKShareDialog *shareDialog = [[FBSDKShareDialog alloc]initWithViewController:[XCCurrentVCStackManager shareManager].getCurrentVC content:linkContent delegate:self];
|
||||||
// 需要指定模式,否则会调起web分享
|
// 需要指定模式,否则会调起web分享
|
||||||
shareDialog.mode = FBSDKShareDialogModeNative;
|
shareDialog.mode = FBSDKShareDialogModeNative;
|
||||||
|
@@ -51,4 +51,6 @@ typedef NS_ENUM(NSUInteger, GradientType) {
|
|||||||
|
|
||||||
|
|
||||||
-(UIImage *)compressWithMaxLength:(NSUInteger)maxLength;
|
-(UIImage *)compressWithMaxLength:(NSUInteger)maxLength;
|
||||||
|
- (UIImage *)roundedImageWithCornerRadius:(CGFloat)cornerRadius size:(CGSize)size;
|
||||||
|
+(UIImage *)getImageFromView:(UIView *)view;
|
||||||
@end
|
@end
|
||||||
|
@@ -423,5 +423,32 @@
|
|||||||
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;
|
||||||
|
}
|
||||||
|
+(UIImage *)getImageFromView:(UIView *)view {
|
||||||
|
// 1. 创建一个新的图像上下文,大小与view的bounds相匹配
|
||||||
|
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
|
@end
|
||||||
|
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
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){
|
typedef NS_ENUM(NSInteger, NetImageState){
|
||||||
NetImageStateUnload = 1,
|
NetImageStateUnload = 1,
|
||||||
@@ -30,7 +31,7 @@ typedef NS_ENUM(NSInteger, NetImageState){
|
|||||||
|
|
||||||
- (void)loadImage:(LoadCompletion _Nullable)completion;
|
- (void)loadImage:(LoadCompletion _Nullable)completion;
|
||||||
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion _Nullable)completion;
|
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion _Nullable)completion;
|
||||||
|
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion fail:(LoadFail)fail;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -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 {
|
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion {
|
||||||
[self initImageUrl:imageUrl];
|
[self initImageUrl:imageUrl];
|
||||||
[self loadImage:completion];
|
[self loadImage:completion];
|
||||||
}
|
}
|
||||||
|
- (void)loadImageWithUrl:(NSString * _Nonnull)imageUrl completion:(LoadCompletion)completion fail:(LoadFail)fail{
|
||||||
|
[self initImageUrl:imageUrl];
|
||||||
|
[self loadImage:completion fail:fail];
|
||||||
|
}
|
||||||
- (NetImageConfig *)config {
|
- (NetImageConfig *)config {
|
||||||
if (!_config) {
|
if (!_config) {
|
||||||
_config = [[NetImageConfig alloc] init];
|
_config = [[NetImageConfig alloc] init];
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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==",
|
||||||
|
@@ -48,16 +48,15 @@ isPhoneXSeries = [[UIApplication sharedApplication] delegate].window.safeAreaIns
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///内置版本号
|
||||||
#define PI_App_Version @"2.2.0"
|
#define PI_App_Version @"2.6.5"
|
||||||
#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"
|
||||||
|
|
||||||
|
@@ -49,12 +49,12 @@
|
|||||||
<string>Editor</string>
|
<string>Editor</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>pikoApp</string>
|
<string>pikoapp</string>
|
||||||
</array>
|
</array>
|
||||||
</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>
|
||||||
@@ -96,10 +96,10 @@
|
|||||||
</dict>
|
</dict>
|
||||||
<key>NSCameraUsageDescription</key>
|
<key>NSCameraUsageDescription</key>
|
||||||
<string>“Piko”需要您的同意,才可以访问进行拍照并上传您的图片,然后展示在您的个人主页上,便于他人查看</string>
|
<string>“Piko”需要您的同意,才可以访问进行拍照并上传您的图片,然后展示在您的个人主页上,便于他人查看</string>
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
|
||||||
<string>“Piko”需要您的同意,才可以进行定位服务,推荐附近好友</string>
|
|
||||||
<key>NSLocalNetworkUsageDescription</key>
|
<key>NSLocalNetworkUsageDescription</key>
|
||||||
<string>此App将可发现和连接到您所用网络上的设备。</string>
|
<string>此App将可发现和连接到您所用网络上的设备。</string>
|
||||||
|
<key>NSLocationWhenInUseUsageDescription</key>
|
||||||
|
<string>“Piko”需要您的同意,才可以进行定位服务,推荐附近好友</string>
|
||||||
<key>NSMicrophoneUsageDescription</key>
|
<key>NSMicrophoneUsageDescription</key>
|
||||||
<string>“Piko”需要您的同意,才可以进行语音聊天</string>
|
<string>“Piko”需要您的同意,才可以进行语音聊天</string>
|
||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
|
@@ -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")];
|
||||||
|
@@ -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
|
||||||
|
@@ -8,7 +8,5 @@
|
|||||||
#import "LoginAreaModel.h"
|
#import "LoginAreaModel.h"
|
||||||
|
|
||||||
@implementation LoginAreaModel
|
@implementation LoginAreaModel
|
||||||
+ (NSDictionary *)replacedKeyFromPropertyName {
|
|
||||||
return @{@"pi_phoneAreaCode":@"phoneAreaCode"};
|
|
||||||
}
|
|
||||||
@end
|
@end
|
||||||
|
@@ -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;
|
||||||
///头像的地址
|
///头像的地址
|
||||||
|
@@ -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
|
||||||
|
@@ -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];
|
||||||
|
@@ -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;
|
||||||
|
@@ -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;
|
||||||
|
@@ -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];
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
@interface LoginFullInfoViewController : MvpViewController
|
@interface LoginFullInfoViewController : MvpViewController
|
||||||
|
@property(nonatomic,copy) NSString *inviteCode;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#import "LoginFullInfoPresenter.h"
|
#import "LoginFullInfoPresenter.h"
|
||||||
#import "LoginFullInfoProtocol.h"
|
#import "LoginFullInfoProtocol.h"
|
||||||
#import "PILoginManager.h"
|
#import "PILoginManager.h"
|
||||||
|
#import "ClientConfig.h"
|
||||||
|
|
||||||
@interface LoginFullInfoViewController ()<LoginFullInfoProtocol>
|
@interface LoginFullInfoViewController ()<LoginFullInfoProtocol>
|
||||||
|
|
||||||
@@ -81,6 +81,11 @@
|
|||||||
[self initSubViews];
|
[self initSubViews];
|
||||||
[self initSubViewConstraints];
|
[self initSubViewConstraints];
|
||||||
[self initEvents];
|
[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 {
|
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||||
@@ -226,7 +231,10 @@
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
- (void)setInviteCode:(NSString *)inviteCode{
|
||||||
|
_inviteCode = inviteCode;
|
||||||
|
self.codeTextField.text = _inviteCode;
|
||||||
|
}
|
||||||
///更新用户信息
|
///更新用户信息
|
||||||
- (void)updateUserInfo {
|
- (void)updateUserInfo {
|
||||||
[XNDJTDDLoadingTool showOnlyView:self.view];
|
[XNDJTDDLoadingTool showOnlyView:self.view];
|
||||||
|
@@ -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];
|
||||||
|
@@ -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 {
|
||||||
|
@@ -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
|
||||||
|
@@ -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
|
||||||
|
@@ -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,13 +47,17 @@
|
|||||||
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;
|
||||||
areaStackView.distribution = UIStackViewDistributionFill;
|
areaStackView.distribution = UIStackViewDistributionFill;
|
||||||
|
@@ -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];
|
||||||
|