Authored by liangxs

Merge branch 'feature/coupon' of http://git.dev.yoho.cn/web/yohobuy into feature/coupon

@@ -22,8 +22,6 @@ class CouponFloorProcess @@ -22,8 +22,6 @@ class CouponFloorProcess
22 */ 22 */
23 public static function getContent($data) 23 public static function getContent($data)
24 { 24 {
25 - // tar debug  
26 -// self::debugOut($data);  
27 $result = array(); 25 $result = array();
28 26
29 if (empty($data)) { 27 if (empty($data)) {
@@ -144,22 +142,4 @@ class CouponFloorProcess @@ -144,22 +142,4 @@ class CouponFloorProcess
144 $data['isSingleImage'] = true; 142 $data['isSingleImage'] = true;
145 return $data; 143 return $data;
146 } 144 }
147 -  
148 - /**  
149 - *  
150 - * 辅助方法 Debug 数据输出  
151 - *  
152 - * @param $data  
153 - * @param bool $is_exit 输出后是否中断执行  
154 - */  
155 - public static function debugOut($data, $is_exit = true)  
156 - {  
157 - header("Content-type:text/html;charset=utf-8");  
158 - echo '<pre>';  
159 - print_r($data);  
160 - echo '</pre>';  
161 - if ($is_exit) {  
162 - exit;  
163 - }  
164 - }  
165 } 145 }
@@ -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(