|
@@ -14,34 +14,27 @@ use Plugin\Helpers; |
|
@@ -14,34 +14,27 @@ 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
|
+ 'code' => 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);
|
|
|
37
|
- // 数据写死,调用接口,测试使用
|
|
|
38
|
-// $resource = CouponData::getCouponRousource('b38b9c4f1c76f89533e9214629b458e4', 8040277);
|
30
|
+ $resource = CouponData::getCouponRousource($receiveData['code'], $uid);
|
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
|
-
|
|
|
43
|
- // tar debug
|
|
|
44
|
-// CouponFloorProcess::debugOut($resource);
|
34
|
+// header("Content-type:text/html;charset=utf-8");
|
|
|
35
|
+// echo '<pre>';
|
|
|
36
|
+// print_r($result);
|
|
|
37
|
+// echo '</pre>';exit;
|
45
|
$this->_view->display('index', array(
|
38
|
$this->_view->display('index', array(
|
46
|
'content' => $result,
|
39
|
'content' => $result,
|
47
|
'floorPage' => true
|
40
|
'floorPage' => true
|
|
@@ -51,12 +44,10 @@ class CouponController extends AbstractAction |
|
@@ -51,12 +44,10 @@ class CouponController extends AbstractAction |
51
|
/**
|
44
|
/**
|
52
|
* 领券操作
|
45
|
* 领券操作
|
53
|
*
|
46
|
*
|
54
|
- * @author Targaryen
|
47
|
+ * @author chengyao.guo
|
55
|
*/
|
48
|
*/
|
56
|
public function receiveCouponAction()
|
49
|
public function receiveCouponAction()
|
57
|
{
|
50
|
{
|
58
|
- // tar debug
|
|
|
59
|
-// CouponFloorProcess::debugOut(CouponData::receiveCoupon(8040277,2300));
|
|
|
60
|
$returnData = array();
|
51
|
$returnData = array();
|
61
|
// 获取优惠券 ID
|
52
|
// 获取优惠券 ID
|
62
|
$receiveData = filter_input_array(INPUT_GET, array(
|
53
|
$receiveData = filter_input_array(INPUT_GET, array(
|