|
@@ -51,16 +51,17 @@ class UserController extends AdminController
|
|
|
protected function detail($id)
|
|
protected function detail($id)
|
|
|
{
|
|
{
|
|
|
return Show::make($id, new User(), function (Show $show) {
|
|
return Show::make($id, new User(), function (Show $show) {
|
|
|
|
|
+ $show->model()->with('parent');
|
|
|
$show->field('id');
|
|
$show->field('id');
|
|
|
$show->field('nickname');
|
|
$show->field('nickname');
|
|
|
- $show->field('openid');
|
|
|
|
|
- $show->field('heade_img');
|
|
|
|
|
- $show->field('parenid');
|
|
|
|
|
|
|
+ $show->field('head_img','头像')->image();
|
|
|
|
|
+ $show->parent_id()->as(function ($parent_id) {
|
|
|
|
|
+ return $this->parent?$this->parent->nickname:'无';
|
|
|
|
|
+ });
|
|
|
$show->field('phone_num');
|
|
$show->field('phone_num');
|
|
|
$show->field('income');
|
|
$show->field('income');
|
|
|
- $show->field('is_vip');
|
|
|
|
|
- $show->field('share_qrcode');
|
|
|
|
|
- $show->field('scene_code');
|
|
|
|
|
|
|
+ $show->field('is_vip')->using([0=>'否',1=>'是']);
|
|
|
|
|
+ $show->field('share_qrcode','推广码')->image();
|
|
|
$show->field('become_vip_at');
|
|
$show->field('become_vip_at');
|
|
|
$show->field('become_child_at');
|
|
$show->field('become_child_at');
|
|
|
$show->field('created_at');
|
|
$show->field('created_at');
|