<div style="margin: 50px auto; width: 70%; padding-bottom: 20px;">
<h2 style="font-size: 20px; margin: 20px auto; text-align: center;">用户登录</h2>
<form class="layui-form" method="post" id="login_form">    
  <div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-block"><input class="layui-input" type="text" name="username" autocomplete="off" placeholder="请输入"></div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-block"><input class="layui-input" type="password" name="password" autocomplete="off" placeholder="请输入" maxlength="30"></div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">验证码</label>
    <div class="layui-input-block">
    <img id="verifyimage" src="/verifycode/index" style="cursor: pointer; float: left; margin-top: 8px;" title="点击刷新" onclick="javascript:this.src='/verifycode/index?rnum='+ Math.random();">
    <input class="layui-input" type="text" name="verifycode" autocomplete="off" placeholder="请输入" maxlength="10" style="float: left; width: 100px; margin-left: 20px;"></div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
    <button class="layui-btn" id="login_submit">提交</button>
    <button class="layui-btn layui-btn-primary" type="reset">重置</button>
    <?php if($config->isregist==1){ ?>
    <a style="margin-left: 20px;" href="<?php echo Yii::$app->params["regist_url"]; ?>">没有账号？立即注册</a>
    <?php } ?>
    </div>
  </div>

  <input type="hidden" name="_csrf" value="<?php echo Yii::$app->request->getCsrfToken(); ?>">
</form>

</div>

<script src="/public/modules/control/login/index.js"></script>