|
|
@@ -456,10 +456,18 @@
|
|
|
}
|
|
|
-(void) webPageReturn:(NSString*) returnid value:(NSObject*)value
|
|
|
{
|
|
|
- NSString *jsStr = [NSString stringWithFormat:@"document.getElementById(\"%@\").value = \"%@\";",returnid,value];
|
|
|
- [self.wkwebView evaluateJavaScript:jsStr completionHandler:^(id _Nullable result, NSError * _Nullable error) {
|
|
|
- NSLog(@"%@----%@",result, error);
|
|
|
- }];
|
|
|
+ if (returnid && value) {
|
|
|
+
|
|
|
+ returnid = [returnid ra_stringByEscapingForJavascriptWithDelimiter:'\'' wrapWithDelimiters:YES];
|
|
|
+ value = [value.description ra_stringByEscapingForJavascriptWithDelimiter:'\'' wrapWithDelimiters:YES];
|
|
|
+ NSString *jsStr = [NSString stringWithFormat:@"document.getElementById(%@).value = %@;",returnid,value];
|
|
|
+
|
|
|
+// NSString *jsStr = [NSString stringWithFormat:@"document.getElementById(\"%@\").value = \"%@\";",returnid,value];
|
|
|
+ [self.wkwebView evaluateJavaScript:jsStr completionHandler:^(id _Nullable result, NSError * _Nullable error) {
|
|
|
+ NSLog(@"%@----%@",result, error);
|
|
|
+ }];
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
#pragma mark - MFMailComposeViewControllerDelegate delegate
|