Commit 4523c257 authored by lujunye's avatar lujunye

修复曹尼玛个击吧

parent 7b196ec3
......@@ -27,10 +27,10 @@ let systemVersion = (UIDevice.current.systemVersion as String)
//接口地址
//test
let SERVERCE_ImageHost = "https://z.gelifood.com/"
let SERVERCE_HOST = "https://z.gelifood.com/admin/"
//let SERVERCE_ImageHost = "https://zx.gelifood.com/"
//let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
//let SERVERCE_ImageHost = "https://z.gelifood.com/"
//let SERVERCE_HOST = "https://z.gelifood.com/admin/"
let SERVERCE_ImageHost = "https://zx.gelifood.com/"
let SERVERCE_HOST = "https://zx.gelifood.com/admin/"
////online
//视图常量
......
......@@ -72,7 +72,8 @@ class NetworkRequest {
class var sharedInstance : NetworkRequest {
let serverTrustPolicies: [String: ServerTrustPolicy] = [
"z.gelifood.com": .disableEvaluation,
"zx.gelifood.com": .disableEvaluation
"zx.gelifood.com": .disableEvaluation,
"cms.gelifood.com":.disableEvaluation
]
// Create custom manager
if manager == nil {
......
......@@ -522,6 +522,7 @@
PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
options.synchronous = YES;
options.networkAccessAllowed = YES;
__block LMNImageView *imageView = nil;
[[PHImageManager defaultManager] requestImageForAsset:asset targetSize:targetSize contentMode:PHImageContentModeAspectFill options:options resultHandler:^(UIImage *result, NSDictionary *info) {
......@@ -530,6 +531,7 @@
TestClass *model = [[TestClass alloc]init];
NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:10];
[dict setValue:token forKey:@"user_token"];
NSLog(@"img width = %f",result.size.width);
[model saveFileWithImage:result params:dict success:^(NSDictionary<NSString *,id> * data) {
if ([[NSString stringWithFormat:@"%@",data[@"code"]]isEqualToString:@"1"]) {
......
......@@ -84,11 +84,11 @@ static CGFloat const kVerticalMargin = kVerticalInset + kMargin;
// NSString *imgSrc = @"https://c.gelifood.com/";
NSString *imgSrc = @"https://cms.gelifood.com/";
[self.imageView sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",imgSrc,imageUrl]]
placeholderImage:[UIImage imageNamed:@"lmn_tool_image"] options:(SDWebImageRetryFailed) completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
placeholderImage:[UIImage imageNamed:@"lmn_tool_image"] options:(SDWebImageAllowInvalidSSLCertificates) completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
CGSize size = image.size;
NSLog(@"网络图片大小=%f,%f",size.width,size.height);
NSLog(@"url = %@",[NSString stringWithFormat:@"%@%@",imgSrc,imageUrl]);
}];
......
......@@ -42,13 +42,17 @@ class AddGuiGeCell: UITableViewCell ,WKNavigationDelegate{
webView.scrollView.isScrollEnabled = false
webView.evaluateJavaScript("document.body.scrollHeight") { (result, error) in
let h = result as! CGFloat
print("webH = ",h)
self.actp.stopAnimating()
self.actp.isHidden = true
self.delegate?.AddGuiGeCellWebViewHeight?(height:h)
}
}
func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
        if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
            let card = URLCredential.init(trust: challenge.protectionSpace.serverTrust!)
            completionHandler(URLSession.AuthChallengeDisposition.useCredential,card)
        }
    }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment