Authored by 王水玲

Merge branch 'develop/wap' of http://git.dev.yoho.cn/web/yohobuywap into develop/wap

... ... @@ -75,7 +75,7 @@ class Cache
// 当接口异常,一级缓存没取到数据的情况
if ($node === 'slave') {
$incrementKey = self::makeKey('_increment_' . $key, 'slave');
$incrementValue = HoodCache::Memcached('slave')->get($incrementKey);
$incrementValue = intval(HoodCache::Memcached('slave')->get($incrementKey));
// 接口调用失败累计5次之后,回填二级缓存数据到一级缓存, 重置计数值为0
if (is_int($incrementValue) && $incrementValue > 5) {
HoodCache::Memcached('master')->set(self::makeKey($key, 'master'), $result, 300);
... ...
... ... @@ -40,11 +40,9 @@ $receive.on('click', function() {
success: function(data) {
var msg = data.msg,
status = data.status,
newUrl;
if (data.noLogin === true) {
newUrl = data.url + '?code=' + getUrlParam('code');
if (data.noLogin === true) {
if ($('#intimacy-link').length <= 0) {
$('body').append('<a href=\'' + newUrl + '\' style="display:none;" id="intimacy-link">' +
'<span class="intimacy-link"></span></a>');
... ... @@ -79,7 +77,7 @@ $('.coupon-floor a, .banner-top a').on('click', function() {
}
});
if ($('.banner-swiper').find('li').size() > 1) {
if ($('.banner-swiper').find('li').length > 1) {
bannerSwiper = new Swiper('.banner-swiper', {
lazyLoading: true,
lazyLoadingInPrevNext: true,
... ... @@ -95,3 +93,17 @@ if ($('.banner-swiper').find('li').size() > 1) {
$('.coupon-message-op-rel').on('click', function() {
location.reload();
});
if ($('#noData').length > 0) {
if (location.href.indexOf('?openby:yohobuy=') <= 0){
tip.show('网络异常!');
}else{
console.log(location.href.indexOf('?openby:yohobuy='))
}
}
$mask.on('click',function () {s
$mask.hide();
$message.hide();
});
... ...
.coupon-area {
.coupon-area-page {
max-width: 640px;
overflow: hidden;
.banner-top {
float: left;
}
}
.just-img{
width: 100%;
float: left;
margin: 20px 0;
margin:0;
}
.coupon-floor {
float: left;
... ...
{{>layout/header}}
<div class="coupon-area">
<div class="coupon-area-page yoho-page">
{{# content}}
{{#if isSingleImage}}
<a href="{{url}}"><img src="{{src}}" class="just-img"/></a>
... ... @@ -52,6 +52,9 @@
<input id="shareImg" type="hidden" value="{{shareImg}}">
<input id="shareTitle" type="hidden" value="{{shareTitle}}">
{{/ share}}
{{#if noData}}
<input id="noData" type="hidden">
{{/if}}
{{/ content}}
</div>
<div class="floor-mask"></div>
... ...