Coupon.php
2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
/**
* Created by PhpStorm.
* User: Targaryen
* Date: 2016/4/11
* Time: 16:31
*/
use Action\AbstractAction;
class CouponController extends AbstractAction
{
/**
* 领券中心
*/
public function indexAction()
{
var_dump('123456');
}
/**
* 领券楼层
*/
public function floorAction()
{
$data =[
'title' => '热门推荐',
'showTitle' => 1,
'coupons' => [
[
'id' => 1,
'picUrl' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
'status' => 1,
'num' => '123',
'go'=>'http://m.dev.yohobuy.com/boys',
'couponIds' =>[8024,2564,3587]
],[
'id' => 1,
'picUrl' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
'status' => 1,
'num' => '123',
'go'=>'http://m.dev.yohobuy.com/boys',
'couponIds' =>[8024,2564,3587]
],[
'id' => 1,
'picUrl' => 'http://img12.static.yhbimg.com/yhb-img01/2016/01/19/11/02039485d87cc1b100b883244cf386e62d.jpg?imageView/2/w/640/h/200',
'status' => 1,
'num' => '123',
'go'=>'http://m.dev.yohobuy.com/boys',
'couponIds' =>[8024,2564,3587]
]
]
];
$this->_view->display('index', $data);
}
/**
* 领券操作
*/
public function receiveCouponAction()
{
$receiveData = filter_input_array(INPUT_GET,array(
'id' => FILTER_DEFAULT
));
$returnData = [
'id' => $receiveData['id'],
'status' => 1,
'message' => '您已经领过券了!'
];
$this->_view->display('receive-coupon',$returnData);
}
}