作者 anyv

5

... ... @@ -529,10 +529,17 @@ class PersonalcenterController extends WeChatBaseController{
$tea_money_income = Db::name('money_income') -> where("indent_id =".$val['id']." and uid = ".$uid) -> select() -> toArray();
$money = 0;
foreach ($tea_money_income as $key2 => $val2){
$money += $val2['money'];
}
$teacher_data[$key]['total_money'] = $money;
$teacher_data[$key]['indent_type'] = $val['indent_type'];
$teacher_data[$key]['create_time'] = $val['create_time'];
$my_res[] = $teacher_data[$key];
}
if(empty($my_res)){
$my_res = null;
}
$this -> assign('my_res',$my_res);
return $this -> fetch();
}
... ...
... ... @@ -38,7 +38,7 @@
<div class="recordNum">佣金+{$vo.total_money}</div>
</li>
</volist>
<volist name="" id="">
<volist name="my_res" id="vo">
<li>
<div class="recordImg">
<img src="{$vo.avatar}" alt="">
... ...
... ... @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController
*/
public function checkWeChatUserLogin()
{
/*$user = Db::name('user')->where('id',5)->find();
/*$user = Db::name('user')->where('id',4)->find();
cmf_update_current_user($user);*/
$userId = cmf_get_current_user_id();
if (empty($userId)) {
... ...