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
764ed018
authored
2018-03-21 22:40:24 +0800
by
yangjianbin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
init
1 parent
0e762955
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletions
application/hooks/CheckLogin.php
application/views/config/edit.php
application/hooks/CheckLogin.php
View file @
764ed01
...
...
@@ -28,6 +28,10 @@ class CheckLogin
if
(
!
$session
->
operatorManagers
)
{
$session
->
operatorManagers
=
$this
->
getOperatorManagers
();
}
if
(
!
$session
->
repayments
)
{
$session
->
repayments
=
$this
->
getRepayment
();
}
/*if (preg_match("/admin|base/i", uri_string())) {
...
...
@@ -97,4 +101,16 @@ class CheckLogin
}
}
private
function
getRepayment
()
{
try
{
$url
=
$this
->
CI
->
config
->
item
(
'apiBaseUrl'
)
.
'config/enum/repayment'
;
$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/config/edit.php
View file @
764ed01
...
...
@@ -36,7 +36,9 @@
<span
class=
"form-control select-box"
>
<select
class=
"select"
size=
"1"
name=
"repaymentMode"
>
<option>
请选择
</option>
<option
value=
"1"
>
1
</option>
<?php
foreach
(
$this
->
session
->
repayments
as
$k
=>
$v
)
:?>
<
option
<?=
$k
==
$data
->
repaymentMode
?
'selected'
:
''
?>
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