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
f101b9a5
authored
2018-04-10 02:16:02 +0800
by
Zelig
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'develop' of
http://g.28ms.com:8000/yangjianbin/page
into develop
2 parents
7847273f
b57cb78f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
19 deletions
application/helpers/activate_helper.php
application/views/common/footer.php
application/views/common/header.php
application/views/common/work_menu.php
application/views/welcome/work.php
application/helpers/activate_helper.php
View file @
f101b9a
...
...
@@ -19,3 +19,18 @@ if(!function_exists('api')) {
return
$ret
;
}
}
if
(
!
function_exists
(
'hasRole'
))
{
function
hasRole
(
$roles
=
[])
{
$CI
=
&
get_instance
();
$CI
->
load
->
helper
(
'cookie'
);
$login_user
=
get_cookie
(
'login_user'
);
$login_user
=
json_decode
(
$login_user
,
true
);
foreach
(
$login_user
[
'roleKeys'
]
as
$v
){
if
(
in_array
(
$v
,
$roles
)){
return
true
;
}
}
return
false
;
}
}
...
...
application/views/common/footer.php
View file @
f101b9a
...
...
@@ -222,3 +222,21 @@
table
.
fnDraw
();
}
</script>
<script
type=
"application/javascript"
>
// 这部分代码要放到登录操作完成后立即执行
$
.
ajax
({
type
:
'get'
,
url
:
apiBaseUrl
+
'system/user/loginUser'
,
cache
:
false
,
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
){
Cookies
.
set
(
'login_user'
,
data
.
data
);
},
error
:
function
(){
layer
.
alert
(
"操作失败"
)
}
})
console
.
log
(
Cookies
.
get
(
'login_user'
));
</script>
...
...
application/views/common/header.php
View file @
f101b9a
...
...
@@ -32,22 +32,4 @@
</script>
<!-- js cookie -->
<script
src=
"https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"
></script>
<script
type=
"application/javascript"
>
$
.
ajax
({
type
:
'put'
,
url
:
apiBaseUrl
+
'system/user/loginUser'
,
cache
:
false
,
data
:
JSON
.
stringify
(
data
),
dataType
:
'json'
,
contentType
:
"application/json; charset=UTF-8"
,
success
:
function
(
data
){
},
error
:
function
(){
layer
.
alert
(
"操作失败"
)
}
})
Cookies
.
set
(
'name'
,
{
foo
:
'bar'
});
var
test
=
Cookies
.
get
(
'name'
);
console
.
log
(
apiBaseUrl
);
</script>
</head>
...
...
application/views/common/work_menu.php
View file @
f101b9a
<aside
class=
"Hui-aside"
>
<div
class=
"menu_dropdown bk_2"
>
<ul>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_customer_manager'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/add'
)
?>
"
data-title=
"开始进件"
href=
"javascript:void(0)"
><i
class=
"Hui-iconfont"
>

</i>
开始进件
</a></li>
<?php
endif
;
?>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_customer_manager'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/index'
)
?>
"
data-title=
"全部进件"
href=
"javascript:void(0)"
><i
class=
"Hui-iconfont"
>

</i>
全部进件
</a></li>
<?php
endif
;
?>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_pre_approve'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/1'
)
?>
"
data-title=
"预审管理"
href=
"javascript:void(0)"
><i
class=
"Hui-iconfont"
>

</i>
预审管理
</a></li>
<?php
endif
;
?>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_customer_manager'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/2'
)
?>
"
data-title=
"资料补录"
href=
"javascript:void(0)"
><i
class=
"Hui-iconfont"
>

</i>
资料补录
</a></li>
<?php
endif
;
?>
</ul>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_first_approve'
,
'ROLE_second_approve'
,
'ROLE_last_approve'
]))
:
?>
<dl>
<dt><i
class=
"Hui-iconfont"
>

</i>
审批管理
<i
class=
"Hui-iconfont menu_dropdown-arrow"
>

</i></dt>
<dd>
<ul>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_first_approve'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/3'
)
?>
"
data-title=
"初审"
href=
"javascript:void(0)"
>
初审
</a></li>
<?php
endif
;
?>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_second_approve'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/4'
)
?>
"
data-title=
"复审"
href=
"javascript:void(0)"
>
复审
</a></li>
<?php
endif
;
?>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_last_approve'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/5'
)
?>
"
data-title=
"终审"
href=
"javascript:void(0)"
>
终审
</a></li>
<?php
endif
;
?>
</ul>
</dd>
</dl>
<?php
endif
;
?>
<ul>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_due_diligence'
,
'ROLE_first_approve'
,
'ROLE_second_approve'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/6'
)
?>
"
data-title=
"尽调管理"
href=
"javascript:void(0)"
><i
class=
"Hui-iconfont"
>

</i>
尽调管理
</a></li>
<?php
endif
;
?>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_customer_manager'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/7'
)
?>
"
data-title=
"客户确认"
href=
"javascript:void(0)"
><i
class=
"Hui-iconfont"
>

</i>
客户确认
</a></li>
<?php
endif
;
?>
<?php
if
(
hasRole
([
'ROLE_admin'
,
'ROLE_common'
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/8'
)
?>
"
data-title=
"等待放款(移交)"
href=
"javascript:void(0)"
><i
class=
"Hui-iconfont"
>

</i>
等待放款(移交)
</a></li>
<?php
endif
;
?>
<?php
if
(
hasRole
([
'ROLE_admin'
,
''
]))
:
?>
<li><a
data-href=
"
<?=
site_url
(
'/work/side/9'
)
?>
"
data-title=
"确认放款"
href=
"javascript:void(0)"
><i
class=
"Hui-iconfont"
>

</i>
确认放款
</a></li>
<?php
endif
;
?>
</ul>
</div>
</aside>
...
...
application/views/welcome/work.php
View file @
f101b9a
...
...
@@ -12,7 +12,6 @@
$this
->
load
->
view
(
'common/work_menu'
);
?>
<div
class=
"dislpayArrow hidden-xs"
><a
class=
"pngfix"
href=
"javascript:void(0);"
onClick=
"displaynavbar(this)"
></a></div>
<section
class=
"Hui-article-box"
>
<div
id=
"Hui-tabNav"
class=
"Hui-tabNav hidden-xs"
>
...
...
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