lixianglan 7 жил өмнө
parent
commit
4b814fc367

+ 2 - 2
ios/JianYuIOS/JianYuIOS.xcodeproj/project.pbxproj

@@ -648,7 +648,7 @@
 				GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
 				GCC_PREFIX_HEADER = "$(SRCROOT)/JianYuIOS/BaseClass1/PrefixHeader.pch";
 				INFOPLIST_FILE = JianYuIOS/Info.plist;
-				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",
@@ -680,7 +680,7 @@
 				GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES;
 				GCC_PREFIX_HEADER = "$(SRCROOT)/JianYuIOS/BaseClass1/PrefixHeader.pch";
 				INFOPLIST_FILE = JianYuIOS/Info.plist;
-				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
 				LIBRARY_SEARCH_PATHS = (
 					"$(inherited)",

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


+ 22 - 38
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/lxl.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -20,27 +20,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "JianYuIOS/ViewController.m"
-            timestampString = "541583255.400169"
+            timestampString = "541589651.318934"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "442"
-            endingLineNumber = "442"
-            landmarkName = "-jsGetMessageList:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/ViewController.m"
-            timestampString = "541583255.400625"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "516"
-            endingLineNumber = "516"
+            startingLineNumber = "524"
+            endingLineNumber = "524"
             landmarkName = "-jsAlert:"
             landmarkType = "7">
          </BreakpointContent>
@@ -51,44 +35,44 @@
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/BaseClass1/LXViewControllerManager.m"
-            timestampString = "541580756.9772249"
+            filePath = "JianYuIOS/ViewController.m"
+            timestampString = "541589651.319"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "44"
-            endingLineNumber = "44"
-            landmarkName = "-showActionSheetWithTitle:message:actions:"
+            startingLineNumber = "168"
+            endingLineNumber = "168"
+            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 = "541583255.400746"
+            timestampString = "541589651.319052"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "168"
-            endingLineNumber = "168"
-            landmarkName = "-loginOut:"
+            startingLineNumber = "201"
+            endingLineNumber = "201"
+            landmarkName = "-webViewDidFinishLoad:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "JianYuIOS/ViewController.m"
-            timestampString = "541583255.400805"
+            timestampString = "541589651.3190989"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "201"
-            endingLineNumber = "201"
+            startingLineNumber = "184"
+            endingLineNumber = "184"
             landmarkName = "-webViewDidFinishLoad:"
             landmarkType = "7">
          </BreakpointContent>
@@ -99,13 +83,13 @@
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "JianYuIOS/ViewController.m"
-            timestampString = "541583255.4008549"
+            filePath = "JianYuIOS/AppDelegate.m"
+            timestampString = "541589655.068589"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "184"
-            endingLineNumber = "184"
-            landmarkName = "-webViewDidFinishLoad:"
+            startingLineNumber = "196"
+            endingLineNumber = "196"
+            landmarkName = "-clickNotification:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 16 - 2
ios/JianYuIOS/JianYuIOS/AppDelegate.m

@@ -183,9 +183,15 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
         [JPUSHService handleRemoteNotification:userInfo];
     }
     
+    [self clickNotification:userInfo];
+    
+    completionHandler();  // 系统要求执行这个方法
+}
+
+-(void)clickNotification:(NSDictionary *)userInfo{
     NSDictionary *info = userInfo[@"info"];
     if ([info isKindOfClass:[NSString class]]) {
-        info = [[LXViewControllerManager shareViewControllerManager] dictionaryWithJsonString:info];
+        info = [[LXViewControllerManager shareViewControllerManager] dictionaryWithJsonString:userInfo[@"info"]];
     }
     if (info ) {
         NSMutableDictionary *temp = [NSMutableDictionary dictionaryWithDictionary:info];
@@ -224,7 +230,7 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
             [[NSNotificationCenter defaultCenter] postNotificationName:kRequestWebViewWithUrl object:temp userInfo:nil];
         }
     }
-    completionHandler();  // 系统要求执行这个方法
+    
 }
 
 
@@ -266,6 +272,14 @@ didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
 }
 
 
