Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
33c304d1
Commit
33c304d1
authored
Dec 19, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7dea144d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
2 deletions
+6
-2
BrokerService.php
application/api_broker/service/BrokerService.php
+2
-0
common.php
application/common.php
+2
-0
Login.php
application/index/controller/Login.php
+2
-1
ABindingDevice.php
application/model/ABindingDevice.php
+0
-1
No files found.
application/api_broker/service/BrokerService.php
View file @
33c304d1
...
...
@@ -50,10 +50,12 @@ class BrokerService
"is_pc"
=>
$is_pc
]);
return
true
;
}
$is_exits
=
false
;
foreach
(
$result
as
$item
)
{
//如果是客户端登录
if
(
$is_pc
==
2
){
if
(
$device_id
==
$item
[
"device_id"
])
{
if
(
$item
[
"is_forbidden"
]
==
0
)
{
...
...
application/common.php
View file @
33c304d1
...
...
@@ -185,5 +185,6 @@ function del_array_string($string = '', $array_str = []) {
*/
function
big_log
(
$content
){
$filename
=
ROOT_PATH
.
'runtime/log/find_bug.log'
;
$content
=
'['
.
date
(
"Y-m-d H:i:s"
,
time
())
.
'] '
.
$content
;
file_put_contents
(
$filename
,
$content
.
"
\r\n
"
,
FILE_APPEND
);
}
\ No newline at end of file
application/index/controller/Login.php
View file @
33c304d1
...
...
@@ -57,7 +57,6 @@ class Login extends Basic
$model
=
$this
->
params
[
"model"
];
$only_id
=
$this
->
params
[
"only_id"
];
$mac_address
=
$this
->
params
[
"mac_address"
];
if
(
empty
(
$name
)
||
empty
(
$password
))
{
return
$this
->
response
(
101
,
'用户名或密码不能为空'
);
}
...
...
@@ -97,9 +96,11 @@ class Login extends Basic
//判断设备id是否存在
if
(
$mac_address
){
$is_pc
=
2
;
//客户端
$last_login_ip
=
$mac_address
;
//device_id存MAC地址
}
else
{
$is_pc
=
1
;
//浏览器
}
$is_login
=
$this
->
brokerService
->
judgeBand
(
$last_login_ip
,
$user_data
[
'id'
],
$model
,
0
,
$only_id
,
$is_pc
);
if
(
!
$is_login
)
{
return
$this
->
response
(
"102"
,
"该账号没有绑定该设备的浏览器,请先向店长申请,由店长致电财务董飞。"
);
...
...
application/model/ABindingDevice.php
View file @
33c304d1
...
...
@@ -92,7 +92,6 @@ class ABindingDevice extends BaseModel
}
catch
(
\Exception
$e
)
{
$data
=
[];
}
return
$data
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment