|
@@ -36,9 +36,12 @@ JSExportAs(getCipherText, -(NSString *)jsGGetCipherText:(NSString *)phone);
|
|
|
|
|
|
JSExportAs(business, -(NSInteger)jsBusiness:(NSInteger)shooID shopType:(NSInteger )shopType);
|
|
|
|
|
|
-JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
|
|
|
|
|
|
|
|
|
+//新增
|
|
|
+JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
|
|
|
+
|
|
|
+JSExportAs(loginSuccess, -(void)jsLoginSuccess:(NSString*)status);
|
|
|
|
|
|
@end
|
|
|
|
|
@@ -48,7 +51,7 @@ JSExportAs(hiddenBottom, -(void)jsHiddenBottom:(NSString*)hidden);
|
|
|
CGPoint startTouch;
|
|
|
BOOL _isMoving;
|
|
|
|
|
|
-
|
|
|
+ NSInteger pushIndex;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -284,12 +287,16 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
[self jsRemoveUserToken:nil];
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+//前往登录页面
|
|
|
-(void)isLoginTabBar:(NSNotification *)notification
|
|
|
{
|
|
|
NSDictionary *dict = notification.userInfo;
|
|
|
//
|
|
|
NSLog(@"我从第几个页面过来:%@",dict[@"item_index"]);
|
|
|
+ pushIndex = [dict[@"item_index"] integerValue];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
//
|
|
@@ -297,9 +304,52 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
url = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
[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方法登录成功
|
|
|
+-(void)jsLoginSuccess:(NSString*)status
|
|
|
+{
|
|
|
+ NSLog(@"登录成功提示");
|
|
|
+ if([status isEqualToString:@"S"]) {
|
|
|
+// NSString *index = [NSString stringWithFormat:@"%ld",pushIndex];
|
|
|
+// [[NSNotificationCenter defaultCenter] postNotificationName:@"isLoginTabBar" object:nil userInfo:@{@"item_index":@"0"}];
|
|
|
+ //搜索页面过来 我刷新
|
|
|
+
|
|
|
+
|
|
|
+ if(pushIndex!=0) {
|
|
|
+ //tabbar点击登录
|
|
|
+ NSString *index = [NSString stringWithFormat:@"%ld",pushIndex];
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":index}];
|
|
|
+ pushIndex = 0;
|
|
|
+ }else {
|
|
|
+ [self.webView reload];
|
|
|
+ }
|
|
|
+ }else if ([status isEqualToString:@""]) {
|
|
|
+ //手动tabbar点击
|
|
|
+ NSString *index = [NSString stringWithFormat:@"%ld",pushIndex];
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:@"changeItems" object:nil userInfo:@{@"item_index":index}];
|
|
|
+ pushIndex = 0;
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+-(void)dealTabBar
|
|
|
+{
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
- (void)hideTabBar {
|
|
|
+
|
|
|
+ kMainQueue(^{
|
|
|
if (self.tabBarController.tabBar.hidden == YES) {
|
|
|
return;
|
|
|
}
|
|
@@ -310,9 +360,10 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
|
|
|
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height + self.tabBarController.tabBar.frame.size.height);
|
|
|
self.tabBarController.tabBar.hidden = YES;
|
|
|
-
|
|
|
+ });
|
|
|
}
|
|
|
- (void)showTabBar{
|
|
|
+ kMainQueue(^{
|
|
|
if (self.tabBarController.tabBar.hidden == NO)
|
|
|
{
|
|
|
return;
|
|
@@ -327,6 +378,7 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
contentView = [self.tabBarController.view.subviews objectAtIndex:0];
|
|
|
contentView.frame = CGRectMake(contentView.bounds.origin.x, contentView.bounds.origin.y, contentView.bounds.size.width, contentView.bounds.size.height - self.tabBarController.tabBar.frame.size.height);
|
|
|
self.tabBarController.tabBar.hidden = NO;
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
-(void)jsHiddenBottom:(NSString *)hidden
|
|
@@ -581,17 +633,20 @@ NSString *const AesKey_0 = @"mGlAgnIBB8bx2nch";
|
|
|
|
|
|
// 登录时获取到令牌 并保存
|
|
|
-(void)jsSaveUserToken:(NSString *)token{
|
|
|
+ NSLog(@"登陆成功");
|
|
|
[[LXViewControllerManager shareViewControllerManager] hideHud];
|
|
|
[LXUserDefaults saveToken:token];
|
|
|
}
|
|
|
|
|
|
// 取本地的用户令牌
|
|
|
-(NSString *)jsGetUserToken:(NSString *)str{
|
|
|
+ NSLog(@"取用户token");
|
|
|
return [LXUserDefaults token];
|
|
|
}
|
|
|
|
|
|
// 退出时 清空用户数据
|
|
|
-(void)jsRemoveUserToken:(NSString *)str{
|
|
|
+ NSLog(@"清除用户token");
|
|
|
[LXUserDefaults clearAll];
|
|
|
// [[LXDataBaseManager shareDataBaseManager] clearAll];
|
|
|
|