|
@@ -30,7 +30,7 @@ class UserModel |
|
@@ -30,7 +30,7 @@ class UserModel |
30
|
// 调用接口获取个人详情
|
30
|
// 调用接口获取个人详情
|
31
|
$userData = UserData::userData($uid);
|
31
|
$userData = UserData::userData($uid);
|
32
|
|
32
|
|
33
|
- // 处理个人详情数据
|
33
|
+ // 处理个人详情数
|
34
|
if (isset($userData['data']) && !empty($userData['data'])) {
|
34
|
if (isset($userData['data']) && !empty($userData['data'])) {
|
35
|
$result = $userData['data'];
|
35
|
$result = $userData['data'];
|
36
|
$result['gender'] = $result['gender'] == 1 ? '男' : '女';
|
36
|
$result['gender'] = $result['gender'] == 1 ? '男' : '女';
|
|
@@ -213,8 +213,11 @@ class UserModel |
|
@@ -213,8 +213,11 @@ class UserModel |
213
|
$coupons = UserData::couponData($uid, $status);
|
213
|
$coupons = UserData::couponData($uid, $status);
|
214
|
|
214
|
|
215
|
// 处理优惠券数据
|
215
|
// 处理优惠券数据
|
216
|
- if (isset($coupons['data']) && !empty($coupons['data'])) {
|
|
|
217
|
- $result = $coupons['data']['info'];
|
216
|
+ if (!empty($coupons['unused'])) {
|
|
|
217
|
+ $result['unused'] = $coupons['unused']['info'];
|
|
|
218
|
+ }
|
|
|
219
|
+ if (!empty($coupons['used'])) {
|
|
|
220
|
+ $result['used'] = $coupons['used']['info'];
|
218
|
}
|
221
|
}
|
219
|
|
222
|
|
220
|
return $result;
|
223
|
return $result;
|
|
@@ -353,14 +356,11 @@ class UserModel |
|
@@ -353,14 +356,11 @@ class UserModel |
353
|
$one = array();
|
356
|
$one = array();
|
354
|
foreach ($suggest['data']['list'] as $val) {
|
357
|
foreach ($suggest['data']['list'] as $val) {
|
355
|
$one = array();
|
358
|
$one = array();
|
356
|
- $one['hasImage'] = $val['has_image'];
|
|
|
357
|
$one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240);
|
359
|
$one['imgUrl'] = Helpers::getImageUrl($val['cover_image'], 640, 240);
|
358
|
$one['title'] = $val['filter_content'];
|
360
|
$one['title'] = $val['filter_content'];
|
359
|
$one['content'] = $val['reply_content'];
|
361
|
$one['content'] = $val['reply_content'];
|
360
|
- $one['good'] = $val['is_reliable'];
|
|
|
361
|
- $one['bad'] = !$val['is_reliable'];
|
|
|
362
|
- $one['goodNum'] = $val['reliable'];
|
|
|
363
|
- $one['badNum'] = $val['unreliable'];
|
362
|
+ $one['good'] = boolval($val['is_reliable']);
|
|
|
363
|
+ $one['bad'] = !$one['good'];
|
364
|
|
364
|
|
365
|
$result[] = $one;
|
365
|
$result[] = $one;
|
366
|
}
|
366
|
}
|