Commit cca8de7b by 冷斌

add

parent ff288d3d
......@@ -7,9 +7,9 @@
<li class="active"><a >列表</a></li>
<li><a href="{:U('Welfare/add')}">添加</a></li>
</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="保存">
</form>
<form method="post" class="js-ajax-form">
......
......@@ -29,7 +29,6 @@ class WelfareController extends AdminbaseController
function savePrice()
{
if(IS_POST){
echo 1;die;
$price=I('price');
if ($price > 0) {
$jackpot=M("welfare_rate");
......@@ -40,7 +39,6 @@ class WelfareController extends AdminbaseController
'nums' => 0,
'rate' => $price
];
try{
if (empty($check)) {
M("welfare_rate")->create($p);
} else {
......@@ -48,16 +46,12 @@ class WelfareController extends AdminbaseController
var_dump($b);
die;
}
}catch (\Exception $exception){
}
}
}
}
function index(){
$this->savePrice();
$giftid= 76;
$map['giftid']=$giftid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment