mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-14 21:26:41 +00:00
perf: 未登录自动跳转
This commit is contained in:
@ -198,6 +198,10 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#likeCount"+commentId).text("("+data.data+")")
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
@ -219,6 +223,10 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#unLikeCount"+commentId).text("("+data.data+")")
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
@ -171,6 +171,10 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#likeCount"+replyId).text("("+data.data+")")
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
@ -192,6 +196,10 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#unLikeCount"+replyId).text("("+data.data+")")
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
@ -389,6 +389,10 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#likeCount"+commentId).text("("+data.data+")")
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
@ -410,6 +414,10 @@
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#unLikeCount"+commentId).text("("+data.data+")")
|
||||
} 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