Showing
2 changed files
with
2 additions
and
2 deletions
@@ -118,7 +118,7 @@ function initInfosEvt($container) { | @@ -118,7 +118,7 @@ function initInfosEvt($container) { | ||
118 | 118 | ||
119 | 119 | ||
120 | if (code === 200) { | 120 | if (code === 200) { |
121 | - $btn.next('.like-count').text(data.data); | 121 | + $btn.prev('.like-count').text(data.data); |
122 | 122 | ||
123 | // 切换点赞状态 | 123 | // 切换点赞状态 |
124 | $btn.toggleClass('like'); | 124 | $btn.toggleClass('like'); |
@@ -110,7 +110,7 @@ function initInfosEvt($container) { | @@ -110,7 +110,7 @@ function initInfosEvt($container) { | ||
110 | let code = data.code; | 110 | let code = data.code; |
111 | 111 | ||
112 | if (code === 200) { | 112 | if (code === 200) { |
113 | - $btn.next('.like-count').text(data.data); | 113 | + $btn.prev('.like-count').text(data.data); |
114 | 114 | ||
115 | // 切换点赞状态 | 115 | // 切换点赞状态 |
116 | $btn.toggleClass('like'); | 116 | $btn.toggleClass('like'); |
-
Please register or login to post a comment