微信登陆,bug修改

This commit is contained in:
kai60
2020-01-09 09:25:43 +08:00
parent 82590f8fba
commit bfb68dd81c
62 changed files with 5105 additions and 275 deletions
+26 -5
View File
@@ -22,6 +22,8 @@
#import "DisconnectNetController.h"
//#import "JPUSHService.h"
#import "DownLoadViewController.h"
#import "WXApi.h"
#import "WXApiManager.h"
//#define RONYUN_APPKEY @"pgyu6atqyxxlu"// 融云appkey
#import "ChatroomModel.h"
#import "SVProgressHUD.h"
@@ -75,7 +77,7 @@
#import "AccountResult.h"
#import "ContactDAO.h"
#import "IfishMianTabViewController.h"
#import "SDWebImageDownloader.h"
#import "IfishUncaughtExceptionHandler.h"
//阿里百川
#import <AlibcTradeSDK/AlibcTradeSDK.h>
@@ -261,6 +263,7 @@
[[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_Sina appKey:@"1240247140" appSecret:@"d5825aae9f4c8552b60e112b42c345f3" redirectURL:@"https://sns.whalecloud.com/sina2/callback"];
//http://sns.whalecloud.com/sina2/callback
[WXApi registerApp:@"wxb3b27d653ec3e3cb"];
// 4s 宽高比 0.66 5 6 6p 宽高比 0.56
// 如果是5autoSizeScaleX=1autoSizeScaleY=1
@@ -281,8 +284,10 @@ if (kScreenSize.height>480) {
NSString *password = [userDefsult objectForKey:@"password"];
NSString *isExit = [userDefsult objectForKey:@"isExit"];
NSString *unionId=[userDefsult stringForKey:@"unionId"];
self.isWechatLogin=NO;
if (password) {
if ((password||unionId.length)&&![isExit isEqualToString:@"1"]) {
firstLogIn=NO;
[self loginAnimated:application];
@@ -366,6 +371,8 @@ if (kScreenSize.height>480) {
config.reportLogLevel = BuglyLogLevelWarn;
[Bugly startWithAppId:BUGLY_APPID config:config];
return YES;
}
@@ -600,12 +607,26 @@ if (kScreenSize.height>480) {
openURL:url
options:options]) {
//处理其他app跳转到自己的app,如果百川处理过会返回YES
BOOL result = [[UMSocialManager defaultManager] handleOpenURL:url];
return result;
//友盟会消费掉code所以登录时,不给友盟处理
if (self.isWechatLogin)
{
return [WXApi handleOpenURL:url delegate:[WXApiManager sharedManager]];
}
return [[UMSocialManager defaultManager] handleOpenURL:url];
}
return YES;
return [WXApi handleOpenURL:url delegate:[WXApiManager sharedManager]];
}
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
return [WXApi handleOpenURL:url delegate:[WXApiManager sharedManager]];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [WXApi handleOpenURL:url delegate:[WXApiManager sharedManager]];
}
@end