From 7795f6deb1cdc6cc2e75d50de030d0319a55b635 Mon Sep 17 00:00:00 2001 From: dragon1211 Date: Fri, 28 Jan 2022 03:01:54 -0800 Subject: [PATCH] fixed login --- backend/public/js/index.js | 6 +++--- backend/resources/js/admin/login/index.jsx | 5 ++++- backend/resources/js/child/auth/login/index.jsx | 5 ++++- backend/resources/js/parent/auth/login/index.jsx | 5 ++++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/backend/public/js/index.js b/backend/public/js/index.js index 715161d6..99992fb5 100644 --- a/backend/public/js/index.js +++ b/backend/public/js/index.js @@ -27447,7 +27447,7 @@ var AdminLogin = function AdminLogin() { switch (response.data.status_code) { case 200: { - loginOK(response.data.params.id); + if (location.search == '') window.location.href = "/admin/meeting";else window.location.href = location.search.replace('?redirect_to=', ''); break; } @@ -31002,7 +31002,7 @@ var ChildLogin = function ChildLogin() { switch (response.data.status_code) { case 200: { - loginOK(response.data.params.id); + if (location.search == '') window.location.href = "/c-account/meeting";else window.location.href = location.search.replace('?redirect_to=', ''); break; } @@ -37548,7 +37548,7 @@ var ParentLogin = function ParentLogin() { switch (response.data.status_code) { case 200: { - loginOK(response.data.params.id); + if (location.search == '') window.location.href = "/p-account/meeting";else window.location.href = location.search.replace('?redirect_to=', ''); break; } diff --git a/backend/resources/js/admin/login/index.jsx b/backend/resources/js/admin/login/index.jsx index 1d3b5e59..3e4e2cf4 100644 --- a/backend/resources/js/admin/login/index.jsx +++ b/backend/resources/js/admin/login/index.jsx @@ -27,7 +27,10 @@ const AdminLogin = () => { switch (response.data.status_code) { case 200: { - loginOK(response.data.params.id); + if(location.search == '') + window.location.href = "/admin/meeting"; + else + window.location.href = location.search.replace('?redirect_to=', ''); break; } default: break; diff --git a/backend/resources/js/child/auth/login/index.jsx b/backend/resources/js/child/auth/login/index.jsx index 60f8d868..03b3e951 100644 --- a/backend/resources/js/child/auth/login/index.jsx +++ b/backend/resources/js/child/auth/login/index.jsx @@ -26,7 +26,10 @@ const ChildLogin = () => { switch (response.data.status_code) { case 200: { - loginOK(response.data.params.id); + if(location.search == '') + window.location.href = "/c-account/meeting"; + else + window.location.href = location.search.replace('?redirect_to=', ''); break; } default: break; diff --git a/backend/resources/js/parent/auth/login/index.jsx b/backend/resources/js/parent/auth/login/index.jsx index 05ae38b2..cc4686b2 100644 --- a/backend/resources/js/parent/auth/login/index.jsx +++ b/backend/resources/js/parent/auth/login/index.jsx @@ -28,7 +28,10 @@ const ParentLogin = () => { switch (response.data.status_code) { case 200: { - loginOK(response.data.params.id); + if(location.search == '') + window.location.href = "/p-account/meeting"; + else + window.location.href = location.search.replace('?redirect_to=', ''); break; } default: break;