...
|
...
|
@@ -11,6 +11,9 @@ |
|
|
var goodsConsultsEle = $('#goods-consults')[0],
|
|
|
goodsConsultsHammer = goodsConsultsEle && new Hammer(goodsConsultsEle);
|
|
|
|
|
|
var productId,
|
|
|
total;
|
|
|
|
|
|
function showCountPlus($el) {
|
|
|
var $count = $el.find('.animate-count');
|
|
|
|
...
|
...
|
@@ -24,6 +27,13 @@ function showCountPlus($el) { |
|
|
});
|
|
|
}
|
|
|
|
|
|
(function() {
|
|
|
var queryStr = window.location.search.substring(1);
|
|
|
|
|
|
productId = queryStr.split('&')[0].split('=')[1];
|
|
|
total = queryStr.split('&')[1] ? queryStr.split('&')[1].split('=')[1] : undefined;
|
|
|
})();
|
|
|
|
|
|
if (goodsConsultsHammer) {
|
|
|
|
|
|
goodsConsultsHammer.on('tap', function(e) {
|
...
|
...
|
@@ -45,7 +55,9 @@ if (goodsConsultsHammer) { |
|
|
method: 'post',
|
|
|
url: url,
|
|
|
data: {
|
|
|
id: id
|
|
|
id: id,
|
|
|
productId: productId,
|
|
|
total: total
|
|
|
}
|
|
|
}).done(function(data) {
|
|
|
if (data.code === 200) {
|
...
|
...
|
|