mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-16 23:38:36 +00:00
[Update] 修改api
This commit is contained in:
@@ -80,12 +80,7 @@ function doRequestAuth() {
|
||||
requestApi({
|
||||
url: url,
|
||||
method: "GET",
|
||||
success: function () {
|
||||
clearInterval(interval);
|
||||
clearInterval(checkInterval);
|
||||
window.location = successUrl;
|
||||
},
|
||||
error: function (text, data) {
|
||||
success: function (data) {
|
||||
if (data.error !== "login_confirm_wait") {
|
||||
if (!errorMsgShow) {
|
||||
infoMsgRef.hide();
|
||||
@@ -97,7 +92,13 @@ function doRequestAuth() {
|
||||
clearInterval(checkInterval);
|
||||
$(".copy-btn").attr('disabled', 'disabled')
|
||||
}
|
||||
errorMsgRef.html(data.msg)
|
||||
if (data.msg === 'ok' && !data.error) {
|
||||
window.location = "{% url 'authentication:login-guard' %}"
|
||||
} else {
|
||||
errorMsgRef.html(data.msg)
|
||||
}
|
||||
},
|
||||
error: function (text, data) {
|
||||
},
|
||||
flash_message: false
|
||||
})
|
||||
|
Reference in New Issue
Block a user