登录页面提示信息国际化

This commit is contained in:
zhanghongqing
2018-03-07 17:35:15 +08:00
parent c48bdc9afe
commit 28d1d2676b
3 changed files with 9 additions and 3 deletions

View File

@@ -128,8 +128,8 @@
captcha: {remote: "${pageContext.request.contextPath}/validateCode"}
},
messages: {
username: {required: "请填写用户名..."},password: {required: "请填写密码..."},
captcha: {remote: "验证码不正确...", required: "请填写验证码..."}
username: {required: '<spring:message code="fill_loginName"/>...'},password: {required: '<spring:message code="fill_loginPassWord"/>...'},
captcha: {remote: '<spring:message code="captcha_error"/>...', required: '<spring:message code="enter_captcha"/>...'}
},
errorLabelContainer: "#messageBox",
errorPlacement: function(error, element) {
@@ -139,7 +139,7 @@
// 如果在框架或在对话框中,则弹出提示并跳转到首页
if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0){
alert('未登录或登录超时。请重新登录,谢谢!');
alert("<spring:message code='login_timeout'/>");
top.location = "${pageContext.request.contextPath }";
}