正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -524,10 +524,9 @@ class PersonalcenterController extends WeChatBaseController{ | @@ -524,10 +524,9 @@ class PersonalcenterController extends WeChatBaseController{ | ||
524 | }else{ | 524 | }else{ |
525 | $data[$key] = Db::name('indent') -> where('uid',$val['uid']) -> where("state = 2 or state = 3 or state = 5") -> select() -> toArray(); | 525 | $data[$key] = Db::name('indent') -> where('uid',$val['uid']) -> where("state = 2 or state = 3 or state = 5") -> select() -> toArray(); |
526 | } | 526 | } |
527 | - | ||
528 | - | ||
529 | $name = $val['user_nickname']; | 527 | $name = $val['user_nickname']; |
530 | $avatar = $val['avatar']; | 528 | $avatar = $val['avatar']; |
529 | + if(count($data[$key])!=0){ | ||
531 | foreach ($data[$key] as $key1 => $val1){ | 530 | foreach ($data[$key] as $key1 => $val1){ |
532 | $book_name = Db::name('indent_goods') -> where("indent_id",$val1['id']) -> find(); | 531 | $book_name = Db::name('indent_goods') -> where("indent_id",$val1['id']) -> find(); |
533 | $data[$key][$key1]['user_name'] = $name; | 532 | $data[$key][$key1]['user_name'] = $name; |
@@ -541,6 +540,7 @@ class PersonalcenterController extends WeChatBaseController{ | @@ -541,6 +540,7 @@ class PersonalcenterController extends WeChatBaseController{ | ||
541 | $data[$key][$key1]['total_money'] = $money; | 540 | $data[$key][$key1]['total_money'] = $money; |
542 | $res[] = $data[$key][$key1]; | 541 | $res[] = $data[$key][$key1]; |
543 | } | 542 | } |
543 | + } | ||
544 | 544 | ||
545 | } | 545 | } |
546 | if(empty($res)){ | 546 | if(empty($res)){ |
-
请 注册 或 登录 后发表评论