Kaynağa Gözat

绿色干净版本

mortimer 6 yıl önce
ebeveyn
işleme
4e035e8b6d

Dosya farkı çok büyük olduğundan ihmal edildi
+ 5 - 5
KXCardHelp.xcodeproj/project.pbxproj


BIN
KXCardHelp.xcworkspace/xcuserdata/mortimer.xcuserdatad/UserInterfaceState.xcuserstate


+ 32 - 0
KXCardHelp.xcworkspace/xcuserdata/mortimer.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -13,5 +13,37 @@
13 13
             stopOnStyle = "0">
14 14
          </BreakpointContent>
15 15
       </BreakpointProxy>
16
+      <BreakpointProxy
17
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
18
+         <BreakpointContent
19
+            shouldBeEnabled = "Yes"
20
+            ignoreCount = "0"
21
+            continueAfterRunningActions = "No"
22
+            filePath = "KXCardHelp/Main/Home/VC/JCYCHHomeViewController.m"
23
+            timestampString = "556700565.250088"
24
+            startingColumnNumber = "9223372036854775807"
25
+            endingColumnNumber = "9223372036854775807"
26
+            startingLineNumber = "116"
27
+            endingLineNumber = "116"
28
+            landmarkName = "-loadData"
29
+            landmarkType = "7">
30
+         </BreakpointContent>
31
+      </BreakpointProxy>
32
+      <BreakpointProxy
33
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
34
+         <BreakpointContent
35
+            shouldBeEnabled = "Yes"
36
+            ignoreCount = "0"
37
+            continueAfterRunningActions = "No"
38
+            filePath = "KXCardHelp/AppDelegate/AppDelegate.m"
39
+            timestampString = "556700565.250504"
40
+            startingColumnNumber = "9223372036854775807"
41
+            endingColumnNumber = "9223372036854775807"
42
+            startingLineNumber = "175"
43
+            endingLineNumber = "175"
44
+            landmarkName = "-xhLaunchAd:clickAndOpenModel:clickPoint:"
45
+            landmarkType = "7">
46
+         </BreakpointContent>
47
+      </BreakpointProxy>
16 48
    </Breakpoints>
17 49
 </Bucket>

+ 17 - 9
KXCardHelp/AppDelegate/AppDelegate.m

@@ -88,7 +88,7 @@ UNUserNotificationCenterDelegate
88 88
     [XHLaunchAd setWaitDataDuration:2];
89 89
     
90 90
     //广告数据请求
