Jonlin 6 年之前
父節點
當前提交
35cd7095ec
共有 1 個文件被更改,包括 12 次插入12 次删除
  1. 12 12
      application/user/controller/Login.php

+ 12 - 12
application/user/controller/Login.php

@@ -21,10 +21,10 @@ class Login extends Controller
      */
     public function index()
     {
-        $http = array();
-        if(!empty($_SERVER['HTTP_REFERER'])){
-            $http[] = $_SERVER['HTTP_REFERER'];
-        }
+//        $http = array();
+//        if(!empty($_SERVER['HTTP_REFERER'])){
+            $http = $_SERVER['HTTP_REFERER'];
+        //}
 
         if (session('user_id')) {
             $this->success('已经登录', 'User/Index/index');
@@ -75,18 +75,18 @@ class Login extends Controller
                 session('user_id', $user_info['user_id']);
                 session('user_email', $user_info['user_email']);
 
-                if(!empty($http)){
-                    return $this->redirect('Home/Product/product');
-                   // header(location:$http);
-                   // echo '<script>parent.location.href='.$http.';</script>';
-                    //header("location:http://homedata.test/home/product/details.html?id=2");
-                }else{
-                    return $this->redirect('User/Index/index');
-                }
+//                if(!empty($http)){
+//                    //return $this->redirect('Home/Product/product');
+//                    header("location:$http");
+//                }else{
+//                    return $this->redirect('User/Index/index');
+//                }
+                return $this->redirect('User/Index/index');
             } else {
                 $this->success('帐号密码错误');
             }
         } else {
+            //$this->assign('http', $http);
             return $this->fetch();
         }
     }