...
|
...
|
@@ -31,6 +31,14 @@ var colTxt = { |
|
|
|
|
|
var $saleReturn = $('#saleReturn');
|
|
|
|
|
|
function productUrl(s) {
|
|
|
return window.location.href + '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"' + s + '"}}';
|
|
|
}
|
|
|
|
|
|
function isEmpty(el) {
|
|
|
return !$.trim(el.html());
|
|
|
}
|
|
|
|
|
|
bindEvent.add(function() {
|
|
|
var $imgShow = $('#img-show'),
|
|
|
$thumbs = $('#thumbs > .thumb-wrap');
|
...
|
...
|
@@ -50,6 +58,8 @@ bindEvent.add(function() { |
|
|
var $lcContainer = $('.lc-container'),
|
|
|
$itemBuy = $('.item-buy');
|
|
|
|
|
|
var $qrcode = $('.qr-code');
|
|
|
|
|
|
var $descColor = $('#desc-color');
|
|
|
|
|
|
var thumbsLoaded = {};
|
...
|
...
|
@@ -137,6 +147,7 @@ bindEvent.add(function() { |
|
|
}());
|
|
|
|
|
|
require('../plugins/share');
|
|
|
require('yoho-jquery-qrcode');
|
|
|
|
|
|
// 品牌收藏
|
|
|
$('#brand-favour').click(function() {
|
...
|
...
|
@@ -312,6 +323,15 @@ bindEvent.add(function() { |
|
|
// 限购码
|
|
|
$('.get-lc:not(.dis)').hover(function() {
|
|
|
$lcContainer.removeClass('hide');
|
|
|
|
|
|
if (isEmpty($qrcode)) {
|
|
|
$qrcode.qrcode({
|
|
|
render: 'table',
|
|
|
size: 140,
|
|
|
text: productUrl(skn)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
}, function() {
|
|
|
$lcContainer.addClass('hide');
|
|
|
});
|
...
|
...
|
|