Browse Source

:construction: 登陆功能优化

jqh 4 years ago
parent
commit
aba55df2d9
2 changed files with 1 additions and 14 deletions
  1. 0 13
      resources/views/pages/login.blade.php
  2. 1 1
      src/Http/Controllers/AuthController.php

+ 0 - 13
resources/views/pages/login.blade.php

@@ -122,19 +122,6 @@ Dcat.ready(function () {
     // ajax表单提交
     $('#login-form').form({
         validate: true,
-        success: function (data) {
-            if (! data.status) {
-                Dcat.error(data.message);
-
-                return false;
-            }
-
-            Dcat.success(data.message);
-
-            location.href = data.redirect;
-
-            return false;
-        }
     });
 });
 </script>

+ 1 - 1
src/Http/Controllers/AuthController.php

@@ -243,7 +243,7 @@ class AuthController extends Controller
 
         return $this->response()
             ->success(trans('admin.login_successful'))
-            ->redirectToIntended($this->getRedirectPath())
+            ->locationToIntended($this->getRedirectPath())
             ->send();
     }