Authored by 梁志锋

合并HTTPS的修改

Showing 28 changed files with 117 additions and 96 deletions
... ... @@ -62,7 +62,7 @@ class Helpers
*/
public static function getImageUrl($url, $width, $height, $mode = 2)
{
return strtr($url, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode));
return strtr($url, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode, 'http://' => '//'));
}
/**
... ... @@ -354,6 +354,9 @@ class Helpers
$articleData['author']['url'] = Helpers::getFilterUrl($articleData['author']['url']);
}
$result['author'] = $articleData['author'];
if (isset($result['author']['avatar'])) {
$result['author']['avatar'] = strtr($result['author']['avatar'], array('http://' => '//'));
}
}
// 模板中需要的标签标识
... ... @@ -811,10 +814,10 @@ class Helpers
$url = 'https://login.m.yohobuy.com';
break;
case 'testing':
$url = 'http://m1.yohobuy.com';
$url = 'https://login.m.yohobuy.com'; //http://m1.yohobuy.com 没有https时
break;
default:
$url = 'http://m1.yohobuy.com';
$url = 'https://login.m.yohobuy.com';
break;
}
$url .= '/Passport/session/index?callback=' . $callback . '&sign=' . md5(md5($uid . 'Js8Yn0!EwPM45-ws')) . '&uid=' . $uid . '&go=' . $refer;
... ...
... ... @@ -51,7 +51,7 @@ class Images
return $fileName;
}
$domain = self::getDomain($bucket, $fileName);
return 'http://' . $domain . '/' . $bucket . $fileName;
return '//' . $domain . '/' . $bucket . $fileName;
}
/**
... ... @@ -71,7 +71,7 @@ class Images
if (stripos($fileName, 'http://') !== 0) {
$fileName = self::template($fileName, $bucket, $mode);
}
return strtr($fileName, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode));
return strtr($fileName, array('{width}' => $width, '{height}' => $height, '{mode}' => $mode, 'http://' => '//'));
}
/**
... ...
... ... @@ -152,17 +152,17 @@ function reMarginFooter(fixedElement) {
//未登录
$op.prepend(
'<a href="http://m.yohobuy.com/signin.html?refer=' + location.href + '">登录</a>' +
'<a href="//m.yohobuy.com/signin.html?refer=' + location.href + '">登录</a>' +
'<span class="sep-line">|</span>' +
'<a href="http://m.yohobuy.com/reg.html">注册</a>'
'<a href="//m.yohobuy.com/reg.html">注册</a>'
);
} else {
//已登录
$op.prepend(
'<span>Hi,</span>' +
'<a class="user-name" href="http://m.yohobuy.com/home?tmp=' + Math.random() + '">' + user[0] + '</a>' +
'<a href="http://m.yohobuy.com/passport/signout/index?token=' + user[3] + '">退出</a>'
'<a class="user-name" href="//m.yohobuy.com/home?tmp=' + Math.random() + '">' + user[0] + '</a>' +
'<a href="//m.yohobuy.com/passport/signout/index?token=' + user[3] + '">退出</a>'
);
}
... ... @@ -191,7 +191,7 @@ function reMarginFooter(fixedElement) {
a.async = 1;
a.src = j;
m.parentNode.insertBefore(a, m);
})(window, document, 'script', 'http://cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas');
})(window, document, 'script', '//cdn.yoho.cn/yas-jssdk/1.0.14/yas.js', '_yas');
(function() {
var uid = getUid();
... ...
... ... @@ -23,71 +23,71 @@
</head>
<body>
<div id="wrapper">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/01.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/02.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/03.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/01.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/02.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/03.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/04.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/04.jpg">
<a class="href href-right" href="{{url_yohope}}"></a>
</div>
<a href="{{url_mycoupon}}"><img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/05.jpg"></a>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/06.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/07.jpg">
<a href="{{url_mycoupon}}"><img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/05.jpg"></a>
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/06.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/07.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/08.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/08.jpg">
<a class="href href-left" href="{{url_60}}"></a>
<a class="href href-right" href="{{url_710}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/09.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/09.jpg">
<a class="href href-left" href="{{url_138}}"></a>
<a class="href href-right" href="{{url_495}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/10.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/10.jpg">
<a class="href href-left" href="{{url_419}}"></a>
<a class="href href-right" href="{{url_868}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/11.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/11.jpg">
<a class="href href-left" href="{{url_1026}}"></a>
<a class="href href-right" href="{{url_1027}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/12.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/12.jpg">
<a class="href href-left" href="{{url_324}}"></a>
<a class="href href-right" href="{{url_649}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/13.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/13.jpg">
<a class="href href-left" href="{{url_more}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/14.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/14.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/15.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/15.jpg">
<a class="href-click" id="get-all-coupon" href="{{jumpUrl}}"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/16.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/17.jpg">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/18.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/16.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/17.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/18.jpg">
<div class="img-box">
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/19.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/19.jpg">
<a href="{{url_help}}" class="show-more"></a>
</div>
<img class="lazy" data-original="http://static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
<img class="lazy" data-original="//static.buy.test.yoho.cn/img/cuxiao/newuser/00.jpg">
</div>
<div id="coupon-container" param="{{activityId}}"></div>
<script src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.min.js"></script>
<script src="http://static.buy.test.yoho.cn/js/cuxiao/jquery.lazyload.js"></script>
<script src="http://static.buy.test.yoho.cn/js/cuxiao/151201/coupon.mobile.js"></script>
<script src="//static.buy.test.yoho.cn/js/cuxiao/jquery.min.js"></script>
<script src="//static.buy.test.yoho.cn/js/cuxiao/jquery.lazyload.js"></script>
<script src="//static.buy.test.yoho.cn/js/cuxiao/151201/coupon.mobile.js"></script>
<script>
$(function() {
$("img.lazy").lazyload({
... ...
... ... @@ -112,7 +112,7 @@
{{/ orderDetail}}
</div>
<script>_ozprm = "orderid={{orderCode}}&ordertotal={{orderTotal}}";</script>
<script type="text/javascript" src="http://static.yohobuy.com/m/v1/js/AG_Tracking.js"></script>
<script type="text/javascript" src="//static.yohobuy.com/m/v1/js/AG_Tracking.js"></script>
<script type="text/javascript">
var _agq = _agq || [];
_agq.push(['_cid', '415']); //生成value
... ...
... ... @@ -33,7 +33,7 @@
</div>
</div>
<script>_ozprm="orderid={{orderCode}}&ordertotal={{orderTotal}}";</script>
<script type="text/javascript" src ="http://static.yohobuy.com/m/v1/js/AG_Tracking.js"></script>
<script type="text/javascript" src ="//static.yohobuy.com/m/v1/js/AG_Tracking.js"></script>
<script type="text/javascript">
var _agq = _agq || [];
_agq.push(['_cid', '415']); //生成value
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="back-email-success-page passport-page yoho-page">
{{> passport/header}}
<div class="content">
... ... @@ -8,4 +8,4 @@
<a id="resend" class="resend" data-url={{resendUrl}}>重新发送邮件</a>
</div>
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="back-email-page passport-page yoho-page">
{{> passport/header}}
<div class="content">
... ... @@ -8,4 +8,4 @@
<span id="btn-sure" class="btn btn-sure disable row">确定</span>
</div>
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="back-code-page passport-page yoho-page">
{{> passport/code}}
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="back-mobile-page passport-page yoho-page">
{{> passport/header}}
<div class="content">
... ... @@ -10,4 +10,4 @@
<span id="btn-next" class="btn btn-next disable row">下一步</span>
</div>
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="back-new-password-page passport-page yoho-page">
{{> passport/header}}
<div class="content">
... ... @@ -17,4 +17,4 @@
<input id="email-code" type="hidden" value={{.}}>
{{/ code}}
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="reg-code-page passport-page yoho-page">
<input type="hidden" id="isReg" value="{{isReg}}">
<input type="hidden" id="openId" value="{{openId}}">
... ... @@ -6,4 +6,4 @@
<input type="hidden" id="nickname" value="{{nickname}}">
{{> passport/code}}
</div>
{{> layout/footer_passport}}
{{> layout/footer}}
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="bind-page passport-page yoho-page">
<input type="hidden" id="openId" value="{{openId}}">
<input type="hidden" id="sourceType" value="{{sourceType}}">
... ... @@ -14,4 +14,4 @@
<p class="bind-tip">绑定手机号码后,可选择{{platform}}和手机号登录此帐号</p>
</div>
</div>
{{> layout/footer_passport}}
{{> layout/footer}}
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="bind-password-page passport-page yoho-page">
<input type="hidden" id="openId" value="{{openId}}">
<input type="hidden" id="sourceType" value="{{sourceType}}">
... ... @@ -14,4 +14,4 @@
<input id="area-code" type="hidden" value={{areaCode}}>
<input id="token" type="hidden" value={{token}}>
</div>
{{> layout/footer_passport}}
{{> layout/footer}}
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="login-page passport-page yoho-page">
{{> passport/header}}
<div class="content">
... ... @@ -41,4 +41,4 @@
</ul>
</div>
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="login-international-page passport-page yoho-page">
{{> passport/header}}
<div class="content">
... ... @@ -13,4 +13,4 @@
<span id="btn-login" class="btn btn-login disble row">登录</span>
</div>
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="reg-code-page passport-page yoho-page">
{{> passport/code}}
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="reg-page passport-page yoho-page">
{{> passport/header}}
<div class="content">
... ... @@ -11,4 +11,4 @@
<p class="register-tip">YOHO!Family账号可登录Yoho!Buy有货、YOHO!Boys、YOHO!Girls及SHOW</p>
</div>
</div>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
{{> layout/header_passport}}
{{> layout/header}}
<div class="reg-password-page passport-page yoho-page">
{{> passport/header}}
<div class="content">
... ... @@ -20,4 +20,4 @@ var r=b.getElementsByTagName('script')[0];r.parentNode.insertBefore(s,r);
_agtjs('init','AG_052186_PHCW','yohobuy.com');
_agtjs('loadEvent',{atsev:101,'atsrmv':""});
</script>
{{> layout/footer_passport}}
\ No newline at end of file
{{> layout/footer}}
\ No newline at end of file
... ...
... ... @@ -30,7 +30,7 @@
})();
(function() {
var hm = document.createElement("script");
hm.src = "http://static.yohobuy.com/js/analytics/analysis.js";
hm.src = "//static.yohobuy.com/js/analytics/analysis.js";
hm.async = 1;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
... ... @@ -52,4 +52,4 @@
var h = d.getElementsByTagName("script")[0];h.parentNode.insertBefore(c, h);
}(document);
</script>
<script src="http://static.yohobuy.com/m/v1/js/om_code.js" async="async"></script>
\ No newline at end of file
<script src="//static.yohobuy.com/m/v1/js/om_code.js" async="async"></script>
\ No newline at end of file
... ...
{{> layout/page_footer}}
{{> layout/download_app}}
{{#if hasWxShare}}
<script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript" charset="utf-8" src="//res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
{{/if}}
{{#if rlsEnv}}
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
{{/if}}
{{#if preEnv}}
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/index.js"></script>
{{/if}}
{{#if testEnv}}
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="http://cdn.yoho.cn/myohobuy/{{version}}/index-debug.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/lib.js"></script>
<script src="//cdn.yoho.cn/myohobuy/{{version}}/index-debug.js"></script>
{{/if}}
{{#if devEnv}}
<script src="http://localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: 'http://localhost:8000/'});</script>
<script src="//localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: '//localhost:8000/'});</script>
{{/if}}
{{> layout/use}}
{{> layout/analysis}}
... ...
... ... @@ -16,8 +16,8 @@
<script src="/dist/myohobuy/{{version}}/index-debug.js"></script>
{{/if}}
{{#if devEnv}}
<script src="http://localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: 'http://localhost:8000/'});</script>
<script src="//localhost:8000/static/js/sea.js?nowrap"></script>
<script>seajs.config({base: '//localhost:8000/'});</script>
{{/if}}
{{> layout/use}}
{{> layout/analysis_passport}}
... ...
... ... @@ -27,20 +27,20 @@
<link rel="dns-prefetch" href="//img12.static.yhbimg.com">
<link rel="dns-prefetch" href="//img13.static.yhbimg.com">
{{#if rlsEnv}}
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">
<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/{{version}}/index.css">
{{/if}}
{{#if preEnv}}
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">
<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/{{version}}/index.css">
{{/if}}
{{#if testEnv}}
<link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">
<link rel="stylesheet" href="//cdn.yoho.cn/myohobuy/{{version}}/index.css">
{{/if}}
{{#if devEnv}}
<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
<link rel="stylesheet" href="//static.dev.yohobuy.com/css/index.css">
{{/if}}
<link rel="apple-touch-icon-precomposed" href="http://static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="http://static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="http://static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
<link rel="apple-touch-icon-precomposed" href="//static.yohobuy.com/m/v1/img/touch/apple-touch-icon-144x144-precomposed-new.png">
<link rel="apple-touch-startup-image" sizes="640x920" href="//static.yohobuy.com/m/v1/img/startup/startup-retina.png" media="screen and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2)">
<link rel="apple-touch-startup-image" sizes="320x460" href="//static.yohobuy.com/m/v1/img/startup/startup.png" media="screen and (max-device-width: 320)">
</head>
<body {{#if isPassportPage}}class=passport-body{{/if}}>
{{#if systemUpdate}}
... ...
... ... @@ -36,7 +36,7 @@
<link rel="stylesheet" href="/dist/myohobuy/{{version}}/index.css">
{{/if}}
{{#if devEnv}}
<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
<link rel="stylesheet" href="//static.dev.yohobuy.com/css/index.css">
{{/if}}
</head>
<body {{#if isPassportPage}}class=passport-body{{/if}}>
... ...
... ... @@ -66,8 +66,13 @@ class GradeModel
//username 调用获取用户基本信息数据,获得nikename昵称;
$result['vipGrade']['name'] = !empty($data['userProfile']) ? $data['userProfile']['nickname'] : '';
//跳转url(会员特权详情)
$result['vipGrade']['allUrl'] = Helpers::url('/home/preferential', null);
$allUrl = Helpers::url('/home/preferential', null);
$result['vipGrade']['allUrl'] = strtr($allUrl, array('http://' => '//'));
//当前vip等级享受的特权
foreach ($data['grade']['enjoy_preferential'] as &$value) {
$value['pic'] = strtr($value['pic'], array('http://' => '//'));
}
$result['vipGrade']['privilege'] = $data['grade']['enjoy_preferential'];
}
... ... @@ -106,6 +111,9 @@ class GradeModel
//调取接口获得数据
$data = GradeData::getPreferentialData($channel, $uid);
if (isset($data['code']) && $data['code'] == 200) {
foreach ($data['data'] as &$value) {
$value['pic'] = strtr($value['pic'], array('http://' => '//'));
}
$result['vipGrade']['privilege'] = $data['data'];
}
... ...
... ... @@ -123,7 +123,7 @@ class OrderModel
break;
}
$result['logisticUrl'] = $logistics['data']['url'];
$result['logisticImg'] = $logistics['data']['logo'];
$result['logisticImg'] = strtr($logistics['data']['logo'], array('http://' => '//'));
$result['logisticCompany'] = $logistics['data']['caption'];
$result['logisticNumber'] = $logistics['data']['express_number'];
... ...
... ... @@ -473,6 +473,8 @@ class DetailModel
// 测量方式
if (!empty($sizeInfo['sizeImage'])) {
$sizeInfo['sizeImage'] = strtr($sizeInfo['sizeImage'], array('http://' => '//'));
$result['measurementMethod'] = array(
'title' => '测量方式',
'enTitle' => 'MEASUREMENT METHOD',
... ... @@ -501,7 +503,7 @@ class DetailModel
$result['reference']['detail']['list'][6]['params'] = array(0 => array('param' => '试穿描述')); // 试穿描述
foreach ($sizeInfo['modelBos'] as $value) {
$result['reference']['detail']['list'][0]['params'][] = array('param' => $value['avatar']);
$result['reference']['detail']['list'][0]['params'][] = array('param' => strtr($value['avatar'], array('http://' => '//')));
$result['reference']['detail']['list'][1]['params'][] = array('param' => $value['modelName']);
$result['reference']['detail']['list'][2]['params'][] = array('param' => $value['height']);
$result['reference']['detail']['list'][3]['params'][] = array('param' => $value['weight']);
... ... @@ -531,7 +533,7 @@ class DetailModel
);
foreach ($sizeInfo['productMaterialList'] as $value) {
$result['materials']['list'][] = array(
'img' => $value['imageUrl'],
'img' => strtr($value['imageUrl'], array('http://' => '//')),
'desc' => $value['remark'],
);
}
... ... @@ -541,7 +543,11 @@ class DetailModel
if (!empty($sizeInfo['washTipsBoList'])) {
$result['washTips']['list'] = array();
foreach ($sizeInfo['washTipsBoList'] as $value) {
$result['washTips']['list'][] = $value;
//$result['washTips']['list'][] = $value;
$result['washTips']['list'][] = array(
'img' => strtr($value['img'], array('http://' => '//')),
'caption' => $value['caption'],
);
}
}
... ... @@ -557,6 +563,7 @@ class DetailModel
'title' => '商品详情',
'enTitle' => 'DETAILS',
'desc' => strtr($productIntro, array(
'http://' => '//',
'\r\n\t' => '',
'</p>' => '',
'<img src=' => "<img class=\"lazy\" src=\"data:image/gif;base64,R0lGODlhAQABAJEAAAAAAP///93d3f///yH5BAEAAAMALAAAAAABAAEAAAICVAEAOw==\" data-original=",
... ...
... ... @@ -55,7 +55,7 @@ class InfoController extends AbstractAction
// 作者信息数据
if (isset($detail['getAuthor']['name'])) {
$data['guang']['author'] = array();
$data['guang']['author']['avatar'] = $detail['getAuthor']['avatar'];
$data['guang']['author']['avatar'] = strtr($detail['getAuthor']['avatar'], array('http://' => '//'));
$data['guang']['author']['name'] = $detail['getAuthor']['name'];
$data['guang']['author']['intro'] = $detail['getAuthor']['author_desc'];
$data['guang']['author']['url'] = $isApp ? $detail['getAuthor']['url'] : Helpers::url('/author/index', array('id' => $detail['getArticle']['author_id']), 'guang');
... ... @@ -158,6 +158,9 @@ class InfoController extends AbstractAction
// 相关品牌
if (!empty($detail['getBrand'])) {
$data['relatedBrand'] = $detail['getBrand'];
foreach ($data['relatedBrand'] as &$value) {
$value['thumb'] = strtr($value['thumb'], array('http://' => '//'));
}
}
// 相关标签
... ...