...
|
...
|
@@ -429,6 +429,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
foreach ($money_expend as $key => $val){
|
|
|
$money += $val['money'];
|
|
|
}
|
|
|
$money = number_format($money,2);
|
|
|
if($data){
|
|
|
return $money;
|
|
|
}else{
|
...
|
...
|
@@ -449,7 +450,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
$student = Db::name('my_user') -> alias('a') -> field("a.*,b.user_nickname,b.avatar") -> join("user b","a.uid = b.id",'LEFT') -> where("a.pid",$my_user['id']) -> select() -> toArray();
|
|
|
if(!empty($student)){
|
|
|
foreach ($student as $key => $val){
|
|
|
$student[$key]['indent'] = Db::name('indent') -> where('uid',$val['uid']) -> where("state = 2 or state = 3 or state = 5") -> select() -> toArray();
|
|
|
$student[$key]['indent'] = Db::name('indent') -> where('uid',$val['uid']) -> where("state = 2 or state = 3 or state = 5") -> order("pay_time desc") -> select() -> toArray();
|
|
|
$name = $val['user_nickname'];
|
|
|
$avatar = $val['avatar'];
|
|
|
$cumulative_money = 0;
|
...
|
...
|
@@ -461,10 +462,10 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
foreach ($money_income as $key2 => $val2){
|
|
|
$money += $val2['money'];
|
|
|
}
|
|
|
$student[$key]['indent'][$key1]['total_money'] = $money;
|
|
|
$student[$key]['indent'][$key1]['total_money'] = number_format($money,2);
|
|
|
$cumulative_money += $money;
|
|
|
}
|
|
|
$student[$key]['cumulative_money'] = $cumulative_money;
|
|
|
$student[$key]['cumulative_money'] = number_format($cumulative_money,2);
|
|
|
|
|
|
}
|
|
|
}else{
|
...
|
...
|
@@ -557,7 +558,7 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
$teacher_avatar = Db::name('user') -> where('id',$uid) -> find();
|
|
|
if(!empty($get['startime']) && !empty($get['endtime'])){
|
|
|
$startime = strtotime($get['startime']);
|
|
|
$endtime = strtotime($get['endtime']);
|
|
|
$endtime = strtotime($get['endtime'])+86400;
|
|
|
$teacher = Db::name('indent') -> where('uid',$uid) -> where("pay_time>=".$startime." and pay_time<=".$endtime) -> where("state = 2 or state = 3 or state = 5") -> select() -> toArray();
|
|
|
}else{
|
|
|
$teacher = Db::name('indent') -> where('uid',$uid) -> where("state = 2 or state = 3 or state = 5") -> select() -> toArray();
|
...
|
...
|
@@ -592,8 +593,17 @@ class PersonalcenterController extends WeChatBaseController{ |
|
|
$yewu[] = $val;
|
|
|
}
|
|
|
}
|
|
|
$this -> assign('pingtai',$pingtai);
|
|
|
$this -> assign('yewu',$yewu);
|
|
|
if(empty($pingtai)){
|
|
|
$this -> assign('pingtai',array());
|
|
|
}else{
|
|
|
$this -> assign('pingtai',$pingtai);
|
|
|
}
|
|
|
if(empty($yewu)){
|
|
|
$this -> assign('yewu',array());
|
|
|
}else{
|
|
|
$this -> assign('yewu',$yewu);
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
$this -> assign('pingtai',array());
|
|
|
$this -> assign('yewu',array());
|
...
|
...
|
|