正在显示
3 个修改的文件
包含
11 行增加
和
4 行删除
@@ -529,10 +529,17 @@ class PersonalcenterController extends WeChatBaseController{ | @@ -529,10 +529,17 @@ class PersonalcenterController extends WeChatBaseController{ | ||
529 | $tea_money_income = Db::name('money_income') -> where("indent_id =".$val['id']." and uid = ".$uid) -> select() -> toArray(); | 529 | $tea_money_income = Db::name('money_income') -> where("indent_id =".$val['id']." and uid = ".$uid) -> select() -> toArray(); |
530 | $money = 0; | 530 | $money = 0; |
531 | foreach ($tea_money_income as $key2 => $val2){ | 531 | foreach ($tea_money_income as $key2 => $val2){ |
532 | - | 532 | + $money += $val2['money']; |
533 | } | 533 | } |
534 | + $teacher_data[$key]['total_money'] = $money; | ||
535 | + $teacher_data[$key]['indent_type'] = $val['indent_type']; | ||
536 | + $teacher_data[$key]['create_time'] = $val['create_time']; | ||
537 | + $my_res[] = $teacher_data[$key]; | ||
534 | } | 538 | } |
535 | - | 539 | + if(empty($my_res)){ |
540 | + $my_res = null; | ||
541 | + } | ||
542 | + $this -> assign('my_res',$my_res); | ||
536 | return $this -> fetch(); | 543 | return $this -> fetch(); |
537 | 544 | ||
538 | } | 545 | } |
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | <div class="recordNum">佣金+{$vo.total_money}</div> | 38 | <div class="recordNum">佣金+{$vo.total_money}</div> |
39 | </li> | 39 | </li> |
40 | </volist> | 40 | </volist> |
41 | - <volist name="" id=""> | 41 | + <volist name="my_res" id="vo"> |
42 | <li> | 42 | <li> |
43 | <div class="recordImg"> | 43 | <div class="recordImg"> |
44 | <img src="{$vo.avatar}" alt=""> | 44 | <img src="{$vo.avatar}" alt=""> |
@@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController | @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController | ||
204 | */ | 204 | */ |
205 | public function checkWeChatUserLogin() | 205 | public function checkWeChatUserLogin() |
206 | { | 206 | { |
207 | - /*$user = Db::name('user')->where('id',5)->find(); | 207 | + /*$user = Db::name('user')->where('id',4)->find(); |
208 | cmf_update_current_user($user);*/ | 208 | cmf_update_current_user($user);*/ |
209 | $userId = cmf_get_current_user_id(); | 209 | $userId = cmf_get_current_user_id(); |
210 | if (empty($userId)) { | 210 | if (empty($userId)) { |
-
请 注册 或 登录 后发表评论