Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
杨建斌
/
page
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
1
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0223b292
authored
2018-03-21 21:35:24 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
a39e00fe
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
6 deletions
application/hooks/CheckLogin.php
application/views/work/index.php
application/hooks/CheckLogin.php
View file @
0223b29
...
...
@@ -19,6 +19,12 @@ class CheckLogin
if
(
!
$session
->
orderStatus
)
{
$session
->
orderStatus
=
$this
->
getOrderStatus
();
}
if
(
!
$session
->
departments
)
{
$session
->
departments
=
$this
->
getDepartment
();
}
if
(
!
$session
->
customerManagers
)
{
$session
->
customerManagers
=
$this
->
getCustomerManagers
();
}
/*if (preg_match("/admin|base/i", uri_string())) {
if(!$this->CI->session->isadmin){
...
...
@@ -50,4 +56,20 @@ class CheckLogin
return
$products
;
}
private
function
getDepartment
()
{
$url
=
'http://151.28ms.com:8088/department/getTree'
;
$res
=
json_decode
(
file_get_contents
(
$url
));
$products
=
$res
->
data
;
return
$products
;
}
private
function
getCustomerManagers
()
{
$url
=
'http://151.28ms.com:8088/system/user/getAllCustomerManager'
;
$res
=
json_decode
(
file_get_contents
(
$url
));
$products
=
$res
->
data
;
return
$products
;
}
}
\ No newline at end of file
...
...
application/views/work/index.php
View file @
0223b29
...
...
@@ -17,9 +17,9 @@
<span
class=
"select-box"
>
<select
class=
"select table_search"
name=
"departmentId"
size=
"1"
column=
"6"
>
<option
value=
""
selected
>
网点
</option>
<
option
value=
"1"
>
菜单一
</option
>
<option
value=
"2"
>
菜单二
</option>
<
option
value=
"3"
>
菜单三
</option
>
<
?php
foreach
(
$this
->
session
->
departments
as
$k
=>
$v
)
:?
>
<
option
value
=
"<?=
$v->id
?>"
><?=
$v
->
name
?>
</option>
<
?php
endforeach
;
?
>
</select>
</span>
</div>
...
...
@@ -37,9 +37,9 @@
<span
class=
"select-box"
>
<select
class=
"select table_search"
name=
"createUser"
size=
"1"
column=
"10"
>
<option
value=
""
selected
>
客户经理
</option>
<
option>
李四
</option
>
<option>
菜单二
</option>
<
option>
菜单三
</option
>
<
?php
foreach
(
$this
->
session
->
customerManagers
as
$k
=>
$v
)
:?
>
<
option
value
=
"<?=
$v->id
?>"
><?=
$v
->
name
?>
</option>
<
?php
endforeach
;
?
>
</select>
</span>
</div>
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment