- 新增 invoice_title、showcase、wallet_log 模型及对应语言包 - 新增后台控制器、视图及搜索字段配置 - 修复服务类目删除保护逻辑 - 优化后台登录页面文案及样式 - 新增前端角色切换逻辑及页面拦截 - 新增 SVG 图标及样式变量 - 修复接口权限及下拉框默认值问题
54 行
1.2 KiB
PHP
可执行文件
54 行
1.2 KiB
PHP
可执行文件
<?php
|
|
|
|
namespace app\admin\controller\user;
|
|
|
|
use app\common\controller\Backend;
|
|
|
|
/**
|
|
* 会员组管理
|
|
*
|
|
* @icon fa fa-users
|
|
*/
|
|
class Group extends Backend
|
|
{
|
|
|
|
/**
|
|
* @var \app\admin\model\UserGroup
|
|
*/
|
|
protected $model = null;
|
|
protected $searchFields = 'id,name';
|
|
|
|
public function _initialize()
|
|
{
|
|
parent::_initialize();
|
|
$this->model = model('UserGroup');
|
|
$this->view->assign("statusList", $this->model->getStatusList());
|
|
}
|
|
|
|
public function add()
|
|
{
|
|
if ($this->request->isPost()) {
|
|
$this->token();
|
|
}
|
|
$nodeList = \app\admin\model\UserRule::getTreeList();
|
|
$this->assign("nodeList", $nodeList);
|
|
return parent::add();
|
|
}
|
|
|
|
public function edit($ids = null)
|
|
{
|
|
if ($this->request->isPost()) {
|
|
$this->token();
|
|
}
|
|
$row = $this->model->get($ids);
|
|
if (!$row) {
|
|
$this->error(__('No Results were found'));
|
|
}
|
|
$rules = explode(',', $row['rules']);
|
|
$nodeList = \app\admin\model\UserRule::getTreeList($rules);
|
|
$this->assign("nodeList", $nodeList);
|
|
return parent::edit($ids);
|
|
}
|
|
|
|
}
|