186 řádky
7.6 KiB
HTML
186 řádky
7.6 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<title>${context.getContextName()}</title>
|
||
<meta charset="UTF-8">
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||
|
||
${Styles.src(zhiqim.css)}
|
||
${Scripts.src(zhiqim.js)}
|
||
${Scripts.src(jsencrypt.js)}
|
||
${Styles.htmlOverflowHidden()}
|
||
<style>
|
||
body{color:#333;background:#4865e7 url(ztmpl/zhiqim_manager/index_bg_00.jpg) no-repeat top center; background-size:auto 100%;}
|
||
body,table,td,div{font-size:14px;line-height:120%;}
|
||
a,a:visited{color:#333;text-decoration:none;cursor:pointer;}
|
||
a:active,a:hover{color:#1e7eec;text-decoration:none;}
|
||
|
||
.header{width:100%;background:rgba(255,255,255,.3); filter:alpha(opacity=30); height:40px;}
|
||
.footer{position:fixed;bottom:0px; width:100%;height:40px;background:rgba(255,255,255,0.2);line-height:40px;text-align:center;color:#fff;}
|
||
|
||
.login{width:825px; background:rgba(255,255,255,.3); filter:alpha(opacity=30); border-radius:12px; position: absolute; right:7%; top:50%; margin:-180px 0 0 0;}
|
||
input{background:#fff;color:#86BFE9; width:320px; font-size:14px;border:1px solid #3b8edc;border-radius:5px;height:45px;line-height:45px;text-indent:10px;}
|
||
input::-webkit-input-placeholder{color:#86BFE9;}
|
||
.input.verificationCode{letter-spacing:4px;}
|
||
.event-class{float:right; font-size:14px; color:#fff; margin:16px 86px 20px 0;}
|
||
.event-class a{color:#fff;}
|
||
.z-relative{ position: relative;}
|
||
.register{ position: absolute; top:30px; right:58px; color:#ffd200!important; font-size:14px; text-decoration: underline;}
|
||
.z-checkbox{ border:2px solid #fff; border-radius:16px; width:18px; height:18px;}
|
||
</style>
|
||
<script>
|
||
Z.onload(function()
|
||
{//默认焦点
|
||
if (Z.V.isEmpty(Z("#operatorCode").val()))
|
||
Z("#operatorCode").focus();
|
||
else if (Z.V.isEmpty(Z("#operatorPass").val()))
|
||
Z("#operatorPass").focus();
|
||
else if (Z("#verificationCode").length > 0)
|
||
Z("#verificationCode").focus();
|
||
|
||
Z(document).keydown(function(e)
|
||
{
|
||
if (Z.E.key(e) != Z.E.KEY.ENTER)
|
||
return;
|
||
|
||
if (!Z.Dialog.cache.isEmpty())
|
||
return;
|
||
|
||
doLogin();
|
||
});
|
||
});
|
||
|
||
function doRememberCode(rememberCode)
|
||
{//取消记住账号时,同时取消记住密码
|
||
if (!rememberCode.checked)
|
||
{
|
||
Z("#rememberPass")[0].checked = false;
|
||
Z("[data-id=rememberPass]").removeClass("z-active");
|
||
}
|
||
}
|
||
|
||
function doRememberPass(rememberPass)
|
||
{//记住密码时,同时记住账号
|
||
if (rememberPass.checked)
|
||
{
|
||
Z("#rememberCode")[0].checked = true;
|
||
Z("[data-id=rememberCode]").addClass("z-active");
|
||
}
|
||
}
|
||
|
||
function doLogin()
|
||
{//ajax登陆
|
||
var operatorCode = Z("#operatorCode").val();
|
||
if (Z.V.isEmptyBlank(operatorCode))
|
||
{//用户名和密码必填
|
||
Z.failure("用户名不能为空!");
|
||
Z("#operatorCode").focus();
|
||
return;
|
||
}
|
||
|
||
var operatorPass = Z("#operatorPass").val();
|
||
if (Z.V.isEmptyBlank(operatorPass))
|
||
{//用户名和密码必填
|
||
Z.failure("密码不能为空!");
|
||
Z("#operatorPass").focus();
|
||
return;
|
||
}
|
||
|
||
var verificationCode = Z("#verificationCode").val();
|
||
if (Z("#verificationCode").length > 0 && verificationCode.length != 4)
|
||
{//如果有验证码框的时候,要求值必须是4位(数字在输入时控制)
|
||
Z.failure("验证码为4位数字!");
|
||
return;
|
||
}
|
||
|
||
//对密码进行RSA加密
|
||
var publicKey = "${ZmrParamDao.getPublicKey(context)}";
|
||
var encrypt = new JSEncrypt();
|
||
encrypt.setPublicKey(publicKey);
|
||
operatorPass = encrypt.encrypt(operatorPass);
|
||
|
||
var ajax = new Z.Ajax();
|
||
ajax.setContextPath("${context.getContextPath()}");
|
||
ajax.setClassName("ZmrLoginPresenter");
|
||
ajax.setMethodName("doLogin");
|
||
ajax.addParam("operatorCode", operatorCode);
|
||
ajax.addParam("operatorPass", operatorPass);
|
||
ajax.addParam("role", "designer");
|
||
|
||
<#if hasRememberPass>
|
||
if (Z("#rememberPass")[0].checked)
|
||
ajax.addParam("rememberPass", "true");
|
||
</#if>
|
||
<#if hasRememberCode>
|
||
if (Z("#rememberCode")[0].checked)
|
||
ajax.addParam("rememberCode", "true");
|
||
</#if>
|
||
|
||
ajax.addParam("verificationCode", verificationCode);
|
||
ajax.setFailureAlert();
|
||
ajax.setSuccess(function(){window.location.href= this.responseText;});
|
||
ajax.execute();
|
||
}
|
||
</script>
|
||
</head>
|
||
|
||
<body>
|
||
<#-- 主题变量和函数定义 -->
|
||
<#include "/ztmpl/zhiqim_manager/"+themeIndex+"/define.htm"/>
|
||
|
||
${Htmls.toCallFrame()}
|
||
<div class="header">
|
||
<div class="z-float-left z-w400 z-lh40 z-pd-l10 z-color-white">欢迎登录 [ ${context.getContextName()} ]!</div>
|
||
<div class="z-float-right z-text-right z-w200 z-lh40 z-pd-r10"></div>
|
||
</div>
|
||
<div class="login" style="height:<#if hasVerificationCode && hasRememberCode>410<#elseif hasVerificationCode>360<#elseif hasRememberCode>360<#else>300</#if>px">
|
||
<table class="z-table z-h100p">
|
||
<tr>
|
||
<td width="50%" class="z-text-center"><img src="ztmpl/zhiqim_manager/designLogo.png"></td>
|
||
<td width="50%" valign="top" rowspan="2" class="z-relative">
|
||
<input type="text" class="z-hidden-fixed"/>
|
||
<input type="password" class="z-hidden-fixed"/>
|
||
<a class="register" href='/reg.htm'>注册设计师</a>
|
||
<table class="z-table z-mg-l30 z-h70-tr z-pd5 z-color-white">
|
||
<tr>
|
||
<td class="z-px20 z-mg-t10">用户登录</td>
|
||
</tr>
|
||
<tr>
|
||
<td><input id="operatorCode" class="input" placeholder="用户名/手机号" value="#{operatorCode}" maxlength="16" spellcheck="false" autocomplete="off"></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input id="operatorPass" type="password" class="input" placeholder="密码" value="#{operatorPass}" maxlength="16" spellcheck="false" autocomplete="off"></td>
|
||
</tr>
|
||
<#if hasVerificationCode>
|
||
<tr>
|
||
<td>
|
||
<input id="verificationCode" class="z-w200 input verificationCode" placeholder="验证码" data-options="type:Numeric;paste:true;" maxlength="4" spellcheck="false" autocomplete="off">
|
||
<img class="z-pointer z-bd-rd5 z-mg-t-8" title="点击刷新验证码" onclick="this.src='service/vcode.jpg?bgColor=%231299ec&width=95&height=42&fontSize=20&yawp=true&t='+new Date().getTime();" src="service/vcode.jpg?bgColor=%231299ec&width=95&height=42&fontSize=20&yawp=true&t=${DateTimes.getDateTime17String()}">
|
||
</td>
|
||
</tr>
|
||
</#if>
|
||
<#if hasRememberCode>
|
||
<tr class="zi-h40">
|
||
<td class="z-px16" style="font-size:14px;">
|
||
<input id="rememberCode" style="width:30px;" type="checkbox" data-role="z-checkbox" data-class="z-mg-r10 ${zmr_color_class}" onclick="doRememberCode(this);" <#if Validates.isNotEmpty(operatorCode)>checked</#if>>记住用户名
|
||
<#if hasRememberPass>
|
||
|
||
<input id="rememberPass" style='margin:0 0 0 70px;width:30px;' type="checkbox" data-role="z-checkbox" data-class="z-mg-r10 ${zmr_color_class}" onclick="doRememberPass(this);" <#if Validates.isNotEmpty(operatorPass)>checked</#if>/>记住密码
|
||
</#if>
|
||
</td>
|
||
</tr>
|
||
</#if>
|
||
<tr>
|
||
<td><button style="width:320px; border-radius:5px;" class="z-button z-h50 zi-px20 ${zmr_color_class}" onclick="doLogin()">登 录</button>
|
||
<div class="event-class"><a href='/resetPassword.htm'>忘记密码</a></div>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
<div class="footer">Copyright © 2023 领淘众创 All Rights Reserved <a href="https://beian.miit.gov.cn/" style="color: white" target="_blank">备案号:闽ICP备2023014112号-1 </a></div>
|
||
</body>
|
||
</html>
|