Commit 007449b2 by zhangheng

y

parent 29008421
......@@ -88,30 +88,13 @@ class IndexController extends Controller
'take_time' => array(array('gt', $from), array('lt', $to)),
'is_get' => 1,
))->count();
// 1是电影票
if ($type == 1) {
if ($c >= 2) {
continue;
}
}
// 1牙膏
if ($type == 2) {
if ($c >= 2) {
continue;
}
}
// 3是手机
if ($type == 3) {
if ($c >= 1) {
continue;
}
}
// 4是吹风机
if ($type == 4) {
if ($type == 1) {
if ($c >= 2) {
continue;
}
}
$req_type[] = $type;
}
if (empty($req_type)) {
......@@ -288,29 +271,12 @@ class IndexController extends Controller
{
for ($i = 0; $i < 3; $i++) {
M('Prize')->add(array(
'content' => '电影票',
'type' => 1,
));
}
for ($i = 0; $i < 3; $i++) {
M('Prize')->add(array(
'content' => '牙膏',
'type' => 2,
));
}
for ($i = 0; $i < 3; $i++) {
M('Prize')->add(array(
'content' => '手机',
'type' => 3,
));
}
for ($i = 0; $i < 3; $i++) {
M('Prize')->add(array(
'content' => '吹风机',
'type' => 4,
'type' => 1,
));
}
}
}
......@@ -40,7 +40,7 @@
// doc.addEventListener('DOMContentLoaded', recalc, false);
// })(document, window);
</script>
<title></title>
<title>冷酸灵</title>
<link href="__CDN__/css/swiper.min.css" rel="stylesheet">
<link href="__CDN__/css/main.css" rel="stylesheet">
......
......@@ -29,23 +29,23 @@ class ReportController extends BaseUserController
'type'=>1,
'is_get'=>0
))->count();
$count_2=M('Prize')->where(array(
'type'=>2,
'is_get'=>0
))->count();
$count_3=M('Prize')->where(array(
'type'=>3,
'is_get'=>0
))->count();
$count_4=M('Prize')->where(array(
'type'=>4,
'is_get'=>0
))->count();
// $count_2=M('Prize')->where(array(
// 'type'=>2,
// 'is_get'=>0
// ))->count();
//
// $count_3=M('Prize')->where(array(
// 'type'=>3,
// 'is_get'=>0
// ))->count();
// $count_4=M('Prize')->where(array(
// 'type'=>4,
// 'is_get'=>0
// ))->count();
$this->assign('count_1',$count_1);
$this->assign('count_2',$count_2);
$this->assign('count_3',$count_3);
$this->assign('count_4',$count_4);
// $this->assign('count_2',$count_2);
// $this->assign('count_3',$count_3);
// $this->assign('count_4',$count_4);
$this->assign('event_meta_list', $event_meta_list);
$this->assign('data_list', $data_list[$channel]);
......
......@@ -13,10 +13,9 @@
</div>
<table class="table" class="table table-striped">
<tr>
<td style="width: 100px;">电影票剩余: <span style="color: red">{:$count_1}</span></td>
<td style="width: 100px">牙膏剩余: <span style="color: red">{:$count_2}</span></td>
<td style="width: 100px">手机剩余: <span style="color: red">{:$count_3}</span></td>
<td style="width: 100px">吹风机剩余: <span style="color: red">{:$count_4}</span></td>
<td style="width: 100px">牙膏剩余: <span style="color: red">{:$count_1}</span></td>
</tr>
......
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 sign in to comment