...
|
...
|
@@ -368,8 +368,21 @@ class UserModel |
|
|
// 调用接口获取优惠券数据
|
|
|
$coupons = UserData::couponData($uid, $status, $page);
|
|
|
|
|
|
// 没有获取到优惠券时
|
|
|
if (!$coupons) {
|
|
|
$result['topURL'] = '/product/new';
|
|
|
$result['noRecord'] = true;
|
|
|
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
|
// 处理优惠券数据
|
|
|
if (isset($coupons['data']) && !empty($coupons['data']['total'])) {
|
|
|
if (isset($coupons['data'])) {
|
|
|
// 不能再查到结果了
|
|
|
if ($page == 1 && $coupons['data']['total'] === 0) {
|
|
|
$result['walkwayUrl'] = '/product/new';
|
|
|
$result['noRecord'] = true;
|
|
|
} else {
|
|
|
$result['coupons'] = $coupons['data']['info'];
|
|
|
|
|
|
foreach ($result['coupons'] as &$val) {
|
...
|
...
|
@@ -378,7 +391,7 @@ class UserModel |
|
|
$val['used'] = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return $result;
|
...
|
...
|
|