mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-15 13:46:39 +00:00
perf: 未登录自动跳转
This commit is contained in:
@ -198,7 +198,11 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#likeCount"+commentId).text("("+data.data+")")
|
||||
} else {
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
@ -219,7 +223,11 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#unLikeCount"+commentId).text("("+data.data+")")
|
||||
} else {
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
|
@ -171,7 +171,11 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#likeCount"+replyId).text("("+data.data+")")
|
||||
} else {
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
@ -192,7 +196,11 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#unLikeCount"+replyId).text("("+data.data+")")
|
||||
} else {
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,11 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#likeCount"+commentId).text("("+data.data+")")
|
||||
} else {
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
@ -410,7 +414,11 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#unLikeCount"+commentId).text("("+data.data+")")
|
||||
} else {
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user