Merge branch 'fix/beta' into 'beta'
购买咨询页面点赞接口加入productId和total参数。 code review by 张振 购买咨询页面点赞接口加入productId和total参数。 code review by 张振 See merge request !99
Showing
1 changed file
with
13 additions
and
1 deletions
@@ -11,6 +11,9 @@ | @@ -11,6 +11,9 @@ | ||
11 | var goodsConsultsEle = $('#goods-consults')[0], | 11 | var goodsConsultsEle = $('#goods-consults')[0], |
12 | goodsConsultsHammer = goodsConsultsEle && new Hammer(goodsConsultsEle); | 12 | goodsConsultsHammer = goodsConsultsEle && new Hammer(goodsConsultsEle); |
13 | 13 | ||
14 | +var productId, | ||
15 | + total; | ||
16 | + | ||
14 | function showCountPlus($el) { | 17 | function showCountPlus($el) { |
15 | var $count = $el.find('.animate-count'); | 18 | var $count = $el.find('.animate-count'); |
16 | 19 | ||
@@ -24,6 +27,13 @@ function showCountPlus($el) { | @@ -24,6 +27,13 @@ function showCountPlus($el) { | ||
24 | }); | 27 | }); |
25 | } | 28 | } |
26 | 29 | ||
30 | +(function() { | ||
31 | + var queryStr = window.location.search.substring(1); | ||
32 | + | ||
33 | + productId = queryStr.split('&')[0].split('=')[1]; | ||
34 | + total = queryStr.split('&')[1] ? queryStr.split('&')[1].split('=')[1] : undefined; | ||
35 | +})(); | ||
36 | + | ||
27 | if (goodsConsultsHammer) { | 37 | if (goodsConsultsHammer) { |
28 | 38 | ||
29 | goodsConsultsHammer.on('tap', function(e) { | 39 | goodsConsultsHammer.on('tap', function(e) { |
@@ -45,7 +55,9 @@ if (goodsConsultsHammer) { | @@ -45,7 +55,9 @@ if (goodsConsultsHammer) { | ||
45 | method: 'post', | 55 | method: 'post', |
46 | url: url, | 56 | url: url, |
47 | data: { | 57 | data: { |
48 | - id: id | 58 | + id: id, |
59 | + productId: productId, | ||
60 | + total: total | ||
49 | } | 61 | } |
50 | }).done(function(data) { | 62 | }).done(function(data) { |
51 | if (data.code === 200) { | 63 | if (data.code === 200) { |
-
Please register or login to post a comment