__('Status 11')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getAvatarAttr($value, $data) { //获取头像 $user = User::get($data['user_id']); return empty($user)?'':$user['avatar']; } public function getUsernameAttr($value, $data) { //获取头像 $user = User::get($data['user_id']); return empty($user)?'用户已注销':$user['nickname']; } }