Authored by Lynnic

update

@@ -1243,6 +1243,6 @@ @@ -1243,6 +1243,6 @@
1243 'cartInfo' : { 1243 'cartInfo' : {
1244 'numInCart' : 3, 1244 'numInCart' : 3,
1245 'goodsInstore' : 0, 1245 'goodsInstore' : 0,
1246 - '' 1246 + 'isCollect':true
1247 } 1247 }
1248 } 1248 }
@@ -11,7 +11,7 @@ var goodsSwiper; @@ -11,7 +11,7 @@ var goodsSwiper;
11 11
12 require('./desc'); 12 require('./desc');
13 require('./comments-consults'); 13 require('./comments-consults');
14 -require('./like.js'); 14 +require('./like');
15 require('../recommend-for-you.js'); 15 require('../recommend-for-you.js');
16 16
17 lazyLoad($('img.lazy')); 17 lazyLoad($('img.lazy'));
@@ -50,6 +50,4 @@ $('.goodsDiscount .dropdown').on('click', function() { @@ -50,6 +50,4 @@ $('.goodsDiscount .dropdown').on('click', function() {
50 $('.goodsDiscount .first-item span').html(''); 50 $('.goodsDiscount .first-item span').html('');
51 $('.goodsDiscount .discount-folder').slideUp(); 51 $('.goodsDiscount .discount-folder').slideUp();
52 } 52 }
53 -});  
54 -  
55 - 53 +});
@@ -7,7 +7,7 @@ var $ = require('jquery'), @@ -7,7 +7,7 @@ var $ = require('jquery'),
7 Hammer = require('yoho.hammer'), 7 Hammer = require('yoho.hammer'),
8 tip = require('../../plugin/tip'); 8 tip = require('../../plugin/tip');
9 9
10 -var likeHammer = new Hammer('#likeBtn'); 10 +var likeHammer = new Hammer(document.getElementById('likeBtn'));
11 11
12 likeHammer.on('tap', function(e) { 12 likeHammer.on('tap', function(e) {
13 var productId = $('#productId').val(), 13 var productId = $('#productId').val(),
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="good-detail-page yoho-page"> 2 <div class="good-detail-page yoho-page">
3 <div class="banner-container"> 3 <div class="banner-container">
4 <div class="tag-container"> 4 <div class="tag-container">
5 - <p class="good-tag soonSoldOut-tag">即将售罄</p> 5 + <!-- <p class="good-tag soonSoldOut-tag">即将售罄</p> -->
6 {{# tags}} 6 {{# tags}}
7 {{# is_new}} 7 {{# is_new}}
8 <p class="good-tag new-tag">NEW</p> 8 <p class="good-tag new-tag">NEW</p>
@@ -118,10 +118,10 @@ @@ -118,10 +118,10 @@
118 {{else}} 118 {{else}}
119 <a href="" class="sold-out">已售罄</a> 119 <a href="" class="sold-out">已售罄</a>
120 {{/if}} 120 {{/if}}
121 - {{#if favorite}} 121 + {{#if isCollect}}
122 <a href="" id="likeBtn" class="favorite iconfont liked">&#xe605;</a> 122 <a href="" id="likeBtn" class="favorite iconfont liked">&#xe605;</a>
123 {{else}} 123 {{else}}
124 - <a href="" class="favorite iconfont">&#xe605;</a> 124 + <a href="" id="likeBtn" class="favorite iconfont">&#xe605;</a>
125 {{/if}} 125 {{/if}}
126 </div> 126 </div>
127 {{/cartInfo}} 127 {{/cartInfo}}