Showing
1 changed file
with
7 additions
and
7 deletions
@@ -1080,12 +1080,12 @@ function fetchComment() { | @@ -1080,12 +1080,12 @@ function fetchComment() { | ||
1080 | $.ajax({ | 1080 | $.ajax({ |
1081 | type: 'GET', | 1081 | type: 'GET', |
1082 | url: '/product/detail/consult/like/' + cid | 1082 | url: '/product/detail/consult/like/' + cid |
1083 | - }).then(function(data) { | ||
1084 | - if (data && data.code === 400) { | ||
1085 | - return window.jumpUrl(data.data.refer); | 1083 | + }).then(function(result) { |
1084 | + if (result && result.code === 400) { | ||
1085 | + return window.jumpUrl(result.data.refer); | ||
1086 | } | 1086 | } |
1087 | 1087 | ||
1088 | - if (data && data.code === 200) { | 1088 | + if (result && result.code === 200) { |
1089 | $this.addClass('getzan'); | 1089 | $this.addClass('getzan'); |
1090 | $('.zan-content .icon-border[data-id=' + cid + '] .likeNum') | 1090 | $('.zan-content .icon-border[data-id=' + cid + '] .likeNum') |
1091 | .replaceWith('<em class="likeNum">' + (like + 1) + '</em>'); | 1091 | .replaceWith('<em class="likeNum">' + (like + 1) + '</em>'); |
@@ -1105,12 +1105,12 @@ function fetchComment() { | @@ -1105,12 +1105,12 @@ function fetchComment() { | ||
1105 | $.ajax({ | 1105 | $.ajax({ |
1106 | type: 'GET', | 1106 | type: 'GET', |
1107 | url: '/product/detail/consult/useful/' + cid | 1107 | url: '/product/detail/consult/useful/' + cid |
1108 | - }).then(function(data) { | ||
1109 | - if (data && data.code === 400) { | 1108 | + }).then(function(result) { |
1109 | + if (result && result.code === 400) { | ||
1110 | return window.jumpUrl(data.data.refer); | 1110 | return window.jumpUrl(data.data.refer); |
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | - if (data && data.code === 200) { | 1113 | + if (result && result.code === 200) { |
1114 | $('.zan-content .usefulData[data-id=' + cid + '] .usefulNum') | 1114 | $('.zan-content .usefulData[data-id=' + cid + '] .usefulNum') |
1115 | .replaceWith('<em class="usefulNum">' + (useful + 1) + '</em>'); | 1115 | .replaceWith('<em class="usefulNum">' + (useful + 1) + '</em>'); |
1116 | } | 1116 | } |
-
Please register or login to post a comment