Commit 5ca64ea3 authored by rlgy's avatar rlgy

添加角色 上一个人的缓存清除

parent 7701f633
......@@ -8,6 +8,7 @@ use Yii;
/**
* 后台用户控制器
*
* @author libingle
*/
class AdminController extends BaseController
......@@ -43,6 +44,7 @@ class AdminController extends BaseController
if (Yii::$app->request->isPost) {
/* 表单验证 */
$data = Yii::$app->request->post('Admin');
$data = array_map('trim', $data);
$data['reg_time'] = time();
$data['reg_ip'] = ip2long(Yii::$app->request->getUserIP());
$data['last_login_time'] = 0;
......
......@@ -14,19 +14,21 @@ use common\core\ActiveForm;
]); ?>
<?= $form->field($model, 'username')->iconTextInput([
'class' => 'form-control c-md-2',
'iconPos' => 'left',
'iconClass' => 'icon-user',
'placeholder' => '登录账号',
// 'readonly' =>'readonly',
'class' => 'form-control c-md-2',
'iconPos' => 'left',
'iconClass' => 'icon-user',
'placeholder' => '登录账号',
'value' => ' ',
'autocomplete' => 'off',
])->label(false) ?>
<?= $form->field($model, 'password')->iconTextInput([
'type' => 'password',
'class' => 'form-control c-md-2',
'iconPos' => 'left',
'iconClass' => 'icon-lock',
'placeholder' => '修改时,密码不变可不填'
'type' => 'password',
'class' => 'form-control c-md-2',
'iconPos' => 'left',
'iconClass' => 'icon-lock',
'value' => '',
'placeholder' => '修改时,密码不变可不填',
'autocomplete' => 'off',
])->label(false) ?>
<input type="hidden" value="<?= $role ?>" name="role">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment