...
|
...
|
@@ -77,32 +77,58 @@ class VolunteerModel extends Model |
|
|
$userInfo['study_time']=$user['study_time'];
|
|
|
$userInfo['use_time']=$user['use_time']??0;
|
|
|
$userInfo['level_time']=$user['work_time']-$user['use_time'];
|
|
|
if ($user['status']==2){
|
|
|
if ($user['study_time']>=5 && $user['work_time']>10){
|
|
|
$userInfo['status']='志愿者';
|
|
|
$userInfo['user_num']=$userId.$user['create_time'];
|
|
|
}
|
|
|
$userInfo['status']=$this->getUserState($user['status'],$user['stage']);
|
|
|
// if ($user['status']==2){
|
|
|
// if ($user['study_time']>=5 && $user['work_time']>10){
|
|
|
// $userInfo['status']='志愿者';
|
|
|
// $userInfo['user_num']=$userId.$user['create_time'];
|
|
|
// }
|
|
|
//
|
|
|
// if ($user['study_time']<5){
|
|
|
// $userInfo['status']='志愿者(待学习)';
|
|
|
// $userInfo['user_num']='';
|
|
|
// }
|
|
|
//
|
|
|
// if ($user['study_time']>=5 && $user['work_time']<10){
|
|
|
// $userInfo['status']='志愿者(待实习)';
|
|
|
// $userInfo['user_num']='';
|
|
|
// }
|
|
|
// }else{
|
|
|
// $userInfo['status']='非志愿者';
|
|
|
// $userInfo['user_num']='';
|
|
|
// }
|
|
|
|
|
|
if ($user['study_time']<5){
|
|
|
$userInfo['status']='志愿者(待学习)';
|
|
|
$userInfo['user_num']='';
|
|
|
}
|
|
|
return $userInfo;
|
|
|
|
|
|
if ($user['study_time']>=5 && $user['work_time']<10){
|
|
|
$userInfo['status']='志愿者(待实习)';
|
|
|
$userInfo['user_num']='';
|
|
|
}
|
|
|
|
|
|
public function getUserState($status,$stage){
|
|
|
$name='';
|
|
|
if ($status==2){
|
|
|
switch ($stage){
|
|
|
|
|
|
case 1:
|
|
|
$name='志愿者(待学习)';
|
|
|
break;
|
|
|
case 2:
|
|
|
$name='志愿者(待实习)';
|
|
|
break;
|
|
|
case 3:
|
|
|
$name='志愿者';
|
|
|
break;
|
|
|
default:
|
|
|
$name='';
|
|
|
break;
|
|
|
}
|
|
|
}else{
|
|
|
$userInfo['status']='非志愿者';
|
|
|
$userInfo['user_num']='';
|
|
|
$name='非志愿者';
|
|
|
}
|
|
|
return $name;
|
|
|
}
|
|
|
|
|
|
|
|
|
return $userInfo;
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
/*
|
|
|
* 获取用户状态
|
|
|
* @param $userId
|
|
|
* @return mixed
|
...
|
...
|
@@ -122,27 +148,46 @@ class VolunteerModel extends Model |
|
|
$return['remark']='审核中';
|
|
|
}
|
|
|
if ($user['status']==2){
|
|
|
if ($user['study_time']>=5 && $user['work_time']>10){
|
|
|
$userInfo['status']='志愿者';
|
|
|
$userInfo['user_num']=$userId.$user['create_time'];
|
|
|
$return['code']=4;
|
|
|
$return['remark']='志愿者';
|
|
|
}
|
|
|
|
|
|
if ($user['study_time']<5){
|
|
|
$userInfo['status']='志愿者(待学习)';
|
|
|
$userInfo['user_num']='';
|
|
|
$return['code']=2;
|
|
|
$return['remark']='志愿者(待学习)';
|
|
|
}
|
|
|
|
|
|
if ($user['study_time']>=5 && $user['work_time']<10){
|
|
|
$userInfo['status']='志愿者(待实习)';
|
|
|
$userInfo['user_num']='';
|
|
|
|
|
|
$return['code']=3;
|
|
|
$return['remark']='志愿者(待实习)';
|
|
|
switch ($user['stage']){
|
|
|
case 1:
|
|
|
$return['code']=2;
|
|
|
$return['remark']='志愿者(待学习)';
|
|
|
break;
|
|
|
case 2:
|
|
|
$return['code']=3;
|
|
|
$return['remark']='志愿者(待实习)';
|
|
|
break;
|
|
|
case 3:
|
|
|
$return['code']=4;
|
|
|
$return['remark']='志愿者';
|
|
|
break;
|
|
|
default:
|
|
|
$return['code']='';
|
|
|
$return['remark']='';
|
|
|
break;
|
|
|
}
|
|
|
// $this->getUserStage()
|
|
|
// if ($user['study_time']>=5 && $user['work_time']>10){
|
|
|
// $userInfo['status']='志愿者';
|
|
|
// $userInfo['user_num']=$userId.$user['create_time'];
|
|
|
// $return['code']=4;
|
|
|
// $return['remark']='志愿者';
|
|
|
// }
|
|
|
//
|
|
|
// if ($user['study_time']<5){
|
|
|
// $userInfo['status']='志愿者(待学习)';
|
|
|
// $userInfo['user_num']='';
|
|
|
// $return['code']=2;
|
|
|
// $return['remark']='志愿者(待学习)';
|
|
|
// }
|
|
|
//
|
|
|
// if ($user['study_time']>=5 && $user['work_time']<10){
|
|
|
// $userInfo['status']='志愿者(待实习)';
|
|
|
// $userInfo['user_num']='';
|
|
|
//
|
|
|
// $return['code']=3;
|
|
|
// $return['remark']='志愿者(待实习)';
|
|
|
// }
|
|
|
}
|
|
|
if ($user['status']==3){
|
|
|
$return['code']=-1;
|
...
|
...
|
|