Commit cca8de7b by 冷斌

add

parent ff288d3d
...@@ -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">
......
...@@ -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,7 +39,6 @@ class WelfareController extends AdminbaseController ...@@ -40,7 +39,6 @@ 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 {
...@@ -48,16 +46,12 @@ class WelfareController extends AdminbaseController ...@@ -48,16 +46,12 @@ class WelfareController extends AdminbaseController
var_dump($b); var_dump($b);
die; die;
} }
}catch (\Exception $exception){
}
} }
} }
} }
function index(){ function index(){
$this->savePrice();
$giftid= 76; $giftid= 76;
$map['giftid']=$giftid; $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