Authored by 郭成尧

冗余代码清理

@@ -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,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(