Authored by linlong

update

@@ -223,15 +223,27 @@ public class ClickUnionRest { @@ -223,15 +223,27 @@ public class ClickUnionRest {
223 url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8"; 223 url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
224 } 224 }
225 //momochat/7.5.6 ios/664 (iphone 6; ios 10.2; zh_cn; iphone7,2; s1) 225 //momochat/7.5.6 ios/664 (iphone 6; ios 10.2; zh_cn; iphone7,2; s1)
226 - if(agent.contains("momochat")){  
227 - int first = agent.indexOf(" ios ")+4;  
228 - String version1 = agent.substring(first);  
229 - String version = version1.substring(version1.indexOf(" ")+1, version1.indexOf(";"));  
230 - bo.setTd("ios_" + version.replaceAll("_", "."));  
231 - bo.setClient_type("ios");  
232 - bo.setAppid("490655927");  
233 - url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";  
234 - } 226 + if(agent.contains("momochat")){
  227 + String version = "";
  228 + if(agent.contains("ios")){
  229 + int first = agent.indexOf(" ios ")+4;
  230 + String version1 = agent.substring(first);
  231 + version = version1.substring(version1.indexOf(" ")+1, version1.indexOf(";"));
  232 + bo.setTd("ios_" + version.replaceAll("_", "."));
  233 + bo.setClient_type("ios");
  234 + bo.setAppid("490655927");
  235 + url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
  236 + } //momochat/7.5.6 ios/664 (iphone 6s; iphone os 9.2; zh_cn; iphone8,1; s1)
  237 + else if(agent.contains("os")){
  238 + int first = agent.indexOf(" os ")+3;
  239 + String version1 = agent.substring(first);
  240 + version = version1.substring(version1.indexOf(" ")+1, version1.indexOf(";"));
  241 + bo.setTd("ios_" + version.replaceAll("_", "."));
  242 + bo.setClient_type("ios");
  243 + bo.setAppid("490655927");
  244 + url = "https://itunes.apple.com/cn/app/yoho!-you-huo/id490655927?mt=8";
  245 + }
  246 + }
235 //ios/6.6 com.jugg.doctor ipad5,3/8.3/768x1024/2.0 /1---这个应该就是ios_6.6 247 //ios/6.6 com.jugg.doctor ipad5,3/8.3/768x1024/2.0 /1---这个应该就是ios_6.6
236 if(agent.contains("ios/")){ 248 if(agent.contains("ios/")){
237 String version = agent.substring(agent.indexOf("ios/")+4,agent.indexOf(" ")); 249 String version = agent.substring(agent.indexOf("ios/")+4,agent.indexOf(" "));