Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Showing
2 changed files
with
4 additions
and
3 deletions
@@ -238,7 +238,7 @@ class HomeController extends AbstractAction | @@ -238,7 +238,7 @@ class HomeController extends AbstractAction | ||
238 | 238 | ||
239 | $uid = $this->getUid(); | 239 | $uid = $this->getUid(); |
240 | $coupons = array( | 240 | $coupons = array( |
241 | - 'couponsUrl' => UserModel::getCouponData($uid), | 241 | + 'couponsUrl' => UserModel::getCouponData($uid, 1), |
242 | 'couponsPage' => true | 242 | 'couponsPage' => true |
243 | ); | 243 | ); |
244 | $coupons['pageFooter'] = true; | 244 | $coupons['pageFooter'] = true; |
@@ -304,14 +304,15 @@ class UserModel | @@ -304,14 +304,15 @@ class UserModel | ||
304 | * 处理优惠券数据 | 304 | * 处理优惠券数据 |
305 | * | 305 | * |
306 | * @param int $uid 用户ID | 306 | * @param int $uid 用户ID |
307 | + * @param int $page 第几页 | ||
307 | * @return array|mixed 处理之后的优惠券数据 | 308 | * @return array|mixed 处理之后的优惠券数据 |
308 | */ | 309 | */ |
309 | - public static function getCouponData($uid) | 310 | + public static function getCouponData($uid, $page) |
310 | { | 311 | { |
311 | $result = array(); | 312 | $result = array(); |
312 | 313 | ||
313 | // 调用接口获取优惠券数据 | 314 | // 调用接口获取优惠券数据 |
314 | - $coupons = UserData::couponData($uid); | 315 | + $coupons = UserData::couponData($uid, $page); |
315 | 316 | ||
316 | // 处理优惠券数据 | 317 | // 处理优惠券数据 |
317 | if (!empty($coupons['unused'])) { | 318 | if (!empty($coupons['unused'])) { |
-
Please register or login to post a comment