|
@@ -14,34 +14,24 @@ use Plugin\Helpers; |
|
@@ -14,34 +14,24 @@ use Plugin\Helpers; |
14
|
|
14
|
|
15
|
class CouponController extends AbstractAction
|
15
|
class CouponController extends AbstractAction
|
16
|
{
|
16
|
{
|
17
|
- private $contentCode = '';
|
|
|
18
|
-
|
|
|
19
|
/**
|
17
|
/**
|
20
|
* 领券楼层数据列表
|
18
|
* 领券楼层数据列表
|
21
|
*
|
19
|
*
|
22
|
- * @author Targaryen
|
20
|
+ * @author chengyao.guo
|
23
|
*/
|
21
|
*/
|
24
|
public function floorAction()
|
22
|
public function floorAction()
|
25
|
{
|
23
|
{
|
26
|
$receiveData = filter_input_array(INPUT_GET, array(
|
24
|
$receiveData = filter_input_array(INPUT_GET, array(
|
27
|
'contentCode' => FILTER_DEFAULT
|
25
|
'contentCode' => FILTER_DEFAULT
|
28
|
));
|
26
|
));
|
29
|
- $this->contentCode = $receiveData['contentCode'];
|
|
|
30
|
$result = array();
|
27
|
$result = array();
|
31
|
|
28
|
|
32
|
- // 正常接口调用
|
|
|
33
|
$uid = $this->getUid();
|
29
|
$uid = $this->getUid();
|
34
|
- //tar debug
|
|
|
35
|
-// CouponFloorProcess::debugOut($uid);
|
|
|
36
|
$resource = CouponData::getCouponRousource($receiveData['contentCode'], $uid);
|
30
|
$resource = CouponData::getCouponRousource($receiveData['contentCode'], $uid);
|
37
|
- // 数据写死,调用接口,测试使用
|
|
|
38
|
-// $resource = CouponData::getCouponRousource('b38b9c4f1c76f89533e9214629b458e4', 8040277);
|
|
|
39
|
if (isset($resource['code']) && $resource['code'] == 200) {
|
31
|
if (isset($resource['code']) && $resource['code'] == 200) {
|
40
|
$result = CouponFloorProcess::getContent($resource['data']);
|
32
|
$result = CouponFloorProcess::getContent($resource['data']);
|
41
|
}
|
33
|
}
|
42
|
|
34
|
|
43
|
- // tar debug
|
|
|
44
|
-// CouponFloorProcess::debugOut($resource);
|
|
|
45
|
$this->_view->display('index', array(
|
35
|
$this->_view->display('index', array(
|
46
|
'content' => $result,
|
36
|
'content' => $result,
|
47
|
'floorPage' => true
|
37
|
'floorPage' => true
|
|
@@ -51,12 +41,10 @@ class CouponController extends AbstractAction |
|
@@ -51,12 +41,10 @@ class CouponController extends AbstractAction |
51
|
/**
|
41
|
/**
|
52
|
* 领券操作
|
42
|
* 领券操作
|
53
|
*
|
43
|
*
|
54
|
- * @author Targaryen
|
44
|
+ * @author chengyao.guo
|
55
|
*/
|
45
|
*/
|
56
|
public function receiveCouponAction()
|
46
|
public function receiveCouponAction()
|
57
|
{
|
47
|
{
|
58
|
- // tar debug
|
|
|
59
|
-// CouponFloorProcess::debugOut(CouponData::receiveCoupon(8040277,2300));
|
|
|
60
|
$returnData = array();
|
48
|
$returnData = array();
|
61
|
// 获取优惠券 ID
|
49
|
// 获取优惠券 ID
|
62
|
$receiveData = filter_input_array(INPUT_GET, array(
|
50
|
$receiveData = filter_input_array(INPUT_GET, array(
|