Browse Source

中经联盟修改活动报名逻辑 v2.2.1

贺泌钦 1 year ago
parent
commit
ddacfa394b

+ 15 - 1
ZhongJingLianMeng.xcodeproj/project.pbxproj

@@ -304,6 +304,7 @@
 		CCF9555C21B79D71006DE1B2 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CCF9555B21B79D71006DE1B2 /* libsqlite3.tbd */; };
 		CCF9555E21B79D80006DE1B2 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = CCF9555D21B79D80006DE1B2 /* libz.tbd */; };
 		CCF9556021B79D8E006DE1B2 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCF9555F21B79D8D006DE1B2 /* CoreTelephony.framework */; };
+		CCFE40A12553DF6800F58DC5 /* LMWebviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CCFE40A02553DF6800F58DC5 /* LMWebviewController.m */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -833,6 +834,8 @@
 		CCF9555B21B79D71006DE1B2 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
 		CCF9555D21B79D80006DE1B2 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
 		CCF9555F21B79D8D006DE1B2 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
+		CCFE409F2553DF6700F58DC5 /* LMWebviewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LMWebviewController.h; sourceTree = "<group>"; };
+		CCFE40A02553DF6800F58DC5 /* LMWebviewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LMWebviewController.m; sourceTree = "<group>"; };
 		EBE3D243B8A22B20959F95A0 /* Pods-ZhongJingLianMeng.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZhongJingLianMeng.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ZhongJingLianMeng/Pods-ZhongJingLianMeng.debug.xcconfig"; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
@@ -1120,6 +1123,7 @@
 		CC1CE926219BB579004F8F79 /* ZhongJingLianMeng */ = {
 			isa = PBXGroup;
 			children = (
+				CCFE409E2553DF2600F58DC5 /* NewFileGroup */,
 				CC1D359121B6584300D3CD65 /* ZhongJingLianMeng.entitlements */,
 				CC1CE95A219BCEBB004F8F79 /* AppDelegate */,
 				CC1CE959219BCE90004F8F79 /* main */,
@@ -1930,6 +1934,15 @@
 			path = analytics_ios_5.5.0;
 			sourceTree = "<group>";
 		};
+		CCFE409E2553DF2600F58DC5 /* NewFileGroup */ = {
+			isa = PBXGroup;
+			children = (
+				CCFE409F2553DF6700F58DC5 /* LMWebviewController.h */,
+				CCFE40A02553DF6800F58DC5 /* LMWebviewController.m */,
+			);
+			path = NewFileGroup;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -2187,6 +2200,7 @@
 				CC140BF821B9241900AFE57C /* MyActivityModel.m in Sources */,
 				CC140BF721B9240E00AFE57C /* NewsModel.m in Sources */,
 				CC140BF621B9238D00AFE57C /* NewsModel.h in Sources */,
+				CCFE40A12553DF6800F58DC5 /* LMWebviewController.m in Sources */,
 				CC140BF521B9237000AFE57C /* MyActivityModel.h in Sources */,
 				CC8D8B272462BD320015831A /* MyDemandControlVC.m in Sources */,
 				CC140BF421B9236100AFE57C /* activityModel.h in Sources */,
@@ -2550,7 +2564,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
 				CODE_SIGN_ENTITLEMENTS = ZhongJingLianMeng/ZhongJingLianMeng.entitlements;
-				CODE_SIGN_IDENTITY = "iPhone Developer: chaowen Deng (J85CH93XS9)";
+				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
 				DEVELOPMENT_TEAM = N4WTU4JYW2;

BIN
ZhongJingLianMeng.xcworkspace/xcuserdata/youke.xcuserdatad/UserInterfaceState.xcuserstate


+ 74 - 44
ZhongJingLianMeng.xcworkspace/xcuserdata/youke.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -61,7 +61,7 @@
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "247"
                   endingLineNumber = "247"
-                  offsetFromSymbolStart = "2219">
+                  offsetFromSymbolStart = "1892">
                </Location>
                <Location
                   uuid = "AB050733-677C-4F0B-839B-B5343C5C5C6B - 55643d31c4145ccc"
@@ -76,7 +76,7 @@
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "248"
                   endingLineNumber = "248"
-                  offsetFromSymbolStart = "51">
+                  offsetFromSymbolStart = "72">
                </Location>
             </Locations>
          </BreakpointContent>
@@ -126,8 +126,8 @@
             timestampString = "595241105.4388469"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "270"
-            endingLineNumber = "270"
+            startingLineNumber = "273"
+            endingLineNumber = "273"
             landmarkName = "-collectionClick:"
             landmarkType = "7">
          </BreakpointContent>
@@ -373,40 +373,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "2A636324-6EAA-48F5-9E9E-C964B54A0B76"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "ZhongJingLianMeng/main/home(&#x9996;&#x9875;)/joinAllianceVController.m"
-            timestampString = "584848256.454308"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "576"
-            endingLineNumber = "576"
-            landmarkName = "-loadAreaData"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "CAE9F7DC-F4D4-4F4F-8261-C0E918A7C299"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "ZhongJingLianMeng/main/home(&#x9996;&#x9875;)/joinAllianceVController.m"
-            timestampString = "584848256.454358"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "574"
-            endingLineNumber = "574"
-            landmarkName = "-loadAreaData"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "2A0901A7-0B30-4E8C-AB08-DDC46AB1F95B"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
@@ -552,7 +518,7 @@
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "178"
                   endingLineNumber = "178"
-                  offsetFromSymbolStart = "1536">
+                  offsetFromSymbolStart = "1488">
                </Location>
                <Location
                   uuid = "AFFEED44-1771-4400-BCBB-1C34667484A4 - 22f82573e41164f1"
@@ -567,7 +533,7 @@
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "178"
                   endingLineNumber = "178"
-                  offsetFromSymbolStart = "12">
+                  offsetFromSymbolStart = "16">
                </Location>
             </Locations>
          </BreakpointContent>
@@ -890,7 +856,7 @@
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "487"
                   endingLineNumber = "487"
-                  offsetFromSymbolStart = "1003">
+                  offsetFromSymbolStart = "1052">
                </Location>
                <Location
                   uuid = "647E6838-D4CE-4B4E-95F8-16B8863927BF - 3376f16053cdbeb2"
@@ -905,7 +871,7 @@
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "487"
                   endingLineNumber = "487"
-                  offsetFromSymbolStart = "12">
+                  offsetFromSymbolStart = "16">
                </Location>
             </Locations>
          </BreakpointContent>
@@ -954,7 +920,7 @@
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "460"
                   endingLineNumber = "460"
-                  offsetFromSymbolStart = "729">
+                  offsetFromSymbolStart = "740">
                </Location>
                <Location
                   uuid = "22D316D8-2A7E-4F5E-8004-C81561A8CBF7 - 981176c0d8df24e0"
@@ -969,7 +935,7 @@
                   endingColumnNumber = "9223372036854775807"
                   startingLineNumber = "461"
                   endingLineNumber = "461"
-                  offsetFromSymbolStart = "100">
+                  offsetFromSymbolStart = "96">
                </Location>
             </Locations>
          </BreakpointContent>
@@ -1210,5 +1176,69 @@
             stopOnStyle = "0">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "EABB7AC1-AF2F-423E-B035-6328C5323375"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "ZhongJingLianMeng/main/home(&#x9996;&#x9875;)/joinAllianceVController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "606"
+            endingLineNumber = "606"
+            landmarkName = "-loadFeeData:andCategory:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "35A9E0E7-B0F7-41C9-83F0-7BD3C203BBBF"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "ZhongJingLianMeng/main/home(&#x9996;&#x9875;)/homePageViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "535"
+            endingLineNumber = "535"
+            landmarkName = "-isPersionStatus:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "2759FBCD-4B18-443B-8CD4-53D37AA8FD56"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "ZhongJingLianMeng/main/home(&#x9996;&#x9875;)/homePageViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "75"
+            endingLineNumber = "75"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "09A10F07-D81D-44B5-AD96-8ED0C8F6A100"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "ZhongJingLianMeng/main/activity(&#x6d3b;&#x52a8;)/activityDetailVController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "419"
+            endingLineNumber = "419"
+            landmarkName = "-OrderToClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 16 - 0
ZhongJingLianMeng/NewFileGroup/LMWebviewController.h

@@ -0,0 +1,16 @@
+//
+//  LMWebviewController.h
+//  LMWebview
+//
+//  Created by Leesim on 2018/6/25.
+//  Copyright © 2018年 LiMing. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface LMWebviewController : UIViewController
+
+//传递进来加载的网页
+@property (nonatomic,copy) NSString * urlString;
+
+@end

+ 298 - 0
ZhongJingLianMeng/NewFileGroup/LMWebviewController.m

@@ -0,0 +1,298 @@
+//
+//  LMWebviewController.m
+//  LMWebview
+//
+//  Created by Leesim on 2018/6/25.
+//  Copyright © 2018年 LiMing. All rights reserved.
+//
+
+#import "LMWebviewController.h"
+#import <WebKit/WebKit.h>
+
+#define NAV_HEIGHT (([[UIApplication sharedApplication] statusBarFrame].size.height)+44.0f)
+#define LMRGBAColor(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]
+
+@interface LMWebviewController ()<WKNavigationDelegate,WKUIDelegate,UIGestureRecognizerDelegate>
+
+@property (nonatomic,strong) WKWebView * webview;
+@property (nonatomic,strong) UIBarButtonItem * customBackBarItem;
+@property (nonatomic,strong) UIBarButtonItem * closeButtonItem;
+@property (nonatomic,strong) UIBarButtonItem* refreshBarItem;
+@property (nonatomic,strong) UIView * progressGetView;
+@property (nonatomic,strong) UIView * errorShowView;
+//为了修复侧滑手势在webview上响应
+@property (nonatomic,assign) id delegate;
+//注入方法名 用于接受JS调用原生方法 让Web端掉用iOS端代码
+@property (nonatomic,strong) WKWebViewConfiguration *webConfig;
+
+@end
+
+@implementation LMWebviewController
+
+//由于,手动设置了导航栏左按钮,因此我们会发现系统自带的侧滑返回功能失效了,为了网页所在视图控制器的侧滑返回功能可实现,需要再修复其失效的问题。
+#pragma mark - 让自定义的导航栏左侧按钮支持侧滑手势的处理
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+    if (self.navigationController.viewControllers.count > 1) {
+        //记录原来的代理
+        self.delegate = self.navigationController.interactivePopGestureRecognizer.delegate;
+        //修复手势操作代理
+        self.navigationController.interactivePopGestureRecognizer.delegate = self;
+    }
+}
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    //把手势代理在传递给原来的代理对象
+    self.navigationController.interactivePopGestureRecognizer.delegate = self.delegate;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    self.view.backgroundColor = [UIColor whiteColor];
+    
+    [self.view addSubview:self.webview];
+    [self.refreshBarItem class];
+    [self.view addSubview:self.progressGetView];
+    [self.view addSubview:self.errorShowView];
+    
+    //更新左侧按钮
+    [self updateNavigationItems];
+    
+}
+
+-(void)dealloc{
+    //移除观察者在离开界面的时候
+    [self.webview removeObserver:self forKeyPath:@"estimatedProgress"];
+    [self.webview removeObserver:self forKeyPath:@"title"];
+    
+}
+
+#pragma mark - delegate or observer
+
+// 页面加载完成之后调用
+- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
+{
+    //判断左侧按钮状态
+    [self updateNavigationItems];
+}
+
+// 页面加载失败时调用 开始加载后失败
+- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error
+{
+    
+    self.title = @"加载失败";
+    //加载失败时
+    [self showLoadErrorView];
+    
+}
+
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
+    
+    if ([keyPath isEqualToString:@"estimatedProgress"]) {
+        if (object == self.webview) {
+            self.progressGetView.hidden = NO;
+            [UIView animateWithDuration:0.1 delay:0.1 options:UIViewAnimationOptionCurveEaseOut animations:^{
+                self.progressGetView.frame =CGRectMake(0,NAV_HEIGHT,SCREEN_WIDTH*self.webview.estimatedProgress, 3);
+            } completion:nil];
+            //下面动画是为了防止加载进度在快速请求另外的网页的时候
+            //出现进度条回缩的问题
+            if(self.webview.estimatedProgress >= 1.0f) {
+                [UIView animateWithDuration:0.3 delay:0.3 options:UIViewAnimationOptionCurveEaseOut animations:^{
+
+                } completion:^(BOOL finished) {
+                    self.progressGetView.frame =CGRectMake(0,NAV_HEIGHT,0, 3);
+                    self.progressGetView.hidden = YES;
+                }];
+            }
+        }
+    }else if ([keyPath isEqualToString:@"title"])
+    {
+        if (object == self.webview) {
+            self.title = self.webview.title;
+        }
+    }
+}
+
+//两个手势代理是为了让界面响应侧滑手势
+- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
+    return self.navigationController.viewControllers.count > 1;
+}
+- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
+    return self.navigationController.viewControllers.count > 1;
+}
+
+
+#pragma mark - pravite method
+
+-(void)setUrlString:(NSString *)urlString{
+    _urlString = urlString;
+    
+    NSMutableURLRequest * request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString]];
+    [self.webview loadRequest:request];
+}
+
+//更新左侧按钮
+-(void)updateNavigationItems{
+    self.errorShowView.hidden = YES;
+    if (self.webview.canGoBack) {
+        [self.navigationItem setLeftBarButtonItems:@[self.customBackBarItem,self.closeButtonItem] animated:NO];
+    }else{
+        self.navigationController.interactivePopGestureRecognizer.enabled = YES;
+        [self.navigationItem setLeftBarButtonItems:@[self.customBackBarItem]];
+    }
+}
+
+-(void)customBackItemClicked{
+    //如果可以返回 则返回网页上一级
+    if (self.webview.goBack) {
+        [self.webview goBack];
+    }else{
+        [self closeItemClicked];
+    }
+}
+
+-(void)closeItemClicked{
+    //移除js监控 要在pop界面之前 不然会内存泄露
+    //[self popControllerDealloc];
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+-(void)refreshClicked{
+    [self.webview reload];
+    self.errorShowView.hidden = YES;
+}
+
+-(void)errorRefreshClick{
+    [self.webview reload];
+    self.errorShowView.hidden = YES;
+}
+
+//当加载网页失败后 展示加载失败界面
+- (void)showLoadErrorView{
+    self.errorShowView.hidden = NO;
+}
+
+
+#pragma mark - lazy load
+-(UIBarButtonItem *)customBackBarItem{
+    if (!_customBackBarItem) {
+        //自定义左侧返回按钮
+        _customBackBarItem = [[UIBarButtonItem alloc]
+                              initWithImage:[UIImage imageNamed:@"nav_btn_back_black"]
+                              style:UIBarButtonItemStylePlain
+                              target:self
+                              action:@selector(customBackItemClicked)];
+       
+    }
+    return _customBackBarItem;
+}
+
+-(UIBarButtonItem*)closeButtonItem{
+    if (!_closeButtonItem) {
+        _closeButtonItem = [[UIBarButtonItem alloc]
+                            initWithImage:[UIImage imageNamed:@"icon_close"]
+                            style:UIBarButtonItemStylePlain
+                            target:self
+                            action:@selector(closeItemClicked)];
+        
+        [_closeButtonItem setImageInsets:UIEdgeInsetsMake(0, -8, 0, 0)];
+        
+    }
+    return _closeButtonItem;
+}
+
+-(UIBarButtonItem *)refreshBarItem{
+    
+    if (!_refreshBarItem) {
+        _refreshBarItem = [[UIBarButtonItem alloc]
+                              initWithImage:[UIImage imageNamed:@"icon_fresh"]
+                              style:UIBarButtonItemStylePlain
+                              target:self
+                              action:@selector(refreshClicked)];
+        self.navigationItem.rightBarButtonItem = _refreshBarItem;
+    }
+    return _refreshBarItem;
+    
+}
+
+
+-(WKWebView *)webview{
+    if (!_webview) {
+        _webview = [[WKWebView alloc]initWithFrame:CGRectMake(0, NAV_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT-NAV_HEIGHT)];
+        _webview.navigationDelegate = self;
+        _webview.UIDelegate = self;
+        //侧滑返回上层
+        _webview.allowsBackForwardNavigationGestures = YES;
+
+        //观察进度变化
+        [_webview addObserver:self forKeyPath:@"estimatedProgress" options:NSKeyValueObservingOptionOld context:NULL];
+        //观察网页标题
+        [_webview addObserver:self forKeyPath:@"title" options:NSKeyValueObservingOptionNew context:NULL];
+    }
+    return _webview;
+}
+
+-(UIView *)progressGetView
+{
+    if (!_progressGetView) {
+        _progressGetView = [[UIView alloc]init];
+        _progressGetView.frame =CGRectMake(0, NAV_HEIGHT,0 , 3);
+        _progressGetView.backgroundColor = LMRGBAColor(67, 138, 230, 1);
+    }
+    return _progressGetView;
+}
+
+-(UIView *)errorShowView{
+    
+    if (!_errorShowView) {
+        
+        _errorShowView = [[UIView alloc]init];
+        _errorShowView.backgroundColor = [UIColor whiteColor];
+        _errorShowView.frame = CGRectMake(0, NAV_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT-NAV_HEIGHT);
+        
+        UIButton * refreshButton = [[UIButton alloc]init];
+        refreshButton.bounds = CGRectMake(0, 0, 120, 44);
+        refreshButton.layer.masksToBounds = YES;
+        refreshButton.layer.cornerRadius = 22;
+        refreshButton.layer.borderColor = [UIColor blackColor].CGColor;
+        refreshButton.layer.borderWidth = 1;
+        [refreshButton setTitle:@"刷新" forState:UIControlStateNormal];
+        [refreshButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
+        refreshButton.titleLabel.font = [UIFont boldSystemFontOfSize:17];
+        [refreshButton addTarget:self action:@selector(errorRefreshClick) forControlEvents:UIControlEventTouchUpInside];
+        [_errorShowView addSubview:refreshButton];
+        
+        refreshButton.center = CGPointMake(SCREEN_WIDTH/2, SCREEN_HEIGHT/2-NAV_HEIGHT+22+80);
+        
+        
+        UILabel * showLabel = [[UILabel alloc]init];
+        showLabel.numberOfLines = 0;
+        showLabel.font = [UIFont systemFontOfSize:16];
+        showLabel.textColor = LMRGBAColor(0, 0, 0, 0.48);
+        showLabel.text =@"当前网络状态不佳,您可以尝试点击下方按钮刷新重试O~";
+        showLabel.bounds = CGRectMake(0, 0, SCREEN_WIDTH-88, 1);
+        [showLabel sizeToFit];
+        [_errorShowView addSubview:showLabel];
+        
+        showLabel.frame =CGRectMake(44, CGRectGetMinY(refreshButton.frame)-60-showLabel.bounds.size.height, showLabel.bounds.size.width, showLabel.bounds.size.height);
+  
+        UILabel * errorLabel = [[UILabel alloc]init];
+        errorLabel.font = [UIFont boldSystemFontOfSize:18];
+        errorLabel.textColor = LMRGBAColor(0, 0, 0, 0.8);
+        errorLabel.text =@"很抱歉,加载失败了";
+        errorLabel.textAlignment = NSTextAlignmentCenter;
+        [_errorShowView addSubview:errorLabel];
+        
+        errorLabel.frame =CGRectMake(0, CGRectGetMinY(showLabel.frame)-20-18, SCREEN_WIDTH, 18);
+        
+        
+        _errorShowView.hidden = YES;
+        
+    }
+    return _errorShowView;
+}
+
+@end

+ 1 - 1
ZhongJingLianMeng/main/activity(活动)/ActivityTableController.m

@@ -57,7 +57,7 @@
 //    [self.navigationView setNavigationBackgroundColor:[UIColor colorWithHexValue:0x3C915C]];
     self.view.backgroundColor = [UIColor whiteColor];
      _page = 1;
-    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0, kGScreenWidth, kGScreenHeight-NaviHeight -54 ) style:UITableViewStylePlain];
+    _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,15, kGScreenWidth, kGScreenHeight-NaviHeight -54-15 ) style:UITableViewStylePlain];
     _tableView.backgroundColor = [UIColor colorWithHexValue:0xFFFFFF];
     self.view.backgroundColor = [UIColor colorWithHexValue:0xFFFFFF];//cell不对齐
     [self.view addSubview:_tableView];

