Merge branch 'master' into auth
This commit is contained in:
commit
7d444c044b
2 files changed
+38
-5
No files matched your search
@@ -51,6 +51,16 @@ class Student extends BaseModel
|
||||
,'1' => '男'
|
||||
,'2' => '保密'
|
||||
];
|
||||
|
||||
$str = '';
|
||||
if(isset($sex[$value]))
|
||||
{
|
||||
$str = $sex[$value];
|
||||
}else{
|
||||
$str = '未知';
|
||||
}
|
||||
return $str;
|
||||
|
||||
return $sex[$value];
|
||||
}
|
||||
|
||||
@@ -61,8 +71,17 @@ class Student extends BaseModel
|
||||
$sex = [
|
||||
'0' => '不参加'
|
||||
,'1' => '参加'
|
||||
,'2' => '未知'
|
||||
];
|
||||
|
||||
$str = '';
|
||||
if(isset($sex[$value]))
|
||||
{
|
||||
$str = $sex[$value];
|
||||
}else{
|
||||
$str = '未知';
|
||||
}
|
||||
return $str;
|
||||
|
||||
return $sex[$value];
|
||||
}
|
||||
|
||||
|
||||
@@ -332,16 +332,30 @@ class Teacher extends BaseModel
|
||||
// 性别获取器
|
||||
public function getSexAttr($value)
|
||||
{
|
||||
$sex = array('0' => '女', '1' => '男', '2' => '未知');
|
||||
return $sex[$value];
|
||||
$sex = array('0' => '女', '1' => '男');
|
||||
$str = '';
|
||||
if(isset($sex[$value]))
|
||||
{
|
||||
$str = $sex[$value];
|
||||
}else{
|
||||
$str = '未知';
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
// 退休获取器
|
||||
public function getTuixiuAttr($value)
|
||||
{
|
||||
$sex = array('0' => '否', '1' => '是', '2' => '未知');
|
||||
return $sex[$value];
|
||||
$sex = array('0' => '否', '1' => '是');
|
||||
$str = '';
|
||||
if(isset($sex[$value]))
|
||||
{
|
||||
$str = $sex[$value];
|
||||
}else{
|
||||
$str = '未知';
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user