Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repair_login_enterkey #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions themes/pc/admin/system/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h2>RhaPHP · 二哈微信平台管理系统</h2>

<script>

layui.use('form', function () {
layui.use(['form','layer'], function () {
(function () {
var isIE = function () {
var U = navigator.userAgent,
Expand All @@ -83,7 +83,23 @@ <h2>RhaPHP · 二哈微信平台管理系统</h2>
location.href = "{:url('mp/Mp/index')}";
});
} else {
layer.alert(obj.msg);
layer.open({
title: '提示'
,content: obj.msg
,btn: ['确认',]
,success: function(layero, index){
this.enterEsc = function(event){
if(event.keyCode === 13){
layer.close(index);
return false; //阻止系统默认回车事件
}
};
$(document).on('keydown', this.enterEsc); //监听键盘事件,关闭层
}
,end: function(){
$(document).off('keydown', this.enterEsc); //解除键盘关闭事件
}
});
}
},
"json"
Expand Down