+-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
+    // App 收到推送的通知
+    NSLog(@"********** ios7.0之前 **********");
+    [self clickNotification:userInfo];
+}
+
+
+
 - (void)networkDidReceiveMessage:(NSNotification *)notification {
     NSDictionary * userInfo = [notification userInfo];
     NSString *content = [userInfo valueForKey:@"content"];

+ 9 - 6
ios/JianYuIOS/JianYuIOS/Base.lproj/Main.storyboard

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="Alignment constraints with different attributes" minToolsVersion="5.1"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <scenes>
@@ -14,6 +14,10 @@
         <scene sceneID="tne-QT-ifu">
             <objects>
                 <viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="KRu-Xv-QLR"/>
+                        <viewControllerLayoutGuide type="bottom" id="mUM-zT-OLx"/>
+                    </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@@ -36,13 +40,12 @@
                         <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <constraints>
                             <constraint firstItem="e4B-3b-Lwa" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="TlB-Qn-sjp"/>
-                            <constraint firstItem="FYC-rR-cTH" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" id="Xir-CD-4sF"/>
+                            <constraint firstItem="FYC-rR-cTH" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="Xir-CD-4sF"/>
                             <constraint firstItem="FYC-rR-cTH" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="cVW-Na-SF6"/>
-                            <constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="FYC-rR-cTH" secondAttribute="trailing" id="ewx-by-zn7"/>
+                            <constraint firstAttribute="trailing" secondItem="FYC-rR-cTH" secondAttribute="trailing" id="ewx-by-zn7"/>
                             <constraint firstItem="e4B-3b-Lwa" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="fLx-8C-V0G"/>
-                            <constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="FYC-rR-cTH" secondAttribute="bottom" id="zCw-HF-R5H"/>
+                            <constraint firstItem="mUM-zT-OLx" firstAttribute="top" secondItem="FYC-rR-cTH" secondAttribute="bottom" id="zCw-HF-R5H"/>
                         </constraints>
-                        <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
                     </view>
                     <connections>
                         <outlet property="topC" destination="cVW-Na-SF6" id="iL3-Tw-knQ"/>

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

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

+ 9 - 11
ios/JianYuIOS/JianYuIOS/NewWebController.xib

@@ -1,12 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -31,7 +30,7 @@
                     <color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                 </webView>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="n0W-Rs-iUe">
-                    <rect key="frame" x="10" y="35" width="30" height="30"/>
+                    <rect key="frame" x="10" y="15" width="30" height="30"/>
                     <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.69999999999999996" colorSpace="calibratedRGB"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="30" id="AJ4-xJ-RJh"/>
@@ -97,17 +96,16 @@
             </subviews>
             <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <constraints>
-                <constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="9yt-yG-Kvh" secondAttribute="trailing" id="1lW-Bt-Y4d"/>
-                <constraint firstItem="Q5M-cg-NOt" firstAttribute="trailing" secondItem="hKS-9A-lkH" secondAttribute="trailing" id="6nu-EY-FNH"/>
-                <constraint firstItem="n0W-Rs-iUe" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" constant="10" id="D1g-jA-wTm"/>
+                <constraint firstAttribute="trailing" secondItem="9yt-yG-Kvh" secondAttribute="trailing" id="1lW-Bt-Y4d"/>
+                <constraint firstAttribute="trailing" secondItem="hKS-9A-lkH" secondAttribute="trailing" id="6nu-EY-FNH"/>
+                <constraint firstItem="n0W-Rs-iUe" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="10" id="D1g-jA-wTm"/>
                 <constraint firstItem="9yt-yG-Kvh" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="E3n-th-ijR"/>
-                <constraint firstItem="hKS-9A-lkH" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="HeZ-y1-nVG"/>
-                <constraint firstItem="n0W-Rs-iUe" firstAttribute="top" secondItem="Q5M-cg-NOt" secondAttribute="top" constant="15" id="VEu-09-LBg"/>
-                <constraint firstItem="Q5M-cg-NOt" firstAttribute="bottom" secondItem="hKS-9A-lkH" secondAttribute="bottom" id="Ysb-dr-ykz"/>
+                <constraint firstItem="hKS-9A-lkH" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="HeZ-y1-nVG"/>
+                <constraint firstItem="n0W-Rs-iUe" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="15" id="VEu-09-LBg"/>
+                <constraint firstAttribute="bottom" secondItem="hKS-9A-lkH" secondAttribute="bottom" id="Ysb-dr-ykz"/>
                 <constraint firstItem="hKS-9A-lkH" firstAttribute="top" secondItem="9yt-yG-Kvh" secondAttribute="bottom" id="ZBl-A3-xFX"/>
-                <constraint firstItem="9yt-yG-Kvh" firstAttribute="leading" secondItem="Q5M-cg-NOt" secondAttribute="leading" id="i13-TT-Cqr"/>
+                <constraint firstItem="9yt-yG-Kvh" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="i13-TT-Cqr"/>
             </constraints>
-            <viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
             <point key="canvasLocation" x="33.5" y="53.5"/>
         </view>
     </objects>

+ 9 - 1
ios/JianYuIOS/JianYuIOS/ViewController.m

@@ -109,7 +109,7 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
     NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/login"];
     NSString *token = [LXUserDefaults token];
     if (token) {
-        url = [url stringByAppendingString:[NSString stringWithFormat:@"?sign=%@&url=/jyapp/jylab/mainSearch", token]];
+        url = [url stringByAppendingString:[NSString stringWithFormat:@"?sign=%@&url=/jyapp/jylab/mainSearch&from=restart", token]];
     }
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
@@ -223,6 +223,14 @@ JSExportAs(alert, -(void)jsAlert:(NSString *)content);// 弹框
     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];
+//    }
 }