Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
xiaozhan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
xiaozhan
Commits
cca8de7b
Commit
cca8de7b
authored
Feb 19, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
ff288d3d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
admin/themes/simplebootx/Admin/Welfare/index.html
+2
-2
application/Admin/Controller/WelfareController.class.php
+6
-12
No files found.
admin/themes/simplebootx/Admin/Welfare/index.html
View file @
cca8de7b
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
<li
class=
"active"
><a
>
列表
</a></li>
<li
class=
"active"
><a
>
列表
</a></li>
<li><a
href=
"{:U('Welfare/add')}"
>
添加
</a></li>
<li><a
href=
"{:U('Welfare/add')}"
>
添加
</a></li>
</ul>
</ul>
<form
class=
"well form-search"
method=
"post"
action=
"{:U('Welfare/
index
')}"
>
<form
class=
"well form-search"
method=
"post"
action=
"{:U('Welfare/
savePrice
')}"
>
价格:
价格:
<input
type=
"text"
name=
"price"
style=
"width: 200px;"
value=
"
{$formget.keyword}
"
placeholder=
""
>
<input
type=
"text"
name=
"price"
style=
"width: 200px;"
value=
""
placeholder=
""
>
<input
type=
"submit"
class=
"btn btn-primary"
value=
"保存"
>
<input
type=
"submit"
class=
"btn btn-primary"
value=
"保存"
>
</form>
</form>
<form
method=
"post"
class=
"js-ajax-form"
>
<form
method=
"post"
class=
"js-ajax-form"
>
...
...
application/Admin/Controller/WelfareController.class.php
View file @
cca8de7b
...
@@ -29,7 +29,6 @@ class WelfareController extends AdminbaseController
...
@@ -29,7 +29,6 @@ class WelfareController extends AdminbaseController
function
savePrice
()
function
savePrice
()
{
{
if
(
IS_POST
){
if
(
IS_POST
){
echo
1
;
die
;
$price
=
I
(
'price'
);
$price
=
I
(
'price'
);
if
(
$price
>
0
)
{
if
(
$price
>
0
)
{
$jackpot
=
M
(
"welfare_rate"
);
$jackpot
=
M
(
"welfare_rate"
);
...
@@ -40,16 +39,12 @@ class WelfareController extends AdminbaseController
...
@@ -40,16 +39,12 @@ class WelfareController extends AdminbaseController
'nums'
=>
0
,
'nums'
=>
0
,
'rate'
=>
$price
'rate'
=>
$price
];
];
try
{
if
(
empty
(
$check
))
{
if
(
empty
(
$check
))
{
M
(
"welfare_rate"
)
->
create
(
$p
);
M
(
"welfare_rate"
)
->
create
(
$p
);
}
else
{
}
else
{
$b
=
M
(
"welfare_rate"
)
->
where
(
"id=1"
)
->
save
(
$p
);
$b
=
M
(
"welfare_rate"
)
->
where
(
"id=1"
)
->
save
(
$p
);
var_dump
(
$b
);
var_dump
(
$b
);
die
;
die
;
}
}
catch
(
\Exception
$exception
){
}
}
}
}
}
}
...
@@ -57,7 +52,6 @@ class WelfareController extends AdminbaseController
...
@@ -57,7 +52,6 @@ class WelfareController extends AdminbaseController
function
index
(){
function
index
(){
$this
->
savePrice
();
$giftid
=
76
;
$giftid
=
76
;
$map
[
'giftid'
]
=
$giftid
;
$map
[
'giftid'
]
=
$giftid
;
...
...
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