ソースを参照

app功能 + 缺陷的编写 + 修改

apple 5 年 前
コミット
c29c8fdd48
21 ファイル変更362 行追加217 行削除
  1. 4 0
      ios/JianYuIOS/JianYuIOS.xcodeproj/project.pbxproj
  2. BIN
      ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate
  3. 2 0
      ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/WorkspaceSettings.xcsettings
  4. 24 0
      ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  5. 1 1
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/Contents.json
  6. BIN
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/laboratory.png
  7. BIN
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/laboratory@1x.png
  8. BIN
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/laboratory@2x.png
  9. BIN
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/laboratory@3x.png
  10. 1 1
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/Contents.json
  11. BIN
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/laboratory1.png
  12. BIN
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/laboratory1@1x.png
  13. BIN
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/laboratory1@2x.png
  14. BIN
      ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/laboratory1@3x.png
  15. 20 4
      ios/JianYuIOS/JianYuIOS/BaseClass1/PrefixHeader.pch
  16. 46 64
      ios/JianYuIOS/JianYuIOS/Classes(模块)/JYExpViewController.m
  17. 37 46
      ios/JianYuIOS/JianYuIOS/Classes(模块)/JYMineViewController.m
  18. 180 57
      ios/JianYuIOS/JianYuIOS/Classes(模块)/JYSearchViewController.m
  19. 35 27
      ios/JianYuIOS/JianYuIOS/Classes(模块)/JYSubViewController.m
  20. 8 0
      ios/JianYuIOS/JianYuIOS/Info.plist
  21. 4 17
      ios/JianYuIOS/JianYuIOS/JYTabBarController.m

+ 4 - 0
ios/JianYuIOS/JianYuIOS.xcodeproj/project.pbxproj

@@ -9,6 +9,7 @@
 /* Begin PBXBuildFile section */
 /* Begin PBXBuildFile section */
 		182ECCFB22FD221100FFC79E /* qidongye@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 182ECCFA22FD221000FFC79E /* qidongye@2x.png */; };
 		182ECCFB22FD221100FFC79E /* qidongye@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 182ECCFA22FD221000FFC79E /* qidongye@2x.png */; };
 		182ECCFD22FD223A00FFC79E /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 182ECCFC22FD223A00FFC79E /* logo.png */; };
 		182ECCFD22FD223A00FFC79E /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 182ECCFC22FD223A00FFC79E /* logo.png */; };
+		185F510A23A76765009F9022 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 185F510923A76765009F9022 /* CoreLocation.framework */; };
 		1876C3FC219920DE00BC23DE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1876C3FB219920DE00BC23DE /* ViewController.m */; };
 		1876C3FC219920DE00BC23DE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1876C3FB219920DE00BC23DE /* ViewController.m */; };
 		187B4EE321EC356100A9368D /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE221EC356100A9368D /* UIView+Extension.m */; };
 		187B4EE321EC356100A9368D /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE221EC356100A9368D /* UIView+Extension.m */; };
 		187B4EE621EC635700A9368D /* GlobalData.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE521EC635700A9368D /* GlobalData.m */; };
 		187B4EE621EC635700A9368D /* GlobalData.m in Sources */ = {isa = PBXBuildFile; fileRef = 187B4EE521EC635700A9368D /* GlobalData.m */; };
@@ -84,6 +85,7 @@
 		10D9BC27D00CB4DF3F791728 /* Pods-JianYuIOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JianYuIOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-JianYuIOS/Pods-JianYuIOS.release.xcconfig"; sourceTree = "<group>"; };
 		10D9BC27D00CB4DF3F791728 /* Pods-JianYuIOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-JianYuIOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-JianYuIOS/Pods-JianYuIOS.release.xcconfig"; sourceTree = "<group>"; };
 		182ECCFA22FD221000FFC79E /* qidongye@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "qidongye@2x.png"; sourceTree = "<group>"; };
 		182ECCFA22FD221000FFC79E /* qidongye@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "qidongye@2x.png"; sourceTree = "<group>"; };
 		182ECCFC22FD223A00FFC79E /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
 		182ECCFC22FD223A00FFC79E /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logo.png; sourceTree = "<group>"; };
+		185F510923A76765009F9022 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
 		1876C3FB219920DE00BC23DE /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
 		1876C3FB219920DE00BC23DE /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
 		187B4EE121EC356100A9368D /* UIView+Extension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; };
 		187B4EE121EC356100A9368D /* UIView+Extension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = "<group>"; };
 		187B4EE221EC356100A9368D /* UIView+Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = "<group>"; };
 		187B4EE221EC356100A9368D /* UIView+Extension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = "<group>"; };
@@ -174,6 +176,7 @@
 			isa = PBXFrameworksBuildPhase;
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
+				185F510A23A76765009F9022 /* CoreLocation.framework in Frameworks */,
 				188A144923273CB400D39E7E /* UserNotificationsUI.framework in Frameworks */,
 				188A144923273CB400D39E7E /* UserNotificationsUI.framework in Frameworks */,
 				188A144723273CAD00D39E7E /* UserNotifications.framework in Frameworks */,
 				188A144723273CAD00D39E7E /* UserNotifications.framework in Frameworks */,
 				18E05D1022F11D97001E5B44 /* Foundation.framework in Frameworks */,
 				18E05D1022F11D97001E5B44 /* Foundation.framework in Frameworks */,
