Selaa lähdekoodia

没有安装微信

lixianglan 7 vuotta sitten
vanhempi
commit
d2e02fdf7b

BIN
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/lxl.xcuserdatad/UserInterfaceState.xcuserstate


+ 41 - 25
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/lxl.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -20,60 +20,76 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "JianYuIOS/ViewController.m"
-            timestampString = "541589651.318934"
+            timestampString = "541907964.6674711"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "524"
-            endingLineNumber = "524"
-            landmarkName = "-jsAlert:"
+            startingLineNumber = "185"
+            endingLineNumber = "185"
+            landmarkName = "-loginOut:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "JianYuIOS/ViewController.m"
-            timestampString = "541589651.319"
+            timestampString = "541907964.6675349"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "168"
-            endingLineNumber = "168"
-            landmarkName = "-loginOut:"
+            startingLineNumber = "221"
+            endingLineNumber = "221"
+            landmarkName = "-webViewDidFinishLoad:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "No"
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/ViewController.m"
-            timestampString = "541589651.319052"
+            filePath = "JianYuIOS/AppDelegate.m"
+            timestampString = "541907964.6675889"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "201"
-            endingLineNumber = "201"
-            landmarkName = "-webViewDidFinishLoad:"
+            startingLineNumber = "240"
+            endingLineNumber = "240"
+            landmarkName = "-application:didReceiveRemoteNotification:fetchCompletionHandler:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "No"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "JianYuIOS/AppDelegate.m"
+            timestampString = "541907964.66763"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "286"
+            endingLineNumber = "286"
+            landmarkName = "-networkDidReceiveMessage:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "JianYuIOS/ViewController.m"
-            timestampString = "541589651.3190989"
+            timestampString = "541907964.667668"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "184"
-            endingLineNumber = "184"
-            landmarkName = "-webViewDidFinishLoad:"
+            startingLineNumber = "549"
+            endingLineNumber = "549"
+            landmarkName = "-jsIsInstallWeixin:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -83,13 +99,13 @@
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/AppDelegate.m"
-            timestampString = "541589655.068589"
+            filePath = "JianYuIOS/BaseClass1/LXUserDefaults.m"
+            timestampString = "541907964.667716"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "196"
-            endingLineNumber = "196"
-            landmarkName = "-clickNotification:"
+            startingLineNumber = "63"
+            endingLineNumber = "63"
+            landmarkName = "+saveIsInstallWeiXin:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 11 - 10
ios/JianYuIOS/JianYuIOS/AppDelegate.m

@@ -56,7 +56,7 @@
     // 如需继续使用pushConfig.pinfo文件声明appKey等配置内容,请依旧使用[JPUSHService setupWithOption:launchOptions]方式初始化。
     [JPUSHService setupWithOption:launchOptions appKey:@"5efa1257867cf5d77d007ce6"
                           channel:@"APP Store"
-                 apsForProduction:0
+                 apsForProduction:1
             advertisingIdentifier:nil]; // llxl
     NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
     [defaultCenter addObserver:self selector:@selector(networkDidReceiveMessage:) name:kJPFNetworkDidReceiveMessageNotification object:nil];
@@ -123,20 +123,21 @@
     [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
     [JPUSHService setBadge:0];
     [LXUserDefaults saveNotifyState:[[UIApplication sharedApplication] currentUserNotificationSettings].types != UIUserNotificationTypeNone ? 1 : 0];
+    [LXUserDefaults saveIsInstallWeiXin:[[UMSocialManager defaultManager] isInstall:UMSocialPlatformType_WechatSession]?@"1":@"0"];
     [[NSNotificationCenter defaultCenter] postNotificationName:kUpdateNotifyState object:nil];
 }
 
 
 - (void)applicationWillTerminate:(UIApplication *)application {
     // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
-    sleep(1);
-    UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
-    content.badge = @(-1);
-    UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"clearBadge" content:content trigger:nil];
-    [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {
-    }];
-    
-    NSLog(@"applicationWillTerminate");
+//    sleep(1);
+//    UNMutableNotificationContent *content = [[UNMutableNotificationContent alloc] init];
+//    content.badge = @(-1);
+//    UNNotificationRequest *request = [UNNotificationRequest requestWithIdentifier:@"clearBadge" content:content trigger:nil];
+//    [[UNUserNotificationCenter currentNotificationCenter] addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) {
+//    }];
+//
+//    NSLog(@"applicationWillTerminate");
 }
 
 
