|
@@ -115,6 +115,8 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
@"savePic",
|
|
|
@"ocrVerifyService",
|
|
|
@"faceVerifyService",
|
|
|
+ @"skipAppointTab",
|
|
|
+ @"refreshAppointTab",
|
|
|
];
|
|
|
for (NSString*jsName in jsArr) {
|
|
|
[config.userContentController addScriptMessageHandler:self name:jsName];
|
|
@@ -182,7 +184,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openPushLinkUrlMethods:) name:OpenPushLinkUrlMethods object:nil];
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(openPushUrlMethodsThree:) name:OpenPushUrlMethodsThree object:nil];
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jyReceiveNewsRedPoint:) name:JYReceiveNewsRedPoint object:nil];
|
|
|
-
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jyRefreshMenusView:) name:JYRefreshMenusView object:nil];
|
|
|
|
|
|
//支付状态通知
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(alipayWXpayStatus:) name:AlipayWXpayStatus object:nil];
|
|
@@ -332,6 +334,10 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
[self jsOcrVerifyService:message.body];
|
|
|
}else if ([message.name isEqualToString:@"faceVerifyService"]) {
|
|
|
[self jsFaceVerifyService:message.body];
|
|
|
+ }else if ([message.name isEqualToString:@"skipAppointTab"]) {
|
|
|
+ [self jsSkipAppointTab:message.body];
|
|
|
+ }else if ([message.name isEqualToString:@"refreshAppointTab"]) {
|
|
|
+ [self jsRefreshAppointTab:message.body];
|
|
|
}else {
|
|
|
|
|
|
}
|
|
@@ -630,7 +636,7 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
}
|
|
|
// 获取推送id
|
|
|
-(NSString *)jsGetPushRid:(NSDictionary *)dict{
|
|
|
- return [LXUserDefaults registrationID];
|
|
|
+ return [LXUserDefaults grpcPushID];
|
|
|
}
|
|
|
// 打开新页面 加载新web
|
|
|
-(void)JsOpenExternalLink:(NSDictionary *)dict{
|
|
@@ -1091,6 +1097,34 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
}
|
|
|
|
|
|
|
|
|
+//切换模块
|
|
|
+-(void)jsSkipAppointTab:(NSDictionary *)dict {
|
|
|
+ if(self.tabBarController.selectedIndex == 2) {
|
|
|
+ AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
+ JYTabBarController *tab = (JYTabBarController *)delegate.window.rootViewController;
|
|
|
+ NSString *name = [NSString stringWithFormat:@"%@",dict[@"name"]];
|
|
|
+ if ([name isEqualToString:@"search"]) {
|
|
|
+ tab.selectedIndex = 0;//切换底部栏
|
|
|
+ }else if ([name isEqualToString:@"subscribe"]) {
|
|
|
+ tab.selectedIndex = 1;//切换底部栏
|
|
|
+ }else if ([name isEqualToString:@"box"]) {
|
|
|
+ tab.selectedIndex = 2;//切换底部栏
|
|
|
+ }else if ([name isEqualToString:@"me"]) {
|
|
|
+ tab.selectedIndex = 3;//切换底部栏
|
|
|
+ }else {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//刷新模块页面
|
|
|
+-(void)jsRefreshAppointTab:(NSDictionary *)dict {
|
|
|
+ if(self.tabBarController.selectedIndex == 2) {
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:JYRefreshMenusView object:nil userInfo:dict];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
#pragma mark *****其他方法
|
|
|
-(void)judgeIsHiddenBottom {
|
|
|
if(self.tabBarController.selectedIndex == 2) {
|
|
@@ -1478,6 +1512,16 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
[self isExitCallToJS:textJS withMethodName:@"afterReceivePushMessage"];
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+-(void)jyRefreshMenusView:(NSNotification *)notificaition {
|
|
|
+ NSDictionary *dict = notificaition.userInfo;
|
|
|
+ NSString *name = [NSString stringWithFormat:@"%@",dict[@"name"]];
|
|
|
+ if ([name isEqualToString:@"box"]) {
|
|
|
+ [self.webView reload];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//刷新页面相关
|
|
|
-(void)refreshNonCurVC:(NSNotification *)notificaition{
|
|
|
if(self.tabBarController.selectedIndex != 2) {
|