Authored by ccbikai

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

... ... @@ -1243,6 +1243,6 @@
'cartInfo' : {
'numInCart' : 3,
'goodsInstore' : 0,
''
'isCollect':true
}
}
... ...
... ... @@ -11,7 +11,7 @@ var goodsSwiper;
require('./desc');
require('./comments-consults');
require('./like.js');
require('./like');
require('../recommend-for-you.js');
lazyLoad($('img.lazy'));
... ... @@ -51,5 +51,3 @@ $('.goodsDiscount .dropdown').on('click', function() {
$('.goodsDiscount .discount-folder').slideUp();
}
});
\ No newline at end of file
... ...
... ... @@ -7,7 +7,7 @@ var $ = require('jquery'),
Hammer = require('yoho.hammer'),
tip = require('../../plugin/tip');
var likeHammer = new Hammer('#likeBtn');
var likeHammer = new Hammer(document.getElementById('likeBtn'));
likeHammer.on('tap', function(e) {
var productId = $('#productId').val(),
... ... @@ -40,4 +40,9 @@ likeHammer.on('tap', function(e) {
tip.show('网络断开连接了~');
}
});
});
$('#likeBtn').on('click', function(e) {
return false;
});
\ No newline at end of file
... ...
... ... @@ -2,7 +2,7 @@
<div class="good-detail-page yoho-page">
<div class="banner-container">
<div class="tag-container">
<p class="good-tag soonSoldOut-tag">即将售罄</p>
<!-- <p class="good-tag soonSoldOut-tag">即将售罄</p> -->
{{# tags}}
{{# is_new}}
<p class="good-tag new-tag">NEW</p>
... ... @@ -118,10 +118,10 @@
{{else}}
<a href="" class="sold-out">已售罄</a>
{{/if}}
{{#if favorite}}
<a href="" id="likeBtn" class="favorite iconfont liked">&#xe605;</a>
{{#if isCollect}}
<a href="#" id="likeBtn" class="favorite iconfont liked">&#xe605;</a>
{{else}}
<a href="" class="favorite iconfont">&#xe605;</a>
<a href="" id="likeBtn" class="favorite iconfont">&#xe605;</a>
{{/if}}
</div>
{{/cartInfo}}
... ...
... ... @@ -38,7 +38,7 @@
<div class="question">
<span class="iconfont">&#xe639;</span>
<p>
{{question}}
{{question}}<br>
<span class="time">{{time}}</span>
</p>
</div>
... ...
... ... @@ -203,6 +203,12 @@ class DetailModel
'goodsInstore' => $baseInfo['storage'],
);
// 是否收藏
$result['isCollect'] = false;
if (isset($baseInfo['isCollect']) && $baseInfo['isCollect'] === 'Y') {
$result['isCollect'] = true;
}
// 底部简介的URL链接
$result['introUrl'] = Helpers::url('/product/intro_' . $baseInfo['erpProductId'] . '/' . $baseInfo['cnAlphabet'] . '.html');
$result['id'] = $productId;
... ...
... ... @@ -17,12 +17,10 @@ class DetailController extends AbstractAction
public function indexAction()
{
$productId = $this->param('productId');
$productId = 22399;
if (!is_numeric($productId)) {
$this->error();
}
$goodsId = $this->param('goodsId');
$goodsId = 32443;
if (!is_numeric($goodsId)) {
$this->error();
}
... ...