소스 검색

1.修改NPD Order Detail链接可点击跳转。

Pen Li 8 년 전
부모
커밋
477e3fac7d
1개의 변경된 파일17개의 추가작업 그리고 0개의 파일을 삭제
  1. 17 0
      RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

+ 17 - 0
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

@@ -2010,6 +2010,8 @@
         [cell.webview loadHTMLString:[section valueForKey:@"data"] baseURL:nil];
         
         cell.backgroundColor = [UIColor whiteColor];
+        
+        cell.webview.userInteractionEnabled = YES;
         return cell;
     } else if ([type isEqualToString:@"sign_url"]) { /** Sign */
         
@@ -3466,4 +3468,19 @@
     
     
 }
+
+
+- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
+    
+    if (navigationType == UIWebViewNavigationTypeOther ) {
+        return YES;
+    }
+    
+    if ([[UIApplication sharedApplication] canOpenURL:request.URL]) {
+        [[UIApplication sharedApplication] openURL:request.URL];
+    }
+    
+    return NO;
+}
+
 @end