Authored by 郭成尧

代码注解补充

... ... @@ -17,8 +17,8 @@ class CouponData
/**
* 获取领券楼层数据
*
* @param $uid
* @param $contentCode
* @param $uid 用户ID
* @param $contentCode 资源码
* @return array|mixed
* @internal param $contentCode
*/
... ... @@ -34,8 +34,8 @@ class CouponData
/**
* @param $uid
* @param $couponId
* @param $uid 用户ID
* @param $couponId 优惠券ID
* @return mixed
*/
public static function receiveCoupon($uid, $couponId)
... ...
... ... @@ -22,6 +22,7 @@ class CouponFloorProcess
*/
public static function getContent($data)
{
// self::debugOut($data);
$result = array();
if (empty($data)) {
... ...
... ... @@ -30,13 +30,14 @@ class CouponController extends AbstractAction
// $uid = $this->getUid();
// 调用模拟接口
// $resource = $this->getFloor();
$resource = CouponData::getCouponRousource('b38b9c4f1c76f89533e9214629b458e4', 8040274);
$resource = CouponData::getCouponRousource('b38b9c4f1c76f89533e9214629b458e4', 8040277);
// $resource = CouponData::getCouponRousource($receiveData['contentCode'],$uid);
if (isset($resource['code']) && $resource['code'] == 200) {
$result = CouponFloorProcess::getContent($resource['data']);
}
// CouponFloorProcess::debugOut($resource);
// tar debug
// CouponFloorProcess::debugOut($result);
$this->_view->display('index', array(
'content' => $result,
'floorPage' => true
... ... @@ -50,14 +51,15 @@ class CouponController extends AbstractAction
*/
public function receiveCouponAction()
{
// CouponFloorProcess::debugOut(CouponData::receiveCoupon(7893817,1516));
// tar debug
// CouponFloorProcess::debugOut(CouponData::receiveCoupon(8040277,2295));
$returnData = array();
// 获取优惠券 ID
$receiveData = filter_input_array(INPUT_GET, array(
'couponID' => FILTER_DEFAULT
));
// 跳转 URl
$playUrl = 'coupon/floor';
$playUrl = Helpers::url('coupon/floor');
// 判断用户是否登录
if (!$this->getUid() || !is_numeric($this->getUid())) {
// 用户未登录,跳转登录页面
... ...