指定社区等级

main
limu 1 year ago
parent 2cfe01b70d
commit 43328c66b0
  1. 11
      app/common/repositories/user/UserRepository.php
  2. 7
      app/controller/admin/user/User.php
  3. 3
      route/admin/user.php

@ -150,6 +150,17 @@ class UserRepository extends BaseRepository
}
return $options;
}),
Elm::select('community_level', '社区等级')->options(function () {
$data = config('partner.community_level');
$options = [['value' => 0, 'label' => '请选择']];
foreach ($data as $value => $label) {
$value = $label['id'];
$label = $label['alias'];
$options[] = compact('value', 'label');
}
return $options;
}),
Elm::selectMultiple('label_id', '用户标签')->options(function () {
$data = app()->make(UserLabelRepository::class)->allOptions();

@ -205,7 +205,7 @@ class User extends BaseController
'brand_integral',
'all_value',
'community_level',
'birthday', 'card_id', 'addres', 'mark', 'group_id', ['label_id', []], ['is_promoter', 0], ['status', 0]]);
$validate->check($data);
if (!$this->repository->exists($id))
@ -625,4 +625,9 @@ class User extends BaseController
return app('json')->success('修改成功');
}
public function communityList()
{
return app('json')->success(config('partner.community_level'));
}
}

@ -195,6 +195,9 @@ Route::group(function () {
Route::post('partner/:id', '/changePartner')->name('systemUserChangePartner')->option([
'_alias' => '用户合作人角色编辑',
]);
Route::get('community', '/communityList')->name('systemUsercCommunity')->option([
'_alias' => '用户社区等级设置',
]);
})->prefix('admin.user.User')->option([

Loading…
Cancel
Save