|
@@ -132,7 +132,8 @@ class Loan extends Base {
|
|
|
public function userInfo(){
|
|
|
$uid = $this->uid;
|
|
|
$user_info = Db::table('dx_user')->field('id,realname,phone,score,id_code,is_manage')->where(['id'=>$uid])->find();
|
|
|
- $quota = Db::table('dx_loan')->where(['uid'=>$uid])->where('status','=','0,2')->order('id desc')->value('quota');
|
|
|
+ //$quota = Db::table('dx_loan')->where(['uid'=>$uid])->where('status','=','0,2')->order('id desc')->value('quota');
|
|
|
+ $quota = Db::table('dx_loan')->where(['uid'=>$uid,'status'=>1])->sum('quota');
|
|
|
if (!empty($quota)){
|
|
|
$user_info['quota'] = $quota;
|
|
|
}else{
|