6
0
Fork 0

调整用户详情

release
vine_liutk 2022-01-05 11:57:18 +08:00
parent 0a8f3317ed
commit a99be4c478
3 changed files with 10 additions and 0 deletions

View File

@ -148,6 +148,8 @@ class UserController extends AdminController
$show->field('id');
$show->field('phone');
$show->field('user_info.nickname');
$show->field('user_info.gender')->using(UserInfo::$genderTexts)->label();
$show->field('user_info.birthday');
$show->field('user_info.agent_level')->as(function ($value) {
return $this->userInfo?->agent_level_name??'未知';
})->label();

View File

@ -102,6 +102,12 @@ class UserInfo extends Model
self::AGENT_LEVEL_DIRECTOR => 'director',
];
public static $genderTexts = [
self::GENDER_UNKNOWN => '未知',
self::GENDER_MALE => '男性',
self::GENDER_FEMALE => '女性',
];
/**
* 代理等级文本
*

View File

@ -42,6 +42,8 @@ return [
'points'=>'积分',
'quota_v2'=>'新配额',
'quota_v1'=>'老配额',
'gender'=>'性别',
'birthday'=>'生日',
'inviter_info'=>[
'user'=>[
'phone' =>'推荐人手机',