Commit bae52c31 by 冷斌

add

parent b331eafc
......@@ -18,7 +18,6 @@
<tr>
<th align="center">ID</th>
<th>礼物名称</th>
<th>数量</th>
<th>中奖概率</th>
<th align="center">{:L('ACTIONS')}</th>
</tr>
......@@ -27,7 +26,7 @@
<foreach name="lists" item="vo">
<tr>
<td align="center">{$vo.id}</td>
<td>{$vo['nums']}</td>
<td>{$gift[$vo['nums']]}</td>
<td>{$vo['rate']}%</td>
<td><if condition="$vo['isall'] eq 1"><else/></if></td>
<td align="center">
......
......@@ -36,7 +36,6 @@ class WelfareController extends AdminbaseController
$p = [
'id' => 1,
'giftid' => 0,
'nums' => 0,
'rate' => $price
];
M("welfare_rate")->add($p);
......@@ -47,6 +46,16 @@ class WelfareController extends AdminbaseController
$this->success('修改成功');
}
function gift()
{
$data = [];
$gifts = $this->getGift();
foreach ($gifts as $gift) {
$data[$gift['id']] = $gift['name'];
}
return $data;
}
function index(){
$jackpot=M("welfare_rate");
$count=$jackpot->count();
......@@ -61,6 +70,7 @@ class WelfareController extends AdminbaseController
$check = $jackpot->where("id=1")->find();
$this->assign('price', $check['rate']);
$this->assign("page", $page->show('Admin'));
$this->assign('gift', $this->gift());
$this->display();
}
......
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