Authored by 梁志锋

包含m.yohoby.com的url自动去掉http:

@@ -74,6 +74,9 @@ class Helpers @@ -74,6 +74,9 @@ class Helpers
74 public static function getFilterUrl($url) 74 public static function getFilterUrl($url)
75 { 75 {
76 $url = strtr($url, array('.m.yohobuy.com' => SUB_DOMAIN, OLD_MAIN => SITE_MAIN, 'www.yohobuy.com' => SITE_MAIN)); 76 $url = strtr($url, array('.m.yohobuy.com' => SUB_DOMAIN, OLD_MAIN => SITE_MAIN, 'www.yohobuy.com' => SITE_MAIN));
  77 + if (strrpos($url, 'm.yohobuy.com') !== 0) {
  78 + $url = strtr($url, array('http://' => '//'));
  79 + }
77 $filter = strstr($url, 'openby:yohobuy=', true); 80 $filter = strstr($url, 'openby:yohobuy=', true);
78 if ($filter) { 81 if ($filter) {
79 return rtrim(rtrim($filter, '?'), '&'); 82 return rtrim(rtrim($filter, '?'), '&');
@@ -191,7 +191,7 @@ function reMarginFooter(fixedElement) { @@ -191,7 +191,7 @@ function reMarginFooter(fixedElement) {
191 a.async = 1; 191 a.async = 1;
192 a.src = j; 192 a.src = j;
193 m.parentNode.insertBefore(a, m); 193 m.parentNode.insertBefore(a, m);
194 -})(window, document, 'script', '//cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas'); 194 +})(window, document, 'script', ('https:' == document.location.protocol ? 'https' : 'http') + '://' + 'cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas');
195 195
196 (function() { 196 (function() {
197 var uid = getUid(); 197 var uid = getUid();