Authored by xuqi

ajax code

@@ -85,7 +85,9 @@ likeHammer.on('tap', function(e) { @@ -85,7 +85,9 @@ likeHammer.on('tap', function(e) {
85 success: function(data) { 85 success: function(data) {
86 if (data.code === 200) { 86 if (data.code === 200) {
87 $this.toggleClass('like'); 87 $this.toggleClass('like');
88 - } else if (data.code === 400) { 88 + } else if (data.code === 400 || data.code === 412) {
  89 +
  90 + //code:412 用户ID不正确,即未登录
89 tip.show('未登录'); 91 tip.show('未登录');
90 } else { 92 } else {
91 tip.show(data.message); 93 tip.show(data.message);