作者 anyv

6

@@ -369,7 +369,7 @@ class PersonalcenterController extends WeChatBaseController{ @@ -369,7 +369,7 @@ class PersonalcenterController extends WeChatBaseController{
369 $this -> assign('money_ratio',$money_ratio); 369 $this -> assign('money_ratio',$money_ratio);
370 $this -> assign('balance',$balance['balance']); 370 $this -> assign('balance',$balance['balance']);
371 $this -> assign('cumulative_money',$cumulative_money); 371 $this -> assign('cumulative_money',$cumulative_money);
372 - $money_expend = Db::name('money_expend') -> where('uid',$uid) -> select(); 372 + $money_expend = Db::name('money_expend') -> where('uid='.$uid." and state=0") -> select();
373 $money = 0; 373 $money = 0;
374 foreach ($money_expend as $key => $val){ 374 foreach ($money_expend as $key => $val){
375 $money += $val['money']; 375 $money += $val['money'];
@@ -388,7 +388,7 @@ class PersonalcenterController extends WeChatBaseController{ @@ -388,7 +388,7 @@ class PersonalcenterController extends WeChatBaseController{
388 $_POST['create_time'] = time(); 388 $_POST['create_time'] = time();
389 $_POST['state'] = 0; 389 $_POST['state'] = 0;
390 $data = Db::name('money_expend') -> insert($_POST); 390 $data = Db::name('money_expend') -> insert($_POST);
391 - $money_expend = Db::name('money_expend') -> where('uid',$_POST['uid']) -> select(); 391 + $money_expend = Db::name('money_expend') -> where('uid='.$_POST['uid']." and state=0") -> select();
392 $money = 0; 392 $money = 0;
393 foreach ($money_expend as $key => $val){ 393 foreach ($money_expend as $key => $val){
394 $money += $val['money']; 394 $money += $val['money'];