@@ -270,6 +273,7 @@
 		954256EB2ECEF2507E4350ED /* Frameworks */ = {
 		954256EB2ECEF2507E4350ED /* Frameworks */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				185F510923A76765009F9022 /* CoreLocation.framework */,
 				188A144823273CB300D39E7E /* UserNotificationsUI.framework */,
 				188A144823273CB300D39E7E /* UserNotificationsUI.framework */,
 				188A144623273CAD00D39E7E /* UserNotifications.framework */,
 				188A144623273CAD00D39E7E /* UserNotifications.framework */,
 				18E05D0F22F11D97001E5B44 /* Foundation.framework */,
 				18E05D0F22F11D97001E5B44 /* Foundation.framework */,

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


+ 2 - 0
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/WorkspaceSettings.xcsettings

@@ -4,6 +4,8 @@
 <dict>
 <dict>
 	<key>BuildLocationStyle</key>
 	<key>BuildLocationStyle</key>
 	<string>UseAppPreferences</string>
 	<string>UseAppPreferences</string>
+	<key>BuildSystemType</key>
+	<string>Original</string>
 	<key>CustomBuildLocationType</key>
 	<key>CustomBuildLocationType</key>
 	<string>RelativeToDerivedData</string>
 	<string>RelativeToDerivedData</string>
 	<key>DerivedDataLocationStyle</key>
 	<key>DerivedDataLocationStyle</key>

+ 24 - 0
ios/JianYuIOS/JianYuIOS.xcworkspace/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -2,4 +2,28 @@
 <Bucket
 <Bucket
    type = "0"
    type = "0"
    version = "2.0">
    version = "2.0">
+   <Breakpoints>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            symbolName = ""
+            moduleName = "">
+            <Locations>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            scope = "0"
+            stopOnStyle = "0">
+         </BreakpointContent>
+      </BreakpointProxy>
+   </Breakpoints>
 </Bucket>
 </Bucket>

+ 1 - 1
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/Contents.json

@@ -2,7 +2,7 @@
   "images" : [
   "images" : [
     {
     {
       "idiom" : "universal",
       "idiom" : "universal",
-      "filename" : "laboratory.png",
+      "filename" : "laboratory@1x.png",
       "scale" : "1x"
       "scale" : "1x"
     },
     },
     {
     {

BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/laboratory.png


BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/laboratory@1x.png


BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/laboratory@2x.png


BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory.imageset/laboratory@3x.png


+ 1 - 1
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/Contents.json

@@ -2,7 +2,7 @@
   "images" : [
   "images" : [
     {
     {
       "idiom" : "universal",
       "idiom" : "universal",
-      "filename" : "laboratory1.png",
+      "filename" : "laboratory1@1x.png",
       "scale" : "1x"
       "scale" : "1x"
     },
     },
     {
     {

BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/laboratory1.png


BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/laboratory1@1x.png


BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/laboratory1@2x.png


BIN
ios/JianYuIOS/JianYuIOS/Assets.xcassets/tab/laboratory1.imageset/laboratory1@3x.png


+ 20 - 4
ios/JianYuIOS/JianYuIOS/BaseClass1/PrefixHeader.pch

@@ -92,21 +92,34 @@ _Pragma("clang diagnostic pop")\
 #import  <CommonCrypto/CommonCryptor.h>
 #import  <CommonCrypto/CommonCryptor.h>
 
 
 #define kRequestWebViewWithUrl @"kRequestWebViewWithUrl"
 #define kRequestWebViewWithUrl @"kRequestWebViewWithUrl"
-
 #define kUpdateNotifyState @"kUpdateNotifyState"
 #define kUpdateNotifyState @"kUpdateNotifyState"
 #define kAfterReceiveNewMsg @"kAfterReceiveNewMsg"
 #define kAfterReceiveNewMsg @"kAfterReceiveNewMsg"
 #define JYNewsRedPoint @"JYNewsRedPoint"
 #define JYNewsRedPoint @"JYNewsRedPoint"
 #define kReloadWebVIew @"kReloadWebVIew"
 #define kReloadWebVIew @"kReloadWebVIew"
 #define kLoginOut @"kLoginOut"
 #define kLoginOut @"kLoginOut"
 #define kNewsTable @"kNewsTable"
 #define kNewsTable @"kNewsTable"
+
+
+
+
 //点击订阅通知
 //点击订阅通知
 #define ClickSubNotiMethods @"ClickSubNotiMethods"
 #define ClickSubNotiMethods @"ClickSubNotiMethods"
 //点击支付相关通知
 //点击支付相关通知
 #define ClickPayMethods @"ClickPayMethods"
 #define ClickPayMethods @"ClickPayMethods"
-
 //支付回调通知
 //支付回调通知
 #define AlipayWXpayStatus @"AlipayWXpayStatus"
 #define AlipayWXpayStatus @"AlipayWXpayStatus"
 
 
+
+//前往登录通知-tabbar
+#define LoginIndexTabBar @"LoginIndexTabBar"
+//刷新非当前页
+#define RefreshNonCurVC @"RefreshNonCurVC"
+//刷新所有页面-非订阅
+#define RefreshAllVC @"RefreshAllVC"
+//只刷新我的和百宝箱
+#define RefreshExpAndMine @"RefreshExpAndMine"
+
+
 //微信SDK头文件
 //微信SDK头文件
 #import "WXApi.h"
 #import "WXApi.h"
 //支付宝支付头文件
 //支付宝支付头文件
@@ -118,6 +131,7 @@ _Pragma("clang diagnostic pop")\
 
 
 
 
 
 
+
 //#define kHost @"http://web-jydev-ws.jianyu360.cn/" //王山
 //#define kHost @"http://web-jydev-ws.jianyu360.cn/" //王山
 
 
 //#define kHost @"https://web-jydev-wcj.jianyu360.cn/"//王传近
 //#define kHost @"https://web-jydev-wcj.jianyu360.cn/"//王传近
@@ -130,15 +144,17 @@ _Pragma("clang diagnostic pop")\
 
 
 //#define kHost @"http://web-jydev-zxl.jianyu360.cn/" //张鑫磊
 //#define kHost @"http://web-jydev-zxl.jianyu360.cn/" //张鑫磊
 
 
-#define kHost @"http://web-jydev-xzh.jianyu360.cn/" //徐志恒
+//#define kHost @"http://web-jydev-xzh.jianyu360.cn/" //徐志恒
 
 
 //#define kHost @"https://app1.jianyu360.com/"//弃用
 //#define kHost @"https://app1.jianyu360.com/"//弃用
 
 
 
 
 //#define kHost @"https://app2-jytest.jianyu360.cn/" //测试
 //#define kHost @"https://app2-jytest.jianyu360.cn/" //测试
 
 
+//#define kHost @"https://app-jytest.jianyu360.cn/" //老测试
+
 
 
-//#define kHost @"https://res.jianyu360.com/"//正式
+#define kHost @"https://res.jianyu360.com/"//正式
 
 
 
 
 
 

+ 46 - 64
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYExpViewController.m

@@ -41,18 +41,13 @@ JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSIntege
 
 
 //新增
 //新增
 JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
 JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
-
-
+//刷新其他页面
 JSExportAs(checkLab, -(void)jsCheckLab:(NSString*)str);
 JSExportAs(checkLab, -(void)jsCheckLab:(NSString*)str);
 
 
-
-
+//登录相关
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
-
 JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
 JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
-
 JSExportAs(clearPushMessage, -(void)jsClearPushMessage:(NSString*)type);
 JSExportAs(clearPushMessage, -(void)jsClearPushMessage:(NSString*)type);
-
 JSExportAs(hideRedSpotOnMenu, -(void)jsHideRedSpotOnMenu:(NSString*)str);
 JSExportAs(hideRedSpotOnMenu, -(void)jsHideRedSpotOnMenu:(NSString*)str);
 JSExportAs(showRedSpotOnMenu, -(void)jsShowRedSpotOnMenu:(NSString*)str);
 JSExportAs(showRedSpotOnMenu, -(void)jsShowRedSpotOnMenu:(NSString*)str);
 
 
@@ -77,7 +72,7 @@ JSExportAs(getPhoneBrand, -(NSString *)jsGetPhoneBrand:(NSString *)str);
     CGPoint startTouch;
     CGPoint startTouch;
     BOOL _isMoving;
     BOOL _isMoving;
     
     
-    BOOL searchRefreshBool;
+    BOOL refreshTabBool;
 }
 }
 
 
 
 
@@ -145,9 +140,10 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
     //手势
     //手势
     
     
     
     
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:@"refreshAllVC" object:nil];
-    
-    
+    //接收全新当前All通知
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshNonCurVC:) name:RefreshNonCurVC object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:RefreshAllVC object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshExpAndMine:) name:RefreshExpAndMine object:nil];
     //    [self clearWeb];
     //    [self clearWeb];
     
     
 }
 }
@@ -382,16 +378,10 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
     }
     }
 }
 }
 
 
