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
cee4fe99
authored
2018-03-24 13:24:56 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
7aab96d5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
3 deletions
application/hooks/CheckLogin.php
application/views/work/资料/资料补录.php
application/hooks/CheckLogin.php
View file @
cee4fe9
...
...
@@ -79,6 +79,13 @@ class CheckLogin
if
(
!
$session
->
genderEnum
)
{
$session
->
genderEnum
=
$this
->
getGenderEnum
();
}
if
(
!
$session
->
loanUseEnum
)
{
$session
->
loanUseEnum
=
$this
->
getLoanUseEnum
();
}
if
(
!
$session
->
loanNatureEnum
)
{
$session
->
loanNatureEnum
=
$this
->
getLoanNatureEnum
();
}
/*if (preg_match("/admin|base/i", uri_string())) {
if(!$this->CI->session->isadmin){
redirect('login');
...
...
@@ -302,4 +309,28 @@ class CheckLogin
}
}
private
function
getLoanUseEnum
()
{
try
{
$url
=
$this
->
CI
->
config
->
item
(
'apiBaseUrl'
)
.
'enum/loan/use'
;
$res
=
json_decode
(
file_get_contents
(
$url
));
$products
=
$res
->
data
;
return
$products
;
}
catch
(
Exception
$e
)
{
return
array
();
}
}
private
function
getLoanNatureEnum
()
{
try
{
$url
=
$this
->
CI
->
config
->
item
(
'apiBaseUrl'
)
.
'enum/loan/nature'
;
$res
=
json_decode
(
file_get_contents
(
$url
));
$products
=
$res
->
data
;
return
$products
;
}
catch
(
Exception
$e
)
{
return
array
();
}
}
}
\ No newline at end of file
...
...
application/views/work/资料/资料补录.php
View file @
cee4fe9
...
...
@@ -348,7 +348,7 @@
<div
class=
"form-group col-sm-3 col-md-2"
>
<label>
还款方式
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
>
<select
class=
"select"
size=
c
"1"
>
<option
value=
"1"
></option>
</select>
</span>
...
...
@@ -357,7 +357,9 @@
<label>
贷款用途
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
>
<option
value=
"1"
></option>
<?php
foreach
(
$this
->
session
->
loanUseEnum
as
$k
=>
$v
)
:?>
<
option
value
=
"<?=
$k
?>"
><?=
$v
?>
</option>
<?php
endforeach
;
?>
</select>
</span>
</div>
...
...
@@ -381,7 +383,9 @@
<label>
贷款用途性质
</label>
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
>
<option
value=
"1"
></option>
<?php
foreach
(
$this
->
session
->
loanNatureEnum
as
$k
=>
$v
)
:?>
<
option
value
=
"<?=
$k
?>"
><?=
$v
?>
</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