+ 68 - 1
ZhongJingLianMeng/main/activity(活动)/activityDetailVController.m

@@ -15,6 +15,8 @@
 #import "logInViewController.h"
 #import "UserInfoModel.h"
 #import "eventActivityVController.h"
+#import "OrderAirportPayCancelView.h"
+#import "joinAllianceVController.h"
 @interface activityDetailVController ()<ZLCWebViewDelegate>
 @property (nonatomic, strong) ZLCWebView *webView;
 @property(nonatomic,strong) JSContext *jsContext;
@@ -23,6 +25,7 @@
 @property (strong, nonatomic) HttpRequestManger *sessionManager;
 @property(nonatomic,strong)NSString *collectionStaus;
 @property(nonatomic,strong)UserInfoModel *userInfoModel;
+@property (strong, nonatomic) OrderAirportPayCancelView *cancelView;
 @end
 @implementation activityDetailVController
 - (HttpRequestManger*) sessionManager{
@@ -413,10 +416,74 @@
         logInViewController *control = [[logInViewController alloc] init];
         [self.navigationController pushViewController:control animated:YES];
     }else{
-        [self loadActivityStatus];
+        [self isSpeicialStatus];
         
     }
 }
+- (OrderAirportPayCancelView*)cancelView{
+    WS(weakSelf);
+    if (!_cancelView) {
+        _cancelView = [[NSBundle mainBundle]loadNibNamed:@"OrderAirportPayCancelView" owner:self options:nil].firstObject;
+        _cancelView.frame = self.view.bounds;
+        //        _cancelView.isFromOrder = self.isFromOrder;
+        _cancelView.tipLabel.hidden = YES;
+        _cancelView.contentLabel.hidden = YES;
+        _cancelView.titleLabel.text = @"您还未加入会员";
+        _cancelView.titleLabelTop.constant = 35;
+        [_cancelView.rightBtn setBackgroundColor:[UIColor colorWithHexValue:0x3C915C]];
+        [_cancelView.leftBtn setTitle:@"继续报名" forState:UIControlStateNormal];
+        [_cancelView.rightBtn setTitle:@"加入会员" forState:UIControlStateNormal];
+        
+        _cancelView.leftBtnCallback = ^{
+            eventActivityVController *control = [[eventActivityVController alloc] init];
+            control.activityId = weakSelf.newsId;
+            [weakSelf.navigationController pushViewController:control animated:YES];
+//             [weakSelf.cancelView removeFromSuperview];
+        };
+        _cancelView.rightBtnCallback = ^{
+            joinAllianceVController *joinVC = [[joinAllianceVController alloc]init];
+            joinVC.phone = weakSelf.userInfoModel.phone;
+            joinVC.model = weakSelf.userInfoModel;
+            [weakSelf.navigationController pushViewController:joinVC animated:YES];
+            
+        };
+    }
+    return _cancelView;
+}
+
+-(void)isSpeicialStatus{
+    kWeakSelf(self);
+       
+       [ProgressHUD show];
+       
+       _sessionManager  =[[HttpRequestManger alloc]init];
+       
+       [_sessionManager sendPostHttpRequestWithUrl:getMemberInfo params:nil bodyBlock:nil progress:nil success:^(NSDictionary *response) {
+           
+           [ProgressHUD hide];
+           
+           NSLog(@"%@",response);
+           
+           NSDictionary *dic = [response objectForKeySafely:@"memberInfo"];
+           
+           weakself.userInfoModel = [UserInfoModel mj_objectWithKeyValues:dic];
+           if ([weakself.userInfoModel.level isEqualToString:@"1"]||[weakself.userInfoModel.level isEqualToString:@"2"]||[weakself.userInfoModel.level isEqualToString:@"3"]){
+               
+               //是会员的话 走 loadActivityStatus 方法
+               [self loadActivityStatus];
+               
+           }else{
+              //弹窗
+               UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
+                                  
+             [window addSubview: weakself.cancelView];
+           }
+         
+       } failure:^(NSError *error) {
+           NSLog(@"%@",error);
+           [ProgressHUD hide];
+       }];
+}
 
 -(void)loadActivityStatus{
     

BIN
zhongJingLianMengSecondProvision.mobileprovision


BIN
zhongjinglianmengTextProfile.mobileprovision