|
@@ -31,6 +31,14 @@ var colTxt = { |
|
@@ -31,6 +31,14 @@ var colTxt = { |
31
|
|
31
|
|
32
|
var $saleReturn = $('#saleReturn');
|
32
|
var $saleReturn = $('#saleReturn');
|
33
|
|
33
|
|
|
|
34
|
+function productUrl(s) {
|
|
|
35
|
+ return window.location.href + '?openby:yohobuy={"action":"go.productDetail","params":{"product_skn":"' + s + '"}}';
|
|
|
36
|
+}
|
|
|
37
|
+
|
|
|
38
|
+function isEmpty(el) {
|
|
|
39
|
+ return !$.trim(el.html());
|
|
|
40
|
+}
|
|
|
41
|
+
|
34
|
bindEvent.add(function() {
|
42
|
bindEvent.add(function() {
|
35
|
var $imgShow = $('#img-show'),
|
43
|
var $imgShow = $('#img-show'),
|
36
|
$thumbs = $('#thumbs > .thumb-wrap');
|
44
|
$thumbs = $('#thumbs > .thumb-wrap');
|
|
@@ -50,6 +58,8 @@ bindEvent.add(function() { |
|
@@ -50,6 +58,8 @@ bindEvent.add(function() { |
50
|
var $lcContainer = $('.lc-container'),
|
58
|
var $lcContainer = $('.lc-container'),
|
51
|
$itemBuy = $('.item-buy');
|
59
|
$itemBuy = $('.item-buy');
|
52
|
|
60
|
|
|
|
61
|
+ var $qrcode = $('.qr-code');
|
|
|
62
|
+
|
53
|
var $descColor = $('#desc-color');
|
63
|
var $descColor = $('#desc-color');
|
54
|
|
64
|
|
55
|
var thumbsLoaded = {};
|
65
|
var thumbsLoaded = {};
|
|
@@ -137,6 +147,7 @@ bindEvent.add(function() { |
|
@@ -137,6 +147,7 @@ bindEvent.add(function() { |
137
|
}());
|
147
|
}());
|
138
|
|
148
|
|
139
|
require('../plugins/share');
|
149
|
require('../plugins/share');
|
|
|
150
|
+ require('yoho-jquery-qrcode');
|
140
|
|
151
|
|
141
|
// 品牌收藏
|
152
|
// 品牌收藏
|
142
|
$('#brand-favour').click(function() {
|
153
|
$('#brand-favour').click(function() {
|
|
@@ -312,6 +323,15 @@ bindEvent.add(function() { |
|
@@ -312,6 +323,15 @@ bindEvent.add(function() { |
312
|
// 限购码
|
323
|
// 限购码
|
313
|
$('.get-lc:not(.dis)').hover(function() {
|
324
|
$('.get-lc:not(.dis)').hover(function() {
|
314
|
$lcContainer.removeClass('hide');
|
325
|
$lcContainer.removeClass('hide');
|
|
|
326
|
+
|
|
|
327
|
+ if (isEmpty($qrcode)) {
|
|
|
328
|
+ $qrcode.qrcode({
|
|
|
329
|
+ render: 'table',
|
|
|
330
|
+ size: 140,
|
|
|
331
|
+ text: productUrl(skn)
|
|
|
332
|
+ });
|
|
|
333
|
+ }
|
|
|
334
|
+
|
315
|
}, function() {
|
335
|
}, function() {
|
316
|
$lcContainer.addClass('hide');
|
336
|
$lcContainer.addClass('hide');
|
317
|
});
|
337
|
});
|