Authored by linlong

update

@@ -214,13 +214,25 @@ public class ClickUnionRest { @@ -214,13 +214,25 @@ public class ClickUnionRest {
214 } 214 }
215 //youku;5.4;ios;10.2;iphone6,1 ---这种情况比较多 215 //youku;5.4;ios;10.2;iphone6,1 ---这种情况比较多
216 if(agent.contains("youku")){ 216 if(agent.contains("youku")){
217 - int first = agent.indexOf("ios;")+4;  
218 - String version1 = agent.substring(first);  
219 - String version = version1.substring(version1.indexOf(" ")+1, version1.indexOf(";"));  
220 - bo.setTd("ios_" + version.replaceAll("_", "."));  
221 - bo.setClient_type("ios");  
222 - bo.setAppid("490655927");  
223 - url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8"; 217 + String version = "";
  218 + if(agent.contains("ios")){
  219 + int first = agent.indexOf("ios;")+4;
  220 + String version1 = agent.substring(first);
  221 + version = version1.substring(version1.indexOf(" ")+1, version1.indexOf(";"));
  222 + bo.setTd("ios_" + version.replaceAll("_", "."));
  223 + bo.setClient_type("ios");
  224 + bo.setAppid("490655927");
  225 + url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
  226 + } //youku;5.4.1;iphone os;8.4.1;iphone6,2
  227 + else if(agent.contains("os")){
  228 + int first = agent.indexOf("os;") + 3;
  229 + String version1 = agent.substring(first);
  230 + version = version1.substring(version1.indexOf(" ") + 1, version1.indexOf(";"));
  231 + bo.setTd("ios_" + version.replaceAll("_", "."));
  232 + bo.setClient_type("ios");
  233 + bo.setAppid("490655927");
  234 + url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
  235 + }
224 } 236 }
225 //momochat/7.5.6 ios/664 (iphone 6; ios 10.2; zh_cn; iphone7,2; s1) 237 //momochat/7.5.6 ios/664 (iphone 6; ios 10.2; zh_cn; iphone7,2; s1)
226 if(agent.contains("momochat")){ 238 if(agent.contains("momochat")){