|  |  |  | 
|---|
|  |  |  | <label class="layui-icon layui-icon-password"></label> | 
|---|
|  |  |  | <input type="password" id="password" name="password" placeholder="请输入登录密码" autocomplete="off" class="layui-input"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div id="code-box" class="layui-form-item"> | 
|---|
|  |  |  | <label class="layui-icon layui-icon-vercode"></label> | 
|---|
|  |  |  | <input type="text" id="code" name="code" placeholder="图形验证码" autocomplete="off" class="layui-input verification captcha"> | 
|---|
|  |  |  | <div class="captcha-img" style="margin-right: 5px"> | 
|---|
|  |  |  | <img id="codeImg" title="看不清?点击换一张。"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!--                <div id="code-box" class="layui-form-item">--> | 
|---|
|  |  |  | <!--                    <label class="layui-icon layui-icon-vercode"></label>--> | 
|---|
|  |  |  | <!--                    <input type="text" id="code" name="code" placeholder="图形验证码" autocomplete="off" class="layui-input verification captcha">--> | 
|---|
|  |  |  | <!--                    <div class="captcha-img" style="margin-right: 5px">--> | 
|---|
|  |  |  | <!--                        <img id="codeImg" title="看不清?点击换一张。">--> | 
|---|
|  |  |  | <!--                    </div>--> | 
|---|
|  |  |  | <!--                </div>--> | 
|---|
|  |  |  | <div class="layui-form-item"> | 
|---|
|  |  |  | <input type="checkbox" id="rememberPwd" value="true" lay-skin="primary" title="记住密码"> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | notice.msg('密码不能为空', {icon: 2}); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (data.code === '' && codeSwitch === 'Y') { | 
|---|
|  |  |  | $("#code").focus(); | 
|---|
|  |  |  | notice.msg('验证码不能为空', {icon: 2}); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (sessionStorage.getItem("code").toUpperCase() !== data.code.toUpperCase() && codeSwitch==='Y'){ | 
|---|
|  |  |  | $("#code").focus(); | 
|---|
|  |  |  | notice.msg('验证码错误', {icon: 2}); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // if (data.code === '' && codeSwitch === 'Y') { | 
|---|
|  |  |  | //     $("#code").focus(); | 
|---|
|  |  |  | //     notice.msg('验证码不能为空', {icon: 2}); | 
|---|
|  |  |  | //     return false; | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | // if (sessionStorage.getItem("code").toUpperCase() !== data.code.toUpperCase() && codeSwitch==='Y'){ | 
|---|
|  |  |  | //     $("#code").focus(); | 
|---|
|  |  |  | //     notice.msg('验证码错误', {icon: 2}); | 
|---|
|  |  |  | //     return false; | 
|---|
|  |  |  | // } | 
|---|
|  |  |  | var user = { | 
|---|
|  |  |  | username: data.username, | 
|---|
|  |  |  | password: hex_md5(data.password) | 
|---|