Commit db054087 by 冷斌

add

parent 82dcd8e6
...@@ -29,7 +29,6 @@ class WelfareController extends AdminbaseController ...@@ -29,7 +29,6 @@ class WelfareController extends AdminbaseController
function savePrice() function savePrice()
{ {
$price=I('price'); $price=I('price');
echo $price;die;
if ($price > 0) { if ($price > 0) {
$jackpot=M("welfare_rate"); $jackpot=M("welfare_rate");
$check = $jackpot->where("id=1")->find(); $check = $jackpot->where("id=1")->find();
...@@ -40,10 +39,12 @@ class WelfareController extends AdminbaseController ...@@ -40,10 +39,12 @@ class WelfareController extends AdminbaseController
]; ];
try{ try{
if ($check) { if ($check) {
$jackpot->create($p); $a = $jackpot->create($p);
} else { } else {
$jackpot->save($p); $a = $jackpot->save($p);
} }
var_dump($a);
die;
}catch (\Exception $exception){ }catch (\Exception $exception){
} }
......
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