Showing
3 changed files
with
4 additions
and
6 deletions
@@ -171,12 +171,11 @@ class UserData | @@ -171,12 +171,11 @@ class UserData | ||
171 | * 优惠券数据 | 171 | * 优惠券数据 |
172 | * | 172 | * |
173 | * @param int $uid 用户ID | 173 | * @param int $uid 用户ID |
174 | - * @param int $status 优惠券状态,0表示未使用,1表示已使用 | ||
175 | * @param int $page 第几页,默认1 | 174 | * @param int $page 第几页,默认1 |
176 | * @param int $limit 限制读取的数目,默认10 | 175 | * @param int $limit 限制读取的数目,默认10 |
177 | * @return array 优惠券接口返回的数据 | 176 | * @return array 优惠券接口返回的数据 |
178 | */ | 177 | */ |
179 | - public static function couponData($uid, $status, $page = 1, $limit = 10) | 178 | + public static function couponData($uid, $page = 1, $limit = 10) |
180 | { | 179 | { |
181 | $urlList = array(); | 180 | $urlList = array(); |
182 | 181 |
@@ -162,9 +162,8 @@ class HomeController extends AbstractAction | @@ -162,9 +162,8 @@ class HomeController extends AbstractAction | ||
162 | $this->setNavHeader('优惠券', true, SITE_MAIN); | 162 | $this->setNavHeader('优惠券', true, SITE_MAIN); |
163 | // $uid = $this->getUid(); | 163 | // $uid = $this->getUid(); |
164 | $uid = 8826435; | 164 | $uid = 8826435; |
165 | - $status = $this->get('status', 0); | ||
166 | $coupons = array( | 165 | $coupons = array( |
167 | - 'couponsUrl' => \Index\UserModel::getCouponData($uid, $status), | 166 | + 'couponsUrl' => \Index\UserModel::getCouponData($uid), |
168 | 'couponsPage' => true | 167 | 'couponsPage' => true |
169 | ); | 168 | ); |
170 | $this->_view->display('coupons', $coupons); | 169 | $this->_view->display('coupons', $coupons); |
@@ -258,12 +258,12 @@ class UserModel | @@ -258,12 +258,12 @@ class UserModel | ||
258 | * @param int $uid 用户ID | 258 | * @param int $uid 用户ID |
259 | * @return array|mixed 处理之后的优惠券数据 | 259 | * @return array|mixed 处理之后的优惠券数据 |
260 | */ | 260 | */ |
261 | - public static function getCouponData($uid, $status) | 261 | + public static function getCouponData($uid) |
262 | { | 262 | { |
263 | $result = array(); | 263 | $result = array(); |
264 | 264 | ||
265 | // 调用接口获取优惠券数据 | 265 | // 调用接口获取优惠券数据 |
266 | - $coupons = UserData::couponData($uid, $status); | 266 | + $coupons = UserData::couponData($uid); |
267 | 267 | ||
268 | // 处理优惠券数据 | 268 | // 处理优惠券数据 |
269 | if (!empty($coupons['unused'])) { | 269 | if (!empty($coupons['unused'])) { |
-
Please register or login to post a comment