Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SooonerHotel
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
吴贤德
SooonerHotel
Commits
39ff7e1a
Commit
39ff7e1a
authored
Jul 31, 2019
by
吴贤德
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改登录逻辑,session('_USER_SPID_LIST', $spIDList); —> session('sp_ids', $spIDList);
parent
7c34758d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
LoginAction.class.php
SooonerHotel/App/Lib/Action/LoginAction.class.php
+10
-2
UserModel.class.php
SooonerHotel/App/Lib/Model/UserModel.class.php
+1
-1
No files found.
SooonerHotel/App/Lib/Action/LoginAction.class.php
View file @
39ff7e1a
...
@@ -47,7 +47,11 @@ class LoginAction extends Action{
...
@@ -47,7 +47,11 @@ class LoginAction extends Action{
foreach
(
$spList
as
$sp
)
{
foreach
(
$spList
as
$sp
)
{
$spIDList
[]
=
$sp
[
'id'
];
$spIDList
[]
=
$sp
[
'id'
];
}
}
session
(
'_USER_SPID_LIST'
,
$spIDList
);
// session('_USER_SPID_LIST', $spIDList);
$sp_ids
=
"0"
;
if
(
!
empty
(
$spIDList
))
$sp_ids
=
implode
(
","
,
$spIDList
);
session
(
'sp_ids'
,
$spIDList
);
}
}
$login_count
=
$r
[
'login_count'
]
+
1
;
$login_count
=
$r
[
'login_count'
]
+
1
;
...
@@ -166,7 +170,11 @@ class LoginAction extends Action{
...
@@ -166,7 +170,11 @@ class LoginAction extends Action{
foreach
(
$spList
as
$sp
)
{
foreach
(
$spList
as
$sp
)
{
$spIDList
[]
=
$sp
[
'id'
];
$spIDList
[]
=
$sp
[
'id'
];
}
}
session
(
'_USER_SPID_LIST'
,
$spIDList
);;
// session('_USER_SPID_LIST', $spIDList);;
$sp_ids
=
"0"
;
if
(
!
empty
(
$spIDList
))
$sp_ids
=
implode
(
","
,
$spIDList
);
session
(
'sp_ids'
,
$spIDList
);
}
}
$login_count
=
$r
[
'login_count'
]
+
1
;
$login_count
=
$r
[
'login_count'
]
+
1
;
...
...
SooonerHotel/App/Lib/Model/UserModel.class.php
View file @
39ff7e1a
...
@@ -19,7 +19,7 @@ class UserModel extends RelationModel{
...
@@ -19,7 +19,7 @@ class UserModel extends RelationModel{
}
}
//获取用户绑定的SP列表
//获取用户绑定的SP列表
public
function
getSpList
(
$id
){
public
function
getSpList
(
$id
){
$sql
=
"SELECT sp.id,sp.code,sp.name FROM
vsdn
_sp_user_map vsum,vsdn_sp sp"
$sql
=
"SELECT sp.id,sp.code,sp.name FROM
sh
_sp_user_map vsum,vsdn_sp sp"
.
" WHERE vsum.user_id=
$id
AND vsum.status=0 AND sp.status=0 AND sp.id=vsum.sp_id"
.
" WHERE vsum.user_id=
$id
AND vsum.status=0 AND sp.status=0 AND sp.id=vsum.sp_id"
.
" ORDER BY sp.id ASC;"
;
.
" ORDER BY sp.id ASC;"
;
$model
=
new
Model
();
$model
=
new
Model
();
...
...
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