Authored by 郝肖肖

'未登录收藏跳到登录页'

... ... @@ -350,6 +350,7 @@ const _detailDataPkg = (origin) => {
result.addToCart = 1;
}
result.isCollect = propOrigin('is_collect');
result.colors = skuData.skuGoods;
return result;
... ...
... ... @@ -101,7 +101,7 @@
<button class="btn-sell-out btn-grey none">
<i class="sellOut iconfont">&#xe6e0;</i>已售罄
</button>
{{#if isFav}}
{{#if isCollect}}
<button class="btn-fav-count favAdd" data-role="fav-count"><i class="fav-count iconfont coled">&#xe68f;</i><em>已收藏</em></button>
{{else}}
<button class="btn-fav-count favCancel" data-role="fav-count"><i class="fav-count iconfont">&#xe68f;</i><em>收藏商品</em></button>
... ...
... ... @@ -506,6 +506,12 @@ function productCollect(pid, isCancel) {
productId: pid,
type: isCancel ? 'cancel' : 'add'
}
}).then(function(d) {
if (d.code === 403) {
location.href = d.data.url;
}
return d;
});
}
... ...