|
@@ -1100,11 +1100,14 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
-(void)requestWebTime:(NSDictionary *)infoDict
|
|
|
{
|
|
|
NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"info"][@"url"]];
|
|
|
+ if ([urlStr containsString:@"https://"]||[urlStr containsString:@"http://"]) {
|
|
|
+ }else {
|
|
|
+ urlStr = [kHost stringByAppendingString:urlStr];
|
|
|
+ }
|
|
|
if([infoDict[@"type"] isEqualToString:@"message"]) {
|
|
|
- NSString *url = [NSString stringWithFormat:@"%@",urlStr];
|
|
|
- NSArray * array = [url componentsSeparatedByString:@"=="];
|
|
|
- url = [array.firstObject stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
- [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
|
|
|
+ NSArray * array = [urlStr componentsSeparatedByString:@"=="];
|
|
|
+ urlStr = [array.firstObject stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
+ [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]];
|
|
|
}else if ([infoDict[@"type"] isEqualToString:@"titleMessage"]) {
|
|
|
NSArray * array = [urlStr componentsSeparatedByString:@"=="];
|
|
|
urlStr = [array.firstObject stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
@@ -1114,9 +1117,8 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
[self JsOpenExternalLink:@{@"url":urlStr,@"title":titleStr}];
|
|
|
}
|
|
|
}else {
|
|
|
- NSString *url = [NSString stringWithFormat:@"%@%@", kHost, urlStr];
|
|
|
- url = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
- [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:url]]];
|
|
|
+ urlStr = [urlStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
+ [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]]];
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1408,6 +1410,10 @@ NSString *const new_AesKey_3 = @"mGlAgnIBB8bx2nch";
|
|
|
return;
|
|
|
}
|
|
|
NSString * urlStr = [NSString stringWithFormat:@"%@",infoDict[@"url"]];
|
|
|
+ if ([urlStr containsString:@"https://"]||[urlStr containsString:@"http://"]) {
|
|
|
+ }else {
|
|
|
+ urlStr = [kHost stringByAppendingString:urlStr];
|
|
|
+ }
|
|
|
NSArray * array = [urlStr componentsSeparatedByString:@"=="];
|
|
|
urlStr = [array.firstObject stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
|
|
NSString * titleStr = @"消息通知";
|