6
0
Fork 0

admin user

release
panliang 2022-05-20 11:13:12 +08:00
parent 4ef6cf2382
commit ac998c036c
3 changed files with 15 additions and 11 deletions

View File

@ -4,10 +4,14 @@
- php >= 8.0 - php >= 8.0
## Step ## Step
- `composer install` - `composer install`
- `cp .env.example .env`, 并修改配置文件 - `cp .env.example .env`, 并修改配置文件
- `php artisan migrate --seed` - `php artisan migrate --seed`
- `php artisan storage:link` - `php artisan storage:link`
### 定时任务
- 自动取消未支付的订单: `php artisan order:close-expired`, 常驻内存执行(死循环)
- 自动完成待收货的订单: `php artisan order:complete`, 常驻内存执行(死循环)

View File

@ -53,9 +53,9 @@ class UserController extends AdminController
}); });
}); });
$grid->column('phone')->copyable(); $grid->column('phone')->copyable();
$grid->column('user_info.code')->copyable(); $grid->column('userInfo.code')->copyable();
$grid->column('user_info.inviterInfo.user.phone')->copyable(); $grid->column('userInfo.inviterInfo.user.phone')->copyable();
$grid->column('user_info.growth_value')->filter( $grid->column('userInfo.growth_value')->filter(
Grid\Column\Filter\Between::make() Grid\Column\Filter\Between::make()
)->modal(function ($modal) { )->modal(function ($modal) {
$modal->title('成长值'); $modal->title('成长值');
@ -81,7 +81,7 @@ class UserController extends AdminController
// PriceBetween::make() // PriceBetween::make()
// ); // );
$grid->column('user_info.is_company')->bool(); $grid->column('userInfo.is_company', '员工')->bool();
$grid->column('created_at')->sortable(); $grid->column('created_at')->sortable();
$grid->column('status')->using([-1=>'冻结', 1=>'正常', 2=>'禁用']) $grid->column('status')->using([-1=>'冻结', 1=>'正常', 2=>'禁用'])
->dot([ ->dot([
@ -157,14 +157,14 @@ class UserController extends AdminController
return $this->agent ? $this->agent->name . '(' .$this->agent->ratio. '%)' : ''; return $this->agent ? $this->agent->name . '(' .$this->agent->ratio. '%)' : '';
})->badge(); })->badge();
$show->width(6)->field('phone'); $show->width(6)->field('phone');
$show->field('user_info.inviter_info.user.phone'); $show->field('user_info.inviter_info.user.phone', '邀请人');
// $show->field('userInfo.nickname'); // $show->field('userInfo.nickname');
// $show->field('userInfo.gender')->using(UserInfo::$genderTexts)->label(); // $show->field('userInfo.gender')->using(UserInfo::$genderTexts)->label();
// $show->field('userInfo.birthday'); // $show->field('userInfo.birthday');
$show->field('user_info.growth_value'); $show->field('user_info.growth_value', '成长值');
$show->field('profit'); $show->field('profit');
$show->field('user_info.is_company')->as(function ($v) { $show->field('inviter_info.is_company', '员工')->as(function ($v) {
return $v ? '是' : '否'; return $v ? '是' : '否';
}); });
$show->field('vip_expired'); $show->field('vip_expired');

View File

@ -17,7 +17,7 @@ return [
'register_ip' => '注册IP', 'register_ip' => '注册IP',
'created_at' => '注册时间', 'created_at' => '注册时间',
'agent' => '代理', 'agent' => '代理',
'user_info'=>[ 'userInfo'=>[
'code' => '邀请码', 'code' => '邀请码',
'avatar' => '头像', 'avatar' => '头像',
'nickname' => '昵称', 'nickname' => '昵称',
@ -25,7 +25,7 @@ return [
'points'=>'积分', 'points'=>'积分',
'gender'=>'性别', 'gender'=>'性别',
'birthday'=>'生日', 'birthday'=>'生日',
'inviter_info'=>[ 'inviterInfo'=>[
'user'=>[ 'user'=>[
'phone' =>'推荐人', 'phone' =>'推荐人',
], ],