-
-
 -(void)pushDY:(NSDictionary *)infoDict
 -(void)pushDY:(NSDictionary *)infoDict
 {
 {
     [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshDY" object:nil userInfo:infoDict];
     [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshDY" object:nil userInfo:infoDict];
 }
 }
-
-
-
-
 // 收到通知消息
 // 收到通知消息
 -(void)afterReceiveNewMsg{
 -(void)afterReceiveNewMsg{
     NSLog(@"afterReceiveNewMsg");
     NSLog(@"afterReceiveNewMsg");
@@ -404,10 +394,25 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
     if([notification.userInfo[@"item_index"] integerValue]!=2) {
     if([notification.userInfo[@"item_index"] integerValue]!=2) {
         return;
         return;
     }
     }
-    
-    
     [self webViewRequestByMsg];
     [self webViewRequestByMsg];
 }
 }
+//刷新页面相关
+-(void)refreshNonCurVC:(NSNotification *)notificaition{
+    if(self.tabBarController.selectedIndex != 2) {
+        refreshTabBool = YES;
+        [self webViewFirstRequest];
+    }
+}
+
+-(void)refreshAllVC:(NSNotification *)notificaition{
+    [self webViewFirstRequest];
+}
+-(void)refreshExpAndMine:(NSNotification *)notificaition{
+    refreshTabBool = YES;
+    [self webViewFirstRequest];
+}
+
+
 
 
 - (void)hideTabBar {
 - (void)hideTabBar {
     kMainQueue(^{
     kMainQueue(^{
@@ -443,16 +448,6 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
     });
     });
 }
 }
 
 
-
--(void)dealTabBar
-{
-    NSLog(@"刷新第三个页面");
-    kMainQueue(^{
-        
-        [self webViewFirstRequest];
-    });
-}
-
 -(void)judgeIsHidden
 -(void)judgeIsHidden
 {
 {
     NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
     NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
@@ -522,8 +517,8 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
 - (void)webViewDidFinishLoad:(UIWebView *)webView{
 - (void)webViewDidFinishLoad:(UIWebView *)webView{
     
     
     
     
-    if(searchRefreshBool) {
-        searchRefreshBool = NO;
+    if(refreshTabBool) {
+        refreshTabBool = NO;
     }else {
     }else {
         //正常的网页加载
         //正常的网页加载
         [self judgeIsHidden];//是否隐藏
         [self judgeIsHidden];//是否隐藏
@@ -942,58 +937,37 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
     return nil;
     return nil;
 }
 }
 
 
-
--(void)jsCheckLab:(NSString*)str
-{
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshSS" object:nil userInfo:nil];
-}
-
-
-//首页登录通知刷新页面
--(void)refreshAllVC:(NSNotification *)notificaition{
-    searchRefreshBool = YES;
-    [self webViewFirstRequest];
-}
-
-
-
--(void)jsBackUrl:(NSString*)str
+-(void)jsLoginSuccess:(NSString*)status
 {
 {
-    NSLog(@"Mine返回首页%@",str);
-    if([str isEqualToString:@"H"]) {
-        //测试返回首页
+    NSLog(@"exp登录成功提示");
+    [GlobalData shareInstance].isReLogin = YES;
+    if([status isEqualToString:@"S"]) {
         kMainQueue(^{
         kMainQueue(^{
+            [[NSNotificationCenter defaultCenter] postNotificationName:RefreshAllVC object:nil userInfo:nil];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             tab.selectedIndex = 0;
             tab.selectedIndex = 0;
-            
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":@"0"}];
-            
-            [self dealTabBar];
         });
         });
+    }else {
         
         
     }
     }
-    
-    
 }
 }
 
 
 
 
-
--(void)jsLoginSuccess:(NSString*)status
+-(void)jsBackUrl:(NSString*)str
 {
 {
-    NSLog(@"exp登录成功提示");
-    [GlobalData shareInstance].isReLogin = YES;
-    if([status isEqualToString:@"S"]) {
+    NSLog(@"exp返回");
+    if([str isEqualToString:@"H"]) {
         kMainQueue(^{
         kMainQueue(^{
+            [[NSNotificationCenter defaultCenter] postNotificationName:RefreshAllVC object:nil userInfo:nil];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             tab.selectedIndex = 0;
             tab.selectedIndex = 0;
-            
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":@"5"}];
         });
         });
-    }else {
         
         
     }
     }
+    
+    
 }
 }
 
 
 
 
@@ -1097,6 +1071,14 @@ NSString *const AesKey_2 = @"mGlAgnIBB8bx2nch";
 }
 }
 
 
 
 
+//刷新页面方法
+-(void)jsCheckLab:(NSString*)str
+{
+//    [[NSNotificationCenter defaultCenter] postNotificationName:@" c" object:nil userInfo:nil];  //刷新首页
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:RefreshNonCurVC object:nil userInfo:nil]; 
+}
+
 
 
 /*
 /*
  #pragma mark - Navigation
  #pragma mark - Navigation

+ 37 - 46
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYMineViewController.m

@@ -39,18 +39,15 @@ JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSIntege
 
 
 
 
 
 
-
 //新增
 //新增
 JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
 JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
+//刷新其他页面
+JSExportAs(checkLab, -(void)jsCheckLab:(NSString*)str);
 
 
+//登录相关
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
-
 JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
 JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
-
-
-
 JSExportAs(clearPushMessage, -(void)jsClearPushMessage:(NSString*)type);
 JSExportAs(clearPushMessage, -(void)jsClearPushMessage:(NSString*)type);
-
 JSExportAs(hideRedSpotOnMenu, -(void)jsHideRedSpotOnMenu:(NSString*)str);
 JSExportAs(hideRedSpotOnMenu, -(void)jsHideRedSpotOnMenu:(NSString*)str);
 JSExportAs(showRedSpotOnMenu, -(void)jsShowRedSpotOnMenu:(NSString*)str);
 JSExportAs(showRedSpotOnMenu, -(void)jsShowRedSpotOnMenu:(NSString*)str);
 
 
@@ -75,7 +72,7 @@ JSExportAs(getPhoneBrand, -(NSString *)jsGetPhoneBrand:(NSString *)str);
     CGPoint startTouch;
     CGPoint startTouch;
     BOOL _isMoving;
     BOOL _isMoving;
     
     
-    BOOL searchRefreshBool;
+    BOOL refreshTabBool;
 }
 }
 
 
 
 
@@ -159,9 +156,13 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
     [self.view addGestureRecognizer:recognizer];
     [self.view addGestureRecognizer:recognizer];
     //手势
     //手势
     
     
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:@"refreshAllVC" object:nil];
     
     
-    //    [self clearWeb];
+
+    //接收全新当前All通知
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshNonCurVC:) name:RefreshNonCurVC object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:RefreshAllVC object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshExpAndMine:) name:RefreshExpAndMine object:nil];
     
     
 }
 }
 
 
@@ -432,11 +433,25 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
     if([notification.userInfo[@"item_index"] integerValue]!=3) {
     if([notification.userInfo[@"item_index"] integerValue]!=3) {
         return;
         return;
     }
     }
-    
-    
     [self webViewRequestByMsg];
     [self webViewRequestByMsg];
 }
 }
 
 
+//刷新页面相关
+-(void)refreshNonCurVC:(NSNotification *)notificaition{
+    if(self.tabBarController.selectedIndex != 3) {
+        refreshTabBool = YES;
+        [self webViewFirstRequest];
+    }
+}
+-(void)refreshAllVC:(NSNotification *)notificaition{
+    [self webViewFirstRequest];
+}
+-(void)refreshExpAndMine:(NSNotification *)notificaition{
+    refreshTabBool = YES;
+    [self webViewFirstRequest];
+}
+
+
 - (void)hideTabBar {
 - (void)hideTabBar {
     
     
     kMainQueue(^{
     kMainQueue(^{
@@ -472,15 +487,6 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
     });
     });
 }
 }
 
 
--(void)dealTabBar
-{
-    NSLog(@"刷新第四个页面");
-    kMainQueue(^{
-        [self webViewFirstRequest];
-    });
-    
-}
-
 -(void)judgeIsHidden
 -(void)judgeIsHidden
 {
 {
     NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
     NSString *current_url = [self.webView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
@@ -544,8 +550,8 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
 #pragma mark  webView代理方法
 #pragma mark  webView代理方法
 - (void)webViewDidFinishLoad:(UIWebView *)webView{
 - (void)webViewDidFinishLoad:(UIWebView *)webView{
     
     
-    if(searchRefreshBool) {
-        searchRefreshBool = NO;
+    if(refreshTabBool) {
+        refreshTabBool = NO;
     }else {
     }else {
         //正常的网页加载
         //正常的网页加载
         [self judgeIsHidden];//是否隐藏
         [self judgeIsHidden];//是否隐藏
@@ -975,22 +981,15 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 
 -(void)jsBackUrl:(NSString*)str
 -(void)jsBackUrl:(NSString*)str
 {
 {
-    NSLog(@"Mine返回首页%@",str);
+    NSLog(@"me返回");
     if([str isEqualToString:@"H"]) {
     if([str isEqualToString:@"H"]) {
-        //测试返回首页
         kMainQueue(^{
         kMainQueue(^{
+            [[NSNotificationCenter defaultCenter] postNotificationName:RefreshAllVC object:nil userInfo:nil];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             tab.selectedIndex = 0;
             tab.selectedIndex = 0;
-            
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":@"0"}];
-            
-            [self dealTabBar];
         });
         });
-        
     }
     }
-    
-    
 }
 }
 
 
 
 
@@ -1001,11 +1000,11 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
     [GlobalData shareInstance].isReLogin = YES;
     [GlobalData shareInstance].isReLogin = YES;
     if([status isEqualToString:@"S"]) {
     if([status isEqualToString:@"S"]) {
         kMainQueue(^{
         kMainQueue(^{
+            [[NSNotificationCenter defaultCenter] postNotificationName:RefreshAllVC object:nil userInfo:nil];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             tab.selectedIndex = 0;
             tab.selectedIndex = 0;
             
             
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":@"5"}];
         });
         });
     }else {
     }else {
         
         
@@ -1014,20 +1013,6 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
 
 
 
 
 
 
-
-
-
-
-
-//首页登录通知刷新页面
--(void)refreshAllVC:(NSNotification *)notificaition{
-    searchRefreshBool = YES;
-    [self webViewFirstRequest];
-}
-
-
-
-
 -(void)jsHideRedSpotOnMenu:(NSString*)str
 -(void)jsHideRedSpotOnMenu:(NSString*)str
 {
 {
     NSLog(@"wd隐藏:%@",str);
     NSLog(@"wd隐藏:%@",str);
@@ -1129,6 +1114,12 @@ NSString *const AesKey_3 = @"mGlAgnIBB8bx2nch";
 }
 }
 
 
 
 
+//刷新页面方法
+-(void)jsCheckLab:(NSString*)str
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:RefreshNonCurVC object:nil userInfo:nil];
+}
+
 /*
 /*
  #pragma mark - Navigation
  #pragma mark - Navigation
  
  

+ 180 - 57
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYSearchViewController.m

@@ -8,7 +8,7 @@
 
 
 #import "JYSearchViewController.h"
 #import "JYSearchViewController.h"
 #import "JYTabBarController.h"
 #import "JYTabBarController.h"
-
+#import <CoreLocation/CoreLocation.h>
 
 
 @protocol JYSearchViewControllerJSExport<JSExport>
 @protocol JYSearchViewControllerJSExport<JSExport>
 
 
@@ -41,14 +41,13 @@ JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSIntege
 
 
 //新增
 //新增
 JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
 JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
+//刷新其他页面
+JSExportAs(checkLab, -(void)jsCheckLab:(NSString*)str);
 
 
+//登录相关
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
-
 JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
 JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
-
-
 //JSExportAs(redirectKeyset, -(void)jsRedirectKeyset:(NSString*)str);
 //JSExportAs(redirectKeyset, -(void)jsRedirectKeyset:(NSString*)str);
-
 JSExportAs(clearPushMessage, -(void)jsClearPushMessage:(NSString*)type);
 JSExportAs(clearPushMessage, -(void)jsClearPushMessage:(NSString*)type);
 
 
 
 
@@ -65,18 +64,22 @@ JSExportAs(aliPay, -(void)jsAliPay:(NSString*)str);
 JSExportAs(getOtherPushRid, -(NSString *)jsGetOtherPushRid:(NSString *)str);
 JSExportAs(getOtherPushRid, -(NSString *)jsGetOtherPushRid:(NSString *)str);
 JSExportAs(getPhoneBrand, -(NSString *)jsGetPhoneBrand:(NSString *)str);
 JSExportAs(getPhoneBrand, -(NSString *)jsGetPhoneBrand:(NSString *)str);
 
 
+//返回省-市
+JSExportAs(getLocation, -(NSString *)jsGetLocation:(NSString *)str);
 
 
+//切换底部栏
+JSExportAs(chooseTab, -(void)jsChooseTab:(int)indexTab);
 
 
 
 
 @end
 @end
 
 
 
 
-@interface JYSearchViewController ()<UIWebViewDelegate, JYSearchViewControllerJSExport>
+@interface JYSearchViewController ()<UIWebViewDelegate, JYSearchViewControllerJSExport,CLLocationManagerDelegate>
 {
 {
     CGPoint startTouch;
     CGPoint startTouch;
     BOOL _isMoving;
     BOOL _isMoving;
     
     
-    NSInteger pushIndex;
+    NSInteger pushIndex;//第几个模块过来的
     
     
     NSInteger _timeTick;
     NSInteger _timeTick;
     NSInteger _time;
     NSInteger _time;
@@ -84,7 +87,7 @@ JSExportAs(getPhoneBrand, -(NSString *)jsGetPhoneBrand:(NSString *)str);
     BOOL autologin;
     BOOL autologin;
     BOOL notiFinish;
     BOOL notiFinish;
     
     
-    BOOL expRefreshBool; //实验室 是否刷新
+    BOOL refreshTabBool; //实验室-百宝箱 是否刷新
 }
 }
 
 
 
 
@@ -103,6 +106,8 @@ JSExportAs(getPhoneBrand, -(NSString *)jsGetPhoneBrand:(NSString *)str);
 @property (nonatomic, strong)NSMutableDictionary *notiDict;
 @property (nonatomic, strong)NSMutableDictionary *notiDict;
 @property (nonatomic,weak)NSTimer *timer;
 @property (nonatomic,weak)NSTimer *timer;
 
 
+@property(nonatomic,strong)CLLocationManager *locaationManager;
+@property(nonatomic,strong)NSString *placeAdr;
 @end
 @end
 
 
 NSString *const kInitVector_0 = @"1389461544135476";
 NSString *const kInitVector_0 = @"1389461544135476";
@@ -155,12 +160,6 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
     [[AFNetworkReachabilityManager sharedManager] startMonitoring];
     [[AFNetworkReachabilityManager sharedManager] startMonitoring];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachChanged:) name:AFNetworkingReachabilityDidChangeNotification object:nil];
     
     
-    
-    
-    
-    //前往登录通知-tabbar
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(isLoginTabBar:) name:@"isLoginTabBar" object:nil];
-    
     UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
     UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc]initWithTarget:self action:@selector(paningGestureReceive:)];
     [recognizer delaysTouchesBegan];
     [recognizer delaysTouchesBegan];
     [self.view addGestureRecognizer:recognizer];
     [self.view addGestureRecognizer:recognizer];
@@ -175,14 +174,21 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
         }
         }
     }
     }
     
     
-    //新增刷新通知
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshSS:) name:@"refreshSS" object:nil];
     
     
-    //展示底部红的通知
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(newsRedPoint:) name:JYNewsRedPoint object:nil];
     
     
     
     
+    //前往登录通知-tabbar
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(isLoginTabBar:) name:LoginIndexTabBar object:nil];
+    //新增刷新通知
+//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshSS:) name:@"refreshSS" object:nil];
+    //展示底部红的通知
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(newsRedPoint:) name:JYNewsRedPoint object:nil];
+    //接收全新通知
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshNonCurVC:) name:RefreshNonCurVC object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:RefreshAllVC object:nil];
     
     
+    //初始化临时属性
+    self.placeAdr = [NSString new];
     
     
     
     
     
     
@@ -567,80 +573,69 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
     
     
 }
 }
 
 
+//刷新页面相关
+-(void)refreshNonCurVC:(NSNotification *)notificaition{
+    if(self.tabBarController.selectedIndex != 0) {
+        refreshTabBool = YES;
+        [self webViewFirstRequest];
+    }
+}
+-(void)refreshAllVC:(NSNotification *)notificaition{
+    [self webViewFirstRequest];
+}
+
+
 //前往登录页面
 //前往登录页面
 -(void)isLoginTabBar:(NSNotification *)notification
 -(void)isLoginTabBar:(NSNotification *)notification
 {
 {
     NSDictionary *dict = notification.userInfo;
     NSDictionary *dict = notification.userInfo;
-    //
     NSLog(@"我从第几个页面过来:%@",dict[@"item_index"]);
     NSLog(@"我从第几个页面过来:%@",dict[@"item_index"]);
     pushIndex = [dict[@"item_index"] integerValue];
     pushIndex = [dict[@"item_index"] integerValue];
-    
-    //
     NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/login"];
     NSString *url = [NSString stringWithFormat:@"%@%@", kHost, @"jyapp/free/login"];
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     url =  [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
     [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
     
     
-    
-    
-    
-    //    NSString *index = [NSString stringWithFormat:@"%ld",pushIndex];
-    //    [[NSNotificationCenter defaultCenter] postNotificationName:@"isLoginTabBar" object:nil userInfo:@{@"item_index":index}];
-    
 }
 }
 
 
+
+
 //js返回首页
 //js返回首页
 -(void)jsBackUrl:(NSString*)str
 -(void)jsBackUrl:(NSString*)str
 {
 {
-    NSLog(@"search返回首页,search返回首页,search返回首页,search返回首页,search返回首页,search返回首页");
+    NSLog(@"search返回首页,search返回首页");
     if([str isEqualToString:@"H"]) {
     if([str isEqualToString:@"H"]) {
         pushIndex = 0;
         pushIndex = 0;
         [self webViewFirstRequest];
         [self webViewFirstRequest];
     }
     }
 }
 }
 
 
-
-
 //js方法登录成功
 //js方法登录成功
 -(void)jsLoginSuccess:(NSString*)status
 -(void)jsLoginSuccess:(NSString*)status
 {
 {
-    NSLog(@"登录成功提示;%@当前下标:%ld",status,(long)pushIndex);
+    NSLog(@"首页登录成功提示");
     [GlobalData shareInstance].isReLogin = YES;
     [GlobalData shareInstance].isReLogin = YES;
     if([status isEqualToString:@"S"]) {
     if([status isEqualToString:@"S"]) {
         if(pushIndex!=0) {
         if(pushIndex!=0) {
-            NSLog(@"SSSSSS");
-            
             kMainQueue((^{
             kMainQueue((^{
-                NSString *index = [NSString stringWithFormat:@"%ld",(long)pushIndex];
-                [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":index}];
+                [[NSNotificationCenter defaultCenter] postNotificationName:RefreshAllVC object:nil userInfo:nil];
                 AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                 AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                 JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
                 JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
                 tab.selectedIndex = pushIndex;
                 tab.selectedIndex = pushIndex;
                 pushIndex = 0;
                 pushIndex = 0;
             }));
             }));
         }else {
         }else {
+            NSLog(@"刷新页面------当前页面");
             [self webViewFirstRequest];
             [self webViewFirstRequest];
         }
         }
         
         
     }else if ([status isEqualToString:@""]) {
     }else if ([status isEqualToString:@""]) {
-        //不刷新订阅 首页,刷新其他
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"refreshAllVC" object:nil userInfo:nil];
+        //不刷新订阅-首页,刷新其他
+        [[NSNotificationCenter defaultCenter] postNotificationName:RefreshExpAndMine object:nil userInfo:nil];
     }else {
     }else {
         
         
     }
     }
 }
 }
 
 
--(void)dealTabBar
-{
-    NSLog(@"刷新第一个页面");
-    kMainQueue(^{
-        [self webViewFirstRequest];
-    });
-    
-    
-    
-}
-
-
 - (void)hideTabBar {
 - (void)hideTabBar {
     NSLog(@"隐藏tabbar");
     NSLog(@"隐藏tabbar");
     kMainQueue(^{
     kMainQueue(^{
@@ -747,8 +742,8 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
         notiFinish = YES;
         notiFinish = YES;
     }
     }
     
     
-    if(expRefreshBool) {
-        expRefreshBool = NO;
+    if(refreshTabBool) {
+        refreshTabBool = NO;
     }else {
     }else {
         //正常的网页加载
         //正常的网页加载
         [self judgeIsHidden];//是否隐藏
         [self judgeIsHidden];//是否隐藏
@@ -1201,11 +1196,11 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
 //}
 //}
 
 
 //通知刷新页面
 //通知刷新页面
--(void)refreshSS:(NSNotification *)notificaition{
-    
-    expRefreshBool = YES;
-    [self webViewFirstRequest];
-}
+//-(void)refreshSS:(NSNotification *)notificaition{
+//
+//    refreshTabBool = YES;
+//    [self webViewFirstRequest];
+//}
 
 
 
 
 
 
@@ -1301,7 +1296,7 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
 -(NSString *)jsGetOtherPushRid:(NSString *)str
 -(NSString *)jsGetOtherPushRid:(NSString *)str
 {
 {
     NSLog(@"取deviceToken:%@",[LXUserDefaults deviceToken]);
     NSLog(@"取deviceToken:%@",[LXUserDefaults deviceToken]);
-    return [LXUserDefaults deviceToken];;
+    return [LXUserDefaults deviceToken];
 }
 }
 -(NSString *)jsGetPhoneBrand:(NSString *)str
 -(NSString *)jsGetPhoneBrand:(NSString *)str
 {
 {
@@ -1309,11 +1304,139 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
     return device.platformString;
     return device.platformString;
 }
 }
 
 
+-(void)jsChooseTab:(int)indexTab
+{
+    kMainQueue((^{
+        AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+        JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
+        tab.selectedIndex = indexTab;
+        pushIndex = indexTab;
+    }));
+}
+
+//刷新页面方法
+-(void)jsCheckLab:(NSString*)str
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:RefreshNonCurVC object:nil userInfo:nil];
+}
+
+
 
 
 
 
 
 
 
 
 
 
+//获取定位相关
+-(NSString *)jsGetLocation:(NSString *)str
+{
+    NSLog(@"------开始调用获取位置");
+    // 1.检查定位服务是否开启
+    if ([self checkLocationServiceIsEnabled]) {
+        // 2.创建定位管理器:
+        [self createCLManager];
+    }else{
+        NSLog(@"定位不可用");
+    }
+    NSLog(@"即将返回城市信息-%@",self.placeAdr);
+    return self.placeAdr;
+}
+- (BOOL)checkLocationServiceIsEnabled{
+    // 该方法是类方法,和我们创建的管理器没有关系
+    if ([CLLocationManager locationServicesEnabled]) {
+        return YES;
+    }
+    return NO;
+}
+
+- (void)createCLManager{
+    // 创建CoreLocation管理对象
+    self.locaationManager = [[CLLocationManager alloc]init];
+    // 设定定位精准度
+    [self.locaationManager setDesiredAccuracy:kCLLocationAccuracyBest];
+    // 设定DistanceFilter可以在用户移动指定距离之后触发更新事件(100米更新一次)
+    [self.locaationManager setDistanceFilter:100.f];
+    // 设置代理
+    self.locaationManager.delegate = self;
+    // 开始更新定位
+    [self.locaationManager startUpdatingLocation];
+}
+// 代理方法,更新位置
+-  (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray<CLLocation *> *)locations{
+    CLLocation * newLocation = [locations lastObject];
+    // 判空处理
+    if (newLocation.horizontalAccuracy < 0) {
+        return;
+    }
+    CLGeocoder *geocoder = [[CLGeocoder alloc] init];
+    [geocoder reverseGeocodeLocation:newLocation completionHandler:^(NSArray *placemarks, NSError *error) {
+        for (CLPlacemark *placeMark in placemarks) {
+            //NSLog(@"位置:%@", placeMark.name);
+            //NSLog(@"街道:%@", placeMark.thoroughfare);
+            //NSLog(@"子街道:%@", placeMark.subThoroughfare);
+            //NSLog(@"区\\县:%@", placeMark.subLocality);
+            //NSLog(@"市:%@", placeMark.locality);
+            //NSLog(@"行政区:%@", placeMark.administrativeArea);
+            //NSLog(@"国家:%@", placeMark.country);
+            
+            self.placeAdr = [placeMark.administrativeArea stringByAppendingString:[NSString stringWithFormat:@"-%@",placeMark.locality]];
+        }
+    }];
+    
+//    [self.locaationManager stopUpdatingLocation];
+//    self.locaationManager.delegate=nil;
+    //    //获取定位经纬度
+    //    CLLocationCoordinate2D coor2D = newLocation.coordinate;
+    //    NSLog(@"纬度为:%f, 经度为:%f", coor2D.latitude, coor2D.longitude);
+    //
+    //    // 获取定位海拔高度
+    //    CLLocationDistance altitude = newLocation.altitude;
+    //    NSLog(@"高度为:%f", altitude);
+    //
+    //    // 获取定位水平精确度, 垂直精确度
+    //    CLLocationAccuracy horizontalAcc = newLocation.horizontalAccuracy;
+    //    CLLocationAccuracy verticalAcc = newLocation.verticalAccuracy;
+    //    NSLog(@"%f, %f", horizontalAcc, verticalAcc);
+}
+
+// 代理方法,定位权限检查
+-(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status{
+    switch (status) {
+        case kCLAuthorizationStatusNotDetermined:{
+            NSLog(@"用户还未决定授权");
+            // 主动获得授权
+            [self.locaationManager requestWhenInUseAuthorization];
+            break;
+        }
+        case kCLAuthorizationStatusRestricted:
+        {
+            NSLog(@"访问受限");
+            // 主动获得授权
+            [self.locaationManager requestWhenInUseAuthorization];
+            break;
+        }
+        case kCLAuthorizationStatusDenied:{
+            // 此时使用主动获取方法也不能申请定位权限
+            // 类方法,判断是否开启定位服务
+            if ([CLLocationManager locationServicesEnabled]) {
+                NSLog(@"定位服务开启,被拒绝");
+            } else {
+                NSLog(@"定位服务关闭,不可用");
+            }
+            break;
+        }
+        case kCLAuthorizationStatusAuthorizedAlways:{
+            NSLog(@"获得前后台授权");
+            break;
+        }
+        case kCLAuthorizationStatusAuthorizedWhenInUse:{
+            NSLog(@"获得前台授权");
+            break;
+        }
+        default:
+            break;
+    }
+}
+
 
 
 
 
 
 

+ 35 - 27
ios/JianYuIOS/JianYuIOS/Classes(模块)/JYSubViewController.m

@@ -40,9 +40,12 @@ JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSIntege
 
 
 //新增
 //新增
 JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
 JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
+//刷新其他页面
+JSExportAs(checkLab, -(void)jsCheckLab:(NSString*)str);
+
+//登录相关
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
 JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
 JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
 JSExportAs(backUrl, -(void)jsBackUrl:(NSString*)str);
-
 JSExportAs(hideRedSpotOnMenu, -(void)jsHideRedSpotOnMenu:(NSString*)str);
 JSExportAs(hideRedSpotOnMenu, -(void)jsHideRedSpotOnMenu:(NSString*)str);
 JSExportAs(showRedSpotOnMenu, -(void)jsShowRedSpotOnMenu:(NSString*)str);
 JSExportAs(showRedSpotOnMenu, -(void)jsShowRedSpotOnMenu:(NSString*)str);
 JSExportAs(clearPushMessage, -(void)jsClearPushMessage:(NSString*)type);
 JSExportAs(clearPushMessage, -(void)jsClearPushMessage:(NSString*)type);
@@ -66,6 +69,8 @@ JSExportAs(getPhoneBrand, -(NSString *)jsGetPhoneBrand:(NSString *)str);
 {
 {
     CGPoint startTouch;
     CGPoint startTouch;
     BOOL _isMoving;
     BOOL _isMoving;
+    
+    BOOL refreshTabBool; 
 }
 }
 
 
 
 
@@ -146,10 +151,9 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
     
     
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshDY:) name:@"refreshDY" object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshDY:) name:@"refreshDY" object:nil];
     
     
-    
-    
-    
-    //    [self clearWeb];
+    //接收全新当前All通知
+   [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshNonCurVC:) name:RefreshNonCurVC object:nil];
+//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(refreshAllVC:) name:RefreshAllVC object:nil];
 }
 }
 
 
 -(void)newsRedPoint:(NSNotification *)notificaition
 -(void)newsRedPoint:(NSNotification *)notificaition
@@ -398,9 +402,19 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
     if([notification.userInfo[@"item_index"] integerValue]!=1) {
     if([notification.userInfo[@"item_index"] integerValue]!=1) {
         return;
         return;
     }
     }
-    
+
     [self webViewRequestByMsg];
     [self webViewRequestByMsg];
 }
 }
+//刷新页面相关
+-(void)refreshNonCurVC:(NSNotification *)notificaition{
+    if(self.tabBarController.selectedIndex != 1) {
+        [self webViewFirstRequest];
+    }
+}
+//-(void)refreshAllVC:(NSNotification *)notificaition{
+//    [self webViewFirstRequest];
+//}
+
 
 
 - (void)hideTabBar {
 - (void)hideTabBar {
     kMainQueue(^{
     kMainQueue(^{
@@ -438,15 +452,6 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
     });
     });
 }
 }
 
 
-//
-
--(void)dealTabBar
-{
-    NSLog(@"刷新第二个页面");
-    kMainQueue(^{
-        [self webViewFirstRequest];
-    });
-}
 
 
 -(void)judgeIsHidden
 -(void)judgeIsHidden
 {
 {
@@ -510,8 +515,12 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
 #pragma mark  webView代理方法
 #pragma mark  webView代理方法
 - (void)webViewDidFinishLoad:(UIWebView *)webView{
 - (void)webViewDidFinishLoad:(UIWebView *)webView{
     
     
-    [self judgeIsHidden];//是否隐藏
-    
+    if(refreshTabBool) {
+        refreshTabBool = NO;
+    }else {
+        //正常的网页加载
+        [self judgeIsHidden];//是否隐藏
+    }
     
     
     [self removeNoNetViews];
     [self removeNoNetViews];
     [[LXViewControllerManager shareViewControllerManager] hideHud];
     [[LXViewControllerManager shareViewControllerManager] hideHud];
@@ -931,9 +940,6 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
 //通知刷新页面
 //通知刷新页面
 -(void)refreshDY:(NSNotification *)notificaition{
 -(void)refreshDY:(NSNotification *)notificaition{
     
     
-    
-    //    NSDictionary * infoDict = [notificaition object][@"userInfo"];
-    
     NSDictionary *infoDict = notificaition.userInfo;
     NSDictionary *infoDict = notificaition.userInfo;
     NSLog(@"%@",infoDict);
     NSLog(@"%@",infoDict);
     if (!infoDict) {
     if (!infoDict) {
@@ -948,17 +954,14 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
 
 
 -(void)jsBackUrl:(NSString*)str
 -(void)jsBackUrl:(NSString*)str
 {
 {
-    NSLog(@"Mine返回首页%@",str);
+    NSLog(@"sub返回");
     if([str isEqualToString:@"H"]) {
     if([str isEqualToString:@"H"]) {
         //测试返回首页
         //测试返回首页
         kMainQueue(^{
         kMainQueue(^{
+            [[NSNotificationCenter defaultCenter] postNotificationName:RefreshAllVC object:nil userInfo:nil];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             tab.selectedIndex = 0;
             tab.selectedIndex = 0;
-            
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":@"0"}];
-            
-            [self dealTabBar];
         });
         });
         
         
     }
     }
@@ -974,11 +977,10 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
     [GlobalData shareInstance].isReLogin = YES;
     [GlobalData shareInstance].isReLogin = YES;
     if([status isEqualToString:@"S"]) {
     if([status isEqualToString:@"S"]) {
         kMainQueue(^{
         kMainQueue(^{
+            [[NSNotificationCenter defaultCenter] postNotificationName:RefreshAllVC object:nil userInfo:nil];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
             tab.selectedIndex = 0;
             tab.selectedIndex = 0;
-            
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":@"5"}];
         });
         });
     }else {
     }else {
         
         
@@ -1085,6 +1087,12 @@ NSString *const AesKey_1 = @"mGlAgnIBB8bx2nch";
     return device.platformString;
     return device.platformString;
 }
 }
 
 
+//刷新页面方法
+-(void)jsCheckLab:(NSString*)str
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:RefreshNonCurVC object:nil userInfo:nil];
+}
+
 /*
 /*
  #pragma mark - Navigation
  #pragma mark - Navigation
  
  

+ 8 - 0
ios/JianYuIOS/JianYuIOS/Info.plist

@@ -118,6 +118,14 @@
 			</dict>
 			</dict>
 		</dict>
 		</dict>
 	</dict>
 	</dict>
+	<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
+	<string>是否允许剑鱼标讯访问您的位置?</string>
+	<key>NSCameraUsageDescription</key>
+	<string>是否允许剑鱼标讯使用您的相机,用于拍摄照片?</string>
+	<key>NSLocationWhenInUseUsageDescription</key>
+	<string>是否允许剑鱼标讯访问您的位置?</string>
+	<key>NSPhotoLibraryUsageDescription</key>
+	<string>是否允许剑鱼标讯访问你的媒体资料库,用于获取照片?</string>
 	<key>UIBackgroundModes</key>
 	<key>UIBackgroundModes</key>
 	<array>
 	<array>
 		<string>remote-notification</string>
 		<string>remote-notification</string>

+ 4 - 17
ios/JianYuIOS/JianYuIOS/JYTabBarController.m

@@ -64,7 +64,7 @@
     [self setUpAllChildVc];
     [self setUpAllChildVc];
     [self setSelectedIndex:0];
     [self setSelectedIndex:0];
     
     
-    [self switchRootViewController];
+//    [self switchRootViewController];
 }
 }
 
 
 
 
@@ -79,7 +79,7 @@
         if(tabBarController.tabBar.selectedItem.tag!=0) {
         if(tabBarController.tabBar.selectedItem.tag!=0) {
             NSLog(@"没有token前往登录");
             NSLog(@"没有token前往登录");
             NSString *index = [NSString stringWithFormat:@"%ld",tabBarController.tabBar.selectedItem.tag];
             NSString *index = [NSString stringWithFormat:@"%ld",tabBarController.tabBar.selectedItem.tag];
-            [[NSNotificationCenter defaultCenter] postNotificationName:@"isLoginTabBar" object:nil userInfo:@{@"item_index":index}];
+            [[NSNotificationCenter defaultCenter] postNotificationName:LoginIndexTabBar object:nil userInfo:@{@"item_index":index}];
             return NO;
             return NO;
         }else {
         }else {
             NSLog(@"没有token,当前在搜索页面");
             NSLog(@"没有token,当前在搜索页面");
@@ -103,7 +103,7 @@
     [self setUpOneChildVcWithVc:self.V2 Image:@"subscribe" selectedImage:@"subscribe1" title:@"订阅" tag:1];
     [self setUpOneChildVcWithVc:self.V2 Image:@"subscribe" selectedImage:@"subscribe1" title:@"订阅" tag:1];
 
 
     self.V3 = [[JYExpViewController alloc] init];
     self.V3 = [[JYExpViewController alloc] init];
-    [self setUpOneChildVcWithVc:self.V3 Image:@"laboratory" selectedImage:@"laboratory1" title:@"实验室" tag:2];
+    [self setUpOneChildVcWithVc:self.V3 Image:@"laboratory" selectedImage:@"laboratory1" title:@"百宝箱" tag:2];
 
 
 
 
     self.V4 = [[JYMineViewController alloc] init];
     self.V4 = [[JYMineViewController alloc] init];
@@ -161,24 +161,11 @@
 
 
 #pragma mark - 根控制器的切换
 #pragma mark - 根控制器的切换
 -(void)switchRootViewController
 -(void)switchRootViewController
-{
-   [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeItems:) name:@"changeItems" object:nil];
-}
-
--(void)changeItems:(NSNotification *)notification
 {
 {
     
     
-    NSLog(@"收到改变tabbar的通知");
-    NSDictionary *dict = notification.userInfo;
-    NSInteger index = [dict[@"item_index"] integerValue];
+}
 
 
-    [self.V1 dealTabBar];
-//    [self.V2 dealTabBar];
-    [self.V3 dealTabBar];
-    [self.V4 dealTabBar];
 
 
-    
-}
 - (void)didReceiveMemoryWarning {
 - (void)didReceiveMemoryWarning {
     [super didReceiveMemoryWarning];
     [super didReceiveMemoryWarning];
     // Dispose of any resources that can be recreated.
     // Dispose of any resources that can be recreated.