Authored by Rock Zhang

处理个人中心优惠券返回的数据

... ... @@ -161,7 +161,7 @@ class UserData
public static function couponData($uid, $status, $page = 1, $limit = 10)
{
$param = Yohobuy::param();
$param['method'] = 'app.yohocoin.lists';
$param['method'] = 'app.coupons.li';
$param['uid'] = $uid;
$param['status'] = $status;
$param['page'] = $page;
... ...
... ... @@ -167,13 +167,14 @@ class HomeController extends AbstractAction
$this->setNavHeader('优惠券', true, SITE_MAIN);
// $uid = $this->getUid();
$uid = 8826435;
$status = $this->get('status', 0);
$coupons = array(
'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
'couponsUrl' => array(
\Index\UserModel::getCouponData($uid, 0),
\Index\UserModel::getCouponData($uid, 1),
),
'couponsPage' => true
);
print_r($coupons);
$this->_view->display('coupons', $coupons);
}
... ...
... ... @@ -218,7 +218,7 @@ class UserModel
// 处理优惠券数据
if (isset($coupons['data']) && !empty($coupons['data'])) {
$result = $coupons['data'];
$result = $coupons['data']['info'];
}
return $result;
... ...