|
@@ -59,6 +59,40 @@ class UserLoginLogic |
|
@@ -59,6 +59,40 @@ class UserLoginLogic |
|
59
|
}
|
59
|
}
|
|
60
|
|
60
|
|
|
61
|
/**
|
61
|
/**
|
|
|
|
62
|
+ * 自动登录
|
|
|
|
63
|
+ * @author zbj
|
|
|
|
64
|
+ * @date 2023/7/25
|
|
|
|
65
|
+ */
|
|
|
|
66
|
+ public function autologin()
|
|
|
|
67
|
+ {
|
|
|
|
68
|
+ $current_url = url()->current();
|
|
|
|
69
|
+ $refer_url = url()->previous();
|
|
|
|
70
|
+ if ($current_url == $refer_url) {
|
|
|
|
71
|
+ Common::set_user_login(['user_id'=>0, 'ip'=>request()->ip(), 'project_id' => $this->param['project_id'] ?: 0,'remark' => ' - -|' . $refer_url]);
|
|
|
|
72
|
+ echo ' - -';
|
|
|
|
73
|
+ exit;
|
|
|
|
74
|
+ }
|
|
|
|
75
|
+ if (strpos($refer_url, 'www.quanqiusou.cn') === false && strpos($refer_url, 'crm.globalso.com') === false && strpos($refer_url, 'crm.globalso.com') === false) {
|
|
|
|
76
|
+ Common::set_user_login(['user_id'=>0, 'ip'=>request()->ip(), 'project_id' => $this->param['project_id'] ?: 0,'remark' => ' 来源错误|' . $refer_url]);
|
|
|
|
77
|
+ echo '来源错误';
|
|
|
|
78
|
+ exit;
|
|
|
|
79
|
+ }
|
|
|
|
80
|
+ if (!$this->param['project_id']) {
|
|
|
|
81
|
+ Common::set_user_login(['user_id'=>0, 'ip'=>request()->ip(), 'project_id' => $this->param['project_id'] ?: 0,'remark' => ' 没有传入链接|' . $refer_url]);
|
|
|
|
82
|
+ echo '没有连接';
|
|
|
|
83
|
+ exit;
|
|
|
|
84
|
+ }
|
|
|
|
85
|
+ $has_user = User::where('project_id', $this->param['project_id'])->orderBy('id', 'asc')->first();
|
|
|
|
86
|
+ if (empty($has_user->id)) {
|
|
|
|
87
|
+ Common::set_user_login(['user_id'=>0, 'ip'=>request()->ip(), 'project_id' => $this->param['project_id'] ?: 0,'remark' => ' 该项目未找到注册账号|' . $refer_url]);
|
|
|
|
88
|
+ echo '该项目未找到注册账号';
|
|
|
|
89
|
+ exit;
|
|
|
|
90
|
+ }
|
|
|
|
91
|
+
|
|
|
|
92
|
+ return redirect('admin');
|
|
|
|
93
|
+ }
|
|
|
|
94
|
+
|
|
|
|
95
|
+ /**
|
|
62
|
* @name :(验证账号、密码或验证码是否正确)verifyAccount
|
96
|
* @name :(验证账号、密码或验证码是否正确)verifyAccount
|
|
63
|
* @author :lyh
|
97
|
* @author :lyh
|
|
64
|
* @method :post
|
98
|
* @method :post
|