Authored by 郭成尧

冗余代码清理

... ... @@ -22,8 +22,6 @@ class CouponFloorProcess
*/
public static function getContent($data)
{
// tar debug
// self::debugOut($data);
$result = array();
if (empty($data)) {
... ... @@ -144,22 +142,4 @@ class CouponFloorProcess
$data['isSingleImage'] = true;
return $data;
}
/**
*
* 辅助方法 Debug 数据输出
*
* @param $data
* @param bool $is_exit 输出后是否中断执行
*/
public static function debugOut($data, $is_exit = true)
{
header("Content-type:text/html;charset=utf-8");
echo '<pre>';
print_r($data);
echo '</pre>';
if ($is_exit) {
exit;
}
}
}
\ No newline at end of file
... ...
... ... @@ -14,34 +14,24 @@ use Plugin\Helpers;
class CouponController extends AbstractAction
{
private $contentCode = '';
/**
* 领券楼层数据列表
*
* @author Targaryen
* @author chengyao.guo
*/
public function floorAction()
{
$receiveData = filter_input_array(INPUT_GET, array(
'contentCode' => FILTER_DEFAULT
));
$this->contentCode = $receiveData['contentCode'];
$result = array();
// 正常接口调用
$uid = $this->getUid();
//tar debug
// CouponFloorProcess::debugOut($uid);
$resource = CouponData::getCouponRousource($receiveData['contentCode'], $uid);
// 数据写死,调用接口,测试使用
// $resource = CouponData::getCouponRousource('b38b9c4f1c76f89533e9214629b458e4', 8040277);
if (isset($resource['code']) && $resource['code'] == 200) {
$result = CouponFloorProcess::getContent($resource['data']);
}
// tar debug
// CouponFloorProcess::debugOut($resource);
$this->_view->display('index', array(
'content' => $result,
'floorPage' => true
... ... @@ -51,12 +41,10 @@ class CouponController extends AbstractAction
/**
* 领券操作
*
* @author Targaryen
* @author chengyao.guo
*/
public function receiveCouponAction()
{
// tar debug
// CouponFloorProcess::debugOut(CouponData::receiveCoupon(8040277,2300));
$returnData = array();
// 获取优惠券 ID
$receiveData = filter_input_array(INPUT_GET, array(
... ...