|
|
@@ -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();
|
|
|
}
|
|
|
}
|