Skip to content

Commit bbe1818

Browse files
authored
Merge pull request #79 from zhoumengkang/master
与上次类似的登录窗口打开的 js 兼容性调整
2 parents 7cdb8ee + 15e9939 commit bbe1818

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

assets/templates/admin/admin_modify_password.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,11 @@
132132
okay: {
133133
text: '关闭',
134134
action: function () {
135-
parent.window.close();
136-
window.open("/login");
135+
if (window.frames.length !== parent.frames.length) {
136+
parent.window.open("/login",'_self');
137+
}else{
138+
window.open("/login",'_self');
139+
}
137140
}
138141
}
139142
}

assets/templates/index/index.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,11 @@
281281
$.cookie('_nav_title_', '');
282282
$.cookie('_login_token_', '');
283283

284-
parent.window.close();
285-
window.open("/login");
284+
if (window.frames.length !== parent.frames.length) {
285+
parent.window.open("/login",'_self');
286+
}else{
287+
window.open("/login",'_self');
288+
}
286289
},
287290
function (response) {
288291
AjaxError(response);

0 commit comments

Comments
 (0)