Commit db571a61 authored by clone's avatar clone

pc验证

parent f8d35881
...@@ -52,6 +52,7 @@ class Login extends Basic ...@@ -52,6 +52,7 @@ class Login extends Basic
$name = $this->params["username"]; $name = $this->params["username"];
$password = $this->params["password"]; $password = $this->params["password"];
$model = $this->params["model"]; $model = $this->params["model"];
$only_id = $this->params["only_id"];
if (empty($name) || empty($password)) { if (empty($name) || empty($password)) {
return $this->response(101, '用户名或密码不能为空'); return $this->response(101, '用户名或密码不能为空');
...@@ -79,13 +80,13 @@ class Login extends Basic ...@@ -79,13 +80,13 @@ class Login extends Basic
} }
$last_login_ip = ip2long($this->request->ip()); $last_login_ip = ip2long($this->request->ip());
/*if ($user_data['id'] != 1) { if ($user_data['id'] != 1) {
//判断设备id是否存在 //判断设备id是否存在
$is_login = $this->brokerService->judgeBand($last_login_ip, $user_data['id'], $model, 0, $user_data['phone'], 1); $is_login = $this->brokerService->judgeBand($only_id, $user_data['id'], $model, 0, $user_data['phone'], 1);
if (!$is_login) { if (!$is_login) {
return $this->response("102", "该账号没有绑定该设备,请致电人事进行绑定。"); return $this->response("102", "该账号没有绑定该设备,请致电人事进行绑定。");
} }
}*/ }
$where_rule['status'] = 0; $where_rule['status'] = 0;
if ($user_data['id'] == 1) { if ($user_data['id'] == 1) {
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
</footer> </footer>
<script src="/resource/lib/js/jquery-2.0.3.min.js"></script> <script src="/resource/lib/js/jquery-2.0.3.min.js"></script>
<script src="https://wx.gtimg.com/wxpay_h5/fingerprint2.min.1.5.1.js"></script>
<script src="/resource/js/login.js"></script> <script src="/resource/js/login.js"></script>
</body> </body>
......
...@@ -91,11 +91,14 @@ $(function() { ...@@ -91,11 +91,14 @@ $(function() {
} }
} }
// alert('浏览器UA=' + UA +
// '\n\n浏览器名称=' + NV.name + var fp=new Fingerprint2();
// '\n\n浏览器版本=' + NV.version + var only_id = "";
// //'\n\n浏览器版本='+parseInt(NV.version)+ fp.get(function(result){
// '\n\n浏览器外壳=' + NV.shell); //alert(result);
only_id = result;
//result即为获取到的浏览器指纹值
var browser_version = NV.shell + '/' + NV.version; var browser_version = NV.shell + '/' + NV.version;
console.log(browser_version); console.log(browser_version);
$.ajax({ $.ajax({
...@@ -104,7 +107,8 @@ $(function() { ...@@ -104,7 +107,8 @@ $(function() {
data: { data: {
'username': _userName, 'username': _userName,
'password': _passWord, 'password': _passWord,
'model': browser_version 'model': browser_version,
'only_id': only_id
}, },
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
...@@ -135,5 +139,14 @@ $(function() { ...@@ -135,5 +139,14 @@ $(function() {
}; };
} }
}); });
});
// alert('浏览器UA=' + UA +
// '\n\n浏览器名称=' + NV.name +
// '\n\n浏览器版本=' + NV.version +
// //'\n\n浏览器版本='+parseInt(NV.version)+
// '\n\n浏览器外壳=' + NV.shell);
}) })
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment