diff --git a/app/common/repositories/user/UserRepository.php b/app/common/repositories/user/UserRepository.php index 8b786b1..6e4ff32 100644 --- a/app/common/repositories/user/UserRepository.php +++ b/app/common/repositories/user/UserRepository.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(); diff --git a/app/controller/admin/user/User.php b/app/controller/admin/user/User.php index da9d8ca..5ba791f 100644 --- a/app/controller/admin/user/User.php +++ b/app/controller/admin/user/User.php @@ -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')); + } } diff --git a/route/admin/user.php b/route/admin/user.php index ebfdd35..b2adf71 100644 --- a/route/admin/user.php +++ b/route/admin/user.php @@ -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([