Browse Source

店铺账号查看详情

master
liangyuyan 5 years ago
parent
commit
3543062c25
  1. 30
      app/Admin/Controllers/v3/StoreUserController.php

30
app/Admin/Controllers/v3/StoreUserController.php

@ -71,16 +71,32 @@ class StoreUserController extends AdminController
{
return Show::make($id, new StoreUser(), function (Show $show) {
$show->field('id');
$show->field('store_id');
$show->field('store_id')->as(function($storeId){
$item = StoreModel::getStoreInfo($storeId,'name');
return empty($item)?'':$item['name'];
});
$show->field('username');
$show->field('user_category');
$show->field('register_type');
$show->field('status');
$show->field('user_category')->as(function($userCategory){
$item = StoreUserModel::$_USER_CATEGORY;
return isset($item[$userCategory])?$item[$userCategory]:'';
});
$show->field('register_type')->as(function($registerType){
$item = StoreUserModel::$_REGISTER_TYPE;
return isset($item[$registerType])?$item[$registerType]:'';
});
$show->field('status')->as(function($status){
$item = StoreUserModel::$_STATUS;
return isset($item[$status])?$item[$status]:'';
});
$show->field('join_ip');
$show->field('last_visit_time');
$show->field('last_visit_time_text');
$show->field('last_ip');
$show->field('created_at');
$show->field('updated_at');
$show->field('created_at')->as(function($createdAt){
return date('Y-m-d H:i:s', $createdAt);
});
$show->field('updated_at')->as(function($updatedAt){
return date('Y-m-d H:i:s', $updatedAt);
});
});
}

Loading…
Cancel
Save