Authored by xiaowei

clientType问题

@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 namespace Api; 12 namespace Api;
13 13
14 use Plugin\Cache; 14 use Plugin\Cache;
  15 +
15 class Yohobuy 16 class Yohobuy
16 { 17 {
17 /* 正式环境 */ 18 /* 正式环境 */
@@ -66,25 +67,26 @@ class Yohobuy @@ -66,25 +67,26 @@ class Yohobuy
66 public static function clientType() 67 public static function clientType()
67 { 68 {
68 if(self::isMobile()) { 69 if(self::isMobile()) {
69 - // 苹果设备  
70 - if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {  
71 - return 'iphone';  
72 - }  
73 - // 苹果IPAD  
74 - elseif (strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {  
75 - return 'ipad';  
76 - }  
77 - elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'android')) {  
78 - return 'android';  
79 - }  
80 - // 其它  
81 - else {  
82 - return 'h5';  
83 - } 70 + return 'h5';
84 } 71 }
85 else { 72 else {
86 return 'web'; 73 return 'web';
87 } 74 }
  75 +// // 苹果设备
  76 +// if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
  77 +// return 'iphone';
  78 +// }
  79 +// // 苹果IPAD
  80 +// elseif (strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {
  81 +// return 'ipad';
  82 +// }
  83 +// elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'android')) {
  84 +// return 'android';
  85 +// }
  86 +// // 其它
  87 +// else {
  88 +// return 'android';
  89 +// }
88 } 90 }
89 91
90 /** 92 /**