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
7920ab68
Commit
7920ab68
authored
Dec 15, 2017
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户验证
parent
aa2e7a03
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
Basic.php
application/api/extend/Basic.php
+1
-1
Users.php
application/model/Users.php
+12
-3
No files found.
application/api/extend/Basic.php
View file @
7920ab68
...
@@ -94,7 +94,7 @@ class Basic extends Controller
...
@@ -94,7 +94,7 @@ class Basic extends Controller
//todo 待完成
//todo 待完成
$userModel
=
new
Users
();
$userModel
=
new
Users
();
$userArr
=
$userModel
->
selectUser
(
$this
->
userId
);
$userArr
=
$userModel
->
selectUser
(
$this
->
userId
);
if
(
count
(
$userArr
)
>
0
&&
(
$userArr
[
"status"
]
!=
0
||
$userArr
[
"id"
]
!=
$this
->
userId
||
$userArr
[
"user_phone"
]
!=
$this
->
phone
))
{
if
(
count
(
$userArr
)
>
0
&&
(
$userArr
[
"id"
]
!=
$this
->
userId
||
$userArr
[
"user_phone"
]
!=
$this
->
phone
))
{
echo
json_encode
(
array
(
"code"
=>
"101"
,
"msg"
=>
"用户验证失败,重新登录!"
,
"data"
=>
[],
"type"
=>
"json"
));
echo
json_encode
(
array
(
"code"
=>
"101"
,
"msg"
=>
"用户验证失败,重新登录!"
,
"data"
=>
[],
"type"
=>
"json"
));
exit
;
exit
;
}
}
...
...
application/model/Users.php
View file @
7920ab68
...
@@ -9,8 +9,17 @@ class Users extends Model
...
@@ -9,8 +9,17 @@ class Users extends Model
{
{
// 设置当前模型对应的完整数据表名称
// 设置当前模型对应的完整数据表名称
protected
$table
=
'u_users'
;
protected
$table
=
'u_users'
;
public
function
add
()
{
public
function
add
()
{
}
public
function
selectUser
(
$userId
)
{
$param
[
"status"
]
=
array
(
"eq"
,
0
);
return
$this
->
field
(
"id,user_phone"
)
->
where
(
$param
)
->
find
(
$userId
);
}
}
}
}
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