91
-    [[WWNetWorkingTool sharedNetWorkTool] post:[NSString stringWithFormat:@"%@/Advert/V1/getAdvert",advURL] parameter:@{@"space_sign" : @"18"} success:^(id responseObject) {
91
+    [[WWNetWorkingTool sharedNetWorkTool] post:[NSString stringWithFormat:@"%@/Advert/V1/getAdvert",advURL] parameter:@{@"space_sign" :AppdelegateAdvID} success:^(id responseObject) {
92 92
         NSNumber *code = responseObject[@"code"];
93 93
         if ([code isEqual:0]) {
94 94
             //
@@ -151,7 +151,7 @@ UNUserNotificationCenterDelegate
151 151
     //异步发送广告记录
152 152
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
153 153
         KXAdAlertModel *model = self.dataArray.firstObject;
154
-        [[WWNetWorkingTool sharedNetWorkTool] post:[NSString stringWithFormat:@"%@/api/Advert/V1/advertRecord",advURL] parameter:@{@"space_sign" : @"18", @"advert_id" : model.ID} success:^(id responseObject) {
154
+        [[WWNetWorkingTool sharedNetWorkTool] post:[NSString stringWithFormat:@"%@/api/Advert/V1/advertRecord",advURL] parameter:@{@"space_sign" : AppdelegateAdvID, @"advert_id" : model.ID} success:^(id responseObject) {
155 155
             //
156 156
             NSLog(@"%@", responseObject);
157 157
         } faliure:^(id error) {
@@ -162,12 +162,19 @@ UNUserNotificationCenterDelegate
162 162
     
163 163
     NSString *urlString = (NSString *)openModel;
164 164
     UIViewController *rootViewController = self.window.rootViewController;
165
-    KXWKWebViewVC *webVC    = [[KXWKWebViewVC alloc]init];
166
-    webVC.urlStr = urlString;
167
-    webVC.hidesBottomBarWhenPushed = YES;
168
-    NSArray *childsVC = [rootViewController childViewControllers];
169
-    UINavigationController *navVC = childsVC.firstObject;
170
-    [navVC pushViewController:webVC animated:YES];
165
+    JCYCHWebViewController *webVC=[[JCYCHWebViewController alloc]init];
166
+    webVC.url = urlString;
167
+    if ([rootViewController isKindOfClass:[JCYCHBaseTabBarViewController class]]) {
168
+        NSArray *childsVC = [rootViewController childViewControllers];
169
+        UINavigationController *navVC = childsVC.firstObject;
170
+        [navVC pushViewController:webVC animated:YES];
171
+    }else if([rootViewController isKindOfClass:[UINavigationController class]]) {
172
+        UINavigationController *nav=(UINavigationController *)rootViewController;
173
+        [nav pushViewController:webVC animated:YES];
174
+    }else{
175
+        [rootViewController.navigationController pushViewController:webVC animated:YES];
176
+    }
177
+    
171 178
 }
172 179
 
173 180
 
@@ -182,7 +189,8 @@ UNUserNotificationCenterDelegate
182 189
         self.window.rootViewController = tab;
183 190
     }else{//跳转到登录页面
184 191
         JCYCHLoginFirstViewController  *loginFirst=[[JCYCHLoginFirstViewController alloc]init];
185
-        self.window.rootViewController = loginFirst;
192
+        JCYCHBaseNavViewController *nav=[[JCYCHBaseNavViewController alloc]initWithRootViewController:loginFirst];
193
+        self.window.rootViewController = nav;
186 194
     }
187 195
     [self.window makeKeyAndVisible];
188 196
     

+ 9 - 6
KXCardHelp/AppDelegate/HFile/JCYCHDefineHeader.h

@@ -36,15 +36,18 @@
36 36
 #define KXAlertTextDate @"KXAlertTextDate"
37 37
 
38 38
 //渠道号
39
-#define CHCHANNEL_ID @"2000"
39
+#define CHCHANNEL_ID        @"2002"//--
40
+#define HomeAdvID           @"17"//弹窗
41
+#define AppdelegateAdvID    @"18"//启动图
42
+
40 43
 #define CHTOKEN @"CHTOKEN"
41 44
 #define CHNinePWD @"CHNinePWD"
42 45
 //字符串宏
43
-#define  UMAPP_KEY  @"5b4856abf43e480cc600003e"//---
44
-#define  BUGLY_ID   @"535ec42f09"             //---
45
-#define APPLE_APP_ID @"1424158479"            //----
46
-#define BAIDU_APP_ID @"jUrGeGPsjGIT2nqGiGcoPGc6"//--
47
-#define BAIDU_SECRET @"8Rjs8fbKvtFXOAaRABnOvTxGfVsxXflt"//---
46
+#define  UMAPP_KEY  @"5b7e1f9fb27b0a6573000010"//--
47
+#define  BUGLY_ID   @"2b8be66cb7"//--
48
+#define APPLE_APP_ID @"1433874143"//--
49
+#define BAIDU_APP_ID @"fLeeuCReuMCTlBFeQzIKjXhm"//--
50
+#define BAIDU_SECRET @"98fXjaxW73HHCt4QhYmhfCdCu4md2NgK"//--
48 51
 //公钥
49 52
 #define RSAPublicKey @"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4G6ZCXm4oFZD4cW3wHxUPBfeEKJJmfyGruOMwvT4W/r6FbD1ptEPrcnCDjmhqXwA2egxEWWojgXwxd7/JXFYRxiahPcwQBK4UfY7C7evpwp5J2v/v6FMeV6k/DWaVHX6z7un8W12E6LEosAFL+JLF11y3cXaHwITkQMToVhfz9QIDAQAB"
50 53
 

+ 5 - 5
KXCardHelp/AppDelegate/HFile/JCYCHURLHeader.h

@@ -11,15 +11,15 @@
11 11
 #ifndef CHURLHeader_h
12 12
 #define CHURLHeader_h
13 13
 //测试环境
14
-#define BaseURL  @"http://182.92.118.1:5240"
15
-static NSString *const advURL = @"http://182.92.118.1:8070/api";   //广告测试URL
14
+//#define BaseURL  @"http://182.92.118.1:5240"
15
+//static NSString *const advURL = @"http://182.92.118.1:8070/api";   //广告测试URL
16 16
 
17 17
 
18 18
 //仿真环境
19 19
 
20
-//真实环
21
-//#define BaseURL     @"https://api.lanjiekuan.com"
22
-//static NSString *const advURL = @"http://ads.726p.com/api";   //广告线上URL
20
+//真实环
21
+#define BaseURL     @"https://api.lanjiekuan.com"
22
+static NSString *const advURL = @"http://ads.726p.com/api";   //广告线上URL
23 23
 /**********************************************************/
24 24
 #pragma mark -登录注册
25 25
 

BIN
KXCardHelp/Assets.xcassets/main/home/card/userData/.DS_Store


+ 2 - 2
KXCardHelp/Info.plist

@@ -23,9 +23,9 @@
23 23
 	<key>LSRequiresIPhoneOS</key>
24 24
 	<true/>
25 25
 	<key>MiSDKAppID</key>
26
-	<string>2882303761517847488</string>
26
+	<string>2882303761517852566</string>
27 27
 	<key>MiSDKAppKey</key>
28
-	<string>5321784761488</string>
28
+	<string>5681785253566</string>
29 29
 	<key>MiSDKRun</key>
30 30
 	<string>${MiSDKRun}</string>
31 31
 	<key>NSAppTransportSecurity</key>

+ 5 - 3
KXCardHelp/Main/Ad/KXAdAlertView/KXAdAlertView.m

@@ -74,9 +74,11 @@
74 74
         self.hiddenPageControl  = NO;
75 75
         self.adDataList         = dataList;
76 76
         NSLog(@"self.frame-%@",NSStringFromCGRect(self.frame));
77
-        
78
-        [[UIApplication sharedApplication].keyWindow addSubview:self];
79
-        
77
+        if (view) {
78
+            [view addSubview:self];
79
+        }else{
80
+            [[UIApplication sharedApplication].keyWindow addSubview:self];
81
+        }
80 82
         [self showAlertAnimation];
81 83
         UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(removeFromCurrentView:)];
82 84
         [self addGestureRecognizer:tapGesture];

+ 8 - 10
KXCardHelp/Main/Home/VC/JCYCHHomeViewController.m

@@ -104,7 +104,7 @@ KXAdAlertDelegate
104 104
 }
105 105
 
106 106
 - (void)loadData {
107
-    [[WWNetWorkingTool sharedNetWorkTool] post:[NSString stringWithFormat:@"%@/Advert/V1/getAdvert",advURL] parameter:@{@"space_sign" : @"17"} success:^(id responseObject) {
107
+    [[WWNetWorkingTool sharedNetWorkTool] post:[NSString stringWithFormat:@"%@/Advert/V1/getAdvert",advURL] parameter:@{@"space_sign" : HomeAdvID} success:^(id responseObject) {
108 108
         //请求成功显示弹窗
109 109
         NSLog(@"----------%@", responseObject);
110 110
         self.dataArray = [KXAdAlertModel mj_objectArrayWithKeyValuesArray:responseObject[@"res"]];
@@ -160,7 +160,7 @@ KXAdAlertDelegate
160 160
         //异步发送广告记录
161 161
         dispatch_async(dispatch_get_global_queue(0, 0), ^{
162 162
             NSString *urlString = [NSString stringWithFormat:@"%@/Advert/V1/advertRecord", advURL];
163
-            [[WWNetWorkingTool sharedNetWorkTool] post:urlString parameter:@{@"space_sign" : @"17", @"advert_id" : model.ID} success:^(id responseObject) {
163
+            [[WWNetWorkingTool sharedNetWorkTool] post:urlString parameter:@{@"space_sign" : HomeAdvID, @"advert_id" : model.ID} success:^(id responseObject) {
164 164
                 //
165 165
                 NSLog(@"%@", responseObject);
166 166
             } faliure:^(id error) {
@@ -172,9 +172,8 @@ KXAdAlertDelegate
172 172
         if ([model.advert_url hasPrefix:@"https://itunes.apple.com/cn/app/"]) {
173 173
             [[UIApplication sharedApplication] openURL:[NSURL URLWithString:model.advert_url]];
174 174
         } else {
175
-            KXWKWebViewVC *webVC = [[KXWKWebViewVC alloc]init];
176
-            webVC.urlStr = model.advert_url;
177
-            webVC.hidesBottomBarWhenPushed = YES;
175
+            JCYCHWebViewController *webVC=[[JCYCHWebViewController alloc]init];
176
+            webVC.url = model.advert_url;
178 177
             [self.navigationController pushViewController:webVC animated:YES];
179 178
         }
180 179
     }];
@@ -188,7 +187,7 @@ KXAdAlertDelegate
188 187
     //异步发送广告记录
189 188
     dispatch_async(dispatch_get_global_queue(0, 0), ^{
190 189
         KXAdAlertModel *model = self.dataArray.firstObject;
191
-        [[WWNetWorkingTool sharedNetWorkTool] post:[NSString stringWithFormat:@"%@/Advert/V1/advertRecord",advURL] parameter:@{@"space_sign" : @"17", @"advert_id" : model.ID} success:^(id responseObject) {
190
+        [[WWNetWorkingTool sharedNetWorkTool] post:[NSString stringWithFormat:@"%@/Advert/V1/advertRecord",advURL] parameter:@{@"space_sign" : HomeAdvID, @"advert_id" : model.ID} success:^(id responseObject) {
192 191
             //
193 192
             NSLog(@"%@", responseObject);
194 193
         } faliure:^(id error) {
@@ -197,10 +196,9 @@ KXAdAlertDelegate
197 196
     });
198 197
     
199 198
     KXAdAlertModel *adModel  = [self.dataArray objectAtIndex:index];
200
-    KXWKWebViewVC *webVC    = [[KXWKWebViewVC alloc]init];
201
-    webVC.urlStr        = adModel.advert_url;
202
-    webVC.hidesBottomBarWhenPushed = YES;
203
-    [self.navigationController pushViewController:webVC animated:YES];
199
+    JCYCHWebViewController *vc=[[JCYCHWebViewController alloc]init];
200
+    vc.url=adModel.advert_url;
201
+    [self.navigationController pushViewController:vc animated:YES];
204 202
 }
205 203
 
206 204
 

+ 1 - 1
KXCardHelp/Main/Home/View/JCYCHHomeTopView.m

@@ -58,7 +58,7 @@ static float btnHeight=116;
58 58
         _centerView=[[UIView alloc]initWithFrame:CGRectMake(FITSIZE(14), 0, SCREEN_WIDTH-2*FITSIZE(14), 116)];
59 59
         _centerView.layer.cornerRadius=6;
60 60
         _centerView.layer.masksToBounds=YES;
61
-        _centerView.backgroundColor=[UIColor CHColorWithHex:0x1B82D2];
61
+        _centerView.backgroundColor=[UIColor baseColor];
62 62
     }
63 63
     return _centerView;
64 64
 }

+ 8 - 6
KXCardHelp/Main/Person/VC/JCYCHPersonViewController.m

@@ -133,13 +133,15 @@ static NSString *tabelCell = @"tabelCell";
133 133
 
134 134
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
135 135
     NSArray *arr=self.dataArray[section];
136
-    if (section==1) {
137
-        return 0;
138
-    }
139
-    if (section==2) {
140
-        return 0;
136
+    NSString *num=[[NSUserDefaults standardUserDefaults]objectForKey:IOS_TYPE];
137
+    if (!(num &&[num integerValue]==0)) {
138
+        if (section==1) {
139
+            return 0;
140
+        }
141
+        if (section==2) {
142
+            return 0;
143
+        }
141 144
     }
142
-    
143 145
     return arr.count;
144 146
 }
145 147
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

+ 1 - 1
KXCardHelp/Main/UserLogin/Login/VC/JCYCHLoginViewController.m

@@ -290,7 +290,7 @@ UITextFieldDelegate
290 290
         [attrStr addAttribute:NSFontAttributeName
291 291
                         value:[UIFont systemFontOfSize:13.0f]
292 292
                         range:NSMakeRange(0, str.length)];
293
-        [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor CHColorWithHex:0x196CC7] range:NSMakeRange(0, str.length)];
293
+        [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor baseColor] range:NSMakeRange(0, str.length)];
294 294
         _protocolLabel.numberOfLines=1;
295 295
         _protocolLabel.attributedText = attrStr;
296 296
         UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];

+ 1 - 6
KXCardHelp/Main/UserLogin/VC/JCYCHCheckNineLockViewController.m

@@ -71,12 +71,7 @@
71 71
         _forgetPwd.center=CGPointMake(SCREEN_WIDTH/2.f, 146+NavBarHeight+SCREEN_WIDTH-2*FITSIZE(38)+40);
72 72
         
73 73
         [[_forgetPwd rac_signalForControlEvents:UIControlEventTouchUpInside]subscribeNext:^(id x) {
74
-            [[NSUserDefaults standardUserDefaults] removeObjectForKey:CHNinePWD];
75
-            JCYCHLoginFirstViewController  *loginFirst=[[JCYCHLoginFirstViewController alloc]init];
76
-            [UIApplication sharedApplication].keyWindow.rootViewController=loginFirst;
77
-            JCYCHLoginViewController *vc=[[JCYCHLoginViewController alloc]init];
78
-            JCYCHBaseNavViewController *nav=[[JCYCHBaseNavViewController alloc]initWithRootViewController:vc];
79
-            [loginFirst presentViewController:nav animated:YES completion:nil];
74
+            [AccountTool deleteAccount];
80 75
             
81 76
             if (self.forgetPwdBlock) {
82 77
                 self.forgetPwdBlock();

+ 2 - 2
KXCardHelp/Main/UserLogin/register/VC/JCYCHRegisterViewController.m

@@ -333,7 +333,7 @@ UITextFieldDelegate
333 333
                         value:[UIFont systemFontOfSize:13.0f]
334 334
                         range:NSMakeRange(0, str.length)];
335 335
         [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor CHColorWithHex:0x535353] range:NSMakeRange(0, 9)];
336
-        [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor CHColorWithHex:0x196CC7] range:NSMakeRange(9, str.length-9)];
336
+        [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor baseColor] range:NSMakeRange(9, str.length-9)];
337 337
         _protocolLabel.numberOfLines=1;
338 338
         _protocolLabel.attributedText = attrStr;
339 339
         UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
@@ -360,7 +360,7 @@ UITextFieldDelegate
360 360
                         value:[UIFont systemFontOfSize:13.0f]
361 361
                         range:NSMakeRange(0, str.length)];
362 362
         [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor CHColorWithHex:0x535353] range:NSMakeRange(0, 1)];
363
-        [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor CHColorWithHex:0x196CC7] range:NSMakeRange(1, str.length-1)];
363
+        [attrStr addAttribute:NSForegroundColorAttributeName value:[UIColor baseColor] range:NSMakeRange(1, str.length-1)];
364 364
         _protocolLabel2.numberOfLines=1;
365 365
         _protocolLabel2.attributedText = attrStr;
366 366
         UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];