@@ -238,7 +239,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
     NSDictionary *info = userInfo[@"info"];
     if ([info isKindOfClass:[NSString class]]) {
-        info = [[LXViewControllerManager shareViewControllerManager] dictionaryWithJsonString:info];
+        info = [[LXViewControllerManager shareViewControllerManager] dictionaryWithJsonString:userInfo[@"info"]];
     }
     if (info ) {
         if (info[@"url"]) {

BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/AppIcon.appiconset/1024.png


+ 0 - 1
ios/JianYuIOS/JianYuIOS/Base.lproj/Main.storyboard

@@ -6,7 +6,6 @@
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
-        <capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>

+ 4 - 0
ios/JianYuIOS/JianYuIOS/BaseClass1/LXUserDefaults.h

@@ -26,6 +26,10 @@
 +(void)saveNotifyState:(int)state;
 +(int)notifyState;
 
+// 微信是否可用
++(void)saveIsInstallWeiXin:(NSString *)install;
++(int)isInstallWeiXin;
+
 // 清空
 +(void)clearAll;
 @end

+ 8 - 0
ios/JianYuIOS/JianYuIOS/BaseClass1/LXUserDefaults.m

@@ -59,6 +59,14 @@
     return [NSString stringWithFormat:@"%ld", (long)time];
 }
 
++(void)saveIsInstallWeiXin:(NSString *)install{
+    [[NSUserDefaults standardUserDefaults] setObject:install forKey:@"isInstallWeiXin"];
+}
+
++(int)isInstallWeiXin{
+    return [[[NSUserDefaults standardUserDefaults] objectForKey:@"isInstallWeiXin"] intValue];
+}
+
 +(void)clearAll{
     NSUserDefaults *userDef = [NSUserDefaults standardUserDefaults];
     [userDef removeObjectForKey:@"iconurl"];

+ 2 - 1
ios/JianYuIOS/JianYuIOS/BaseClass1/PrefixHeader.pch

@@ -26,8 +26,9 @@
 #define kLoginOut @"kLoginOut"
 #define kNewsTable @"kNewsTable"
 
+#define kHost @"https://www.jianyu360.com/"
 //#define kHost @"http://webwcj.qmx.top/"
-#define kHost @"http://w2blmjy.qmx.top/"
+//#define kHost @"http://w2blmjy.qmx.top/"
 #endif /* PrefixHeader_pch */
 
 

+ 1 - 0
ios/JianYuIOS/JianYuIOS/BaseClass1/constant.h

@@ -26,6 +26,7 @@
 
 
 #define IphonexAboveScreen (kCurrentDeviceHeight>=812) // iphonex 及以上
+#define systemNewerThan10 ([[UIDevice currentDevice].systemVersion floatValue] > 10.0)
 
 #endif /* constant_h */
 

+ 25 - 15
ios/JianYuIOS/JianYuIOS/CustomView/LXProgressView.m

@@ -18,26 +18,36 @@
     if (self) {
         self.progressTintColor = [UIColor colorWithRed:87/255.f green:188/255.f blue:61/255.f alpha:1];
         self.cumulative = 20;
-        self.timer = [NSTimer scheduledTimerWithTimeInterval:0.1 repeats:YES block:^(NSTimer * _Nonnull timer) {
-            if (self.progress >= .95) {
-                [timer invalidate];
-            }
-            self.progress += self.cumulative/100;
-            if (self.progress >= .9) {
-                self.cumulative = 0.1;
-            }else if (self.progress >=.8) {
-                self.cumulative = .5;
-            }else if (self.progress >= .7) {
-                self.cumulative = 1;
-            }else if (self.progress >= .5){
-                self.cumulative = 2;
-            }
-        }];
+        if (systemNewerThan10) {
+            self.timer = [NSTimer scheduledTimerWithTimeInterval:0.1 repeats:YES block:^(NSTimer * _Nonnull timer) {
+                [self timerAction];
+            }];
+        }else{
+            self.timer = [NSTimer timerWithTimeInterval:0.1 target:self selector:@selector(timerAction) userInfo:nil repeats:YES];
+            [self.timer fire];
+        }
     }
     
     return self;
 }
 
+-(void)timerAction{
+    if (self.progress >= .95) {
+        [self.timer invalidate];
+    }
+    self.progress += self.cumulative/100;
+    if (self.progress >= .9) {
+        self.cumulative = 0.1;
+    }else if (self.progress >=.8) {
+        self.cumulative = .5;
+    }else if (self.progress >= .7) {
+        self.cumulative = 1;
+    }else if (self.progress >= .5){
+        self.cumulative = 2;
+    }
+    
+}
+
 
 /*
 // Only override drawRect: if you perform custom drawing.

+ 2 - 1
ios/JianYuIOS/JianYuIOS/CustomView/NoNetView.m

@@ -16,11 +16,12 @@
     view.frame = [UIScreen mainScreen].bounds;
     return view;
 }
-- (IBAction)click:(id)sender {
+- (IBAction)click1:(id)sender {
     [[NSNotificationCenter defaultCenter] postNotificationName:kReloadWebVIew object:nil];
 }
 
 
+
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.

+ 5 - 2
ios/JianYuIOS/JianYuIOS/CustomView/NoNetView.xib

@@ -12,11 +12,11 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="NMNewUserView">
+        <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="NoNetView">
             <rect key="frame" x="0.0" y="0.0" width="320" height="667"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bN2-JA-Ssh" customClass="NoNetView">
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bN2-JA-Ssh">
                     <rect key="frame" x="18.5" y="192" width="283" height="283"/>
                     <subviews>
                         <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="noNet.png" translatesAutoresizingMaskIntoConstraints="NO" id="W56-Wm-H3y">
@@ -50,6 +50,9 @@
                                 <userDefinedRuntimeAttribute type="boolean" keyPath="clipsToBounds" value="YES"/>
                                 <userDefinedRuntimeAttribute type="string" keyPath="layer.cornerRadius" value="3"/>
                             </userDefinedRuntimeAttributes>
+                            <connections>
+                                <action selector="click1:" destination="iN0-l3-epB" eventType="touchUpInside" id="pWe-lN-Gk4"/>
+                            </connections>
                         </button>
                     </subviews>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>

+ 1 - 1
ios/JianYuIOS/JianYuIOS/Info.plist

@@ -17,7 +17,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
+	<string>1.0.1</string>
 	<key>CFBundleURLTypes</key>
 	<array>
 		<dict>

+ 81 - 57
ios/JianYuIOS/JianYuIOS/ViewController.m

@@ -38,6 +38,7 @@ JSExportAs(lightStatusBar, -(void)jsLightStatusBar:(NSString *)status);// 导航
 JSExportAs(openExternalLink, -(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title);// 打开新控制器 加载新web
 JSExportAs(getVersion, -(NSString *)jsGetVersion:(NSString *)str);// 获取当前版本号
 JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
+JSExportAs(isInstallWeixin, -(int)jsIsInstallWeixin:(NSString *)str);// 是否安装微信
 
 
 
@@ -65,7 +66,7 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
 
 - (void)viewDidLoad {
     [super viewDidLoad];
-    
+        
     [LXDataBaseManager shareDataBaseManager];
     if ([[UIDevice currentDevice].systemVersion floatValue] >= 11.0) {
         self.topC.constant = -20;
@@ -80,20 +81,36 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(afterReceiveNewMsg) name:kAfterReceiveNewMsg object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadWebView) name:kReloadWebVIew object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loginOut:) name:kLoginOut object:nil];
-
     
-   int state =  [[[NSUserDefaults standardUserDefaults] objectForKey:@"firstLoad"] intValue];
     [[AFNetworkReachabilityManager sharedManager] startMonitoring];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
+    
+//   int state =  [[[NSUserDefaults standardUserDefaults] objectForKey:@"firstLoad"] intValue];
 //    AFNetworkingReachabilityDidChangeNotification
-    if (state != 1) {
-         if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable) {
-             [self noNetGetData];
-         }else{
-             [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
-         }
-    }
+    
+//    if (state != 1) {
+//         if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable) {
+//             [self noNetGetData];
+//         }else{
+//             [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
+//         }
+//    }
     [self clearWeb];
 }
+
+-(void)netReachChanged:(NSNotification *)notificaition{
+    NSDictionary *userInfo = notificaition.userInfo;
+    if ([userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == 0 || [userInfo[@"AFNetworkingReachabilityNotificationStatusItem"] intValue] == -1) {
+        [self addNoNetViews];
+    }else{
+        if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"firstLoad"] intValue] == 0) {
+            [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
+            [self removeNoNetViews];
+            [self webViewFirstRequest];
+        }
+    }
+}
+
 // 再次加载页面
 -(void)reloadWebView{
     [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
@@ -117,17 +134,17 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
 }
 
 
--(void)noNetGetData{
-    [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
-    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
-    if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi) {
-        [[AFNetworkReachabilityManager sharedManager] stopMonitoring];
-        [self removeNoNetViews];
-        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/login"]]]];
-    }else{
-        [self performSelector:@selector(noNetGetData) withObject:nil afterDelay:2];
-    }
-}
+//-(void)noNetGetData{
+//    [[NSUserDefaults standardUserDefaults] setObject:@"1" forKey:@"firstLoad"];
+//    [[LXViewControllerManager shareViewControllerManager] showHudText:nil];
+//    if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWWAN || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusReachableViaWiFi) {
+//        [[AFNetworkReachabilityManager sharedManager] stopMonitoring];
+//        [self removeNoNetViews];
+//        [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/login"]]]];
+//    }else{
+//        [self performSelector:@selector(noNetGetData) withObject:nil afterDelay:2];
+//    }
+//}
 
 // 点击通知 跳转到通知内url
 -(void)requestWebView:(NSNotification *)notification{
@@ -174,7 +191,10 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
 
 - (IBAction)click:(id)sender {
 //    [self jsLoginByWeixin:nil];
-    [self clearWeb];
+//    [self clearWeb];
+    NewWebController *ctr = [[NewWebController alloc] init];
+    ctr.url = @"http://www.baidu.com";
+    [self presentViewController:ctr animated:NO completion:nil];
 }
 
 
@@ -220,13 +240,15 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
 
 -(void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error{
     [[LXViewControllerManager shareViewControllerManager] hideHud];
-    if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusUnknown) {
-        [self addNoNetViews];
-    }
+//    if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusUnknown) {
+////        [self addNoNetViews];
+//    }
     NSString *url = webView.request.URL.absoluteString;
     [self doSomeWithLoadUrl:url];
 }
 
+
+
 -(void)webViewDidStartLoad:(UIWebView *)webView{
 //    if ([[UIDevice currentDevice].systemVersion floatValue] < 10) {
 //        [[LXViewControllerManager shareViewControllerManager] hideHud];
@@ -267,40 +289,39 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
 // 微信登录
 -(NSString *)jsLoginByWeixin:(NSString *)str{
 
+    if ([LXUserDefaults isInstallWeiXin] != 1) {
+        [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"微信登录失败,没有安装微信" delay:1.5];
+        return nil;
+    }
     
     kMainQueue(^{
         
-        if (![[UMSocialManager defaultManager] isInstall:UMSocialPlatformType_WechatSession]) {
-            [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"微信登录失败,没有安装微信" delay:1.5];
-            return;
-        }else{
+        [[UMSocialManager defaultManager] getUserInfoWithPlatform:UMSocialPlatformType_WechatSession currentViewController:self completion:^(id result, NSError *error) {
             
-            [[UMSocialManager defaultManager] getUserInfoWithPlatform:UMSocialPlatformType_WechatSession currentViewController:self completion:^(id result, NSError *error) {
-                
-                UMSocialUserInfoResponse *resp = result;
-                
-                // 第三方登录数据(为空表示平台未提供)
-                // 授权数据
-                NSLog(@" uid: %@", resp.uid);
-                NSLog(@" openid: %@", resp.openid);
-                [LXUserDefaults saveOpenID:resp.openid];
-                NSLog(@" accessToken: %@", resp.accessToken);
-                NSLog(@" refreshToken: %@", resp.refreshToken);
-                NSLog(@" expiration: %@", resp.expiration);
-                // 用户数据
-                NSLog(@" name: %@", resp.name);
-                NSLog(@" iconurl: %@", resp.iconurl);
-                NSLog(@" gender: %@", resp.unionGender);
-                
-                // 第三方平台SDK原始数据
-                NSLog(@" originalResponse: %@", resp.originalResponse);
-                
-                [self dealWXDic:(NSDictionary *)resp.originalResponse];
-                
-                [[LXViewControllerManager shareViewControllerManager] hideHud];
-            }];
+            UMSocialUserInfoResponse *resp = result;
             
-        }
+            // 第三方登录数据(为空表示平台未提供)
+            // 授权数据
+            NSLog(@" uid: %@", resp.uid);
+            NSLog(@" openid: %@", resp.openid);
+            [LXUserDefaults saveOpenID:resp.openid];
+            NSLog(@" accessToken: %@", resp.accessToken);
+            NSLog(@" refreshToken: %@", resp.refreshToken);
+            NSLog(@" expiration: %@", resp.expiration);
+            // 用户数据
+            NSLog(@" name: %@", resp.name);
+            NSLog(@" iconurl: %@", resp.iconurl);
+            NSLog(@" gender: %@", resp.unionGender);
+            
+            // 第三方平台SDK原始数据
+            NSLog(@" originalResponse: %@", resp.originalResponse);
+            
+            [self dealWXDic:(NSDictionary *)resp.originalResponse];
+            
+            [[LXViewControllerManager shareViewControllerManager] hideHud];
+        }];
+        
+        
         
     });
     
@@ -353,10 +374,9 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
     kMainQueue(^{
         
         if ([type intValue] == 1 || [type intValue] == 3) {
-            if (![[UMSocialManager defaultManager] isInstall:UMSocialPlatformType_WechatSession]) {
+            if ([LXUserDefaults isInstallWeiXin] != 1) {
                 [[LXViewControllerManager shareViewControllerManager] showHudOnlyText:@"没有安装微信" delay:1.5];
                 return;
-                
             }
         }
         if ([type intValue] == 2) {
@@ -494,7 +514,7 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
 -(void)jsOpenExternalLink:(NSString *)url title:(NSString *)title{
     if (url) {
         if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable || [AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusUnknown) {
-            [self addNoNetViews];
+//            [self addNoNetViews];
         }
         NewWebController *ctr = [[NewWebController alloc] init];
         ctr.url = url;
@@ -524,6 +544,10 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
     [[LXViewControllerManager shareViewControllerManager] showAlertViewWithMessage:content];
 }
 
+// 是否安装微信
+-(int)jsIsInstallWeixin:(NSString *)str{
+    return [LXUserDefaults isInstallWeiXin];
+}