Commit bd6a8687 by lee

fix size guide issue that url build NSURL result is nil

parent 6f9016e9
......@@ -155,11 +155,11 @@ typedef enum{
#pragma mark - KWMMenuDelegate
-(void)kwm_onClickHotMenu{
if([TestModel isEqualToString:@"YES"]){
[self openURLWithString:[NSString stringWithFormat:@"https://cemarose.myshopify.com/products/%@",@"17618-01"]];
}else{
[self openURLWithString:@"https://cemarose.myshopify.com/collections/new?title=最新单品"];
}
// if([TestModel isEqualToString:@"YES"]){
// [self openURLWithString:[NSString stringWithFormat:@"https://cemarose.myshopify.com/products/%@",@"17618-01"]];
// }else{
[self openURLWithString:@"https://cemarose.myshopify.com/collections/new?title=最新单品"];
// }
}
-(void)kwm_onClickNewMenu{
......
......@@ -93,7 +93,7 @@
if(product && product.htmlDescription.length){
// self.lbDetail.text = product.htmlDescription;
// NSString *html = [NSString stringWithFormat:@"%@<script type='text/javascript'>window.webkit.messageHandlers.handle.postMessage(document.body.clientHeight)</scriot>",product.htmlDescription];
NSString *css = [NSString stringWithFormat:@"p{font-size:12px;}img{width:100%%;}*{padding:0;margin:0;max-width:%f}",UI_SCREEN_WIDTH];
NSString *css = [NSString stringWithFormat:@"p{font-size:12px; }img{width:100%%;}*{padding:0;margin:0;max-width:%f}",UI_SCREEN_WIDTH];
NSString *html = [[NSString stringWithFormat:@"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0 user-scalable=yes\" /><div id=\"container\">%@<div><script type=\"text/javascript\">function update() {window.webkit.messageHandlers.handle.postMessage({height:document.body.scrollHeight})} function timer(){ setTimeout(timer,1000); update()} function delay() { setTimeout(update,1000) } window.onload = update</script><style type=\"text/css\">%@</style>",product.htmlDescription,css] stringByReplacingOccurrencesOfString:@"src=\"//cdn.shopify.com" withString:@"src=\"https://o42yton8r.qnssl.com"];
[self.webView loadHTMLString:html baseURL:nil];
......
......@@ -411,6 +411,7 @@
sessionManager.responseSerializer = [AFHTTPResponseSerializer serializer];
sessionManager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/html", nil];
}];
url = [url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet whitespaceCharacterSet].invertedSet];
[PPNetworkHelper GET:url parameters:nil responseCache:success success:success failure:^(NSError *error) {
[this showError:error];
}];
......
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